2 //=============================================================================
6 * receiver.h,v 1.1 2001/04/15 02:56:26 yamuna Exp
8 * @author Yamuna Krishnamurthy <yamuna@cs.wustl.edu>
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
24 /// Method that is called when there is data to be received from a
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
);
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
49 /// Create a receiver application callback.
50 int get_callback (const char *flowname
,
51 TAO_AV_Callback
*&callback
);
54 Receiver_Callback callback_
;
55 /// Receiver application callback.
58 // = This class receives data from a AV sender and writes it to a file.
70 /// Initialize data components.
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.