dialogeventpublisher.h

来自「基于sipfoundy 公司开发的sipx协议API」· C头文件 代码 · 共 96 行

H
96
字号
// // // Copyright (C) 2005 SIPfoundry Inc.// Licensed by SIPfoundry under the LGPL license.// // Copyright (C) 2005 Pingtel Corp.// Licensed to SIPfoundry under a Contributor Agreement.// // $$//////////////////////////////////////////////////////////////////////////////#ifndef _DialogEventPublisher_h_#define _DialogEventPublisher_h_// SYSTEM INCLUDES// APPLICATION INCLUDES#include <tao/TaoAdaptor.h>#include <net/SipDialogEvent.h>#include <net/SipPublishContentMgr.h>#include <utl/UtlHashMap.h>#include <utl/UtlHashMapIterator.h>// DEFINES// MACROS// EXTERNAL FUNCTIONS// EXTERNAL VARIABLES// CONSTANTS// STRUCTS// TYPEDEFS// FORWARD DECLARATIONSclass CallManager;class TaoString;//! Class for publishing the dialog state change for each call/** * This class keeps tracking the dialog state changes for each call and generates * a dialog event package as described in draft-ietf-sipping-dialog-package-06.txt * (An INVITE Initiated Dialog Event Package for SIP) and sends it to a generic * RFC 3265 SUBSCRIBE server or NOTIFIER. */class DialogEventPublisher: public TaoAdaptor{/* //////////////////////////// PUBLIC //////////////////////////////////// */public:/* ============================ CREATORS ================================== */   DialogEventPublisher(CallManager* callMgr, SipPublishContentMgr* contentMgr);     //:Default constructor   virtual   ~DialogEventPublisher();     //:Destructor/* ============================ MANIPULATORS ============================== */   virtual UtlBoolean handleMessage(OsMsg& eventMessage);/* ============================ ACCESSORS ================================= *//* ============================ INQUIRY =================================== *//* //////////////////////////// PROTECTED ///////////////////////////////// */protected:    void dumpTaoMessageArgs(unsigned char eventId, TaoString& args);    void insertEntry(UtlString& callId, SipDialogEvent* call);    SipDialogEvent* getEntry(UtlString& callId);    SipDialogEvent* removeEntry(UtlString& callId);    // Construct entity from requestUri and local address information        void getEntity(UtlString& requestUri, UtlString& entity);        // Delete entry if we get a failed or disconnected event without request Url    bool findEntryByCallId(UtlString& callId, UtlString& entity); /* //////////////////////////// PRIVATE /////////////////////////////////// */private:    CallManager* mpCallManager;        SipPublishContentMgr* mpSipPublishContentMgr;    UtlHashMap mCalls;    unsigned long mDialogId;};/* ============================ INLINE METHODS ============================ */#endif  // _DialogEventPublisher_h_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?