#include <TelepathyChatroom.h>
Public Member Functions | |
TelepathyChatroom (TelepathyAccountHandler *pHandler, TpChannel *pChannel, PD_Document *pDoc, const std::string &sSessionId) | |
bool | running () |
bool | tubeOffered () |
void | stop () |
void | finalize () |
void | setChannel (TpChannel *pChannel) |
boost::shared_ptr < TelepathyChatroom > | ptr () |
TelepathyAccountHandler * | getHandler () |
void | addBuddy (DTubeBuddyPtr pBuddy) |
const std::vector < DTubeBuddyPtr > & | getBuddies () |
DTubeBuddyPtr | getBuddy (TpHandle handle) |
DTubeBuddyPtr | getBuddy (UT_UTF8String dbusName) |
void | removeBuddy (TpHandle handle) |
DBusConnection * | getTube () |
const std::string & | getSessionId () const |
void | setSessionId (const std::string &sSessionId) |
std::string | getDocName () |
void | queue (const std::string &dbusName, const std::string &packet) |
void | acceptTube (const char *address) |
void | queueInvite (TelepathyBuddyPtr pBuddy) |
bool | offerTube () |
void | finalizeOfferTube (DBusConnection *pTube) |
bool | isController (DTubeBuddyPtr pBuddy) |
bool | isLocallyControlled () |
Private Attributes | |
TelepathyAccountHandler * | m_pHandler |
TpChannel * | m_pChannel |
PD_Document * | m_pDoc |
DBusConnection * | m_pTube |
std::string | m_sSessionId |
std::vector< DTubeBuddyPtr > | m_buddies |
std::vector< TelepathyBuddyPtr > | m_pending_invitees |
std::map< std::string, std::vector< std::string > > | m_packet_queue |
bool | m_bShuttingDown |
std::vector< std::string > | m_offered_tubes |
TelepathyChatroom::TelepathyChatroom | ( | TelepathyAccountHandler * | pHandler, | |
TpChannel * | pChannel, | |||
PD_Document * | pDoc, | |||
const std::string & | sSessionId | |||
) |
void TelepathyChatroom::acceptTube | ( | const char * | address | ) |
void TelepathyChatroom::addBuddy | ( | DTubeBuddyPtr | pBuddy | ) |
void TelepathyChatroom::finalize | ( | ) |
References AbiCollabSessionManager::endAsyncOperation(), AbiCollabSessionManager::getManager(), m_pChannel, m_pHandler, m_pTube, ptr(), TelepathyAccountHandler::unregisterChatroom(), and UT_DEBUGMSG.
Referenced by stop(), and tp_channel_close_cb().
void TelepathyChatroom::finalizeOfferTube | ( | DBusConnection * | pTube | ) |
References m_pChannel, m_pTube, s_dbus_handle_message(), tube_dbus_names_changed_cb(), UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by tube_call_offer_cb().
const std::vector<DTubeBuddyPtr>& TelepathyChatroom::getBuddies | ( | ) | [inline] |
References m_buddies.
DTubeBuddyPtr TelepathyChatroom::getBuddy | ( | TpHandle | handle | ) |
References m_buddies, and UT_continue_if_fail.
Referenced by s_dbus_handle_message().
DTubeBuddyPtr TelepathyChatroom::getBuddy | ( | UT_UTF8String | dbusName | ) |
References m_buddies, and UT_continue_if_fail.
std::string TelepathyChatroom::getDocName | ( | ) |
References AD_Document::getFilename(), m_pDoc, and UT_return_val_if_fail.
Referenced by group_call_add_members_cb(), and offerTube().
TelepathyAccountHandler* TelepathyChatroom::getHandler | ( | ) | [inline] |
References m_pHandler.
Referenced by group_call_add_members_cb(), muc_channel_ready_cb(), retrieve_buddy_dbus_mappings_cb(), s_dbus_handle_message(), tube_call_offer_cb(), and tube_dbus_names_changed_cb().
const std::string& TelepathyChatroom::getSessionId | ( | ) | const [inline] |
References m_sSessionId.
DBusConnection* TelepathyChatroom::getTube | ( | ) | [inline] |
References m_pTube.
bool TelepathyChatroom::isController | ( | DTubeBuddyPtr | pBuddy | ) |
bool TelepathyChatroom::isLocallyControlled | ( | ) |
bool TelepathyChatroom::offerTube | ( | ) |
References getDocName(), m_offered_tubes, m_pChannel, m_pending_invitees, m_sSessionId, UT_continue_if_fail, UT_DEBUGMSG, UT_return_val_if_fail, UT_UTF8String_sprintf(), and UT_UTF8String::utf8_str().
Referenced by muc_channel_ready_cb().
boost::shared_ptr<TelepathyChatroom> TelepathyChatroom::ptr | ( | ) | [inline] |
Referenced by finalize(), retrieve_buddy_dbus_mappings_cb(), and tube_dbus_names_changed_cb().
void TelepathyChatroom::queue | ( | const std::string & | dbusName, | |
const std::string & | packet | |||
) |
References m_packet_queue, and UT_DEBUGMSG.
Referenced by s_dbus_handle_message().
void TelepathyChatroom::queueInvite | ( | TelepathyBuddyPtr | pBuddy | ) |
References m_offered_tubes, m_pending_invitees, UT_continue_if_fail, UT_DEBUGMSG, and UT_return_if_fail.
void TelepathyChatroom::removeBuddy | ( | TpHandle | handle | ) |
References m_buddies, UT_ASSERT_HARMLESS, UT_continue_if_fail, and UT_NOT_REACHED.
bool TelepathyChatroom::running | ( | ) | [inline] |
References m_pChannel.
void TelepathyChatroom::setChannel | ( | TpChannel * | pChannel | ) |
References m_pChannel.
Referenced by muc_channel_ready_cb().
void TelepathyChatroom::setSessionId | ( | const std::string & | sSessionId | ) | [inline] |
References m_sSessionId.
void TelepathyChatroom::stop | ( | ) |
References finalize(), m_pChannel, tp_channel_close_cb(), and UT_DEBUGMSG.
bool TelepathyChatroom::tubeOffered | ( | ) | [inline] |
References m_pTube.
Referenced by group_call_add_members_cb().
bool TelepathyChatroom::m_bShuttingDown [private] |
std::vector<DTubeBuddyPtr> TelepathyChatroom::m_buddies [private] |
Referenced by addBuddy(), getBuddies(), getBuddy(), and removeBuddy().
std::vector<std::string> TelepathyChatroom::m_offered_tubes [private] |
Referenced by offerTube(), and queueInvite().
std::map<std::string, std::vector<std::string> > TelepathyChatroom::m_packet_queue [private] |
Referenced by addBuddy(), and queue().
TpChannel* TelepathyChatroom::m_pChannel [private] |
Referenced by acceptTube(), finalize(), finalizeOfferTube(), offerTube(), running(), setChannel(), stop(), and TelepathyChatroom().
PD_Document* TelepathyChatroom::m_pDoc [private] |
Referenced by getDocName().
std::vector<TelepathyBuddyPtr> TelepathyChatroom::m_pending_invitees [private] |
Referenced by offerTube(), and queueInvite().
Referenced by addBuddy(), finalize(), getHandler(), and TelepathyChatroom().
DBusConnection* TelepathyChatroom::m_pTube [private] |
Referenced by acceptTube(), finalize(), finalizeOfferTube(), getTube(), and tubeOffered().
std::string TelepathyChatroom::m_sSessionId [private] |
Referenced by getSessionId(), isController(), isLocallyControlled(), offerTube(), and setSessionId().