⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avstreams_i.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
📖 第 1 页 / 共 5 页
字号:
  virtual void set_dev_params (const CosPropertyService::Properties & new_settings
                               ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::PropertyException,
                     AVStreams::streamOpFailed));

  /// sets the list of protocols to be used.
  virtual void set_protocol_restriction (const AVStreams::protocolSpec & the_spec
                                         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::notSupported));

  /// checks whether the passed flowendpoint is compatible with this.
  virtual CORBA::Boolean is_fep_compatible (AVStreams::FlowEndPoint_ptr fep
                                            ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::formatMismatch,
                     AVStreams::deviceQosMismatch));

  /// sets the peer flowendpoint.
  virtual CORBA::Boolean set_peer (AVStreams::FlowConnection_ptr the_fc,
                                   AVStreams::FlowEndPoint_ptr the_peer_fep,
                                   AVStreams::QoS & the_qos
                                   ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::QoSRequestFailed,
                     AVStreams::streamOpFailed));

  /// sets the multicast peer flowendpoint, not implemented.
  virtual CORBA::Boolean set_Mcast_peer (AVStreams::FlowConnection_ptr the_fc,
                                         AVStreams::MCastConfigIf_ptr a_mcastconfigif,
                                         AVStreams::QoS & the_qos
                                         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::QoSRequestFailed));


  /**
   * This should be implemented in both the FlowProducer and consumer and hence is
   * pure virtual since we need to know the role of the flowendpoint to create appropriate
   * protocol objects. eg. in SFP to create Producer Object/ Consumer Object.
   */
  virtual CORBA::Boolean connect_to_peer (AVStreams::QoS & the_qos,
                                          const char * address,
                                          const char * use_flow_protocol
                                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToConnect,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed)) = 0;

  /// connect to the peer endpoint.
  virtual CORBA::Boolean connect_to_peer_i (TAO_FlowSpec_Entry::Role role,
                                            AVStreams::QoS & the_qos,
                                            const char * address,
                                            const char * use_flow_protocol
                                            ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToConnect,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed));

  /**
   * This should be implemented in both the FlowProducer and consumer and hence is
   * pure virtual since we need to know the role of the flowendpoint to create appropriate
   * protocol objects. eg. in SFP to create Producer Object/ Consumer Object.
   */
  virtual char * go_to_listen (AVStreams::QoS & the_qos,
                               CORBA::Boolean is_mcast,
                               AVStreams::FlowEndPoint_ptr peer,
                               char *& flowProtocol
                               ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToListen,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed)) = 0;

  /// listen request from the peer.
  virtual char * go_to_listen_i (TAO_FlowSpec_Entry::Role role,
                                 AVStreams::QoS & the_qos,
                                 CORBA::Boolean is_mcast,
                                 AVStreams::FlowEndPoint_ptr peer,
                                 char *& flowProtocol
                                 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToListen,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed));


protected:
  /// The related streamendpoint.
  AVStreams::StreamEndPoint_var related_sep_;

  /// The related flow connection reference
  AVStreams::FlowConnection_var related_flow_connection_;

  /// The peer flowendpoint reference.
  AVStreams::FlowEndPoint_var peer_fep_;

  /// Available protocols for this flowendpoint.
  AVStreams::protocolSpec protocols_;

  /// Address information for the protocols.
  AVStreams::protocolSpec protocol_addresses_;

  /// The multicast peer endpoint.
  AVStreams::MCastConfigIf_var mcast_peer_;

  /// Lock.
  CORBA::Boolean lock_;

  CORBA::String_var format_;
  CORBA::String_var flowname_;
  CosPropertyService::Properties dev_params_;
  TAO_AV_FlowSpecSet flow_spec_set_;
  CORBA::String_var reverse_channel_;
};

class TAO_AV_Export TAO_FlowProducer:
  public virtual POA_AVStreams::FlowProducer,
  public virtual TAO_FlowEndPoint,
  public virtual PortableServer::RefCountServantBase
{
public:
  /// default constructor
  TAO_FlowProducer (void);

  TAO_FlowProducer (const char *flowname,
                    AVStreams::protocolSpec protocols,
                    const char *format);

  /**
   * get the reverse channel, to be used for feedback for protocols like UDP.
   * @@Naga: In the spec this is defined in the TAO_FlowProducer but it seems more reasonable for this
   * to be in a FlowEndPoint since any of the flowendpoints can be made to listen. So in the case of
   * UDP if the producer is listening and the consumer connects (logically) then the producer needs to
   * know the reverse channel on its peer fep to send data to.
   */
  virtual char * get_rev_channel (const char * pcol_name
                                  ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  /// stop this flow, to be overridden by the application.
  virtual void stop (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  /// start this flow, to be overridden by the application.
  virtual void start (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual char * go_to_listen (AVStreams::QoS & the_qos,
                               CORBA::Boolean is_mcast,
                               AVStreams::FlowEndPoint_ptr peer,
                               char *& flowProtocol
                               ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToListen,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed));

  virtual CORBA::Boolean connect_to_peer (AVStreams::QoS & the_qos,
                                          const char * address,
                                          const char * use_flow_protocol
                                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToConnect,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed));

  /// connect to the multicast address, not implemented.
  virtual char * connect_mcast (AVStreams::QoS & the_qos,
                                CORBA::Boolean_out is_met,
                                const char * address,
                                const char * use_flow_protocol
                                ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToConnect,
                     AVStreams::notSupported,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed));



  /// sets the public key  to be used for encryption of the data.
  virtual void set_key (const AVStreams::key & the_key
                        ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  /// sets the source id of this flow producer so that it can be used
  /// to distinguish this producer from others in the multicast case.
  virtual void set_source_id (CORBA::Long source_id
                              ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

protected:
  /// source id of this producer.
  CORBA::Long source_id_;
  CORBA::String_var peer_address_;
};

class TAO_AV_Export TAO_FlowConsumer :
  public virtual POA_AVStreams::FlowConsumer,
  public virtual TAO_FlowEndPoint,
  public virtual PortableServer::RefCountServantBase
{
public:
  /// default constructor.
  TAO_FlowConsumer (void);

  TAO_FlowConsumer (const char *flowname,
                    AVStreams::protocolSpec protocols,
                    const char *format);

  /// stop this flow, to be overridden by the application.
  virtual void stop (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  /// start this flow, to be overridden by the application.
  virtual void start (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual char * go_to_listen (AVStreams::QoS & the_qos,
                               CORBA::Boolean is_mcast,
                               AVStreams::FlowEndPoint_ptr peer,
                               char *& flowProtocol
                               ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToListen,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed));

  virtual CORBA::Boolean connect_to_peer (AVStreams::QoS & the_qos,
                                          const char * address,
                                          const char * use_flow_protocol
                                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::failedToConnect,
                     AVStreams::FPError,
                     AVStreams::QoSRequestFailed));
};

/**
 * @class TAO_MediaControl
 * @brief Abstract Mediacontrol class.
 *        The following are to be handled by the specialized media control
 *        for the specific media like camera, speaker.
 */
class TAO_AV_Export TAO_MediaControl
  :public virtual POA_AVStreams::MediaControl,
   public virtual PortableServer::RefCountServantBase
{

public:
  /// default constructor
  TAO_MediaControl (void);

  virtual AVStreams::Position get_media_position (AVStreams::PositionOrigin an_origin,
                                                  AVStreams::PositionKey a_key
                                                  ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::MediaControl::PostionKeyNotSupported)) =0;

  virtual void set_media_position (const AVStreams::Position & a_position
                                   ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::MediaControl::PostionKeyNotSupported,
                     AVStreams::InvalidPosition)) =0;

  virtual void start (const AVStreams::Position & a_position
                      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::InvalidPosition)) =0;

  virtual void pause (const AVStreams::Position & a_position
                      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::InvalidPosition)) =0;

  virtual void resume (const AVStreams::Position & a_position
                       ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::InvalidPosition)) =0;

  virtual void stop (const AVStreams::Position & a_position
                     ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     AVStreams::InvalidPosition)) =0;

};


#include "Transport.h"

#if defined (__ACE_INLINE__)
#include "tao/debug.h"
#include "AVStreams_i.i"
#endif /* __ACE_INLINE__ */

#include "Flows_T.h"

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning(pop)
#endif /* _MSC_VER */

#include /**/ "ace/post.h"
#endif /* AVSTREAMS_I_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -