Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / ATM_QoS.h
blob96c1576bf009650b5554de576fd28fcfc14c3706
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file ATM_QoS.h
7 * @author Joe Hoffert
8 */
9 //==========================================================================
11 #ifndef ACE_ATM_QoS_H
12 #define ACE_ATM_QoS_H
13 #include /**/ "ace/pre.h"
15 #include /**/ "ace/config-all.h"
17 #if !defined(ACE_LACKS_PRAGMA_ONCE)
18 #pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #if defined (ACE_HAS_ATM)
23 #if defined (ACE_HAS_FORE_ATM_WS2)
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
25 // just map to WS2 GQOS struct
26 typedef ACE_QoS ATM_QoS;
27 ACE_END_VERSIONED_NAMESPACE_DECL
28 #elif defined (ACE_HAS_FORE_ATM_XTI)
29 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 typedef struct netbuf ATM_QoS;
31 ACE_END_VERSIONED_NAMESPACE_DECL
32 #elif defined (ACE_HAS_LINUX_ATM)
33 #include /**/ "atm.h"
34 #include "ace/ATM_Params.h"
35 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
36 typedef struct atm_qos ATM_QoS;
37 ACE_END_VERSIONED_NAMESPACE_DECL
38 #else
39 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
40 typedef int ATM_QoS;
41 ACE_END_VERSIONED_NAMESPACE_DECL
42 #endif /* ACE_HAS_FORE_ATM_WS2 || ACE_HAS_FORE_ATM_XTI || ACE_HAS_LINUX_ATM */
44 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
46 /**
47 * @class ACE_ATM_QoS
49 * @brief Define the QoS parameters for ATM
51 * This class wraps up QoS parameters for both ATM/XTI and
52 * ATM/WinSock2 to make the mechanism for the ATM protocol
53 * transparent.
55 class ACE_Export ACE_ATM_QoS
57 public:
58 // Constants used for ATM options
59 static const long LINE_RATE;
60 static const int OPT_FLAGS_CPID;
61 static const int OPT_FLAGS_PMP;
62 static const int DEFAULT_SELECTOR;
63 static const int DEFAULT_PKT_SIZE;
65 /// Default constructor.
66 ACE_ATM_QoS(int = DEFAULT_PKT_SIZE);
68 /// Constructor with a CBR rate.
69 ACE_ATM_QoS(int,
70 int = DEFAULT_PKT_SIZE);
72 ~ACE_ATM_QoS ();
74 /// Set the rate.
75 void set_rate (ACE_HANDLE,
76 int,
77 int);
79 /// Set CBR rate in cells per second.
80 void set_cbr_rate (int,
81 int = DEFAULT_PKT_SIZE);
83 /// Get ATM_QoS struct.
84 ATM_QoS get_qos ();
86 /// Dump the state of an object.
87 void dump () const;
89 /// Declare the dynamic allocation hooks.
90 ACE_ALLOC_HOOK_DECLARE;
92 protected:
93 /// Construct QoS options.
94 char* construct_options(ACE_HANDLE,
95 int,
96 int,
97 long*);
99 private:
100 ATM_QoS qos_;
103 ACE_END_VERSIONED_NAMESPACE_DECL
105 #if defined (__ACE_INLINE__)
106 #include "ace/ATM_QoS.inl"
107 #endif /* __ACE_INLINE__ */
109 #endif /* ACE_HAS_ATM */
110 #include /**/ "ace/post.h"
111 #endif /* ACE_ATM_QoS_H */