sipXcallLib home page


PtEventMask.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 _PtEventMask_h_
13 #define _PtEventMask_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "ptapi/PtEvent.h"
18 
19 // DEFINES
20 // MACROS
21 // EXTERNAL FUNCTIONS
22 // EXTERNAL VARIABLES
23 // CONSTANTS
24 // STRUCTS
25 // TYPEDEFS
26 // FORWARD DECLARATIONS
27 
28 //:The PtEventMask is used to filter events which get passed to a
29 //:PtEventListener.
30 // To provide finer granularity on the control of events that get passed to
31 // a listener, the PtEventMask may be used to define the specific events
32 // that are to be passed. The PtEventMask may be used only to reduce the
33 // event types that a listener will receive. The full set of events
34 // a listener may receive is defined by the derived listener class. Reducing
35 // the events that a listener is interested in is a useful means of optimizing
36 // the performance of the Pingtel system. Due to the distributed nature
37 // of the Pingtel system, reducing the number of unnecessary events that
38 // get sent results in less network latency and traffic.
40 {
41 /* //////////////////////////// PUBLIC //////////////////////////////////// */
42 public:
43 
44 /* ============================ CREATORS ================================== */
45 
46  PtEventMask();
47  //:Default constructor
48 
49  PtEventMask(const PtEventMask& rPtEventMask);
50  //:Copy constructor
51 
52  virtual
53  ~PtEventMask();
54  //:Destructor
55 
56 /* ============================ MANIPULATORS ============================== */
57 
58  PtEventMask& operator=(const PtEventMask& rhs);
59  //:Assignment operator
60 
61 /* ============================ ACCESSORS ================================= */
62 
63  PtStatus setEvents(PtEvent::PtEventId events[], int numEvents);
64  //:Sets the events of interest for this mask
69 
70  PtStatus addEvents(PtEvent::PtEventId events[], int numEvents);
71  //:Adds events of interest to this mask (Union operation)
76 
78  //:Adds events of interest to this mask (Union operation)
81 
82 /* ============================ INQUIRY =================================== */
84  //:Inquires if the given event type is of interest to this listener
88 
89 /* //////////////////////////// PROTECTED ///////////////////////////////// */
90 protected:
91 
92 /* //////////////////////////// PRIVATE /////////////////////////////////// */
93 private:
94 
95 };
96 
97 /* ============================ INLINE METHODS ============================ */
98 
99 #endif // _PtEventMask_h_
PtStatus
Definition: PtDefs.h:49
PtEventId
Definition: PtEvent.h:83
int PtBoolean
Definition: PtDefs.h:71
PtStatus setEvents(PtEvent::PtEventId events[], int numEvents)
virtual ~PtEventMask()
PtEventMask & operator=(const PtEventMask &rhs)
PtBoolean isEventEnabled(PtEvent::PtEventId eventId)
param: (in) rMask - A PtEventMask containing the set of event ids to be added to this mask's event id...
Definition: PtEventMask.h:39
PtStatus addEvents(PtEvent::PtEventId events[], int numEvents)
param: (in) events - Array of event ids of interest param: (in) numEvents - The number of event ids i...