📄 voipcalllogdb.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
// VoIPCallLogDB.h : Declaration of the CVoIPCallLogDB
#ifndef __VOIPCALLLOGDB_H_
#define __VOIPCALLLOGDB_H_
#include "DB.h"
#include <atlbase.h>
#include <atlcom.h>
class CVoIPCallLogDBEnum;
class CVoIPCallLogRecord;
//First and last are for validating the range or acceptable
//value for a voipcalltype
const VoIPCallType VCT_FIRST = e_vctInvalid;
const VoIPCallType VCT_LAST = e_vctMissed;
#define CALL_LOG_IN_NAME L"VoIP Incoming Call Log DB"
#define CALL_LOG_OUT_NAME L"VoIP Outgoing Call Log DB"
#define CALL_LOG_MISSED_NAME L"VoIP Missed Call Log DB"
#define CALL_LOG_DB_NUMBER_PROPS 7
const VOIP_PROPID CALL_LOG_URI = MAKELONG(CEVT_LPWSTR , 0x0001);
const VOIP_PROPID CALL_LOG_FRIENDLYNAME = MAKELONG(CEVT_LPWSTR , 0x0002);
const VOIP_PROPID CALL_LOG_VOIPNAME = MAKELONG(CEVT_LPWSTR , 0x0003);
const VOIP_PROPID CALL_LOG_CALLTYPE = MAKELONG(CEVT_I4 , 0x0004);
const VOIP_PROPID CALL_LOG_STARTTIME = MAKELONG(CEVT_FILETIME, 0x0005);
const VOIP_PROPID CALL_LOG_ENDTIME = MAKELONG(CEVT_FILETIME, 0x0006);
const VOIP_PROPID VOIP_TIME_STAMP = MAKELONG(CEVT_FILETIME, 0x0007);
/////////////////////////////////////////////////////////////////////////////
// CVoIPCallLogDB
class ATL_NO_VTABLE CVoIPCallLogDB :
public CComObjectRootEx<CComMultiThreadModel>,
public CComCoClass<CVoIPCallLogDB, &CLSID_VoIPCallLogDB>,
public IVoIPCallLogDB
{
public:
CVoIPCallLogDB();
~CVoIPCallLogDB();
STDMETHOD (Init)(BSTR bstrURI);
STDMETHOD (CreateRecord)(VoIPCallType vct, IVoIPCallRecord **ppiRecord);
STDMETHOD (put_Capacity)(int cRecords);
STDMETHOD (get_Capacity)(int *cRecords);
STDMETHOD (get_IncomingEnumerator)(IVoIPCallLogDBEnum **ppiEnum);
STDMETHOD (get_OutgoingEnumerator)(IVoIPCallLogDBEnum **ppiEnum);
STDMETHOD (get_MissedEnumerator)(IVoIPCallLogDBEnum **ppiEnum);
HRESULT GetEnumerator(VoIPCallType, IVoIPCallLogDBEnum **ppiEnum);
HRESULT FillRecord(CVoIPCallLogRecord *piRecord, CEPROPVAL *pvals, int cNumProps);
HRESULT InternalCreateRecord(VoIPCallType vct, CComObject<CVoIPCallLogRecord> **ppRecord);
DECLARE_NO_REGISTRY()
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CVoIPCallLogDB)
COM_INTERFACE_ENTRY(IVoIPCallLogDB)
END_COM_MAP()
// IVoIPCallLogDB
public:
private:
CVoipDB* m_pIncomingDB;
CVoipDB* m_pOutgoingDB;
CVoipDB* m_pMissedDB;
int m_Capacity;
BOOL m_fInit;
};
#endif //__VOIPCALLLOGDB_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -