diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/AV/Policy.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/Policy.h | 78 |
1 files changed, 27 insertions, 51 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AV/Policy.h b/TAO/orbsvcs/orbsvcs/AV/Policy.h index 7d7997f39c1..926f9c711b1 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Policy.h +++ b/TAO/orbsvcs/orbsvcs/AV/Policy.h @@ -19,6 +19,7 @@ #ifndef TAO_AV_POLICY_H #define TAO_AV_POLICY_H +#include "ace/Addr.h" #include "tao/TAO.h" #include "tao/debug.h" #include "orbsvcs/orbsvcs_export.h" @@ -26,6 +27,8 @@ struct TAO_AV_frame_info { CORBA::Boolean boundary_marker; + CORBA::Octet format; + // @@ Shouldn't this be a string. CORBA::ULong timestamp; CORBA::ULong ssrc; CORBA::ULong sequence_num; @@ -48,6 +51,7 @@ public: TAO_AV_RTCP_SDES_POLICY, TAO_AV_TIMESTAMP_POLICY }; + TAO_AV_Policy (PolicyType type); PolicyType type (void); protected: @@ -110,13 +114,20 @@ public: class TAO_AV_Protocol_Object; class TAO_AV_Transport; +class TAO_AV_Flow_Handler; class TAO_AV_Callback { - //@@coryan:Document this class. - + // = TITLE + // Callback class that the user will be implementing for receiving + // frames from the network and also for timer events. public: TAO_AV_Callback (void); + + int open (TAO_AV_Protocol_Object *object, + TAO_AV_Flow_Handler *handler); + // Called for opening the callback. + virtual int handle_start (void); // Called during Streamctrl->start. @@ -126,67 +137,32 @@ public: virtual int handle_timeout (void *arg); // Called during timeout for Flow Producers. + virtual int schedule_timer (void); + virtual int receive_frame (ACE_Message_Block *frame, - TAO_AV_frame_info *frame_info = 0); + TAO_AV_frame_info *frame_info = 0, + const ACE_Addr &address = ACE_Addr::sap_any); + // Called when a frame arrives for a FlowConsumer. - virtual int handle_end_stream (void); + virtual int receive_control_frame (ACE_Message_Block *frame, + const ACE_Addr &address = ACE_Addr::sap_any); + // address from which the frame was received. + + virtual int handle_destroy (void); // Called during Streamctrl->destroy i.e tear_down of the stream - // @@coryan:Call it handle_destroy or handle_close. virtual void get_timeout (ACE_Time_Value *&tv, void *&arg); // Called to get the timeout. If tv is 0 then the framework stop - // calling this. + // calling this. This will be called during the start of the frame + // and also if schedule_timer is called to get the timeout. -// virtual int get_frame (ACE_Message_Block *&frame, -// TAO_AV_frame_info *&frame_info); - // @@: Should these be in the open method?? - TAO_AV_Transport *transport (void); - void transport (TAO_AV_Transport *transport); TAO_AV_Protocol_Object *protocol_object (void); - void protocol_object (TAO_AV_Protocol_Object *object); + // Accessor to protocol object. protected: - TAO_AV_Transport *transport_; TAO_AV_Protocol_Object *protocol_object_; -}; - -class TAO_AV_Protocol_Object -{ -public: - TAO_AV_Protocol_Object (TAO_AV_Callback *callback, - TAO_AV_Transport *transport = 0); - // constructor. - - virtual ~TAO_AV_Protocol_Object (void); - // Destructor - - virtual int set_policies (const PolicyList &policy_list); - virtual PolicyList get_policies (void); - // set/get policies. - - virtual int start (void); - virtual int stop (void); - // start/stop the flow. - - virtual int send_frame (ACE_Message_Block *frame, - TAO_AV_frame_info *frame_info = 0) = 0; - // send a data frame. - - virtual int send_frame (const iovec *iov, - int iovcnt, - TAO_AV_frame_info *frame_info = 0) = 0; - // @@Naga: We might need to make this pure virtual - void transport (TAO_AV_Transport *transport); - TAO_AV_Transport *transport (void); - // set/get the transport. - - virtual int end_stream (void) = 0; - // end the stream. -protected: - TAO_AV_Transport *transport_; - PolicyList policy_list_; - TAO_AV_Callback *callback_; + TAO_AV_Flow_Handler *handler_; }; #if defined(__ACE_INLINE__) |