Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Member Functions | Private Attributes

AccountHandler Class Reference

#include <AccountHandler.h>

Inheritance diagram for AccountHandler:
EventListener FakeAccountHandler ServiceAccountHandler SIPSimpleAccountHandler SugarAccountHandler TCPAccountHandler TelepathyAccountHandler XMPPAccountHandler ServiceUnixAccountHandler ServiceWin32AccountHandler SIPSimpleUnixAccountHandler TCPUnixAccountHandler TCPWin32AccountHandler XMPPUnixAccountHandler

List of all members.

Public Types

enum  { PE_Invalid_Version = 1 }

Public Member Functions

 AccountHandler ()
virtual ~AccountHandler ()
virtual UT_UTF8String getStorageType ()=0
virtual UT_UTF8String getDescription ()=0
virtual UT_UTF8String getDisplayType ()=0
void addProperty (const std::string &key, const std::string &value)
bool hasProperty (const std::string &key)
const std::string getProperty (const std::string &key)
PropertyMapgetProperties ()
virtual UT_UTF8String getShareHint (PD_Document *)
virtual void embedDialogWidgets (void *pEmbeddingParent)=0
virtual void removeDialogWidgets (void *pEmbeddingParent)=0
virtual bool canDelete ()
virtual bool canEditProperties ()
virtual void loadProperties ()=0
virtual void storeProperties ()=0
virtual ConnectResult connect ()=0
virtual bool disconnect ()=0
virtual bool isOnline ()=0
virtual bool autoConnect ()
virtual bool operator== (AccountHandler &rhHandler)
virtual bool send (const Packet *packet)=0
virtual bool send (const Packet *packet, BuddyPtr buddy)=0
void addBuddy (BuddyPtr pBuddy)
std::vector< BuddyPtr > & getBuddies ()
virtual void getBuddiesAsync ()
void deleteBuddy (BuddyPtr pBuddy)
void deleteBuddies ()
virtual BuddyPtr constructBuddy (const PropertyMap &vProps)=0
virtual BuddyPtr constructBuddy (const std::string &descriptor, BuddyPtr pBuddy)=0
virtual bool recognizeBuddyIdentifier (const std::string &identifier)=0
virtual bool allowsManualBuddies ()=0
virtual void forceDisconnectBuddy (BuddyPtr)=0
virtual bool hasAccess (const std::vector< std::string > &vAcl, BuddyPtr pBuddy)
virtual bool hasPersistentAccessControl ()=0
virtual bool canShare (BuddyPtr)
virtual bool defaultShareState (BuddyPtr)
virtual void getSessionsAsync ()
virtual void getSessionsAsync (BuddyPtr pBuddy)
virtual bool startSession (PD_Document *, const std::vector< std::string > &, AbiCollab **)
virtual bool getAcl (AbiCollab *, std::vector< std::string > &)
virtual bool setAcl (AbiCollab *, const std::vector< std::string > &)
virtual void joinSessionAsync (BuddyPtr pBuddy, DocHandle &docHandle)
virtual bool hasSession (const UT_UTF8String &sSessionId)
virtual bool allowsSessionTakeover ()=0
bool getCanOffer ()
void setOffering (bool bCanOffer)
virtual bool canManuallyStartSession ()
virtual void handleMessage (Packet *pPacket, BuddyPtr pBuddy)
virtual void signal (const Event &event, BuddyPtr pSource)

Static Public Member Functions

static UT_UTF8String getStaticStorageType ()

Protected Member Functions

Packet_createPacket (const std::string &packet, BuddyPtr pBuddy)
void _createPacketStream (std::string &sString, const Packet *pPacket)
virtual bool _handleProtocolError (Packet *packet, BuddyPtr buddy)
virtual void _handlePacket (Packet *packet, BuddyPtr buddy)
void _sendProtocolError (BuddyPtr, UT_sint32 errorEnum)

Protected Attributes

PropertyMap m_properties

Static Private Member Functions

static void _reportProtocolError (UT_sint32 remoteVersion, UT_sint32 errorEnum, BuddyPtr buddy)

Private Attributes

bool m_bCanOffer
std::vector< BuddyPtrm_vBuddies

Member Enumeration Documentation

anonymous enum
Enumerator:
PE_Invalid_Version 

Constructor & Destructor Documentation

AccountHandler::AccountHandler (  )  [inline]
virtual AccountHandler::~AccountHandler (  )  [inline, virtual]

Member Function Documentation

void AccountHandler::_handlePacket ( Packet packet,
BuddyPtr  buddy 
) [protected, virtual]

Reimplemented in SugarAccountHandler.

References PD_Document::addAuthor(), AbiCollab::addCollaborator(), UT_GenericVector< T >::addItem(), AbiCollabSessionManager::deserializeDocument(), PD_Document::findFirstFreeAuthorInt(), PD_Document::forceDirty(), gchar, AbiCollab::getAcl(), ABI_Collab_Export::getAdjusts(), pp_Author::getAttrProp(), JoinSessionRequestResponseEvent::getAuthorId(), pp_Author::getAuthorInt(), PD_Document::getAuthors(), PD_Document::getCRNumber(), AbiCollab::getDocument(), AD_Document::getDocUUIDString(), AbiCollab::getExport(), AD_Document::getFilename(), UT_GenericVector< T >::getItemCount(), AbiCollabSessionManager::getManager(), UT_GenericVector< T >::getNthItem(), pp_Author::getProperty(), AbiCollabSessionManager::getSessionFromSessionId(), AbiCollab::getSessionId(), JoinSessionRequestResponseEvent::getSessionId(), JoinSessionEvent::getSessionId(), AbiCollabSessionManager::getSessions(), hasAccess(), AbiCollab::isLocallyControlled(), AbiCollabSessionManager::joinSession(), JoinSessionRequestResponseEvent::m_iRev, JoinSessionRequestResponseEvent::m_sDocumentId, JoinSessionRequestResponseEvent::m_sDocumentName, GetSessionsResponseEvent::m_Sessions, JoinSessionRequestResponseEvent::m_sZABW, PCT_GetSessionsEvent, PCT_GetSessionsResponseEvent, PCT_JoinSessionRequestEvent, PCT_JoinSessionRequestResponseEvent, send(), PD_Document::sendAddAuthorCR(), AbiCollabSessionManager::serializeDocument(), AbiCollabSessionManager::setDocumentHandles(), AD_Document::setFilename(), PP_AttrProp::setProperty(), UT_UTF8String::size(), UT_ASSERT_HARMLESS, UT_continue_if_fail, UT_DEBUGMSG, UT_go_basename_from_uri(), UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, and UT_UTF8String::utf8_str().

Referenced by ServiceAccountHandler::_listDocuments_cb(), and handleMessage().

bool AccountHandler::_handleProtocolError ( Packet packet,
BuddyPtr  buddy 
) [protected, virtual]
void AccountHandler::_reportProtocolError ( UT_sint32  remoteVersion,
UT_sint32  errorEnum,
BuddyPtr  buddy 
) [static, private]
void AccountHandler::_sendProtocolError ( BuddyPtr  pBuddy,
UT_sint32  errorEnum 
) [protected]

References send(), and UT_return_if_fail.

Referenced by _createPacket().

bool AccountHandler::autoConnect (  )  [virtual]
virtual bool AccountHandler::canDelete (  )  [inline, virtual]
virtual bool AccountHandler::canEditProperties (  )  [inline, virtual]
virtual bool AccountHandler::canManuallyStartSession (  )  [inline, virtual]
virtual bool AccountHandler::canShare ( BuddyPtr   )  [inline, virtual]

Reimplemented in ServiceAccountHandler.

virtual BuddyPtr AccountHandler::constructBuddy ( const std::string &  descriptor,
BuddyPtr  pBuddy 
) [pure virtual]
virtual bool AccountHandler::defaultShareState ( BuddyPtr   )  [inline, virtual]
void AccountHandler::deleteBuddies (  ) 

References m_vBuddies.

void AccountHandler::deleteBuddy ( BuddyPtr  pBuddy  ) 
virtual void AccountHandler::forceDisconnectBuddy ( BuddyPtr   )  [pure virtual]
virtual bool AccountHandler::getAcl ( AbiCollab ,
std::vector< std::string > &   
) [inline, virtual]

Reimplemented in ServiceAccountHandler.

virtual void AccountHandler::getBuddiesAsync (  )  [inline, virtual]
bool AccountHandler::getCanOffer (  )  [inline]

References m_bCanOffer.

PropertyMap& AccountHandler::getProperties (  )  [inline]
const std::string AccountHandler::getProperty ( const std::string &  key  ) 
void AccountHandler::getSessionsAsync (  )  [virtual]
void AccountHandler::getSessionsAsync ( BuddyPtr  pBuddy  )  [virtual]

References send().

virtual UT_UTF8String AccountHandler::getShareHint ( PD_Document  )  [inline, virtual]
static UT_UTF8String AccountHandler::getStaticStorageType (  )  [inline, static]
bool AccountHandler::hasAccess ( const std::vector< std::string > &  vAcl,
BuddyPtr  pBuddy 
) [virtual]
virtual bool AccountHandler::hasPersistentAccessControl (  )  [pure virtual]
bool AccountHandler::hasSession ( const UT_UTF8String sSessionId  )  [virtual]

Reimplemented in ServiceAccountHandler.

References m_vBuddies, and UT_continue_if_fail.

void AccountHandler::joinSessionAsync ( BuddyPtr  pBuddy,
DocHandle docHandle 
) [virtual]
bool AccountHandler::operator== ( AccountHandler rhHandler  )  [virtual]

References m_properties.

virtual bool AccountHandler::recognizeBuddyIdentifier ( const std::string &  identifier  )  [pure virtual]
virtual bool AccountHandler::send ( const Packet packet,
BuddyPtr  buddy 
) [pure virtual]
virtual bool AccountHandler::setAcl ( AbiCollab ,
const std::vector< std::string > &   
) [inline, virtual]
void AccountHandler::setOffering ( bool  bCanOffer  )  [inline]

References m_bCanOffer.

void AccountHandler::signal ( const Event event,
BuddyPtr  pSource 
) [virtual]
virtual bool AccountHandler::startSession ( PD_Document ,
const std::vector< std::string > &  ,
AbiCollab **   
) [inline, virtual]

Member Data Documentation

Referenced by getCanOffer(), and setOffering().


The documentation for this class was generated from the following files: