From 955d4e00adc9f39ab93bf21f07506eb75b013c70 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 05 Jul 2004 01:53:09 +0000 Subject: initial commit into svn repository git-svn-id: http://svn.klever.net/kin/T42/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8 --- (limited to 'T42CallLog.h') diff --git a/T42CallLog.h b/T42CallLog.h new file mode 100644 index 0000000..fa4a331 --- a/dev/null +++ b/T42CallLog.h @@ -0,0 +1,53 @@ +class CT42CallLogEntry : public CObject { +public: + enum { + statusOk = 0, statusFailed, statusProcessed, + statusNone + }; + UINT m_Status; + CTime m_Time; + CString m_Caller; + CString m_Callee; + CString m_TTY; + CTimeSpan m_Duration; + CString m_Message; + + CT42CallLogEntry() : m_Status(statusNone) {} + CT42CallLogEntry(CT42CallLogEntry& src) { Copy(src); } + + void Copy(const CT42CallLogEntry& src) { + m_Status = src.m_Status; + m_Time = src.m_Time; + m_Caller = src.m_Caller; m_Callee = src.m_Callee; + m_TTY = src.m_TTY; + m_Duration = src.m_Duration; + m_Message = src.m_Message; + } + CT42CallLogEntry& operator=(const CT42CallLogEntry& src) { + Copy(src); + return *this; + } + + void Serialize(CArchive& ar) { + if(ar.IsStoring()){ + ar << m_Status; + ar << m_Time; + ar << m_Caller; ar << m_Callee; ar << m_TTY; + ar << m_Duration; + ar << m_Message; + }else{ + ar >> m_Status; + ar >> m_Time; + ar >> m_Caller; ar >> m_Callee; ar >> m_TTY; + ar >> m_Duration; + ar >> m_Message; + } + } +}; + +inline void SerializeElements(CArchive& ar, CT42CallLogEntry* pElements, int nCount) { + for(int tmp=0;tmp CT42CallLog; -- cgit v0.9.0.2