author | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
commit | 955d4e00adc9f39ab93bf21f07506eb75b013c70 (patch) (side-by-side diff) | |
tree | 92493a2c9ac206b822e24a9e5a6f6b1589be6afb /T42CallLog.h | |
download | T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.zip T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.gz T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.bz2 |
initial commit into svn repository
git-svn-id: http://svn.klever.net/kin/T42/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | T42CallLog.h | 53 |
1 files changed, 53 insertions, 0 deletions
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<nCount;tmp++)
+ pElements[tmp].Serialize(ar);
+}
+
+typedef Klever::CBTreendex<CTime,CT42CallLogEntry,16,512> CT42CallLog;
|