本文整理汇总了C++中ContactRef::getMobileNo方法的典型用法代码示例。如果您正苦于以下问题:C++ ContactRef::getMobileNo方法的具体用法?C++ ContactRef::getMobileNo怎么用?C++ ContactRef::getMobileNo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContactRef
的用法示例。
在下文中一共展示了ContactRef::getMobileNo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SignalMessaged
//.........这里部分代码省略.........
contact cc;
msg = xmlnode_new_tag("presence");
xmlnode_put_attrib(msg,"type","subscribe");
/* add to our roster !!!! */
cc = it_contact_get(sesja,uin);
if (cc == NULL)
it_contact_add(sesja,uin);
log_debug(ZONE,"User added message recived");
break;
}
case MessageEvent::AuthAck: {
log_debug(ZONE,"Authorization received");
AuthAckEvent* ackm=static_cast<AuthAckEvent*>(ev);
msg = xmlnode_new_tag("presence");
if(ackm->isGranted())
xmlnode_put_attrib(msg,"type","subscribed");
else
xmlnode_put_attrib(msg,"type","unsubscribed");
break;
}
case MessageEvent::SMS: {
log_debug(ZONE,"SMS received");
SMSMessageEvent* smsm=static_cast<SMSMessageEvent*>(ev);
msg = xmlnode_new_tag("message");
string text=smsm->getMessage();
xmlnode_insert_cdata(xmlnode_insert_tag(msg,"body"),
text.c_str(),text.size());
xmlnode_put_attrib(msg,"to",jid_full(sesja->id));
xmlnode_put_attrib(msg,"from",(c->getMobileNo()+
"@"+sesja->ti->sms_id).c_str());
it_deliver(sesja->ti,msg);
return;
}
case MessageEvent::SMS_Receipt: {
log_debug(ZONE,"SMS receipt received");
SMSReceiptEvent* receipt=static_cast<SMSReceiptEvent*>(ev);
msg = xmlnode_new_tag("message");
string text= LNG_SMS_MESSAGE+
( receipt->delivered() ?
string(LNG_SMS_DELIVERED) + receipt->getDeliveryTime() :
LNG_SMS_NOTDELIVERED );
xmlnode_insert_cdata(xmlnode_insert_tag(msg,"body"),
it_convert_windows2utf8(xmlnode_pool(msg),text.c_str()),
(unsigned int)-1);
xmlnode_put_attrib(msg,"to",jid_full(sesja->id));
xmlnode_put_attrib(msg,"from",(c->getMobileNo()+
"@"+sesja->ti->sms_id).c_str());
it_deliver(sesja->ti,msg);
return;
}
case MessageEvent::AwayMessage: {
log_debug(ZONE,"Away message received");
AwayMessageEvent *aev = static_cast<AwayMessageEvent*>(ev);
sendContactPresence(aev->getContact()->getUIN(),
aev->getAwayMessage());
return;
}