Esempio n. 1
0
void PurpleIMContactList::removeGroup(const std::string & groupName)
{
	PurpleIMContactListCallbackData* cbData = new PurpleIMContactListCallbackData;

	cbData->setInstance( this );
	cbData->setGroupName( groupName );
	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMContactList::removeGroupCbk ) );
}
Esempio n. 2
0
void PurpleIMContactList::changeGroupName(const std::string & oldGroupName, const std::string & newGroupName)
{
	PurpleIMContactListCallbackData* cbData = new PurpleIMContactListCallbackData;

	cbData->setInstance( this );
	cbData->setOldGroupName( oldGroupName );
	cbData->setNewGroupName( newGroupName );
	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMContactList::changeGroupNameCbk ) );
}
Esempio n. 3
0
void PurpleIMChat::removeContact(IMChatSession & chatSession, const std::string & contactId)
{
	PurpleIMChatCallbackData* cbData = new PurpleIMChatCallbackData;

	cbData->setPurpleIMChat( this );
	cbData->setIMChatSession( &chatSession );
	cbData->setContactId    ( contactId    );

	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMChat::removeContactCbk ) );
//	Mutex::ScopedLock lock(PurpleIMChat::_mutex);
//	data->cbk_id = purple_timeout_add(0, (GSourceFunc) PurpleIMChat::removeContactCbk, data);
}
Esempio n. 4
0
void PurpleIMChat::closeSession(IMChatSession & chatSession)
{
	PurpleIMChatCallbackData* cbData = new PurpleIMChatCallbackData;

	cbData->setPurpleIMChat( this );

	cbData->setIMChatSession( &chatSession );
	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMChat::closeSessionCbk ) );

//	Mutex::ScopedLock lock(PurpleIMChat::_mutex);
//	data->cbk_id = purple_timeout_add(0, (GSourceFunc) PurpleIMChat::closeSessionCbk, data);
}
Esempio n. 5
0
//-----------------------------------------------------------------------------
//VOXOX CHANGE CJC ADD SKYPE CALL SUPPORT
//TODO: THIS SHOULD NOT BE HERE
void PurpleIMChat::callSkypeContact(const IMContactSet & imContactSet)
{
	PurpleIMChatCallbackData* cbData = new PurpleIMChatCallbackData;

	cbData->setPurpleIMChat( this );
	cbData->setIMContactSet( new IMContactSet(imContactSet) );

	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMChat::callSkypeContactCbk ) );

//	Mutex::ScopedLock lock(PurpleIMChat::_mutex);
//	data->cbk_id = purple_timeout_add(0, (GSourceFunc) PurpleIMChat::callSkypeContactCbk, data);
}
Esempio n. 6
0
void PurpleIMChat::sendMessage(IMChatSession & chatSession, const std::string & message)
{
	PurpleIMChatCallbackData* cbData = new PurpleIMChatCallbackData;

	cbData->setPurpleIMChat( this );

	cbData->setIMChatSession( &chatSession );
	cbData->setMessage      ( message      );

	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMChat::sendMessageCbk ) );
//	Mutex::ScopedLock lock(PurpleIMChat::_mutex);
//	data->cbk_id = purple_timeout_add(0, (GSourceFunc) PurpleIMChat::sendMessageCbk, data);
}
Esempio n. 7
0
//-----------------------------------------------------------------------------
//VOXOX - CJC - 2009.05.19 Create chat to sms session
void PurpleIMChat::createChatToSMSSession(const IMContactSet & imContactSet,const std::string & relatedContactId)
{
	PurpleIMChatCallbackData* cbData = new PurpleIMChatCallbackData;

	cbData->setPurpleIMChat( this );
	cbData->setIMContactSet( new IMContactSet(imContactSet) );

	setRelatedContactId(relatedContactId);
	setIMChatType(IMChat::ChatToSMS);

	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMChat::createChatToSMSSessionCbk ) );
//	Mutex::ScopedLock lock(PurpleIMChat::_mutex);
//	data->cbk_id = purple_timeout_add(0, (GSourceFunc) PurpleIMChat::createChatToSMSSessionCbk, data);
}
Esempio n. 8
0
void PurpleIMContactList::addContact(const std::string & groupName, const std::string & contactId)
{
	PurpleIMContactListCallbackData* cbData = new PurpleIMContactListCallbackData;

	cbData->setInstance( this );
	cbData->setGroupName( groupName );
	cbData->setContactId( contactId );
	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMContactList::addContactCbk ) );

//	Mutex::ScopedLock lock(PurpleIMContactList::_mutex);
//	cbData->setCallbackId( purple_timeout_add(0, (GSourceFunc) PurpleIMContactList::addContactCbk, cbData) );

//	getContactVcard( contactId );		//VOXOX - JRT - 2009.05.19- Hold off for now.
}
Esempio n. 9
0
//-----------------------------------------------------------------------------
//VOXOX CHANGE CJC ADD SUPPORT FOR MULTIPLE CHAT MESSAGES
void PurpleIMChat::createSessionAndSendMessage(const IMContactSet & imContactSet, const std::string & message)
{
	PurpleIMChatCallbackData* cbData = new PurpleIMChatCallbackData;

	cbData->setPurpleIMChat( this );
	cbData->setIMContactSet( new IMContactSet(imContactSet) );
	cbData->setMessage     ( message );

	setAutoMessage( message );

	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMChat::createSessionAndSendMessageCbk ) );

//	Mutex::ScopedLock lock(PurpleIMChat::_mutex);
//	data->cbk_id = purple_timeout_add(0, (GSourceFunc) PurpleIMChat::createSessionAndSendMessageCbk, data);
}
Esempio n. 10
0
void PurpleIMChat::createSession(const IMContactSet & imContactSet, IMChat::IMChatType imChatType, const std::string& userChatRoomName )
{
	PurpleIMChatCallbackData* cbData = new PurpleIMChatCallbackData;

	cbData->setPurpleIMChat( this );
	cbData->setIMContactSet( new IMContactSet(imContactSet) );

	setIMChatType	( imChatType	   );
	getGroupChatInfo().setAlias( userChatRoomName );

	cbData->setCallbackId( timeoutAdd( cbData, (GSourceFunc) PurpleIMChat::createSessionCbk ) );

//	Mutex::ScopedLock lock(PurpleIMChat::_mutex);
//	data->cbk_id = purple_timeout_add(0, (GSourceFunc) PurpleIMChat::createSessionCbk, data);
}