2 //=============================================================================
6 * Ftp server to receive data
8 * @author Yamuna Krishnamurthy <yamuna@cs.wustl.edu>
10 //=============================================================================
13 #include "orbsvcs/Naming/Naming_Client.h"
14 #include "orbsvcs/AV/AVStreams_i.h"
15 #include "orbsvcs/AV/Endpoint_Strategy.h"
16 #include "orbsvcs/AV/Policy.h"
20 * @class FTP_Server_Callback
22 * @brief Defines a class for the server application callback.
24 * This class overrides the methods of the TAO_AV_Callback so the
25 * AVStreams can make upcalls to the application.
27 class FTP_Server_Callback
: public TAO_AV_Callback
30 // Method that is called when there is data to be received from the ftp client.
31 int receive_frame (ACE_Message_Block
*frame
,
32 TAO_AV_frame_info
*frame_info
,
33 const ACE_Addr
&peer_address
);
35 // Called when the ftp client has finished reading the file and wants
36 // to close4 down the connection.
37 int handle_destroy ();
41 * @class FTP_Server_StreamEndPoint
43 * @brief Defines the aplication stream endpoint
45 * This is the class that overrides the tao_server_enpodint to handle
46 * pre and post connect processing.
48 class FTP_Server_StreamEndPoint
: public TAO_Server_StreamEndPoint
51 // Create the server application callback.
52 int get_callback (const char *flowname
,
53 TAO_AV_Callback
*&callback
);
56 /// reference to the server application callback.
57 FTP_Server_Callback callback_
;
63 * @brief Defines the server application class.
65 * The actual server program that acts as the ftp server that receives data
66 * sent by the ftp client.
77 /// Initialize data components.
82 /// The Naming Service Client.
83 TAO_Naming_Client my_naming_client_
;
85 /// The endpoint reacxtive strategy.
86 TAO_AV_Endpoint_Reactive_Strategy_B
87 <FTP_Server_StreamEndPoint
,TAO_VDev
,AV_Null_MediaCtrl
> reactive_strategy_
;
89 /// The server MMDevice.
90 TAO_MMDevice
*mmdevice_
;