本文整理汇总了C++中AbiCollabSessionManager::disconnectSession方法的典型用法代码示例。如果您正苦于以下问题:C++ AbiCollabSessionManager::disconnectSession方法的具体用法?C++ AbiCollabSessionManager::disconnectSession怎么用?C++ AbiCollabSessionManager::disconnectSession使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbiCollabSessionManager
的用法示例。
在下文中一共展示了AbiCollabSessionManager::disconnectSession方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeDocument
/*!
* This virtual method is called if the attached document is deleted with an attached
* AbiCollab_Export connected to the document.
*/
void ABI_Collab_Export::removeDocument(void)
{
UT_DEBUGMSG(("ABI_Collab_Export::removeDocument()\n"));
// inform the session manager that this session is being (forcefully) closed
AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager();
UT_return_if_fail(pManager);
// WARNING: Don't do anything after this line, as the disconnectSession() call will
// have destroyed ourselves (yes, that is ugly).
pManager->disconnectSession(m_pAbiCollab);
}
示例2: setNewDocument
/*!
* This virtual method is called from the AbiWord main tree upon doing a replace document with an attached
* AbiCollab_Export connected to the document.
*
* Note: this is a really weird signal, coming from a PD_Document
* Note: If anything, a Frame should emit this signal to its listeners
*/
void ABI_Collab_Export::setNewDocument(PD_Document * /*pDoc*/)
{
UT_DEBUGMSG(("ABI_Collab_Export::setNewDocument()\n"));
// inform the session manager to kill off this session, as that is the only
// thing we can do if the document is replaced
AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager();
UT_return_if_fail(pManager);
// WARNING: Don't do anything after this line, as the disconnectSession() call will
// have destroyed ourselves (yes, that is ugly).
pManager->disconnectSession(m_pAbiCollab);
// FIXME: The AbiCollab destructor will unregister this object as a PD_Document listener,
// while the PD_Document will also unregister us as soon as this function returns.
// Unregistering the same object twice works, but it is ugly as hell. Fix this someday.
}