sipxmedialib  Version 3.3
MpPlayerEvent.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2006 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 
15 #ifndef _MpPlayerEvent_h_
16 #define _MpPlayerEvent_h_
17 
18 // SYSTEM INCLUDES
19 
20 // APPLICATION INCLUDES
21 #include "mp/StreamDefs.h"
22 #include "mp/MpPlayer.h"
23 
24 // DEFINES
25 // MACROS
26 // EXTERNAL FUNCTIONS
27 // EXTERNAL VARIABLES
28 // CONSTANTS
29 // STRUCTS
30 // TYPEDEFS
31 // FORWARD DECLARATIONS
32 class MpPlayer ;
33 
34 //:Event encapsulating a change of player state.
36 {
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
39 
40 /* ============================ CREATORS ================================== */
42 
43  MpPlayerEvent() ;
44  //:Default Constructor
45 
46  MpPlayerEvent(MpPlayer* pPlayer,
47  void* pUserData,
48  PlayerState state) ;
49  //:Constructor requiring a player, user data, and state
50 
51  MpPlayerEvent(const MpPlayerEvent& rMpPlayerEvent);
52  //:Copy constructor
53 
54  virtual
56  //:Destructor
57 
59 
60 /* ============================ MANIPULATORS ============================== */
62 
64  //:Assignment operator
65 
66 /* ============================ ACCESSORS ================================= */
67  MpPlayer* getPlayer() const ;
68  //: Gets the player responsible for firing this event
69 
70  void* getUserData() const ;
71  //: Gets the user supplied data supplied when adding the listener
72 
73  PlayerState getState() const ;
74  //: Gets the state of player snapshotted when the event was fired.
75 
77 
78 /* ============================ INQUIRY =================================== */
80 
81 
83 
84 /* //////////////////////////// PROTECTED ///////////////////////////////// */
85 protected:
86 
87 /* //////////////////////////// PRIVATE /////////////////////////////////// */
88 private:
89  MpPlayer* mpPlayer ; // Reference to the Stream Player
90  void* mpUserData ; // Reference to the user data
91  PlayerState mState ; // State snapshot when fired
92 };
93 
94 /* ============================ INLINE METHODS ============================ */
95 
96 #endif // _MpPlayerEvent_h_
PlayerState getState() const
Definition: MpPlayerEvent.cpp:92
Definition: MpPlayer.h:92
MpPlayer * getPlayer() const
Definition: MpPlayerEvent.cpp:78
MpPlayer * mpPlayer
Definition: MpPlayerEvent.h:89
Definition: MpPlayerEvent.h:35
void * getUserData() const
Definition: MpPlayerEvent.cpp:85
virtual ~MpPlayerEvent()
Definition: MpPlayerEvent.cpp:55
PlayerState
Definition: MpPlayer.h:38
PlayerState mState
Definition: MpPlayerEvent.h:91
MpPlayerEvent()
Definition: MpPlayerEvent.cpp:28
void * mpUserData
Definition: MpPlayerEvent.h:90
MpPlayerEvent & operator=(const MpPlayerEvent &rhs)
Definition: MpPlayerEvent.cpp:63