Exemplo n.º 1
0
Contact::Contact(const std::string &jid,
				 const std::string &resource,
				 const std::string &nickname,
				 const std::string &statusMessage,
				 const std::string &nodeInfo
				 )
{
    this->jid=Jid(jid, resource);
    this->rosterJid=jid;
    this->nickname=nickname;
	this->statusMessage=statusMessage;
	this->nodeInfo=nodeInfo;
    this->status=presence::OFFLINE;
    offlineIcon=presence::OFFLINE;

    enableServerHistory=DISABLED_STATE;

    nUnread=0;
    sortKey=0;

    transpIndex=identifyTransport(jid);

    composing=false;
    acceptComposing=false;

    update();
    messageList=ODRListRef(new ODRList);
}
Exemplo n.º 2
0
DiscoItem::DiscoItem( const std::string &jid, const std::string &node, const std::string &name ) 
{
    this->jid=jid;
    this->node=node;
    this->name=name;
    
    this->iconIndex=(node.empty())? 
        identifyTransport(jid) : 
        icons::ICON_COLLAPSED_INDEX;

    this->wstr=utf8::utf8_wchar((name.empty())? jid : name);
    init();
}