sipXcallLib home page


PtTerminalListener.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 _PtTerminalListener_h_
13 #define _PtTerminalListener_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "PtEventListener.h"
18 // DEFINES
19 // MACROS
20 // EXTERNAL FUNCTIONS
21 // EXTERNAL VARIABLES
22 // CONSTANTS
23 // STRUCTS
24 // TYPEDEFS
25 // FORWARD DECLARATIONS
26 class PtTerminalEvent;
27 
28 //: The PtTerminalListener is used to register with and receive events from
29 //: PtTerminal objects.
30 
32 {
33 /* //////////////////////////// PUBLIC //////////////////////////////////// */
34 public:
36 
37 /* ============================ CREATORS ================================== */
38 
39  PtTerminalListener(const char * pTerminalName = NULL, PtEventMask* pMask = NULL);
40  //:Default constructor
42 
43  virtual
45  //:Destructor
46 
47 /* ============================ MANIPULATORS ============================== */
48 
50  //: Method invoked on listener for event id =
51  //: TERMINAL_EVENT_TRANSMISSION_ENDED
52  //: indicating that the application will no longer receive Terminal events on the instance of the PtTerminalListener.
53  // The event parameter is valid only within
54  // this method. The implementation must copy the event if
55  // it is needed beyond the scope of an invocation. The implementation
56  // of this method should not block as it may prevent other listeners
57  // from processing events in a timely fashion.
59 
60  PtStatus setTerminalName(const char* name);
61 
62 /* ============================ ACCESSORS ================================= */
63 
64  PtStatus getTerminalName(char* name, int len);
65 
66 
67  static const char* className();
68  //:Returns the name of this class
70 
71 /* ============================ INQUIRY =================================== */
72 
73  virtual PtBoolean isClass(const char* pClassName);
74  //:Determines if this object if of the specified type.
78 
79  virtual PtBoolean isInstanceOf(const char* pClassName);
80  //:Determines if this object is either an instance of or is derived from
81  //:the specified type.
85 
86 /* //////////////////////////// PROTECTED ///////////////////////////////// */
87 protected:
89 
90 /* //////////////////////////// PRIVATE /////////////////////////////////// */
91 private:
92 
93  PtTerminalListener(const PtTerminalListener& rPtTerminalListener);
94  //:Copy constructor
95 
96  PtTerminalListener& operator=(const PtTerminalListener& rhs);
97  //:Assignment operator
98 
99 
100 };
101 
102 /* ============================ INLINE METHODS ============================ */
103 
104 #endif // _PtTerminalListener_h_
PtStatus
Definition: PtDefs.h:49
PtTerminalListener & operator=(const PtTerminalListener &rhs)
Definition: PtTerminalListener.cpp:73
int PtBoolean
Definition: PtDefs.h:71
void terminalEventTransmissionEnded(const PtTerminalEvent &rEvent)
Definition: PtTerminalListener.cpp:113
#define PT_CLASS_INFO_MEMBERS
Definition: PtDefs.h:73
Definition: PtEventListener.h:55
virtual ~PtTerminalListener()
param: (in) pMask - Event mask defining events the listener is interested. This must be a subset of t...
Definition: PtTerminalListener.cpp:60
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: PtTerminalEvent.h:32
static const char * className()
PT_CLASS_INFO_MEMBERS PtTerminalListener(const char *pTerminalName=NULL, PtEventMask *pMask=NULL)
Definition: PtTerminalListener.cpp:29
char * mpTerminalName
param: (in) pClassName - the string to compare with the name of this class. retcode: TRUE - if this o...
Definition: PtTerminalListener.h:88
PtStatus setTerminalName(const char *name)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalListener.cpp:92
PtStatus getTerminalName(char *name, int len)
Definition: PtTerminalListener.cpp:118
virtual PtBoolean isClass(const char *pClassName)
returns: Returns the string representation of the name of this class
Definition: PtEventMask.h:39
Definition: PtTerminalListener.h:31