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


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

本文整理汇总了C++中ContactRef::getEmail方法的典型用法代码示例。如果您正苦于以下问题:C++ ContactRef::getEmail方法的具体用法?C++ ContactRef::getEmail怎么用?C++ ContactRef::getEmail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ContactRef的用法示例。


在下文中一共展示了ContactRef::getEmail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SignalSearchResultEvent

/* search_result */
void WPclient::SignalSearchResultEvent(SearchResultEvent *ev) {
  meta_gen meta;

  if (search_ev == ev) {
	UIN_t uin;

    if (sesja->pend_search ==  NULL) {
      log_alert(ZONE,"No search at session");
      search_ev = NULL;
      return;
    }

    if (!ev->isExpired()) {
      //      ContactList& cl = ev->getContactList();
      
      ContactRef c = ev->getLastContactAdded();
      if (c.get() != NULL) {
        uin = c->getUIN();
        meta.nick  = (char*)c->getAlias().c_str();
        meta.first = (char*)c->getFirstName().c_str();
        meta.last  = (char*)c->getLastName().c_str();
        meta.email = (char*)c->getEmail().c_str();
        if (c->getAuthReq()) {
          meta.auth = 1;
        } else {
          meta.auth = 0;
        }


		switch (c->getStatus())
		  {
		  case STATUS_OFFLINE:
			meta.status = ICQ_STATUS_OFFLINE;
			break;
		  case STATUS_AWAY:
			meta.status = ICQ_STATUS_AWAY;
			break;
		  case STATUS_DND:
			meta.status = ICQ_STATUS_DND;
			break;
		  case STATUS_NA:
			meta.status = ICQ_STATUS_NA;
			break;
		  case STATUS_OCCUPIED:
			meta.status = ICQ_STATUS_NA;
			break;
		  case STATUS_FREEFORCHAT:
			meta.status = ICQ_STATUS_FREE_CHAT;
			break;
		  default:
			meta.status = ICQ_STATUS_ONLINE;
			break;
		  }
		
        
		log_debug(ZONE,"Search enter part");
        
        (*(meta_search_cb)sesja->pend_search->cb)
          (sesja,uin,&meta,sesja->pend_search->arg);
      }
    }
    else {
      log_alert(ZONE,"search timedout");
      uin = 0;
    }
    
    if (ev->isFinished()) {
      log_debug(ZONE,"Search send");
      (*(meta_search_cb)sesja->pend_search->cb)
        (sesja,uin,NULL,sesja->pend_search->arg);
      search_ev = NULL;
      sesja->pend_search = NULL;
    }
  }
  else {
    log_alert(ZONE,"Not our search event search_ev= %p",search_ev);
  }
}
开发者ID:Doap,项目名称:transports,代码行数:79,代码来源:wp_client.cpp


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