AJSVC_ServiceStatus EventsAndActionsMessageProcessor(AJ_BusAttachment* busAttachment, AJ_Message* msg, AJ_Status* msgStatus)
{
    AJ_Message reply;
    AJSVC_ServiceStatus serviceStatus = AJSVC_SERVICE_STATUS_HANDLED;

    switch (msg->msgId) {
    case EVENTSANDACTIONS_GET_PROP:
        *msgStatus = AJ_BusPropGet(msg, EventsAndActionsPropGetHandler, NULL);
        break;

    case EVENTSANDACTIONS_SET_PROP:
        *msgStatus = AJ_BusPropSet(msg, EventsAndActionsPropSetHandler, NULL);
        break;

    case ACTIONS_SETMODETOAUTO:
    case ACTIONS_SETMODETOCOOL:
    case ACTIONS_SETMODETOHEAT:
    case ACTIONS_SETMODETOFAN:
    case ACTIONS_SETMODETOOFF:
        AJ_MarshalReplyMsg(msg, &reply);
        setCurrentMode((msg->msgId & 0xFF) - (ACTIONS_SETMODETOAUTO & 0xFF));
        *msgStatus = AJ_DeliverMsg(&reply);
        break;

    default:
        serviceStatus = AJSVC_SERVICE_STATUS_NOT_HANDLED;
        break;
    }

    return serviceStatus;
}
Пример #2
0
/*
 ================================================================================
 Function : CC1101SetTRMode( )
 Set the device as TX mode or RX mode
 INPUT    : mode selection
 OUTPUT   : None
 ================================================================================
 */
void CC1101SetTRMode(TRMODE mode) {
	if (mode == TX_MODE) {
		CC1101WriteReg(CC1101_IOCFG0, 0x46);
		CC1101WriteCmd( CC1101_STX);
	} else if (mode == RX_MODE) {
		CC1101WriteReg(CC1101_IOCFG0, 0x46);
		CC1101WriteCmd( CC1101_SRX);
	}
	setCurrentMode(mode);
}
Пример #3
0
BOOL
LLMediaImplGStreamer::
stop ()
{
	llinfos << "stopping media..." << llendl;
	// todo: error-check this?
	llgst_element_set_state(mPlaybin, GST_STATE_READY);

	BOOL rtn = LLMediaMovieBase::stop();
	setCurrentMode(LLMediaImplGStreamer::ModeStopped);//?
	return rtn;
}
Пример #4
0
void MainApplication::attachPlayer(void)
{
    createDefaultPlayerMode();

    if(getCurrentMode() != NULL && getCurrentMode() != getPlayerMode())
    {
        getCurrentMode()->stop();
        getCurrentMode()->dettachApplication();
    }

    getPlayerMode()->attachApplication();
    setCurrentMode(getPlayerMode());

    getCurrentMode()->start();
}
Пример #5
0
void MainApplication::attachStartScreen(void)
{
    createDefaultStartScreenMode();

    if(getCurrentMode() != NULL && getCurrentMode() != getStartScreenMode())
    {
        getCurrentMode()->stop();
        getCurrentMode()->dettachApplication();
    }

    getStartScreenMode()->attachApplication();
    setCurrentMode(getStartScreenMode());

    getCurrentMode()->start();
}
void QInteractorStyleSurfaceCenterLineVBDUboguStandard::SetCustomEnabled(bool flag)
{
	InteractorStyleSurfaceCenterLineSimpleClipping::SetCustomEnabled(flag);
	setCurrentMode(m_currentMode);
}