sipxmedialib  Version 3.3
MpResNotificationMsg.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007-2021 SIPez LLC. All rights reserved.
3 //
4 // Copyright (C) 2007-2009 SIPfoundry Inc.
5 // Licensed by SIPfoundry under the LGPL license.
6 //
7 // $$
9 
10 #ifndef _MpResNotificationMsg_h_
11 #define _MpResNotificationMsg_h_
12 
13 // SYSTEM INCLUDES
14 
15 // APPLICATION INCLUDES
16 #include "os/OsMsg.h"
17 #include "utl/UtlString.h"
18 #include "mp/MpTypes.h"
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 
31 class MpResNotificationMsg : public OsMsg
32 {
33  /* //////////////////////////// PUBLIC //////////////////////////////////// */
34 public:
35 
37  typedef enum
38  {
41 
72  } RNMsgType;
73 
74  /* ============================ CREATORS ================================== */
76 
77 
79  MpResNotificationMsg(RNMsgType msgType,
80  const UtlString& namedResOriginator,
82  int streamId = -1);
83 
85  MpResNotificationMsg(const MpResNotificationMsg& rMpResNotifyMsg);
86 
88  virtual OsMsg* createCopy(void) const;
89 
91  virtual ~MpResNotificationMsg();
92 
94 
95  /* ============================ MANIPULATORS ============================== */
97 
98 
101 
103  void setOriginatingResourceName(const UtlString& resOriginator);
108  void setConnectionId(MpConnectionID connId);
110 
113  void setStreamId(int streamId);
114 
116 
117  /* ============================ ACCESSORS ================================= */
119 
120 
122  int getMsg() const;
123 
125  UtlString getOriginatingResourceName() const;
133 
136  int getStreamId() const;
137 
139 
140  /* ============================ INQUIRY =================================== */
142 
143 
145 
146  /* //////////////////////////// PROTECTED ///////////////////////////////// */
147 protected:
148 
149  /* //////////////////////////// PRIVATE /////////////////////////////////// */
150 private:
151  UtlString mMsgOriginatorName;
153  int mStreamId;
155 };
157 
158 /* ============================ INLINE METHODS ============================ */
159 
160 #endif // _MpResNotificationMsg_h_
Definition: MpResNotificationMsg.h:42
MpConnectionID getConnectionId() const
Get the connection ID that this message is associated with.
Definition: MpResNotificationMsg.cpp:112
Select all message types (used in enabling/disabling)
Definition: MpResNotificationMsg.h:40
int mStreamId
Definition: MpResNotificationMsg.h:154
Definition: MpResNotificationMsg.h:47
Recording stopped manually (MprnIntMsg bears number of recorded samples).
Definition: MpResNotificationMsg.h:52
virtual OsMsg * createCopy(void) const
Create a copy of this msg object (which may be of a derived type)
Definition: MpResNotificationMsg.cpp:50
Definition: MpResNotificationMsg.h:65
void setStreamId(int streamId)
Set the stream number inside the connection this notification is associated with. ...
Definition: MpResNotificationMsg.cpp:91
Recording stopped because of an error.
Definition: MpResNotificationMsg.h:54
Value for MprnRtpStreamActivityMsg notifications.
Definition: MpResNotificationMsg.h:59
Definition: MpResNotificationMsg.h:71
Definition: MpResNotificationMsg.h:56
Definition: MpResNotificationMsg.h:61
int getMsg() const
Returns the type of the media resource notification message.
Definition: MpResNotificationMsg.cpp:99
MpConnectionID mConnectionId
Definition: MpResNotificationMsg.h:152
Definition: MpResNotificationMsg.h:69
Definition: MpResNotificationMsg.h:62
Value for MprnDTMFMsg notifications.
Definition: MpResNotificationMsg.h:55
Definition: MpResNotificationMsg.h:43
virtual ~MpResNotificationMsg()
Destructor.
Definition: MpResNotificationMsg.cpp:56
Definition: MpResNotificationMsg.h:64
void setConnectionId(MpConnectionID connId)
Set the connection ID that this notification is associated with.
Definition: MpResNotificationMsg.cpp:86
Definition: MpResNotificationMsg.h:70
MpResNotificationMsg & operator=(const MpResNotificationMsg &rhs)
Assignment operator.
Definition: MpResNotificationMsg.cpp:65
UtlString getOriginatingResourceName() const
Get the name of the resource that originated this message.
Definition: MpResNotificationMsg.cpp:106
Definition: MpResNotificationMsg.h:45
int getStreamId() const
Get the stream number inside the connection this notification is associated with. ...
Definition: MpResNotificationMsg.cpp:117
Definition: MpResNotificationMsg.h:63
Definition: MpResNotificationMsg.h:31
Audio energy level (MprnIntMsg)
Definition: MpResNotificationMsg.h:60
Recording stopped automatically (MprnIntMsg bears number of recorded samples).
Definition: MpResNotificationMsg.h:53
Recorder paused after being started, or resumed (MprnIntMsg bears number of recorded samples)...
Definition: MpResNotificationMsg.h:50
Recorder resumed after being paused.
Definition: MpResNotificationMsg.h:51
void setOriginatingResourceName(const UtlString &resOriginator)
Set the name of the resource this message applies to.
Definition: MpResNotificationMsg.cpp:80
Definition: MpResNotificationMsg.h:68
Value for MprnProgressMsg notifications.
Definition: MpResNotificationMsg.h:48
Definition: MpResNotificationMsg.h:44
int MpConnectionID
Flowgraph connection ID.
Definition: MpTypes.h:56
RNMsgType
Phone set message types.
Definition: MpResNotificationMsg.h:37
Audio energy level (MprnIntMsg)
Definition: MpResNotificationMsg.h:46
Definition: MpResNotificationMsg.h:58
Definition: MpResNotificationMsg.h:66
Recording started.
Definition: MpResNotificationMsg.h:49
#define MP_INVALID_CONNECTION_ID
Definition: MpTypes.h:57
MpResNotificationMsg(RNMsgType msgType, const UtlString &namedResOriginator, MpConnectionID connId=MP_INVALID_CONNECTION_ID, int streamId=-1)
Constructor.
Definition: MpResNotificationMsg.cpp:29
Message type is invalid (similar to NULL)
Definition: MpResNotificationMsg.h:39
UtlString mMsgOriginatorName
Name of the resource that originated this message.
Definition: MpResNotificationMsg.h:151
Definition: MpResNotificationMsg.h:57