Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / tests / AVStreams / Latency / pong.h
blob065af4f4f5a003855572b19fafafa7b1dffab169
2 //=============================================================================
3 /**
4 * @file pong.h
6 * @author Carlos O'Ryan
7 */
8 //=============================================================================
10 #ifndef TAO_PONG_H
11 #define TAO_PONG_H
13 #include "orbsvcs/AV/AVStreams_i.h"
14 #include "orbsvcs/AV/Policy.h"
15 #include "orbsvcs/AV/Flows_T.h"
17 class Pong_Recv_Callback : public TAO_AV_Callback
19 public:
20 virtual int handle_stop ();
21 virtual int receive_frame (ACE_Message_Block *frame,
22 TAO_AV_frame_info *frame_info = 0,
23 const ACE_Addr &peer_address = ACE_Addr::sap_any);
24 virtual int handle_destroy ();
27 class Pong_Recv : public TAO_FlowConsumer
29 public:
30 Pong_Recv ();
32 virtual int get_callback (const char *flowname,
33 TAO_AV_Callback *&callback);
35 private:
36 /// The callback object...
37 Pong_Recv_Callback callback_;
40 class Ping_Send_Callback : public TAO_AV_Callback
42 public:
43 Ping_Send_Callback ();
45 virtual int handle_timeout (void *arg);
46 virtual int handle_end_stream ();
47 virtual void get_timeout (ACE_Time_Value *&tv,
48 void *&arg);
50 private:
51 /// the timeout value
52 ACE_Time_Value timeout_;
54 /// Pre-allocate the message block to send...
55 ACE_Message_Block frame_;
56 int count_;
59 class Ping_Send : public TAO_FlowProducer
61 public:
62 Ping_Send ();
63 virtual int get_callback (const char *flowname,
64 TAO_AV_Callback *&callback);
66 private:
67 /// The callback object...
68 Ping_Send_Callback callback_;
71 typedef TAO_AV_Endpoint_Reactive_Strategy_A <TAO_StreamEndPoint_A,TAO_VDev,AV_Null_MediaCtrl> Reactive_Strategy;
73 typedef TAO_FDev<TAO_FlowProducer,Pong_Recv> Pong_Recv_FDev;
74 typedef TAO_FDev<Ping_Send,TAO_FlowConsumer> Ping_Send_FDev;
76 #endif /* TAO_PONG_H */