#include <TelepathyUnixAccountHandler.h>
Public Member Functions | |
TelepathyAccountHandler () | |
virtual | ~TelepathyAccountHandler () |
virtual UT_UTF8String | getDescription () |
virtual UT_UTF8String | getDisplayType () |
virtual UT_UTF8String | getStorageType () |
virtual void | embedDialogWidgets (void *pEmbeddingParent) |
virtual void | removeDialogWidgets (void *pEmbeddingParent) |
virtual bool | canDelete () |
virtual void | loadProperties () |
virtual void | storeProperties () |
virtual ConnectResult | connect () |
virtual bool | disconnect () |
virtual bool | isOnline () |
void | acceptTube (TpChannel *tubes_chan, const char *address) |
void | finalizeOfferTube (TelepathyChatroomPtr pChatroom) |
virtual void | getBuddiesAsync () |
virtual BuddyPtr | constructBuddy (const PropertyMap &props) |
virtual BuddyPtr | constructBuddy (const std::string &descriptor, BuddyPtr pBuddy) |
virtual bool | recognizeBuddyIdentifier (const std::string &identifier) |
virtual bool | allowsManualBuddies () |
virtual void | forceDisconnectBuddy (BuddyPtr pBuddy) |
virtual bool | hasAccess (const std::vector< std::string > &, BuddyPtr pBuddy) |
virtual bool | hasPersistentAccessControl () |
void | addContact (TpContact *contact) |
void | buddyDisconnected (TelepathyChatroomPtr pChatroom, TpHandle disconnected) |
virtual bool | startSession (PD_Document *pDoc, const std::vector< std::string > &acl, AbiCollab **pSession) |
virtual bool | setAcl (AbiCollab *, const std::vector< std::string > &) |
virtual bool | allowsSessionTakeover () |
void | unregisterChatroom (TelepathyChatroomPtr pChatroom) |
virtual void | signal (const Event &event, BuddyPtr pSource) |
virtual bool | send (const Packet *pPacket) |
virtual bool | send (const Packet *pPacket, BuddyPtr buddy) |
void | handleMessage (DTubeBuddyPtr pBuddy, const std::string &packet_str) |
Static Public Member Functions | |
static TelepathyAccountHandler * | getHandler () |
Private Member Functions | |
void | _inviteBuddies (TelepathyChatroomPtr pChatroom, const std::vector< std::string > &) |
std::vector< TelepathyBuddyPtr > | _getBuddies (const std::vector< std::string > &vAcl) |
TelepathyBuddyPtr | _getBuddy (TelepathyBuddyPtr pBuddy) |
TelepathyChatroomPtr | _getChatroom (const std::string &sSessionId) |
Private Attributes | |
GtkWidget * | table |
GtkWidget * | conference_entry |
GtkWidget * | autoconnect_button |
TpBaseClient * | m_pTpClient |
std::vector< TelepathyChatroomPtr > | m_chatrooms |
TelepathyAccountHandler::TelepathyAccountHandler | ( | ) |
TelepathyAccountHandler::~TelepathyAccountHandler | ( | ) | [virtual] |
References disconnect(), and isOnline().
std::vector< TelepathyBuddyPtr > TelepathyAccountHandler::_getBuddies | ( | const std::vector< std::string > & | vAcl | ) | [private] |
References AccountHandler::getBuddies(), and UT_continue_if_fail.
Referenced by _inviteBuddies().
TelepathyBuddyPtr TelepathyAccountHandler::_getBuddy | ( | TelepathyBuddyPtr | pBuddy | ) | [private] |
References AccountHandler::getBuddies(), UT_continue_if_fail, and UT_return_val_if_fail.
Referenced by addContact().
TelepathyChatroomPtr TelepathyAccountHandler::_getChatroom | ( | const std::string & | sSessionId | ) | [private] |
References m_chatrooms, and UT_continue_if_fail.
void TelepathyAccountHandler::_inviteBuddies | ( | TelepathyChatroomPtr | pChatroom, | |
const std::vector< std::string > & | vAcl | |||
) | [private] |
References _getBuddies(), UT_continue_if_fail, and UT_return_if_fail.
Referenced by setAcl(), and startSession().
void TelepathyAccountHandler::acceptTube | ( | TpChannel * | tubes_chan, | |
const char * | address | |||
) |
References m_chatrooms, UT_DEBUGMSG, and UT_return_if_fail.
Referenced by tube_accept_cb().
void TelepathyAccountHandler::addContact | ( | TpContact * | contact | ) |
References _getBuddy(), AccountHandler::addBuddy(), UT_DEBUGMSG, and UT_return_if_fail.
Referenced by list_contacts_for_connection_cb().
virtual bool TelepathyAccountHandler::allowsManualBuddies | ( | ) | [inline, virtual] |
Implements AccountHandler.
virtual bool TelepathyAccountHandler::allowsSessionTakeover | ( | ) | [inline, virtual] |
Implements AccountHandler.
void TelepathyAccountHandler::buddyDisconnected | ( | TelepathyChatroomPtr | pChatroom, | |
TpHandle | disconnected | |||
) |
References AbiCollabSessionManager::getManager(), AbiCollabSessionManager::removeBuddy(), UT_DEBUGMSG, and UT_return_if_fail.
Referenced by tube_dbus_names_changed_cb().
virtual bool TelepathyAccountHandler::canDelete | ( | ) | [inline, virtual] |
Reimplemented from AccountHandler.
ConnectResult TelepathyAccountHandler::connect | ( | ) | [virtual] |
Implements AccountHandler.
References CONNECT_FAILED, CONNECT_INTERNAL_ERROR, abicollab::service::error(), AbiCollabSessionManager::getManager(), handle_dbus_channel(), INTERFACE, m_pTpClient, AbiCollabSessionManager::registerEventListener(), AbiCollabSessionManager::signal(), UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
BuddyPtr TelepathyAccountHandler::constructBuddy | ( | const std::string & | descriptor, | |
BuddyPtr | pBuddy | |||
) | [virtual] |
Implements AccountHandler.
References UT_ASSERT_HARMLESS, and UT_NOT_IMPLEMENTED.
BuddyPtr TelepathyAccountHandler::constructBuddy | ( | const PropertyMap & | props | ) | [virtual] |
Implements AccountHandler.
References UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_NOT_IMPLEMENTED.
bool TelepathyAccountHandler::disconnect | ( | void | ) | [virtual] |
Implements AccountHandler.
References AbiCollabSessionManager::getManager(), m_chatrooms, m_pTpClient, AbiCollabSessionManager::signal(), AbiCollabSessionManager::unregisterEventListener(), UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by ~TelepathyAccountHandler().
void TelepathyAccountHandler::embedDialogWidgets | ( | void * | pEmbeddingParent | ) | [virtual] |
Implements AccountHandler.
References autoconnect_button, conference_entry, table, UT_DEBUGMSG, and UT_return_if_fail.
void TelepathyAccountHandler::finalizeOfferTube | ( | TelepathyChatroomPtr | pChatroom | ) |
void TelepathyAccountHandler::forceDisconnectBuddy | ( | BuddyPtr | pBuddy | ) | [virtual] |
Implements AccountHandler.
References UT_ASSERT_HARMLESS, UT_NOT_IMPLEMENTED, and UT_return_if_fail.
void TelepathyAccountHandler::getBuddiesAsync | ( | ) | [virtual] |
Reimplemented from AccountHandler.
References list_connection_names_cb(), UT_DEBUGMSG, and UT_return_if_fail.
UT_UTF8String TelepathyAccountHandler::getDescription | ( | ) | [virtual] |
Implements AccountHandler.
UT_UTF8String TelepathyAccountHandler::getDisplayType | ( | ) | [virtual] |
Implements AccountHandler.
static TelepathyAccountHandler* TelepathyAccountHandler::getHandler | ( | ) | [static] |
UT_UTF8String TelepathyAccountHandler::getStorageType | ( | ) | [virtual] |
Implements AccountHandler.
void TelepathyAccountHandler::handleMessage | ( | DTubeBuddyPtr | pBuddy, | |
const std::string & | packet_str | |||
) |
References AccountHandler::_createPacket(), DELETEP, AbiCollabSessionManager::getManager(), DocHandle::getName(), DocHandle::getSessionId(), AbiCollabSessionManager::joinSessionInitiate(), GetSessionsResponseEvent::m_Sessions, PCT_GetSessionsEvent, PCT_GetSessionsResponseEvent, send(), UT_DEBUGMSG, UT_return_if_fail, and UT_UTF8String::utf8_str().
Referenced by TelepathyChatroom::addBuddy(), and s_dbus_handle_message().
bool TelepathyAccountHandler::hasAccess | ( | const std::vector< std::string > & | , | |
BuddyPtr | pBuddy | |||
) | [virtual] |
Reimplemented from AccountHandler.
References UT_DEBUGMSG, and UT_return_val_if_fail.
virtual bool TelepathyAccountHandler::hasPersistentAccessControl | ( | ) | [inline, virtual] |
Implements AccountHandler.
bool TelepathyAccountHandler::isOnline | ( | ) | [virtual] |
void TelepathyAccountHandler::loadProperties | ( | ) | [virtual] |
Implements AccountHandler.
References autoconnect_button, conference_entry, AccountHandler::getProperty(), AccountHandler::hasProperty(), and UT_DEBUGMSG.
bool TelepathyAccountHandler::recognizeBuddyIdentifier | ( | const std::string & | identifier | ) | [virtual] |
Implements AccountHandler.
References UT_ASSERT_HARMLESS, and UT_NOT_IMPLEMENTED.
void TelepathyAccountHandler::removeDialogWidgets | ( | void * | pEmbeddingParent | ) | [virtual] |
Implements AccountHandler.
References table, UT_DEBUGMSG, and UT_return_if_fail.
bool TelepathyAccountHandler::send | ( | const Packet * | pPacket | ) | [virtual] |
Implements AccountHandler.
References UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_NOT_IMPLEMENTED, and UT_return_val_if_fail.
Referenced by handleMessage().
Implements AccountHandler.
References AccountHandler::_createPacketStream(), UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_return_val_if_fail.
bool TelepathyAccountHandler::setAcl | ( | AbiCollab * | pSession, | |
const std::vector< std::string > & | vAcl | |||
) | [virtual] |
Reimplemented from AccountHandler.
References _getChatroom(), _inviteBuddies(), AbiCollab::getSessionId(), UT_DEBUGMSG, and UT_return_val_if_fail.
bool TelepathyAccountHandler::startSession | ( | PD_Document * | pDoc, | |
const std::vector< std::string > & | acl, | |||
AbiCollab ** | pSession | |||
) | [virtual] |
Reimplemented from AccountHandler.
References _inviteBuddies(), UT_UUIDGenerator::createUUID(), DELETEP, XAP_App::getApp(), AbiCollabSessionManager::getManager(), AccountHandler::getProperty(), XAP_App::getUUIDGenerator(), m_chatrooms, muc_channel_ready_cb(), AbiCollabSessionManager::startSession(), UT_UUID::toString(), UT_DEBUGMSG, and UT_return_val_if_fail.
void TelepathyAccountHandler::storeProperties | ( | ) | [virtual] |
Implements AccountHandler.
References AccountHandler::addProperty(), autoconnect_button, conference_entry, and UT_DEBUGMSG.
void TelepathyAccountHandler::unregisterChatroom | ( | TelepathyChatroomPtr | pChatroom | ) |
References m_chatrooms, UT_DEBUGMSG, and UT_return_if_fail.
Referenced by TelepathyChatroom::finalize().
GtkWidget* TelepathyAccountHandler::autoconnect_button [private] |
Referenced by embedDialogWidgets(), loadProperties(), and storeProperties().
GtkWidget* TelepathyAccountHandler::conference_entry [private] |
Referenced by embedDialogWidgets(), loadProperties(), and storeProperties().
std::vector<TelepathyChatroomPtr> TelepathyAccountHandler::m_chatrooms [private] |
Referenced by _getChatroom(), acceptTube(), disconnect(), startSession(), and unregisterChatroom().
TpBaseClient* TelepathyAccountHandler::m_pTpClient [private] |
Referenced by connect(), disconnect(), and isOnline().
GtkWidget* TelepathyAccountHandler::table [private] |
Referenced by embedDialogWidgets(), and removeDialogWidgets().