Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ACE_GQoS_Session Class Reference

A GQoS session object. More...

#include <QoS_Session_Impl.h>

Inheritance diagram for ACE_GQoS_Session:

Inheritance graph
[legend]
Collaboration diagram for ACE_GQoS_Session:

Collaboration graph
[legend]
List of all members.

Public Methods

 ~ACE_GQoS_Session (void)
 Default destructor. More...

virtual int open (ACE_INET_Addr dest_addr, ACE_Protocol_ID protocol_id)
 Open a GQoS session [dest IP, dest port, Protocol ID]. More...

virtual int close (void)
 Close the GQoS Session. More...

virtual ACE_QoS qos (void) const
 Returns the QoS for this GQoS session. More...

virtual int qos (ACE_SOCK *socket, ACE_QoS_Manager *qos_manager, const ACE_QoS &ace_qos)
 Set QoS for this GQoS session. The socket parameter is used to confirm if this QoS session was subscribed to by the socket. More...

virtual void qos (const ACE_QoS &ace_qos)
virtual int update_qos (void)
 Calls the ioctl (ACE_SIO_GET_QOS). It is a mechanism of updating the QoS for this session asynchronously, as RSVP events occur. More...

virtual ACE_End_Point_Type flags (void) const
 Get/Set methods for the flags_. More...

virtual void flags (const ACE_End_Point_Type flags)
virtual ACE_INET_Addr dest_addr (void) const
 Get the destination address for this GQoS session. More...

virtual void dest_addr (const ACE_INET_Addr &dest_addr)
 Set the destination address for this GQoS session. More...

virtual u_short source_port (void) const
 Get the source port for this session. More...

virtual void source_port (const u_short &source_port)
 Set the source port for this session. More...

virtual int session_id (void) const
 Get the GQoS session id. More...

virtual void session_id (const int session_id)
 Set the GQoS session id. More...

virtual ACE_HANDLE rsvp_events_handle (void)
 Get the file descriptor of the underlying socket. More...

virtual void rsvp_event_type (RSVP_Event_Type event_type)
virtual RSVP_Event_Type rsvp_event_type (void)
 Set the RAPI event that last occured. More...

virtual int version ()
 Get the RAPI event that last occured GQoS version. More...


Static Public Attributes

int GQoS_session_id = 0
 This is a session ID generator. It does a lot more than expected from an int!. More...


Private Methods

 ACE_GQoS_Session (void)
 Default constructor. Constructor is defined private so that only the friend factory can instantiate this class. More...


Friends

class ACE_QoS_Session_Factory
 The factory is a friend so it can create this object through the only private constructor. More...


Detailed Description

A GQoS session object.

This class is a GQoS (Generic QoS, an implementation of RSVP on Win2K) implementation of the ACE_QoS_Session interface.

Definition at line 153 of file QoS_Session_Impl.h.


Constructor & Destructor Documentation

ACE_INLINE ACE_GQoS_Session::~ACE_GQoS_Session void   
 

Default destructor.

Definition at line 112 of file QoS_Session_Impl.i.

References ACE_TRACE.

00113 {
00114   ACE_TRACE ("ACE_GQoS_Session::~ACE_GQoS_Session");
00115 }

ACE_GQoS_Session::ACE_GQoS_Session void    [private]
 

Default constructor. Constructor is defined private so that only the friend factory can instantiate this class.

Definition at line 622 of file QoS_Session_Impl.cpp.

References ACE_TRACE.

00623 {
00624   ACE_TRACE ("ACE_GQoS_Session::ACE_GQoS_Session");
00625 }


Member Function Documentation

int ACE_GQoS_Session::close void    [virtual]
 

Close the GQoS Session.

Implements ACE_QoS_Session.

Definition at line 642 of file QoS_Session_Impl.cpp.

00643 {
00644   // TBD.
00645   return 0;
00646 }

ACE_INLINE void ACE_GQoS_Session::dest_addr const ACE_INET_Addr   dest_addr [virtual]
 

Set the destination address for this GQoS session.

Implements ACE_QoS_Session.

Definition at line 178 of file QoS_Session_Impl.i.

References ACE_QoS_Session::dest_addr_.

00179 {
00180   this->dest_addr_ = dest_addr;
00181 }

ACE_INLINE ACE_INET_Addr ACE_GQoS_Session::dest_addr void    const [virtual]
 

Get the destination address for this GQoS session.

Implements ACE_QoS_Session.

Definition at line 171 of file QoS_Session_Impl.i.

References ACE_QoS_Session::dest_addr_.

00172 {
00173   return this->dest_addr_;
00174 }

ACE_INLINE void ACE_GQoS_Session::flags const ACE_End_Point_Type    flags [virtual]
 

Implements ACE_QoS_Session.

Definition at line 164 of file QoS_Session_Impl.i.

References flags, and ACE_QoS_Session::flags_.

00165 {
00166   this->flags_ = flags;
00167 }

ACE_INLINE ACE_QoS_Session::ACE_End_Point_Type ACE_GQoS_Session::flags void    const [virtual]
 

Get/Set methods for the flags_.

Implements ACE_QoS_Session.

Definition at line 157 of file QoS_Session_Impl.i.

References ACE_QoS_Session::flags_.

Referenced by flags.

00158 {
00159   return this->flags_;
00160 }

int ACE_GQoS_Session::open ACE_INET_Addr    dest_addr,
ACE_Protocol_ID    protocol_id
[virtual]
 

Open a GQoS session [dest IP, dest port, Protocol ID].

Implements ACE_QoS_Session.

Definition at line 629 of file QoS_Session_Impl.cpp.

References ACE_Protocol_ID, ACE_QoS_Session::dest_addr_, GQoS_session_id, ACE_QoS_Session::protocol_id_, and ACE_QoS_Session::session_id_.

00631 {
00632   this->dest_addr_ = dest_addr;
00633   this->protocol_id_ = protocol_id;
00634 
00635   this->session_id_ = GQoS_session_id++;
00636 
00637   return 0;
00638 }

ACE_INLINE void ACE_GQoS_Session::qos const ACE_QoS   ace_qos [virtual]
 

Sets the QoS for this session object to ace_qos. Does not interfere with the QoS in the underlying socket. This call is useful to update the QoS object when the underlying socket QoS is being set through a mechanism other than the previous qos () method e.g. inside the dgram_mcast.subscribe () where the QoS for the socket is set through ACE_OS::join_leaf ().

Implements ACE_QoS_Session.

Definition at line 127 of file QoS_Session_Impl.i.

References ACE_QoS_Session::qos_.

00128 {
00129   this->qos_ = ace_qos;
00130 }

int ACE_GQoS_Session::qos ACE_SOCK   socket,
ACE_QoS_Manager   qos_manager,
const ACE_QoS   ace_qos
[virtual]
 

Set QoS for this GQoS session. The socket parameter is used to confirm if this QoS session was subscribed to by the socket.

Implements ACE_QoS_Session.

Definition at line 650 of file QoS_Session_Impl.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_LIB_TEXT, ACE_SIO_SET_QOS, ACE_IPC_SAP::get_handle, ACE_OS::ioctl, LM_DEBUG, LM_ERROR, qos, and ACE_QoS_Manager::qos_session_set.

00653 {
00654 
00655   // Confirm if the current session is one of the QoS sessions
00656   // subscribed to by the given socket.
00657 
00658   if (qos_manager->qos_session_set ().find (this) == -1)
00659     ACE_ERROR_RETURN ((LM_ERROR,
00660                        ACE_LIB_TEXT ("This QoS session was not subscribed to")
00661                        ACE_LIB_TEXT (" by the socket\n")),
00662                       -1);
00663 
00664   // Set the QOS according to the supplied ACE_QoS. The I/O control
00665   // code used under the hood is SIO_SET_QOS.
00666 
00667   u_long ret_bytes = 0;
00668 
00669   ACE_QoS qos = ace_qos;
00670   if (ACE_OS::ioctl (socket->get_handle (),
00671                      ACE_SIO_SET_QOS,
00672                      qos,
00673                      &ret_bytes) == -1)
00674     ACE_ERROR_RETURN ((LM_ERROR,
00675                        ACE_LIB_TEXT ("Error in Qos set ACE_OS::ioctl() %d\n"),
00676                        ret_bytes),
00677                       -1);
00678   else
00679     ACE_DEBUG ((LM_DEBUG,
00680                 ACE_LIB_TEXT ("Setting QoS with ACE_OS::ioctl () succeeds \n")));
00681 
00682   return 0;
00683 }

ACE_INLINE ACE_QoS ACE_GQoS_Session::qos void    const [virtual]
 

Returns the QoS for this GQoS session.

Implements ACE_QoS_Session.

Definition at line 119 of file QoS_Session_Impl.i.

References ACE_QoS_Session::qos_.

Referenced by qos.

00120 {
00121   return this->qos_;
00122 }

ACE_QoS_Session::RSVP_Event_Type ACE_GQoS_Session::rsvp_event_type void    [virtual]
 

Set the RAPI event that last occured.

Implements ACE_QoS_Session.

Definition at line 694 of file QoS_Session_Impl.cpp.

References ACE_QoS_Session::rsvp_event_type_.

00695 {
00696   return this->rsvp_event_type_;
00697 }

void ACE_GQoS_Session::rsvp_event_type RSVP_Event_Type    event_type [virtual]
 

Definition at line 701 of file QoS_Session_Impl.cpp.

References ACE_QoS_Session::RSVP_Event_Type, and ACE_QoS_Session::rsvp_event_type_.

00702 {
00703   this->rsvp_event_type_ = event_type;
00704 }

ACE_INLINE ACE_HANDLE ACE_GQoS_Session::rsvp_events_handle void    [virtual]
 

Get the file descriptor of the underlying socket.

Implements ACE_QoS_Session.

Definition at line 150 of file QoS_Session_Impl.i.

00151 {
00152   return 0;
00153 }

ACE_INLINE void ACE_GQoS_Session::session_id const int    session_id [virtual]
 

Set the GQoS session id.

Implements ACE_QoS_Session.

Definition at line 141 of file QoS_Session_Impl.i.

References session_id, and ACE_QoS_Session::session_id_.

00142 {
00143   this->session_id_ = session_id;
00144 }

ACE_INLINE int ACE_GQoS_Session::session_id void    const [virtual]
 

Get the GQoS session id.

Implements ACE_QoS_Session.

Definition at line 134 of file QoS_Session_Impl.i.

References ACE_QoS_Session::session_id_.

Referenced by session_id.

00135 {
00136   return this->session_id_;
00137 }

ACE_INLINE void ACE_GQoS_Session::source_port const u_short &    source_port [virtual]
 

Set the source port for this session.

Implements ACE_QoS_Session.

Definition at line 192 of file QoS_Session_Impl.i.

References source_port, and ACE_QoS_Session::source_port_.

00193 {
00194   this->source_port_ = source_port;
00195 }

ACE_INLINE u_short ACE_GQoS_Session::source_port void    const [virtual]
 

Get the source port for this session.

Implements ACE_QoS_Session.

Definition at line 185 of file QoS_Session_Impl.i.

References ACE_QoS_Session::source_port_.

Referenced by source_port.

00186 {
00187   return this->source_port_;
00188 }

int ACE_GQoS_Session::update_qos void    [virtual]
 

Calls the ioctl (ACE_SIO_GET_QOS). It is a mechanism of updating the QoS for this session asynchronously, as RSVP events occur.

Implements ACE_QoS_Session.

Definition at line 686 of file QoS_Session_Impl.cpp.

00687 {
00688   // WSAIoctl (GET_QOS) call goes here...
00689   return 0;
00690 }

ACE_INLINE int ACE_GQoS_Session::version   [virtual]
 

Get the RAPI event that last occured GQoS version.

Implements ACE_QoS_Session.

Definition at line 199 of file QoS_Session_Impl.i.

00200 {
00201   return 0;
00202 }


Friends And Related Function Documentation

friend class ACE_QoS_Session_Factory [friend]
 

The factory is a friend so it can create this object through the only private constructor.

Definition at line 230 of file QoS_Session_Impl.h.


Member Data Documentation

int ACE_GQoS_Session::GQoS_session_id = 0 [static]
 

This is a session ID generator. It does a lot more than expected from an int!.

Definition at line 619 of file QoS_Session_Impl.cpp.

Referenced by open.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:17:42 2003 for ACE_QoS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002