2 //=============================================================================
6 * @author Carlos O'Ryan
8 //=============================================================================
14 #include "orbsvcs/AV/AVStreams_i.h"
15 #include "orbsvcs/AV/Policy.h"
16 #include "orbsvcs/AV/Flows_T.h"
17 #include "ace/OS_NS_time.h"
19 class Ping_Recv_Callback
: public TAO_AV_Callback
22 Ping_Recv_Callback ();
23 virtual int handle_stop ();
24 virtual int receive_frame (ACE_Message_Block
*frame
,
25 TAO_AV_frame_info
*frame_info
= 0,
26 const ACE_Addr
&peer_address
= ACE_Addr::sap_any
);
27 virtual int handle_destroy ();
32 class Ping_Recv
: public TAO_FlowConsumer
37 virtual int get_callback (const char *flowname
,
38 TAO_AV_Callback
*&callback
);
41 /// The callback object...
42 Ping_Recv_Callback callback_
;
45 class Pong_Send_Callback
: public TAO_AV_Callback
48 /// Ad-hoc method to send a response outside the context of a
50 int send_response (ACE_hrtime_t stamp
);
52 virtual int handle_timeout (void *arg
);
53 virtual int handle_end_stream ();
54 virtual void get_timeout (ACE_Time_Value
*&tv
,
58 class Pong_Send
: public TAO_FlowProducer
62 virtual int get_callback (const char *flowname
,
63 TAO_AV_Callback
*&callback
);
66 typedef TAO_AV_Endpoint_Reactive_Strategy_B
<TAO_StreamEndPoint_B
,TAO_VDev
,AV_Null_MediaCtrl
> Reactive_Strategy
;
68 typedef TAO_FDev
<TAO_FlowProducer
,Ping_Recv
> Ping_Recv_FDev
;
69 typedef TAO_FDev
<Pong_Send
,TAO_FlowConsumer
> Pong_Send_FDev
;
71 #endif /* TAO_PING_H */