#include <ServiceAccountHandler.h>
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 std::string &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< ConnectionPtr > | m_connections |
std::map< uint64_t, DocumentPermissions > | m_permissions |
std::string | m_ssl_ca_file |
PL_ListenerId | m_iListenerID |
AbiCollabService_Export * | m_pExport |
ServiceAccountHandler::ServiceAccountHandler | ( | ) |
References XAP_App::getAbiSuiteLibDir(), XAP_App::getApp(), and m_ssl_ca_file.
ServiceAccountHandler::~ServiceAccountHandler | ( | ) | [virtual] |
References disconnect().
ServiceBuddyPtr ServiceAccountHandler::_getBuddy | ( | const UT_UTF8String & | descriptor | ) | [private] |
References AccountHandler::getBuddies(), and UT_continue_if_fail.
Referenced by _getConnections(), _listDocuments_cb(), getAcl(), and setAcl().
ServiceBuddyPtr ServiceAccountHandler::_getBuddy | ( | ServiceBuddyPtr | pBuddy | ) | [private] |
References AccountHandler::getBuddies(), UT_continue_if_fail, and UT_return_val_if_fail.
ServiceBuddyPtr ServiceAccountHandler::_getBuddy | ( | ServiceBuddyType | type, | |
uint64_t | user_id | |||
) | [private] |
References AccountHandler::getBuddies(), and UT_continue_if_fail.
ConnectionPtr ServiceAccountHandler::_getConnection | ( | const std::string & | session_id | ) | [private] |
References m_connections, and UT_continue_if_fail.
bool ServiceAccountHandler::_getConnections | ( | ) | [private] |
References _getBuddy(), _getDomain(), AccountHandler::addBuddy(), AccountHandler::addProperty(), askPassword(), soa::SoapFault::detail(), abicollab::service::error(), AbiCollabSessionManager::getManager(), AccountHandler::getProperty(), soup_soa::invoke(), m_ssl_ca_file, SERVICE_FRIEND, SERVICE_GROUP, abicollab::service::SOAP_ERROR_INVALID_PASSWORD, AbiCollabSessionManager::storeProfile(), soa::SoapFault::string(), UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by getBuddiesAsync().
std::string ServiceAccountHandler::_getDomain | ( | const std::string & | protocol | ) | [private] |
References AccountHandler::getProperty().
std::string ServiceAccountHandler::_getDomain | ( | ) | [private] |
References UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.
Referenced by _getConnections(), _handleMessages(), _listDocuments_cb(), _openDocumentMaster(), constructBuddy(), hasAccess(), recognizeBuddyIdentifier(), and startSession().
bool ServiceAccountHandler::_getPermissions | ( | uint64_t | doc_id, | |
DocumentPermissions & | perms | |||
) | [private] |
References AccountHandler::addProperty(), askPassword(), soa::SoapFault::detail(), abicollab::service::error(), AbiCollabSessionManager::getManager(), AccountHandler::getProperty(), DocumentPermissions::group_read_only, DocumentPermissions::group_read_owner, DocumentPermissions::group_read_write, soup_soa::invoke(), m_ssl_ca_file, DocumentPermissions::read_only, DocumentPermissions::read_write, s_copy_int_array(), abicollab::service::SOAP_ERROR_INVALID_PASSWORD, AbiCollabSessionManager::storeProfile(), soa::SoapFault::string(), UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by getAcl().
void ServiceAccountHandler::_handleJoinSessionRequestResponse | ( | JoinSessionRequestResponseEvent * | jsre, | |
BuddyPtr | pBuddy, | |||
XAP_Frame * | pFrame, | |||
PD_Document ** | pDoc, | |||
const std::string & | filename, | |||
bool | bLocallyOwned | |||
) | [private] |
References AbiCollabSessionManager::deserializeDocument(), gchar, JoinSessionRequestResponseEvent::getAuthorId(), AbiCollabSessionManager::getManager(), JoinSessionRequestResponseEvent::getSessionId(), AbiCollabSessionManager::joinSession(), JoinSessionRequestResponseEvent::m_iRev, JoinSessionRequestResponseEvent::m_sDocumentId, JoinSessionRequestResponseEvent::m_sZABW, UT_DEBUGMSG, UT_OK, and UT_return_if_fail.
Referenced by _handleMessages().
void ServiceAccountHandler::_handleMessages | ( | ConnectionPtr | connection | ) | [private] |
References AccountHandler::_createPacket(), _getDomain(), _handleJoinSessionRequestResponse(), AccountHandler::_handleProtocolError(), _write_result(), constructBuddy(), DELETEP, abicollab::service::error(), SessionTakeoverRequestPacket::getBuddyIdentifiers(), AbiCollabSessionManager::getManager(), AccountHandler::handleMessage(), realm::protocolv1::PACKET_DELIVER, realm::protocolv1::PACKET_USERJOINED, realm::protocolv1::PACKET_USERLEFT, parseUserInfo(), SessionTakeoverRequestPacket::promote(), AbiCollabSessionManager::removeBuddy(), send(), UT_ASSERT, UT_continue_if_fail, UT_DEBUGMSG, UT_return_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by _handleRealmPacket().
void ServiceAccountHandler::_handleRealmPacket | ( | ConnectionPtr | connection | ) | [private] |
References _handleMessages(), _removeConnection(), AbiCollabSessionManager::getManager(), AbiCollabSessionManager::removeBuddy(), UT_continue_if_fail, UT_DEBUGMSG, and UT_return_if_fail.
Referenced by _realmConnect().
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] |
References soup_soa::invoke(), m_ssl_ca_file, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by _listDocuments_cb(), and getSessionsAsync().
void ServiceAccountHandler::_listDocuments_cb | ( | bool | success, | |
soa::function_call_ptr | fc_ptr, | |||
boost::shared_ptr< std::string > | result_ptr | |||
) | [private] |
TODO: show a message box?
References _getBuddy(), _getDomain(), AccountHandler::_handlePacket(), _listDocuments(), _parseSessionFiles(), AccountHandler::addBuddy(), AccountHandler::addProperty(), askPassword(), AbiCollabSessionManager::beginAsyncOperation(), constructListDocumentsCall(), soa::SoapFault::detail(), AbiCollabSessionManager::endAsyncOperation(), abicollab::service::error(), soa::method_invocation::function(), AbiCollabSessionManager::getManager(), AccountHandler::getProperty(), soa::parse_response(), SERVICE_FRIEND, SERVICE_GROUP, SERVICE_USER, abicollab::service::SOAP_ERROR_INVALID_PASSWORD, abicollab::service::SOAP_ERROR_OK, AbiCollabSessionManager::storeProfile(), soa::SoapFault::string(), UT_DEBUGMSG, and UT_return_if_fail.
Referenced by getSessionsAsync().
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] |
acs::SOAP_ERROR ServiceAccountHandler::_openDocumentSlave | ( | ConnectionPtr | connection, | |
PD_Document ** | pDoc, | |||
XAP_Frame * | pFrame, | |||
const std::string & | filename, | |||
bool | bLocallyOwned | |||
) | [private] |
References AP_Dialog_GenericProgress::getAnswer(), XAP_App::getApp(), XAP_App::getDialogFactory(), getDialogGenericProgressId(), XAP_App::getLastFocussedFrame(), m_iListenerID, m_pExport, XAP_DialogFactory::releaseDialog(), XAP_DialogFactory::requestDialog(), AP_Dialog_GenericProgress::runModal(), AP_Dialog_GenericProgress::setInformation(), AP_Dialog_GenericProgress::setTitle(), abicollab::service::SOAP_ERROR_GENERIC, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by openDocument().
void ServiceAccountHandler::_parseSessionFiles | ( | soa::ArrayPtr | files_array, | |
GetSessionsResponseEvent & | gsre | |||
) | [private] |
References file, GetSessionsResponseEvent::m_Sessions, UT_DEBUGMSG, and UT_return_if_fail.
Referenced by _listDocuments_cb().
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] |
References _handleRealmPacket(), m_ssl_ca_file, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by openDocument(), and startSession().
void ServiceAccountHandler::_removeConnection | ( | const std::string & | session_id | ) | [private] |
References m_connections, UT_continue_if_fail, and UT_DEBUGMSG.
Referenced by _handleRealmPacket().
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::_setPermissions | ( | UT_uint64 | doc_id, | |
DocumentPermissions & | perms | |||
) | [private] |
References AccountHandler::addProperty(), askPassword(), soa::SoapFault::detail(), abicollab::service::error(), AbiCollabSessionManager::getManager(), AccountHandler::getProperty(), DocumentPermissions::group_read_only, DocumentPermissions::group_read_owner, DocumentPermissions::group_read_write, soa::INT_TYPE, soup_soa::invoke(), m_ssl_ca_file, DocumentPermissions::read_only, DocumentPermissions::read_write, abicollab::service::SOAP_ERROR_INVALID_PASSWORD, AbiCollabSessionManager::storeProfile(), soa::SoapFault::string(), UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by setAcl().
bool ServiceAccountHandler::_splitDescriptor | ( | const std::string & | descriptor, | |
uint64_t & | user_id, | |||
uint8_t & | conn_id, | |||
std::string & | domain | |||
) | [private] |
References UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by constructBuddy(), and recognizeBuddyIdentifier().
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::askFilename | ( | std::string & | filename, | |
bool | firsttime | |||
) | [static] |
References ensureExt(), AP_Dialog_GenericInput::getAnswer(), XAP_App::getApp(), XAP_App::getDialogFactory(), getDialogGenericInputId(), AP_Dialog_GenericInput::getInput(), XAP_App::getLastFocussedFrame(), XAP_DialogFactory::releaseDialog(), XAP_DialogFactory::requestDialog(), AP_Dialog_GenericInput::runModal(), AP_Dialog_GenericInput::setInput(), AP_Dialog_GenericInput::setLabel(), AP_Dialog_GenericInput::setMinLenght(), AP_Dialog_GenericInput::setPassword(), AP_Dialog_GenericInput::setQuestion(), AP_Dialog_GenericInput::setTitle(), UT_DEBUGMSG, UT_return_val_if_fail, and UT_UTF8String::utf8_str().
Referenced by startSession().
bool ServiceAccountHandler::askPassword | ( | const std::string & | email, | |
std::string & | password | |||
) | [static] |
References AP_Dialog_GenericInput::getAnswer(), XAP_App::getApp(), XAP_App::getDialogFactory(), getDialogGenericInputId(), AP_Dialog_GenericInput::getInput(), XAP_DialogFactory::releaseDialog(), XAP_DialogFactory::requestDialog(), AP_Dialog_GenericInput::runModal(), AP_Dialog_GenericInput::setLabel(), AP_Dialog_GenericInput::setMinLenght(), AP_Dialog_GenericInput::setPassword(), AP_Dialog_GenericInput::setQuestion(), AP_Dialog_GenericInput::setTitle(), UT_DEBUGMSG, UT_return_val_if_fail, and UT_UTF8String::utf8_str().
Referenced by IE_Imp_AbiCollab::_getAccount(), _getConnections(), _getPermissions(), _listDocuments_cb(), IE_Imp_AbiCollab::_openDocument(), AbiCollabSaveInterceptor::_save_cb(), _setPermissions(), joinSessionAsync(), and startSession().
bool ServiceAccountHandler::canShare | ( | BuddyPtr | pBuddy | ) | [virtual] |
Reimplemented from AccountHandler.
References UT_return_val_if_fail.
ConnectResult ServiceAccountHandler::connect | ( | ) | [virtual] |
Implements AccountHandler.
References CONNECT_INTERNAL_ERROR, AbiCollabSessionManager::getManager(), m_bOnline, AbiCollabSessionManager::registerEventListener(), AbiCollabSessionManager::signal(), UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by IE_Imp_AbiCollab::_getAccount().
BuddyPtr ServiceAccountHandler::constructBuddy | ( | const std::string & | descriptor, | |
BuddyPtr | pBuddy | |||
) | [virtual] |
Implements AccountHandler.
References _getDomain(), _splitDescriptor(), UT_ASSERT_HARMLESS, UT_continue_if_fail, UT_DEBUGMSG, UT_NOT_REACHED, and UT_return_val_if_fail.
BuddyPtr ServiceAccountHandler::constructBuddy | ( | const PropertyMap & | props | ) | [virtual] |
Implements AccountHandler.
References UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_NOT_IMPLEMENTED.
Referenced by _handleMessages().
soa::function_call_ptr ServiceAccountHandler::constructListDocumentsCall | ( | ) |
References AccountHandler::getProperty().
Referenced by _listDocuments_cb(), and getSessionsAsync().
soa::function_call_ptr ServiceAccountHandler::constructSaveDocumentCall | ( | PD_Document * | pDoc, | |
ConnectionPtr | connection_ptr | |||
) |
References AccountHandler::getProperty(), AbiCollabSessionManager::serializeDocument(), UT_DEBUGMSG, UT_OK, and UT_return_val_if_fail.
Referenced by AbiCollabSaveInterceptor::_save_cb(), and AbiCollabSaveInterceptor::save().
bool ServiceAccountHandler::disconnect | ( | void | ) | [virtual] |
Implements AccountHandler.
References AbiCollabSessionManager::getManager(), m_bOnline, removeExporter(), AbiCollabSessionManager::signal(), AbiCollabSessionManager::unregisterEventListener(), UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by ~ServiceAccountHandler().
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.
bool ServiceAccountHandler::getAcl | ( | AbiCollab * | pSession, | |
std::vector< std::string > & | vAcl | |||
) | [virtual] |
Reimplemented from AccountHandler.
References _getBuddy(), _getConnection(), _getPermissions(), AbiCollab::getSessionId(), DocumentPermissions::group_read_write, m_permissions, DocumentPermissions::read_write, SERVICE_FRIEND, SERVICE_GROUP, UT_continue_if_fail, UT_DEBUGMSG, and UT_return_val_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] |
References m_ssl_ca_file.
Referenced by AbiCollabSaveInterceptor::_save_cb(), and AbiCollabSaveInterceptor::save().
ConnectionPtr ServiceAccountHandler::getConnection | ( | PD_Document * | pDoc | ) |
References m_connections, UT_continue_if_fail, and UT_return_val_if_fail.
Referenced by AbiCollabSaveInterceptor::save().
UT_UTF8String ServiceAccountHandler::getDescription | ( | ) | [virtual] |
Implements AccountHandler.
References AccountHandler::getProperty().
Referenced by AbiCollabSaveInterceptor::save().
XAP_Dialog_Id ServiceAccountHandler::getDialogGenericInputId | ( | ) | [static] |
References ap_Dialog_GenericInput_Constructor, XAP_App::getApp(), XAP_App::getDialogFactory(), m_iDialogGenericInput, XAP_DialogFactory::registerDialog(), and XAP_DLGT_NON_PERSISTENT.
Referenced by askFilename(), and askPassword().
XAP_Dialog_Id ServiceAccountHandler::getDialogGenericProgressId | ( | ) | [static] |
UT_UTF8String ServiceAccountHandler::getDisplayType | ( | ) | [virtual] |
Implements AccountHandler.
void ServiceAccountHandler::getSessionsAsync | ( | ) | [virtual] |
void ServiceAccountHandler::getSessionsAsync | ( | const Buddy & | buddy | ) | [virtual] |
UT_UTF8String ServiceAccountHandler::getShareHint | ( | PD_Document * | pDoc | ) | [virtual] |
Reimplemented from AccountHandler.
References AbiCollabSessionManager::getManager(), AccountHandler::getProperty(), AbiCollabSessionManager::isInSession(), UT_return_val_if_fail, and UT_UTF8String_sprintf().
UT_UTF8String ServiceAccountHandler::getStaticStorageType | ( | ) | [static] |
Reimplemented from AccountHandler.
Referenced by getStorageType(), and AbiCollabSessionManager::registerAccountHandlers().
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 std::string & | sSessionId | ) | [virtual] |
Reimplemented from AccountHandler.
References m_connections, and UT_continue_if_fail.
bool ServiceAccountHandler::isOnline | ( | ) | [virtual] |
Reimplemented from AccountHandler.
References AccountHandler::addProperty(), askPassword(), XAP_App::getApp(), XAP_App::getLastFocussedFrame(), AbiCollabSessionManager::getManager(), DocHandle::getName(), AccountHandler::getProperty(), DocHandle::getSessionId(), openDocument(), XAP_Frame::showMessageBox(), abicollab::service::SOAP_ERROR_INVALID_PASSWORD, abicollab::service::SOAP_ERROR_OK, AbiCollabSessionManager::storeProfile(), UT_DEBUGMSG, UT_return_if_fail, and UT_UTF8String::utf8_str().
acs::SOAP_ERROR ServiceAccountHandler::openDocument | ( | UT_uint64 | doc_id, | |
UT_uint64 | revision, | |||
const std::string & | session_id, | |||
PD_Document ** | pDoc, | |||
XAP_Frame * | pFrame | |||
) |
References _openDocumentMaster(), _openDocumentSlave(), _realmConnect(), soa::SoapFault::detail(), abicollab::service::error(), AccountHandler::getProperty(), m_connections, m_ssl_ca_file, abicollab::service::SOAP_ERROR_GENERIC, abicollab::service::SOAP_ERROR_OK, soa::SoapFault::string(), UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by IE_Imp_AbiCollab::_openDocument(), and joinSessionAsync().
bool ServiceAccountHandler::parseUserInfo | ( | const std::string & | userinfo, | |
uint64_t & | user_id | |||
) | [static] |
References FREEP, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by _handleMessages(), and RealmConnection::_login().
bool ServiceAccountHandler::recognizeBuddyIdentifier | ( | const std::string & | identifier | ) | [virtual] |
Implements AccountHandler.
References _getDomain(), and _splitDescriptor().
void ServiceAccountHandler::removeExporter | ( | void | ) |
References DELETEP, AbiCollabService_Export::getDocument(), m_iListenerID, m_pExport, and PD_Document::removeListener().
Referenced by disconnect(), and AbiCollabService_Export::removeDocument().
Implements AccountHandler.
References AccountHandler::_createPacketStream(), _send(), UT_DEBUGMSG, and UT_return_val_if_fail.
bool ServiceAccountHandler::send | ( | const Packet * | packet | ) | [virtual] |
Implements AccountHandler.
References UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_NOT_IMPLEMENTED.
Referenced by _handleMessages(), and _send().
bool ServiceAccountHandler::setAcl | ( | AbiCollab * | pSession, | |
const std::vector< std::string > & | vAcl | |||
) | [virtual] |
Reimplemented from AccountHandler.
References _getBuddy(), _getConnection(), _setPermissions(), AbiCollab::getSessionId(), DocumentPermissions::group_read_only, DocumentPermissions::group_read_owner, DocumentPermissions::group_read_write, m_permissions, printf, DocumentPermissions::read_only, DocumentPermissions::read_write, SERVICE_FRIEND, SERVICE_GROUP, SERVICE_USER, UT_ASSERT_HARMLESS, UT_continue_if_fail, UT_DEBUGMSG, UT_NOT_REACHED, and UT_return_val_if_fail.
Reimplemented from AccountHandler.
References _getConnection(), DisjoinSessionEvent::getSessionId(), CloseSessionEvent::getSessionId(), PCT_CloseSessionEvent, PCT_DisjoinSessionEvent, PCT_StartSessionEvent, UT_DEBUGMSG, and UT_return_if_fail.
bool ServiceAccountHandler::startSession | ( | PD_Document * | pDoc, | |
const std::vector< std::string > & | vAcl, | |||
AbiCollab ** | pSession | |||
) | [virtual] |
Reimplemented from AccountHandler.
References _getDomain(), _realmConnect(), PD_Document::addListener(), AccountHandler::addProperty(), askFilename(), askPassword(), soa::SoapFault::detail(), abicollab::service::error(), AD_Document::getFilename(), AbiCollabSessionManager::getManager(), AccountHandler::getProperty(), soup_soa::invoke(), m_connections, m_iListenerID, m_pExport, m_ssl_ca_file, PD_SIGNAL_DOCNAME_CHANGED, AbiCollabSessionManager::serializeDocument(), PD_Document::setClean(), AD_Document::setFilename(), PD_Document::signalListeners(), abicollab::service::SOAP_ERROR_DUP_FILENAME, abicollab::service::SOAP_ERROR_INVALID_PASSWORD, AbiCollabSessionManager::startSession(), AbiCollabSessionManager::storeProfile(), soa::SoapFault::string(), UT_DEBUGMSG, UT_go_basename_from_uri(), UT_OK, and UT_return_val_if_fail.
bool ServiceAccountHandler::m_bOnline [private] |
Referenced by connect(), disconnect(), and isOnline().
std::vector<ConnectionPtr> ServiceAccountHandler::m_connections [private] |
Referenced by _getConnection(), _removeConnection(), getConnection(), hasSession(), openDocument(), and startSession().
Referenced by getDialogGenericInputId().
Referenced by getDialogGenericProgressId().
Referenced by _openDocumentMaster(), _openDocumentSlave(), removeExporter(), and startSession().
std::map<uint64_t, DocumentPermissions> ServiceAccountHandler::m_permissions [private] |
Referenced by _openDocumentMaster(), _openDocumentSlave(), removeExporter(), and startSession().
AbiCollabSaveInterceptor ServiceAccountHandler::m_saveInterceptor = AbiCollabSaveInterceptor() [static] |
Referenced by AbiCollabSaveInterceptor_interceptor(), and AbiCollabService_Export::signal().
std::string ServiceAccountHandler::m_ssl_ca_file [private] |
Referenced by _getConnections(), _getPermissions(), _listDocuments(), _realmConnect(), _setPermissions(), getCA(), openDocument(), ServiceAccountHandler(), and startSession().