当前位置: 首页>>代码示例>>C++>>正文


C++ ContactRef::getMobileNo方法代码示例

本文整理汇总了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;
    }
开发者ID:Doap,项目名称:transports,代码行数:67,代码来源:wp_client.cpp


注:本文中的ContactRef::getMobileNo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。