Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / tests / AVStreams / Modify_QoS / receiver.h
blob5a6cea84bdc2eaf0658eb65591ddf0b2451bf589
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file receiver.h
6 * receiver.h,v 1.1 2001/04/15 02:56:26 yamuna Exp
8 * @author Yamuna Krishnamurthy <yamuna@cs.wustl.edu>
9 */
10 //=============================================================================
12 #include "orbsvcs/Naming/Naming_Client.h"
13 #include "orbsvcs/AV/AVStreams_i.h"
14 #include "orbsvcs/AV/Endpoint_Strategy.h"
15 #include "orbsvcs/AV/Policy.h"
17 // = AVStreams calls this class when data shows up from a sender.
18 class Receiver_Callback : public TAO_AV_Callback
20 public:
21 Receiver_Callback ();
22 /// Constructor.
24 /// Method that is called when there is data to be received from a
25 /// sender.
26 int receive_frame (ACE_Message_Block *frame,
27 TAO_AV_frame_info *frame_info,
28 const ACE_Addr &peer_address);
30 /// Called when the sender is done sending data and wants to close
31 /// down the connection.
32 int handle_destroy ();
34 /// Set the related stream control for this flow.
35 void streamctrl (AVStreams::StreamCtrl_ptr streamctrl);
37 private:
38 int frame_count_;
39 /// Keeping a count of the incoming frames.
41 /// Related stream control.
42 AVStreams::StreamCtrl_ptr streamctrl_;
45 // = AVStreams calls this class during connection setup.
46 class Receiver_StreamEndPoint : public TAO_Server_StreamEndPoint
48 public:
49 /// Create a receiver application callback.
50 int get_callback (const char *flowname,
51 TAO_AV_Callback *&callback);
53 private:
54 Receiver_Callback callback_;
55 /// Receiver application callback.
58 // = This class receives data from a AV sender and writes it to a file.
59 class Receiver
61 public:
62 Receiver ();
63 /// Constructor
65 ~Receiver ();
66 /// Destructor.
68 int init (int argc,
69 ACE_TCHAR *argv[]);
70 /// Initialize data components.
73 protected:
74 TAO_Naming_Client naming_client_;
75 /// The Naming Service Client.
77 TAO_AV_Endpoint_Reactive_Strategy_B
78 <Receiver_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> reactive_strategy_;
79 /// The endpoint reactive strategy.
81 TAO_MMDevice *mmdevice_;
82 /// Receiver MMDevice.