QoS_Session_Impl.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: QoS_Session_Impl.inl 73790 2006-07-27 20:43:46Z wotte $
00004 
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 #if defined (ACE_HAS_RAPI)
00008 
00009 ACE_INLINE
00010 ACE_RAPI_Session::~ACE_RAPI_Session (void)
00011 {
00012   ACE_TRACE ("ACE_RAPI_Session::~ACE_RAPI_Session");
00013 }
00014 
00015 // Returns the QoS for this RAPI session.
00016 ACE_INLINE ACE_QoS
00017 ACE_RAPI_Session::qos (void) const
00018 {
00019   return this->qos_;
00020 }
00021 
00022 // Overloaded method to set the QoS for this session object. Does not
00023 // interfere with the underlying socket QoS.
00024 ACE_INLINE void
00025 ACE_RAPI_Session::qos (const ACE_QoS &ace_qos)
00026 {
00027   this->qos_ = ace_qos;
00028 }
00029 
00030 // Get the RAPI session id.
00031 ACE_INLINE int
00032 ACE_RAPI_Session::session_id (void) const
00033 {
00034   return this->session_id_;
00035 }
00036 
00037 // Set the RAPI session id.
00038 ACE_INLINE void
00039 ACE_RAPI_Session::session_id (const int session_id)
00040 {
00041   this->session_id_ = session_id;
00042 }
00043 
00044 // Get the RAPI file desciptor for RSVP events.
00045 ACE_INLINE ACE_HANDLE
00046 ACE_RAPI_Session::rsvp_events_handle (void)
00047 {
00048   int rapi_fd = rapi_getfd (this->session_id ());
00049   if (rapi_fd == -1)
00050     {
00051       this->close ();
00052       ACE_ERROR_RETURN ((LM_ERROR,
00053                          "Error in rapi_getfd ()\n"),
00054                         -1);
00055     }
00056 
00057   return rapi_fd;
00058 }
00059 
00060 // Get the End Point Type (Sender/Receiver/Both).
00061 ACE_INLINE ACE_QoS_Session::ACE_End_Point_Type
00062 ACE_RAPI_Session::flags (void) const
00063 {
00064   return this->flags_;
00065 }
00066 
00067 // Set the End Point Type (Sender/Receiver/Both).
00068 ACE_INLINE void
00069 ACE_RAPI_Session::flags (const ACE_End_Point_Type flags)
00070 {
00071   this->flags_ = flags;
00072 }
00073 
00074 
00075 // Get the destination address for this RAPI session.
00076 ACE_INLINE ACE_INET_Addr
00077 ACE_RAPI_Session::dest_addr (void) const
00078 {
00079   return this->dest_addr_;
00080 }
00081 
00082 // Set the destination address for this RAPI session.
00083 ACE_INLINE void
00084 ACE_RAPI_Session::dest_addr (const ACE_INET_Addr &dest_addr)
00085 {
00086   this->dest_addr_ = dest_addr;
00087 }
00088 
00089 // Get the source port for this RAPI session.
00090 ACE_INLINE u_short
00091 ACE_RAPI_Session::source_port (void) const
00092 {
00093   return this->source_port_;
00094 }
00095 
00096 // Set the source port for this RAPI session.
00097 ACE_INLINE void
00098 ACE_RAPI_Session::source_port (const u_short &source_port)
00099 {
00100   this->source_port_ = source_port;
00101 }
00102 
00103 ACE_INLINE ACE_INET_Addr* 
00104 ACE_RAPI_Session::source_addr (void) const
00105 {
00106   return this->src_addr_;
00107 }
00108   
00109 ACE_INLINE void 
00110 ACE_RAPI_Session::source_addr (ACE_INET_Addr* source_addr)
00111 {
00112   this->src_addr_ = source_addr;
00113 }
00114 
00115 // RAPI version. Returned value = 100 * major-version + minor-version.
00116 ACE_INLINE int
00117 ACE_RAPI_Session::version (void)
00118 {
00119   return 0;
00120 }
00121 
00122 #endif /* ACE_HAS_RAPI */
00123 
00124 ACE_INLINE
00125 ACE_GQoS_Session::~ACE_GQoS_Session (void)
00126 {
00127   ACE_TRACE ("ACE_GQoS_Session::~ACE_GQoS_Session");
00128 }
00129 
00130 // Returns the QoS for this GQoS session.
00131 ACE_INLINE ACE_QoS
00132 ACE_GQoS_Session::qos (void) const
00133 {
00134   return this->qos_;
00135 }
00136 
00137 // Overloaded method to set the QoS for this session object. Does not
00138 // interfere with the underlying socket QoS.
00139 ACE_INLINE void
00140 ACE_GQoS_Session::qos (const ACE_QoS &ace_qos)
00141 {
00142   this->qos_ = ace_qos;
00143 }
00144 
00145 // Get the GQoS session id.
00146 ACE_INLINE int
00147 ACE_GQoS_Session::session_id (void) const
00148 {
00149   return this->session_id_;
00150 }
00151 
00152 // Set the GQoS session id.
00153 ACE_INLINE void
00154 ACE_GQoS_Session::session_id (const int session_id)
00155 {
00156   this->session_id_ = session_id;
00157 }
00158 
00159 // Get the underlying file desciptor for RSVP events.
00160 // Currently returns 0 because GQoS does not have a special
00161 // descriptor for QoS events.
00162 ACE_INLINE ACE_HANDLE
00163 ACE_GQoS_Session::rsvp_events_handle (void)
00164 {
00165   return 0;
00166 }
00167 
00168 // Get the End Point Type (Sender/Receiver/Both).
00169 ACE_INLINE ACE_QoS_Session::ACE_End_Point_Type
00170 ACE_GQoS_Session::flags (void) const
00171 {
00172   return this->flags_;
00173 }
00174 
00175 // Set the End Point Type (Sender/Receiver/Both).
00176 ACE_INLINE void
00177 ACE_GQoS_Session::flags (const ACE_End_Point_Type flags)
00178 {
00179   this->flags_ = flags;
00180 }
00181 
00182 // Get the destination address for this GQoS session.
00183 ACE_INLINE ACE_INET_Addr
00184 ACE_GQoS_Session::dest_addr (void) const
00185 {
00186   return this->dest_addr_;
00187 }
00188 
00189 // Set the destination address for this GQoS session.
00190 ACE_INLINE void
00191 ACE_GQoS_Session::dest_addr (const ACE_INET_Addr &dest_addr)
00192 {
00193   this->dest_addr_ = dest_addr;
00194 }
00195 
00196 // Get the source port for this RAPI session.
00197 ACE_INLINE u_short
00198 ACE_GQoS_Session::source_port (void) const
00199 {
00200   return this->source_port_;
00201 }
00202 
00203 // Set the source port for this RAPI session.
00204 ACE_INLINE void
00205 ACE_GQoS_Session::source_port (const u_short &source_port)
00206 {
00207   this->source_port_ = source_port;
00208 }
00209 
00210 ACE_INLINE ACE_INET_Addr* 
00211 ACE_GQoS_Session::source_addr (void) const
00212 {
00213   return this->src_addr_;
00214 }
00215   
00216 ACE_INLINE void 
00217 ACE_GQoS_Session::source_addr (ACE_INET_Addr* source_addr)
00218 {
00219   this->src_addr_ = source_addr;
00220 }
00221 
00222 // GQoS version.
00223 ACE_INLINE int
00224 ACE_GQoS_Session::version (void)
00225 {
00226   return 0;
00227 }
00228 
00229 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 13:03:37 2008 for ACE_QoS by doxygen 1.3.6