Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / AVStreams / Multicast / ftp.h
blob18aa68d2b6fef2753c3e6c048bb6a191065234dc
1 /* -*- C++ -*- */
2 #ifndef TAO_AV_FTP_H
3 #define TAO_AV_FTP_H
5 #include "ace/Get_Opt.h"
6 #include "tao/PortableServer/PortableServer.h"
7 #include "tao/Strategies/advanced_resource.h"
8 #include "orbsvcs/Naming/Naming_Client.h"
9 #include "orbsvcs/AV/AVStreams_i.h"
10 #include "orbsvcs/AV/Endpoint_Strategy.h"
11 #include "orbsvcs/AV/Transport.h"
12 #include "orbsvcs/AV/sfp.h"
13 #include "orbsvcs/AV/MCast.h"
15 class FTP_Client_Callback
16 :public TAO_AV_Callback
18 public:
19 FTP_Client_Callback ();
20 virtual int handle_end_stream ();
21 void set_protocol_object (TAO_AV_Protocol_Object *protocol_object) {this->protocol_object_ = protocol_object;}
22 virtual int handle_timeout (void *arg);
23 virtual void get_timeout (ACE_Time_Value *&tv,
24 void *&arg);
26 protected:
27 int count_;
28 TAO_AV_Protocol_Object *protocol_object_;
31 class FTP_Client_StreamEndPoint
32 :public TAO_Client_StreamEndPoint
34 public:
35 FTP_Client_StreamEndPoint ();
37 virtual int get_callback (const char *flowname,
38 TAO_AV_Callback *&callback);
40 virtual int set_protocol_object (const char *flowname,
41 TAO_AV_Protocol_Object *object);
42 protected:
43 FTP_Client_Callback *callback_;
46 typedef TAO_AV_Endpoint_Reactive_Strategy_A<FTP_Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> ENDPOINT_STRATEGY;
48 class Client;
49 class Endpoint_Reactive_Strategy
50 : public ENDPOINT_STRATEGY
52 public:
53 Endpoint_Reactive_Strategy (CORBA::ORB_ptr orb,
54 PortableServer::POA_ptr poa,
55 Client *client_ptr);
56 // constructor . The orb manager is needed for the TAO_AV_Endpoint_Reactive_Strategy_A.
58 virtual int make_stream_endpoint (FTP_Client_StreamEndPoint *& endpoint);
59 // hook to make our streamendpoint taking a Client pointer
60 private:
61 Client *client_;
62 // pointer to command handler object
66 class Client
68 public:
69 Client ();
70 int init (int argc, ACE_TCHAR *argv[]);
71 int run ();
72 FILE *file ();
73 char *flowname ();
74 TAO_StreamCtrl* streamctrl ();
75 private:
76 int parse_args (int argc, ACE_TCHAR *argv[]);
77 int bind_to_server (const char *name);
78 Endpoint_Reactive_Strategy endpoint_strategy_;
79 AVStreams::MMDevice_var server_mmdevice_;
80 TAO_MMDevice client_mmdevice_;
81 TAO_StreamCtrl streamctrl_;
82 // Video stream controller
84 int argc_;
85 ACE_TCHAR **argv_;
86 const char *filename_;
87 const char *address_;
89 TAO_Naming_Client my_naming_client_;
90 FILE *fp_;
91 char *protocol_;
92 char *flowname_;
93 int use_sfp_;
96 typedef ACE_Unmanaged_Singleton<Client,ACE_Null_Mutex> CLIENT;
98 #endif /* TAO_AV_FTP_H */