Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / tests / AVStreams / Pluggable / server.h
blobfea72eda1735b1ee9a9a7ed26d924bb9222d9333
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file server.h
6 * Ftp server to receive data
8 * @author Yamuna Krishnamurthy <yamuna@cs.wustl.edu>
9 */
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"
19 /**
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
29 public:
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 ();
40 /**
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
50 public:
51 // Create the server application callback.
52 int get_callback (const char *flowname,
53 TAO_AV_Callback *&callback);
55 private:
56 /// reference to the server application callback.
57 FTP_Server_Callback callback_;
60 /**
61 * @class Server
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.
68 class Server
70 public:
71 /// Constructor
72 Server ();
74 /// Destructor.
75 ~Server ();
77 /// Initialize data components.
78 int init (int argc,
79 ACE_TCHAR *argv[]);
81 protected:
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_;