本文整理汇总了C++中TaoMessage::setArgList方法的典型用法代码示例。如果您正苦于以下问题:C++ TaoMessage::setArgList方法的具体用法?C++ TaoMessage::setArgList怎么用?C++ TaoMessage::setArgList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TaoMessage
的用法示例。
在下文中一共展示了TaoMessage::setArgList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getExtSpeakerNominalVolume
TaoStatus TaoPhoneComponentAdaptor::getExtSpeakerNominalVolume(TaoMessage& rMsg)
{
int volume = 0;
int groupType = atoi(rMsg.getArgList());
mpPhoneTask->taoGetNominalVolume(volume, groupType);
if (volume > 10)
volume = 10;
if (volume < 0)
volume = 0;
char buff[MAXIMUM_INTEGER_STRING_LENGTH];
sprintf(buff, "%d", volume);
rMsg.setMsgSubType(TaoMessage::RESPONSE_PHONECOMPONENT);
rMsg.setArgCnt(1);
rMsg.setArgList(buff);
if (mpSvrTransport->postMessage(rMsg))
{
return TAO_SUCCESS;
}
return TAO_FAILURE;
}
示例2: getDisplayContrast
TaoStatus TaoPhoneComponentAdaptor::getDisplayContrast(TaoMessage& rMsg)
{
int argCnt = rMsg.getArgCnt();
if (argCnt != 1)
return TAO_FAILURE;
#ifdef _VXWORKS
int nominal = 0;
if (OS_SUCCESS == MpCodec_getLCDContrastRange(mLCDLow, mLCDHigh, nominal))
{
mLCDContrast = MpCodec_getLCDContrast();
mLCDOffset = mLCDLow - 1;
osPrintf("--- get LCD contrast level %d ---\n", mLCDContrast);
}
UtlString arg;
char buff[MAXIMUM_INTEGER_STRING_LENGTH];
int level = mLCDContrast - mLCDOffset;
if (level < 1)
level = 1;
sprintf(buff, "%d", level);
arg = buff + TAOMESSAGE_DELIMITER;
sprintf(buff, "%d", 1);
arg += buff + TAOMESSAGE_DELIMITER;
sprintf(buff, "%d", (mLCDHigh - mLCDOffset));
arg += buff + TAOMESSAGE_DELIMITER;
sprintf(buff, "%d", (nominal - mLCDOffset));
arg += buff;
rMsg.setMsgSubType(TaoMessage::RESPONSE_PHONECOMPONENT);
rMsg.setArgCnt(4);
rMsg.setArgList(arg.data());
if (mpSvrTransport->postMessage(rMsg))
return TAO_SUCCESS;
#endif
return TAO_FAILURE;
}
示例3: getRingerVolume
TaoStatus TaoPhoneComponentAdaptor::getRingerVolume(TaoMessage& rMsg)
{
int volume = 0;
mpPhoneTask->taoGetVolume(volume, PtComponentGroup::RINGER);
char buff[MAXIMUM_INTEGER_STRING_LENGTH];
sprintf(buff, "%d", volume);
rMsg.setMsgSubType(TaoMessage::RESPONSE_PHONECOMPONENT);
rMsg.setArgCnt(1);
rMsg.setArgList(buff);
if (mpSvrTransport->postMessage(rMsg))
{
return TAO_SUCCESS;
}
return TAO_FAILURE;
}
示例4: getMicGain
TaoStatus TaoPhoneComponentAdaptor::getMicGain(TaoMessage& rMsg)
{
if (rMsg.getArgCnt() != 1)
return TAO_FAILURE;
UtlString arg = rMsg.getArgList();
int groupType = atoi(arg.data());
int gain = mpPhoneTask->taoGetMicGain(groupType);
char buf[32];
sprintf(buf, "%d", gain);
arg += TAOMESSAGE_DELIMITER + buf;
rMsg.setArgCnt(2);
rMsg.setArgList(arg);
rMsg.setMsgSubType(TaoMessage::RESPONSE_PHONECOMPONENT);
if (mpSvrTransport->postMessage(rMsg))
return TAO_SUCCESS;
return TAO_FAILURE;
}
示例5: handleMessage
//.........这里部分代码省略.........
}
break;
case TaoMessage::SPEAKER_GET_VOLUME:
if (TAO_SUCCESS == getSpeakerVolume((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::SPEAKER_GET_NOMINAL_VOLUME:
if (TAO_SUCCESS == getSpeakerNominalVolume((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
/* ----------------------------- PHONEEXTSPEAKER --------------------------------- */
case TaoMessage::EXTSPEAKER_SET_VOLUME:
if (TAO_SUCCESS == setExtSpeakerVolume((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::EXTSPEAKER_GET_VOLUME:
if (TAO_SUCCESS == getExtSpeakerVolume((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::EXTSPEAKER_GET_NOMINAL_VOLUME:
if (TAO_SUCCESS == getExtSpeakerNominalVolume((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
/* ----------------------------- PHONEGROUP --------------------------------- */
case TaoMessage::PHONEGROUP_ACTIVATE:
if (TAO_SUCCESS == activateGroup((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::PHONEGROUP_DEACTIVATE:
if (TAO_SUCCESS == deactivateGroup((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::PHONEGROUP_GET_COMPONENTS:
if (TAO_SUCCESS == getGroupComponents((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::PHONEGROUP_GET_DESCRIPTION:
if (TAO_SUCCESS == getGroupDescription((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::PHONEGROUP_GET_TYPE:
if (TAO_SUCCESS == getGroupType((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::PHONEGROUP_IS_ACTIVATED:
if (TAO_SUCCESS == isGroupActivated((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
case TaoMessage::COMPONENT_RESULT:
if (TAO_SUCCESS == returnResult((TaoMessage&)rMsg))
{
handled = TRUE;
}
break;
default:
break;
}
}
else if (TaoMessage::RESPONSE_PHONECOMPONENT == msgType)
{
if (TAO_SUCCESS == returnResult((TaoMessage&)rMsg))
handled = TRUE;
}
if (!handled)
{
TaoMessage* pMsg = (TaoMessage*) &rMsg;
pMsg->setArgCnt(1);
pMsg->setArgList("-1");
if (mpSvrTransport->postMessage(*pMsg))
handled = TRUE;
}
return handled;
}