sipXcallLib home page


PtMetaEvent.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _PtMetaEvent_h_
13 #define _PtMetaEvent_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "ptapi/PtEvent.h"
18 #include "tao/TaoClientTask.h"
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 
29 //:The <CODE>MetaEvent</CODE> interface is the base interface for
30 // all PTAPI Meta events.
31 // All Meta events must extend this interface.
32 // <p>
33 // An individual <CODE>MetaEvent</CODE>
34 // conveys, directly and with necessary details,
35 // what an application needs to know to respond to a higher-level PTAPI event.
36 // <p>
37 // Currently, meta events are defined in pairs, and they convey three
38 // types of information:
39 // first, the type of higher-level operation which has occurred;
40 // second, the beginning and end of the sequence of "normal" PTAPI events
41 // which were generated to convey the consequential PTAPI model state changes
42 // that occurred because of this higher-level operation;
43 // third, which PTAPI entities were involved in the higher-level operation.
44 // <p>
45 // A PTAPI implementation is alerted to changes in the state of the associated telephony platform,
46 // and reflects that state by sending a stream of PTAPI objects, delimited by MetaEvents.
47 // An application learns of the details of that state change by processing all the events
48 // between the starting and ending MetaEvents.
49 // <p>
50 // Generally the application may draw incorrect conclusions about the current state of
51 // the associated telephony platform if it decides to act before processing
52 // all the events delimited by the MetaEvents.
53 // Specifically, an application which wishes to submit queries to the PTAPI implementation
54 // about the current state of PTAPI entities should not submit the query until it has
55 // processed the matching "ending" MetaEvent.
56 // <p>
57 // The specific Meta event is indicated by
58 // the <CODE>Event.getID()</CODE>
59 // value returned by the event.
60 // The specific Meta event provides context information about the higher-level event.
61 // <p>
62 // The <CODE>Event.getMetaEvent</CODE> method returns the Meta event
63 // associated with a "normal" event (or returns null).
64 
65 class PtMetaEvent : public PtEvent
66 {
67 /* //////////////////////////// PUBLIC //////////////////////////////////// */
68 public:
69 
71 
72 /* ============================ CREATORS ================================== */
74  int metaCode = META_EVENT_NONE,
75  int numOldCalls = 0,
76  const char* callId = 0,
77  TaoClientTask *pClient = 0,
78  int sipResponseCode = 0,
79  const char* sipResponseText = 0,
80  const char** oldCallIds = 0,
81  const char* newCallId = NULL);
82  //:Default constructor
83 
84  PtMetaEvent(const PtMetaEvent& rPtMetaEvent);
85  //:Copy constructor
86 
87  virtual
88  ~PtMetaEvent();
89  //:Destructor
90 
91 /* ============================ MANIPULATORS ============================== */
92 
93  PtMetaEvent& operator=(const PtMetaEvent& rhs);
94  //:Assignment operator
95 
96 /* ============================ ACCESSORS ================================= */
97  static const char* className();
98  //:Returns the name of this class.
100 
101 /* ============================ INQUIRY =================================== */
102  virtual PtBoolean isClass(const char* pClassName);
103  //:Determines if this object if of the specified type.
107 
108  virtual PtBoolean isInstanceOf(const char* pClassName);
109  //:Determines if this object is either an instance of or is derived from
110  //:the specified type.
114 
115 /* //////////////////////////// PROTECTED ///////////////////////////////// */
116 protected:
117 
118 /* //////////////////////////// PRIVATE /////////////////////////////////// */
119 private:
120 
121 };
122 
123 /* ============================ INLINE METHODS ============================ */
124 
125 #endif // _PtMetaEvent_h_
virtual PtBoolean isClass(const char *pClassName)
returns: Returns the string representation of the name of this class
PtEventId
Definition: PtEvent.h:83
int PtBoolean
Definition: PtDefs.h:71
Definition: PtEvent.h:85
static const char * className()
virtual PtBoolean isInstanceOf(const char *pClassName)
param: (in) pClassName - The string to compare with the name of this class. retcode: TRUE - If the gi...
Definition: PtMetaEvent.h:65
#define PT_CLASS_INFO_MEMBERS
Definition: PtDefs.h:73
PT_CLASS_INFO_MEMBERS PtMetaEvent(PtEventId eventId=EVENT_INVALID, int metaCode=META_EVENT_NONE, int numOldCalls=0, const char *callId=0, TaoClientTask *pClient=0, int sipResponseCode=0, const char *sipResponseText=0, const char **oldCallIds=0, const char *newCallId=NULL)
Definition: PtMetaEvent.cpp:28
virtual ~PtMetaEvent()
Definition: PtMetaEvent.cpp:56
PtMetaEvent & operator=(const PtMetaEvent &rhs)
Definition: PtMetaEvent.cpp:65
The PtEvent encapulates data associated with an event notification. The PtEvent is sent to an applica...
Definition: PtEvent.h:76
Definition: TaoClientTask.h:50
Definition: PtEvent.h:346