CContactCache::CContactCache(const HANDLE hContact) { ZeroMemory(this, sizeof(CContactCache)); m_Valid = m_isMeta = false; m_hContact = hContact; m_wOldStatus = m_wStatus = m_wMetaStatus = ID_STATUS_OFFLINE; m_szStatusMsg = m_ListeningInfo = m_xStatusMsg = 0; m_nMax = 0; if(hContact) { m_szProto = reinterpret_cast<char *>(::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)m_hContact, 0)); if(m_szProto) m_tszProto = mir_a2t(m_szProto); initPhaseTwo(); } else { m_szProto = C_INVALID_PROTO; m_tszProto = C_INVALID_PROTO_T; m_szAccount = C_INVALID_ACCOUNT; m_isMeta = false; m_Valid = false; } }
/** * reset meta contact information. Used when meta contacts are disabled * on user's request. */ void CContactCache::resetMeta() { m_isMeta = false; m_szMetaProto = 0; m_wMetaStatus = ID_STATUS_OFFLINE; initPhaseTwo(); }
/** * reset meta contact information. Used when meta contacts are disabled * on user's request. */ void CContactCache::resetMeta() { m_isMeta = false; m_szMetaProto = 0; m_hSubContact = 0; m_tszMetaProto[0] = 0; initPhaseTwo(); }
CContactCache::CContactCache(const MCONTACT hContact) { m_hContact = hContact; m_wOldStatus = m_wStatus = ID_STATUS_OFFLINE; if (hContact) { if ((cc = db_get_contact(hContact)) != NULL) { initPhaseTwo(); return; } } cc = &ccInvalid; m_szAccount = C_INVALID_ACCOUNT; m_isMeta = false; m_Valid = false; }
CContactCache::CContactCache(const HANDLE hContact) { m_hContact = hContact; m_wOldStatus = m_wStatus = m_wMetaStatus = ID_STATUS_OFFLINE; if (hContact) { m_szProto = ::GetContactProto(m_hContact); if (m_szProto) m_tszProto = mir_a2t(m_szProto); initPhaseTwo(); } else { m_szProto = C_INVALID_PROTO; m_tszProto = C_INVALID_PROTO_T; m_szAccount = C_INVALID_ACCOUNT; m_isMeta = false; m_Valid = false; } }