STDMETHODIMP CHyperFeedPriceInfoWithNotify::Disconnect() { try { UnsubscribeAll(); DisconnectProvider(); } _CATCH_COM_EXCEPTION_RETURN_COM( L"Disconnect Failed") _CATCH_UNHANDLED_EXCEPTION_RETURN_COM; return S_OK; }
MessageSubscriber &MessageSubscriber::operator=(const MessageSubscriber &cpy) { if(&cpy == this) return *this; UnsubscribeAll(); FOREACH_CONST( RString, cpy.m_vsSubscribedTo, msg ) this->SubscribeToMessage( *msg ); return *this; }
STDMETHODIMP CHyperFeedPriceProvider::Disconnect() { try { UnsubscribeAll(); DisconnectProvider(); } catch(_com_error& err) { return EgLib::utils::ComError2ErrInfo (err,this); } return S_OK; }
void CGroupPrice::UnsubscribeGroup(const CComVariant& params) { if(V_VT(¶ms) == VT_ERROR) { EgLib::CEgLibTraceManager::Trace(LogInfo, __FUNCTION__, _T("[%s]\t Checking Subscription Group"), m_strUserName.c_str()); UnsubscribeAll(); } else { _QuoteUpdateParams Params(params); EgLib::CEgLibTraceManager::Trace(LogInfo, __FUNCTION__, _T("[%s]\t Symbol: %s, Exchange: %s, Type: %d"), m_strUserName.c_str(), Params->Symbol?CW2T(Params->Symbol):_T(""), Params->Exchange?CW2T(Params->Exchange):_T(""), Params->Type); if(V_VT(&m_vtRequest) != VT_ERROR) { _QuoteUpdateParams param2(m_vtRequest); _bstr_t bsSymbol1(Params->Symbol) ; _bstr_t bsSymbol2(param2->Symbol) ; if(bsSymbol1 == bsSymbol2 && Params->Type == param2->Type) { _CancelOptions(); } } _SetDbKey(Params); char szSymbol[MAX_LENGTH + 1]; ZeroMemory(szSymbol,sizeof(szSymbol)); if(CUtilities::KeyToString(&m_dbaKey.dbaKey, szSymbol, MAX_LENGTH)) { CAutoLock lk(m_csGroupSubscript); grouptickermap::iterator itrGroup = m_mapGroupSubscript.find(szSymbol); if(itrGroup != m_mapGroupSubscript.end()) { for(tickerset::iterator iter = itrGroup->second.begin(); iter != itrGroup->second.end(); iter++) { DBA_KEYS dbaKey; ZeroMemory(&dbaKey, sizeof(DBA_KEYS)); DeleteSubscription(*iter); (*iter)->GetRawKey(&dbaKey.dbaKey); DecInterest(&dbaKey); } m_mapGroupSubscript.erase(itrGroup); } } } m_vtRequest.Clear(); }
int Ardb::UnSubscribe(Context& ctx, RedisCommandFrame& cmd) { if (cmd.GetArguments().size() == 0) { UnsubscribeAll(ctx, true); } else { for (uint32 i = 0; i < cmd.GetArguments().size(); i++) { UnsubscribeChannel(ctx, cmd.GetArguments()[i], true); } } return 0; }
//______________________________________________________________________________ // [] //` Деструктор [] // [] BX_SingleObject::~BX_SingleObject() { UnsubscribeAll (); // Уничтожаем все события OC_ShowEvent oc_show_event; oc_show_event.DeleteClassObjects (); delete m_pOC_Registry; m_pOC_Registry = NULL; delete m_pCACHE; m_pCACHE = NULL; SERVER_DEBUG_TEXT ("Драйвер баннерной системы завершил работу"); }
void CGroupPrice::UnsubscribeGroup(const CComVariant& params) { if(V_VT(¶ms) == VT_ERROR) { UnsubscribeAll(); } else { _QuoteUpdateParams Params(params); if(V_VT(&m_vtRequest) != VT_ERROR) { _QuoteUpdateParams param2(m_vtRequest); _bstr_t bsSymbol1(Params->Symbol) ; _bstr_t bsSymbol2(param2->Symbol) ; if(bsSymbol1 == bsSymbol2 && Params->Type == param2->Type) { _CancelOptions(); } } _SetDbKey(Params); char szSymbol[MAX_LENGTH + 1]; ZeroMemory(szSymbol,sizeof(szSymbol)); KeyToString(&m_dbaKey.dbaKey, szSymbol, MAX_LENGTH); m_csSubscript.Lock(); for(tickerset::const_iterator iter = m_mapGroupSubscript[szSymbol].begin(); iter != m_mapGroupSubscript[szSymbol].end(); iter++) { ZeroMemory(&m_dbaKey.dbaKey, sizeof(DBA_KEY)); ::StringToKey(const_cast<char*>((*iter).c_str()), &m_dbaKey.dbaKey); m_mapSubscript.erase(*iter); DecInterest(); } m_mapGroupSubscript.erase(szSymbol); m_csSubscript.Unlock(); } m_vtRequest.Clear(); }
CGroupPrice::~CGroupPrice() { UnsubscribeAll(); _ASSERTE( m_mapGroupSubscript.empty() ); }
MidiInputDeviceAlsa::MidiInputPortAlsa::~MidiInputPortAlsa() { UnsubscribeAll(); snd_seq_delete_simple_port(pDevice->hAlsaSeq, portNumber); }
IPublisher::~IPublisher() { UnsubscribeAll(); }