这篇教程C++ AbiCollabSessionManager类代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AbiCollabSessionManager类的典型用法代码示例。如果您正苦于以下问题:C++ AbiCollabSessionManager类的具体用法?C++ AbiCollabSessionManager怎么用?C++ AbiCollabSessionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。 在下文中一共展示了AbiCollabSessionManager类的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: UT_DEBUGMSGvoid Synchronizer::_registerWndClass() // Win32-only{ if (sm_iClass) { UT_DEBUGMSG(("Skipping window class registration/n")); return; } AbiCollabSessionManager * pSessionManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pSessionManager); HINSTANCE hInstance = pSessionManager->getInstance(); UT_return_if_fail(hInstance); WNDCLASS wc; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = Synchronizer::s_wndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = NULL; wc.hCursor = NULL; wc.hbrBackground = NULL; wc.lpszMenuName = NULL; wc.lpszClassName = SYNC_CLASSNAME; sm_iClass = RegisterClass(&wc); UT_return_if_fail(sm_iClass); sm_iMessageWindows = 0;}
开发者ID:monkeyiq,项目名称:odf-2011-track-changes-git-svn,代码行数:31,
示例2: gtk_list_store_newvoid AP_UnixDialog_CollaborationAddBuddy::_populateWindowData(){ // populate the account combobox GtkListStore* store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); GtkTreeIter iter; AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); for (UT_uint32 i = 0; i < pManager->getAccounts().size(); i++) { AccountHandler* pHandler = pManager->getAccounts()[i]; if (pHandler && pHandler->allowsManualBuddies()) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, DESC_COLUMN, pHandler->getDescription().utf8_str(), HANDLER_COLUMN, pHandler, -1); } } m_model = GTK_TREE_MODEL (store); gtk_combo_box_set_model(GTK_COMBO_BOX(m_wAccount), m_model); // if we have at least one account, then make sure the first one is selected if (pManager->getAccounts().size() > 0) { gtk_combo_box_set_active(GTK_COMBO_BOX(m_wAccount), 0); } else { // nope, we don't have any account :'-( gtk_combo_box_set_active(GTK_COMBO_BOX(m_wAccount), -1); }}
开发者ID:tchx84,项目名称:debian-abiword-packages,代码行数:33,
示例3: UT_DEBUGMSGbool TelepathyAccountHandler::disconnect(){ UT_DEBUGMSG(("TelepathyAccountHandler::disconnect()/n")); UT_return_val_if_fail(m_pTpClient, false); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_val_if_fail(pManager, false); // unregister as a telepathy client tp_base_client_unregister(m_pTpClient); m_pTpClient = NULL; // tear down all active rooms for (std::vector<TelepathyChatroomPtr>::iterator it = m_chatrooms.begin(); it != m_chatrooms.end(); it++) (*it)->stop(); // we are disconnected now, no need to receive events anymore pManager->unregisterEventListener(this); // signal all listeners we are logged out AccountOfflineEvent event; AbiCollabSessionManager::getManager()->signal(event); return true;}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:25,
示例4: UT_DEBUGMSGvoid TCPAccountHandler::addBuddy(BuddyPtr pBuddy){ UT_DEBUGMSG(("TCPAccountHandler::addBuddy()/n")); UT_return_if_fail(pBuddy); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pManager); if (getProperty("allow-all") == "true") { const UT_GenericVector<AbiCollab *> pSessions = pManager->getSessions(); for (UT_sint32 i = 0; i < pSessions.size(); i++) { AbiCollab* pSession = pSessions.getNthItem(i); UT_continue_if_fail(pSession); if (pSession->getAclAccount() != this) continue; pSession->appendAcl(pBuddy->getDescriptor(false).utf8_str()); } } AccountHandler::addBuddy(pBuddy);}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:25,
示例5: gtk_list_store_newGtkListStore* AP_UnixDialog_CollaborationAccounts::_constructModel(){ GtkTreeIter iter; GtkListStore* model = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); for (UT_uint32 i = 0; i < pManager->getAccounts().size(); i++) { AccountHandler* pHandler = pManager->getAccounts()[i]; if (pHandler) { UT_DEBUGMSG(("Got account: %s of type %s/n", pHandler->getDescription().utf8_str(), pHandler->getDisplayType().utf8_str() )); gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, ONLINE_COLUMN, pHandler->isOnline(), DESC_COLUMN, pHandler->getDescription().utf8_str(), TYPE_COLUMN, pHandler->getDisplayType().utf8_str(), HANDLER_COLUMN, pHandler, -1); } } return model;}
开发者ID:tchx84,项目名称:debian-abiword-packages,代码行数:28,
示例6: UT_DEBUGMSG/*! * 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,
示例7: UT_return_if_failvoid AbiCollab::initiateSessionTakeover(BuddyPtr pNewMaster){ UT_return_if_fail(pNewMaster); UT_DEBUGMSG(("AbiCollab::initiateSessionTakeover() - pNewMaster: %s/n", pNewMaster->getDescriptor(true).utf8_str())); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pManager); // this could lead to us never exiting; add a timeout or something somewhere :) pManager->beginAsyncOperation(this); // NOTE: we only allow slaves in the session takeover process // that are on the same account as the proposed master is. The // others are dropped from the session. At least for now. // TODO: implement me // reset any old session takeover state m_bProposedController = false; m_pProposedController = pNewMaster; m_vApprovedReconnectBuddies.clear(); m_mAckedSessionTakeoverBuddies.clear(); m_bSessionFlushed = false; if (m_vOutgoingQueue.size() > 0) UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN); m_vOutgoingQueue.clear(); // send a SessionTakeoverRequest packet to the new master std::vector<std::string> buddyIdentifiers; for (std::map<BuddyPtr, std::string>::iterator it = m_vCollaborators.begin(); it != m_vCollaborators.end(); it++) { BuddyPtr pBuddy = (*it).first; UT_continue_if_fail(pBuddy); if (pNewMaster != pBuddy) buddyIdentifiers.push_back(pBuddy->getDescriptor(true).utf8_str()); } SessionTakeoverRequestPacket strp_promote(m_sId, m_pDoc->getDocUUIDString(), true, buddyIdentifiers); pNewMaster->getHandler()->send(&strp_promote, pNewMaster); // send a SessionTakeoverRequest packet to the other slaves (if any) buddyIdentifiers.clear(); buddyIdentifiers.push_back(pNewMaster->getDescriptor(true).utf8_str()); SessionTakeoverRequestPacket strp_normal(m_sId, m_pDoc->getDocUUIDString(), false, buddyIdentifiers); for (std::map<BuddyPtr, std::string>::iterator it = m_vCollaborators.begin(); it != m_vCollaborators.end(); it++) { BuddyPtr pBuddy = (*it).first; UT_continue_if_fail(pBuddy); if (pNewMaster != pBuddy) pBuddy->getHandler()->send(&strp_normal, pBuddy); } m_eTakeoveState = STS_SENT_TAKEOVER_REQUEST;}
开发者ID:monkeyiq,项目名称:odf-2011-track-changes-git-svn,代码行数:52,
示例8: UT_DEBUGMSGvoid AP_Dialog_CollaborationShare::share(AccountHandler* pAccount, const std::vector<std::string>& vAcl){ UT_DEBUGMSG(("AP_Dialog_CollaborationShare::_share()/n")); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pManager); // determine which document to share XAP_Frame* pFrame = XAP_App::getApp()->getLastFocussedFrame(); UT_return_if_fail(pFrame); PD_Document* pDoc = static_cast<PD_Document *>(pFrame->getCurrentDoc()); UT_return_if_fail(pDoc); AbiCollab* pSession = NULL; if (!pManager->isInSession(pDoc)) { UT_DEBUGMSG(("Sharing document.../n")); // FIXME: this can cause a race condition: the other side can already be // offered the session before we actually started it! // Tell the account handler that we start a new session, so // it set up things if needed. This call may just setup some stuff // for a new session, or it might actually start a new session. bool b = pAccount->startSession(pDoc, m_vAcl, &pSession); if (!b) { XAP_App::getApp()->getLastFocussedFrame()->showMessageBox( "There was an error sharing this document!", XAP_Dialog_MessageBox::b_O, XAP_Dialog_MessageBox::a_OK); return; } // start the session ourselves when the account handler did not... if (!pSession) { // ... and start the session! UT_UTF8String sSessionId(""); // TODO: we could use/generate a proper descriptor when there is only // 1 account where we share this document over pSession = pManager->startSession(pDoc, sSessionId, pAccount, true, NULL, ""); } } else { pSession = pManager->getSession(pDoc); } UT_return_if_fail(pSession); pManager->updateAcl(pSession, pAccount, vAcl);}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:52,
示例9: _populateWindowDatavoid AP_UnixDialog_CollaborationShare::_populateWindowData(){ AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pManager); // populate the account combobox GtkListStore* store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); GtkTreeIter iter; AccountHandler* pShareeableAcount = _getShareableAccountHandler(); if (pShareeableAcount) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, pShareeableAcount->getDescription().utf8_str(), 1, pShareeableAcount, -1); gtk_widget_set_sensitive(m_wAccount, false); } else { for (std::vector<AccountHandler*>::const_iterator cit = pManager->getAccounts().begin(); cit != pManager->getAccounts().end(); cit++) { AccountHandler* pAccount = *cit; UT_continue_if_fail(pAccount); if (!pAccount->isOnline() || !pAccount->canManuallyStartSession()) continue; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, pAccount->getDescription().utf8_str(), 1, pAccount, -1); } gtk_widget_set_sensitive(m_wAccount, true); } m_pAccountModel = GTK_TREE_MODEL (store); gtk_combo_box_set_model(GTK_COMBO_BOX(m_wAccount), m_pAccountModel); // if we have at least one account handler, then make sure the first one is selected if (pManager->getRegisteredAccountHandlers().size() > 0) { gtk_combo_box_set_active(GTK_COMBO_BOX(m_wAccount), 0); } else { // nope, we don't have any account handler :'-( gtk_combo_box_set_active(GTK_COMBO_BOX(m_wAccount), -1); }}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:51,
示例10: UT_DEBUGMSGvoid TCPAccountHandler::handleEvent(boost::shared_ptr<Session> session_ptr){ UT_DEBUGMSG(("TCPAccountHandler::handleEvent()/n")); UT_return_if_fail(session_ptr); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pManager); // make sure we have handled _all_ packets in the queue before checking // the disconnected status bool disconnected = !session_ptr->isConnected(); _handleMessages(session_ptr); // check the connection status if (disconnected) { UT_DEBUGMSG(("Socket is not connected anymore!/n")); // drop all buddies that were on this connection std::map<TCPBuddyPtr, boost::shared_ptr<Session> >::iterator next; for (std::map<TCPBuddyPtr, boost::shared_ptr<Session> >::iterator it = m_clients.begin(); it != m_clients.end(); it = next) { next = it; next++; UT_continue_if_fail((*it).first); UT_continue_if_fail((*it).second); TCPBuddyPtr pB = (*it).first; if ((*it).second == session_ptr) { UT_DEBUGMSG(("Lost connection to %s buddy %s:%s/n", getProperty("server") == "" ? "client" : "server", pB->getAddress().c_str(), pB->getPort().c_str())); // drop this buddy from all sessions pManager->removeBuddy(pB, false); // erase the buddy <-> session mapping m_clients.erase(it); deleteBuddy(pB); } } // if we were connected to a server, then we are basically disconnected now if (getProperty("server") != "") disconnect(); } // check other things here if needed...}
开发者ID:Distrotech,项目名称:abiword,代码行数:49,
示例11: s_abicollab_joinbool s_abicollab_join(AV_View* /*v*/, EV_EditMethodCallData* /*d*/){ AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_val_if_fail(pManager, false); // Get the current view that the user is in. XAP_Frame *pFrame = XAP_App::getApp()->getLastFocussedFrame(); // Get an Accounts dialog instance XAP_DialogFactory* pFactory = static_cast<XAP_DialogFactory *>(XAP_App::getApp()->getDialogFactory()); UT_return_val_if_fail(pFactory, false); AP_Dialog_CollaborationJoin* pDialog = static_cast<AP_Dialog_CollaborationJoin*>( pFactory->requestDialog(AbiCollabSessionManager::getManager()->getDialogJoinId()) ); // Run the dialog pDialog->runModal(pFrame); // Handle the dialog outcome AP_Dialog_CollaborationJoin::tAnswer answer = pDialog->getAnswer(); BuddyPtr pBuddy = pDialog->getBuddy(); DocHandle* pDocHandle = pDialog->getDocHandle(); pFactory->releaseDialog(pDialog); switch (answer) { case AP_Dialog_CollaborationJoin::a_OPEN: { UT_return_val_if_fail(pBuddy && pDocHandle, false); // Check if we have already joined this session. If so, then just // ignore the request. Otherwise actually join the session. AbiCollab* pSession = pManager->getSessionFromSessionId(pDocHandle->getSessionId()); if (pSession) { UT_DEBUGMSG(("Already connected to session, just raising the associated frame/n")); // Just raise a frame that contains this session, instead of // opening the document again XAP_Frame* pFrameForSession = pManager->findFrameForSession(pSession); UT_return_val_if_fail(pFrameForSession, false); pFrameForSession->raise(); } else pManager->joinSessionInitiate(pBuddy, pDocHandle); } break; case AP_Dialog_CollaborationJoin::a_CANCEL: break; } return true;}
开发者ID:hfiguiere,项目名称:abiword,代码行数:49,
示例12: _getActiveSessionAbiCollab* AP_Dialog_CollaborationShare::_getActiveSession(){ AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_val_if_fail(pManager, NULL); XAP_Frame* pFrame = XAP_App::getApp()->getLastFocussedFrame(); UT_return_val_if_fail(pFrame, NULL); PD_Document* pDoc = static_cast<PD_Document *>(pFrame->getCurrentDoc()); UT_return_val_if_fail(pDoc, NULL); if (!pManager->isInSession(pDoc)) return NULL; return pManager->getSession(pDoc);}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:16,
示例13: _populateShareStatebool AP_Dialog_CollaborationShare::_populateShareState(BuddyPtr pBuddy){ AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_val_if_fail(pManager, false); PD_Document *pDoc = static_cast<PD_Document*>(XAP_App::getApp()->getLastFocussedFrame()->getCurrentDoc()); UT_return_val_if_fail(pDoc, false); if (!pManager->isInSession(pDoc)) { AccountHandler* pHandler = pBuddy->getHandler(); UT_return_val_if_fail(pHandler, false); return pHandler->defaultShareState(pBuddy); } return _inAcl(m_vAcl, pBuddy);}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:18,
示例14: TCPAccountHandlerTCPWin32AccountHandler::TCPWin32AccountHandler() : TCPAccountHandler(), m_pWin32Dialog(NULL), m_hInstance(NULL), m_hServerEntry(NULL), m_hPortEntry(NULL), m_hServerRadio(NULL), m_hJoinRadio(NULL), m_hServerLabel(NULL), m_hPortLabel(NULL), m_hAllowAllCheck(NULL), m_hAutoconnectCheck(NULL){ AbiCollabSessionManager * pSessionManager = AbiCollabSessionManager::getManager(); if (pSessionManager) { m_hInstance = pSessionManager->getInstance(); }}
开发者ID:monkeyiq,项目名称:odf-2011-track-changes-git-svn,代码行数:19,
示例15: UT_DEBUGMSGbool XMPPAccountHandler::disconnect(){ UT_DEBUGMSG(("XMPPAccountHandler::disconnect()/n")); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_val_if_fail(pManager, false); // we are disconnected now, no need to receive events anymore pManager->unregisterEventListener(this); tearDown(); // signal all listeners we are logged out AccountOfflineEvent event; // TODO: fill the event AbiCollabSessionManager::getManager()->signal(event); return true;}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:19,
示例16: m_signalhandlerSynchronizer::Synchronizer(boost::function<void ()> signalhandler) // Win32 Implementation : m_signalhandler(signalhandler), m_hWnd(0), m_bIsProcessing(false), m_iDeferredMessages(0), m_bIsDestroyed(NULL){ UT_DEBUGMSG(("Synchronizer()/n")); AbiCollabSessionManager * pSessionManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pSessionManager); HINSTANCE hInstance = pSessionManager->getInstance(); UT_return_if_fail(hInstance); _registerWndClass(); // HWND_MESSAGE as parent HWND is Win2k/xp/vista only - replaced with 0 // (also HWND_MESSAGE doesn't compile in MinGW, weird bug. --RP 8 August 2007) m_hWnd = CreateWindow(SYNC_CLASSNAME, "AbiCollab", 0, CW_USEDEFAULT, SW_HIDE, CW_USEDEFAULT, CW_USEDEFAULT, HWND_MESSAGE, NULL, hInstance, (void *) this ); UT_DEBUGMSG(("Created message window: HWND 0x%x/n", m_hWnd)); switch ((INT_PTR)m_hWnd) { case NULL: UT_DEBUGMSG(("Win32 error: %d./n", GetLastError())); break; default: sm_iMessageWindows++; break; // ok! };}
开发者ID:monkeyiq,项目名称:odf-2011-track-changes-git-svn,代码行数:43,
示例17: s_any_accounts_online/*! * returns true if at least one account is online */static bool s_any_accounts_online(bool bIncludeNonManualShareAccounts = true){ AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_val_if_fail(pManager, false); const std::vector<AccountHandler *>& vecAccounts = pManager->getAccounts(); for (UT_uint32 i = 0; i < vecAccounts.size(); i++) { AccountHandler* pHandler = vecAccounts[i]; if (pHandler && pHandler->isOnline()) { if (bIncludeNonManualShareAccounts) return true; if (pHandler->canManuallyStartSession()) return true; } } return false;}
开发者ID:hfiguiere,项目名称:abiword,代码行数:23,
示例18: UT_DEBUGMSGvoid AbiCollab::_shutdownAsMaster(){ UT_DEBUGMSG(("AbiCollab::_shutdownAsMaster()/n")); UT_return_if_fail(m_pController == BuddyPtr()); UT_return_if_fail(!m_bProposedController); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pManager); // the session takeover is complete; inform everyone that all session data // is flushed, and that everyone should talk to the new master from now on SessionFlushedPacket sfp(m_sId, m_pDoc->getDocUUIDString()); for (std::map<BuddyPtr, std::string>::iterator it = m_vCollaborators.begin(); it != m_vCollaborators.end(); it++) { BuddyPtr pBuddy = (*it).first; UT_continue_if_fail(pBuddy); pBuddy->getHandler()->send(&sfp, pBuddy); } // session takeover is done as far as the leaving session contoller is concerned pManager->endAsyncOperation(this);}
开发者ID:monkeyiq,项目名称:odf-2011-track-changes-git-svn,代码行数:22,
示例19: void AP_Win32Dialog_CollaborationAccounts::_populateWindowData(){ AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pManager); m_bPopulating = true; // clear out the old contents, if any ListView_DeleteAllItems(m_hAccountList); for (UT_uint32 i = 0; i < pManager->getAccounts().size(); i++) { AccountHandler* pAccount = pManager->getAccounts()[i]; UT_continue_if_fail(pAccount); UT_Win32LocaleString sAccountText = AP_Win32App::s_fromUTF8ToWinLocale(pAccount->getDescription().utf8_str()); UT_Win32LocaleString sAccountTypeText = AP_Win32App::s_fromUTF8ToWinLocale(pAccount->getDisplayType().utf8_str()); // insert a new account record LVITEMW lviAccount; lviAccount.mask = LVIF_STATE | LVIF_IMAGE | LVIF_PARAM; lviAccount.state = 1; lviAccount.iItem = i; lviAccount.iSubItem = 0; lviAccount.lParam = (LPARAM)pAccount; SendMessageW(m_hAccountList, LVM_INSERTITEMW, 0, (LPARAM) &lviAccount); ListView_SetCheckState(m_hAccountList, i, pAccount->isOnline()); lviAccount.iSubItem=1; lviAccount.pszText= const_cast<LPWSTR>(sAccountText.c_str()); SendMessageW(m_hAccountList, LVM_SETITEMTEXTW, i, (LPARAM) &lviAccount); lviAccount.iSubItem=2; lviAccount.pszText= const_cast<LPWSTR>(sAccountTypeText.c_str()); SendMessageW(m_hAccountList, LVM_SETITEMTEXTW, i, (LPARAM) &lviAccount); } _updateSelection(); m_bPopulating = false;}
开发者ID:hfiguiere,项目名称:abiword,代码行数:39,
示例20: UT_return_if_failvoid AccountHandler::handleMessage(Packet* pPacket, BuddyPtr pBuddy){ UT_return_if_fail(pPacket); UT_return_if_fail(pBuddy); AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); UT_return_if_fail(pManager); // // handle the incoming packet: first check for a protocol error, then ask the // session manager to handle it, then try to handle it ourselves // if (_handleProtocolError(pPacket, pBuddy) || pManager->processPacket(*this, pPacket, pBuddy)) { DELETEP(pPacket); return; } // it seems we need to handle the packet ourselves _handlePacket(pPacket, pBuddy); DELETEP(pPacket);}
开发者ID:tchx84,项目名称:debian-abiword-packages,代码行数:23,
示例21: s_abicollab_recordbool s_abicollab_record(AV_View* /*v*/, EV_EditMethodCallData* /*d*/){ UT_DEBUGMSG(("s_abicollab_record/n")); // this option only works in debug mode AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager(); XAP_Frame *pFrame = XAP_App::getApp()->getLastFocussedFrame(); UT_return_val_if_fail(pFrame, false); PD_Document* pDoc = static_cast<PD_Document *>(pFrame->getCurrentDoc()); UT_return_val_if_fail(pDoc, false); // retrieve session AbiCollab* session = pManager->getSession( pDoc ); if (session) { if (session->isRecording()) { session->stopRecording(); UT_ASSERT(!session->isRecording()); } else { session->startRecording( new DiskSessionRecorder( session ) ); UT_ASSERT(session->isRecording()); } } return true;}
开发者ID:hfiguiere,项目名称:abiword,代码行数:24,
注:本文中的AbiCollabSessionManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ About类代码示例 C++ AXObjectCache类代码示例 |