00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 #ifndef ACE_ATM_QoS_H
00015 #define ACE_ATM_QoS_H
00016 #include  "ace/pre.h"
00017 
00018 #include  "ace/config-all.h"
00019 
00020 #if !defined(ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif 
00023 
00024 #if defined (ACE_HAS_ATM)
00025 
00026 #if defined (ACE_HAS_FORE_ATM_WS2)
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 typedef ACE_QoS ATM_QoS;
00030 ACE_END_VERSIONED_NAMESPACE_DECL
00031 #elif defined (ACE_HAS_FORE_ATM_XTI)
00032 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00033 typedef struct netbuf ATM_QoS;
00034 ACE_END_VERSIONED_NAMESPACE_DECL
00035 #elif defined (ACE_HAS_LINUX_ATM)
00036 #include  "atm.h"
00037 #include "ace/ATM_Params.h"
00038 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00039 typedef struct atm_qos ATM_QoS;
00040 ACE_END_VERSIONED_NAMESPACE_DECL
00041 #else
00042 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00043 typedef int ATM_QoS;
00044 ACE_END_VERSIONED_NAMESPACE_DECL
00045 #endif 
00046 
00047 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 class ACE_Export ACE_ATM_QoS
00059 {
00060 public:
00061   
00062   static const long LINE_RATE;
00063   static const int OPT_FLAGS_CPID;
00064   static const int OPT_FLAGS_PMP;
00065   static const int DEFAULT_SELECTOR;
00066   static const int DEFAULT_PKT_SIZE;
00067 
00068   
00069 
00070   ACE_ATM_QoS(int = DEFAULT_PKT_SIZE);
00071 
00072 
00073   ACE_ATM_QoS(int,
00074               int = DEFAULT_PKT_SIZE);
00075 
00076   ~ACE_ATM_QoS ();
00077 
00078 
00079   void set_rate (ACE_HANDLE,
00080                  int,
00081                  int);
00082 
00083 
00084   void set_cbr_rate (int,
00085                      int = DEFAULT_PKT_SIZE);
00086 
00087 
00088   ATM_QoS get_qos (void);
00089 
00090 
00091   void dump (void) const;
00092 
00093 
00094   ACE_ALLOC_HOOK_DECLARE;
00095 
00096 protected:
00097 
00098   char* construct_options(ACE_HANDLE,
00099                           int,
00100                           int,
00101                           long*);
00102 
00103 private:
00104   ATM_QoS qos_;
00105 };
00106 
00107 ACE_END_VERSIONED_NAMESPACE_DECL
00108 
00109 #if defined (__ACE_INLINE__)
00110 #include "ace/ATM_QoS.inl"
00111 #endif 
00112 
00113 #endif 
00114 #include  "ace/post.h"
00115 #endif