Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

ServiceAccountHandler Class Reference

#include <ServiceAccountHandler.h>

Inheritance diagram for ServiceAccountHandler:
AccountHandler EventListener ServiceUnixAccountHandler ServiceWin32AccountHandler

List of all members.

Public Member Functions

 ServiceAccountHandler ()
virtual ~ServiceAccountHandler ()
virtual UT_UTF8String getStorageType ()
virtual UT_UTF8String getDescription ()
virtual UT_UTF8String getDisplayType ()
virtual UT_UTF8String getShareHint (PD_Document *pDoc)
virtual ConnectResult connect ()
virtual bool disconnect ()
virtual bool isOnline ()
ConnectionPtr getConnection (PD_Document *pDoc)
virtual void getBuddiesAsync ()
virtual BuddyPtr constructBuddy (const PropertyMap &props)
virtual BuddyPtr constructBuddy (const std::string &descriptor, BuddyPtr pBuddy)
virtual bool allowsManualBuddies ()
virtual bool recognizeBuddyIdentifier (const std::string &identifier)
virtual void forceDisconnectBuddy (BuddyPtr pBuddy)
virtual bool hasAccess (const std::vector< std::string > &vAcl, BuddyPtr pBuddy)
virtual bool hasPersistentAccessControl ()
virtual bool canShare (BuddyPtr pBuddy)
virtual bool send (const Packet *packet)
virtual bool send (const Packet *packet, BuddyPtr pBuddy)
virtual void getSessionsAsync ()
virtual void getSessionsAsync (const Buddy &buddy)
virtual bool startSession (PD_Document *pDoc, const std::vector< std::string > &vAcl, AbiCollab **pSession)
virtual bool getAcl (AbiCollab *pSession, std::vector< std::string > &vAcl)
virtual bool setAcl (AbiCollab *pSession, const std::vector< std::string > &vAcl)
virtual void joinSessionAsync (BuddyPtr pBuddy, DocHandle &docHandle)
virtual bool hasSession (const UT_UTF8String &sSessionId)
acs::SOAP_ERROR openDocument (UT_uint64 doc_id, UT_uint64 revision, const std::string &session_id, PD_Document **pDoc, XAP_Frame *pFrame)
soa::function_call_ptr constructListDocumentsCall ()
soa::function_call_ptr constructSaveDocumentCall (PD_Document *pDoc, ConnectionPtr connection_ptr)
void removeExporter (void)
virtual bool allowsSessionTakeover ()
virtual void signal (const Event &event, BuddyPtr pSource)
const std::string & getCA () const

Static Public Member Functions

static bool askPassword (const std::string &email, std::string &password)
static bool askFilename (std::string &filename, bool firsttime)
static void ensureExt (std::string &filename, const std::string &extension)
static UT_UTF8String getStaticStorageType ()
static XAP_Dialog_Id getDialogGenericInputId ()
static XAP_Dialog_Id getDialogGenericProgressId ()
static bool parseUserInfo (const std::string &userinfo, uint64_t &user_id)

Static Public Attributes

static XAP_Dialog_Id m_iDialogGenericInput = 0
static XAP_Dialog_Id m_iDialogGenericProgress = 0
static AbiCollabSaveInterceptor m_saveInterceptor = AbiCollabSaveInterceptor()

Private Member Functions

ConnectionPtr _realmConnect (soa::CollectionPtr rcp, UT_uint64 doc_id, const std::string &session_id, bool master)
ServiceBuddyPtr _getBuddy (const UT_UTF8String &descriptor)
ServiceBuddyPtr _getBuddy (ServiceBuddyPtr pBuddy)
ServiceBuddyPtr _getBuddy (ServiceBuddyType type, uint64_t user_id)
template<class T >
void _send (boost::shared_ptr< T > packet, RealmBuddyPtr recipient)
void _write_handler (const asio::error_code &e, std::size_t bytes_transferred, boost::shared_ptr< const RealmBuddy > recipient, boost::shared_ptr< rpv1::Packet > packet)
void _write_result (const asio::error_code &e, std::size_t bytes_transferred, ConnectionPtr connection, boost::shared_ptr< rpv1::Packet > packet)
bool _listDocuments (soa::function_call_ptr fc_ptr, const std::string uri, bool verify_webapp_host, boost::shared_ptr< std::string > result_ptr)
void _listDocuments_cb (bool success, soa::function_call_ptr fc_ptr, boost::shared_ptr< std::string > result_ptr)
acs::SOAP_ERROR _openDocumentMaster (ConnectionPtr connection, soa::CollectionPtr rcp, PD_Document **pDoc, XAP_Frame *pFrame, const std::string &session_id, const std::string &filename, bool bLocallyOwned)
acs::SOAP_ERROR _openDocumentSlave (ConnectionPtr connection, PD_Document **pDoc, XAP_Frame *pFrame, const std::string &filename, bool bLocallyOwned)
bool _getConnections ()
bool _getPermissions (uint64_t doc_id, DocumentPermissions &perms)
bool _setPermissions (UT_uint64 doc_id, DocumentPermissions &perms)
void _handleJoinSessionRequestResponse (JoinSessionRequestResponseEvent *jsre, BuddyPtr pBuddy, XAP_Frame *pFrame, PD_Document **pDoc, const std::string &filename, bool bLocallyOwned)
void _handleRealmPacket (ConnectionPtr connection)
ConnectionPtr _getConnection (const std::string &session_id)
void _removeConnection (const std::string &session_id)
void _handleMessages (ConnectionPtr connection)
void _parseSessionFiles (soa::ArrayPtr files_array, GetSessionsResponseEvent &gsre)
bool _splitDescriptor (const std::string &descriptor, uint64_t &user_id, uint8_t &conn_id, std::string &domain)
std::string _getDomain (const std::string &protocol)
std::string _getDomain ()
bool _parseUserInfo (const std::string &userinfo, uint64_t &user_id)

Private Attributes

bool m_bOnline
std::vector< ConnectionPtrm_connections
std::map< uint64_t,
DocumentPermissions
m_permissions
std::string m_ssl_ca_file
PL_ListenerId m_iListenerID
AbiCollabService_Exportm_pExport

Constructor & Destructor Documentation

ServiceAccountHandler::ServiceAccountHandler (  ) 
ServiceAccountHandler::~ServiceAccountHandler (  )  [virtual]

References disconnect().


Member Function Documentation

ServiceBuddyPtr ServiceAccountHandler::_getBuddy ( const UT_UTF8String descriptor  )  [private]
ServiceBuddyPtr ServiceAccountHandler::_getBuddy ( ServiceBuddyPtr  pBuddy  )  [private]
ServiceBuddyPtr ServiceAccountHandler::_getBuddy ( ServiceBuddyType  type,
uint64_t  user_id 
) [private]
ConnectionPtr ServiceAccountHandler::_getConnection ( const std::string &  session_id  )  [private]

References m_connections, and UT_continue_if_fail.

Referenced by getAcl(), setAcl(), and signal().

std::string ServiceAccountHandler::_getDomain ( const std::string &  protocol  )  [private]
void ServiceAccountHandler::_handleRealmPacket ( ConnectionPtr  connection  )  [private]
bool ServiceAccountHandler::_listDocuments ( soa::function_call_ptr  fc_ptr,
const std::string  uri,
bool  verify_webapp_host,
boost::shared_ptr< std::string >  result_ptr 
) [private]
acs::SOAP_ERROR ServiceAccountHandler::_openDocumentMaster ( ConnectionPtr  connection,
soa::CollectionPtr  rcp,
PD_Document **  pDoc,
XAP_Frame pFrame,
const std::string &  session_id,
const std::string &  filename,
bool  bLocallyOwned 
) [private]
void ServiceAccountHandler::_parseSessionFiles ( soa::ArrayPtr  files_array,
GetSessionsResponseEvent gsre 
) [private]
bool ServiceAccountHandler::_parseUserInfo ( const std::string &  userinfo,
uint64_t &  user_id 
) [private]
ConnectionPtr ServiceAccountHandler::_realmConnect ( soa::CollectionPtr  rcp,
UT_uint64  doc_id,
const std::string &  session_id,
bool  master 
) [private]
void ServiceAccountHandler::_removeConnection ( const std::string &  session_id  )  [private]
template<class T >
void ServiceAccountHandler::_send ( boost::shared_ptr< T >  packet,
RealmBuddyPtr  recipient 
) [inline, private]

References _write_handler(), abicollab::service::error(), and send().

Referenced by send().

bool ServiceAccountHandler::_splitDescriptor ( const std::string &  descriptor,
uint64_t &  user_id,
uint8_t &  conn_id,
std::string &  domain 
) [private]
void ServiceAccountHandler::_write_handler ( const asio::error_code &  e,
std::size_t  bytes_transferred,
boost::shared_ptr< const RealmBuddy recipient,
boost::shared_ptr< rpv1::Packet packet 
) [private]

Referenced by _send().

void ServiceAccountHandler::_write_result ( const asio::error_code &  e,
std::size_t  bytes_transferred,
ConnectionPtr  connection,
boost::shared_ptr< rpv1::Packet packet 
) [private]

Referenced by _handleMessages().

virtual bool ServiceAccountHandler::allowsManualBuddies (  )  [inline, virtual]

Implements AccountHandler.

virtual bool ServiceAccountHandler::allowsSessionTakeover (  )  [inline, virtual]

Implements AccountHandler.

bool ServiceAccountHandler::canShare ( BuddyPtr  pBuddy  )  [virtual]

Reimplemented from AccountHandler.

References UT_return_val_if_fail.

BuddyPtr ServiceAccountHandler::constructBuddy ( const std::string &  descriptor,
BuddyPtr  pBuddy 
) [virtual]
BuddyPtr ServiceAccountHandler::constructBuddy ( const PropertyMap props  )  [virtual]
soa::function_call_ptr ServiceAccountHandler::constructListDocumentsCall (  ) 
void ServiceAccountHandler::ensureExt ( std::string &  filename,
const std::string &  extension 
) [static]

Referenced by askFilename().

void ServiceAccountHandler::forceDisconnectBuddy ( BuddyPtr  pBuddy  )  [virtual]

Implements AccountHandler.

References UT_DEBUGMSG, and UT_return_if_fail.

void ServiceAccountHandler::getBuddiesAsync (  )  [virtual]

Reimplemented from AccountHandler.

References _getConnections(), UT_DEBUGMSG, and UT_return_if_fail.

const std::string& ServiceAccountHandler::getCA (  )  const [inline]
ConnectionPtr ServiceAccountHandler::getConnection ( PD_Document pDoc  ) 
UT_UTF8String ServiceAccountHandler::getDescription (  )  [virtual]
UT_UTF8String ServiceAccountHandler::getDisplayType (  )  [virtual]

Implements AccountHandler.

UT_UTF8String ServiceAccountHandler::getStaticStorageType (  )  [static]
virtual UT_UTF8String ServiceAccountHandler::getStorageType (  )  [inline, virtual]

Implements AccountHandler.

References getStaticStorageType().

bool ServiceAccountHandler::hasAccess ( const std::vector< std::string > &  vAcl,
BuddyPtr  pBuddy 
) [virtual]

Reimplemented from AccountHandler.

References _getDomain(), UT_DEBUGMSG, and UT_return_val_if_fail.

virtual bool ServiceAccountHandler::hasPersistentAccessControl (  )  [inline, virtual]

Implements AccountHandler.

bool ServiceAccountHandler::hasSession ( const UT_UTF8String sSessionId  )  [virtual]
bool ServiceAccountHandler::isOnline (  )  [virtual]

Implements AccountHandler.

References m_bOnline.

Referenced by IE_Imp_AbiCollab::_getAccount().

bool ServiceAccountHandler::parseUserInfo ( const std::string &  userinfo,
uint64_t &  user_id 
) [static]
bool ServiceAccountHandler::recognizeBuddyIdentifier ( const std::string &  identifier  )  [virtual]

Implements AccountHandler.

References _getDomain(), and _splitDescriptor().

void ServiceAccountHandler::removeExporter ( void   ) 
bool ServiceAccountHandler::send ( const Packet packet,
BuddyPtr  pBuddy 
) [virtual]
bool ServiceAccountHandler::send ( const Packet packet  )  [virtual]

Implements AccountHandler.

References UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_NOT_IMPLEMENTED.

Referenced by _handleMessages(), and _send().


Member Data Documentation

Referenced by getAcl(), and setAcl().


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