当前位置: 首页>>代码示例>>C++>>正文


C++ AbiCollabSessionManager::disconnectSession方法代码示例

本文整理汇总了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);
}
开发者ID:tanya-guza,项目名称:abiword,代码行数:16,代码来源:AbiCollab_Export.cpp

示例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.
}
开发者ID:tanya-guza,项目名称:abiword,代码行数:24,代码来源:AbiCollab_Export.cpp


注:本文中的AbiCollabSessionManager::disconnectSession方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。