Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / ATM_Acceptor.h
blob7f8e91a8d8cb3b054f1505a6bb6d49cc0f3c7ccd
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ATM_Acceptor.h
7 * @author Joe Hoffert
8 */
9 //=============================================================================
12 #ifndef ACE_ATM_ACCEPTOR_H
13 #define ACE_ATM_ACCEPTOR_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/config-all.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if defined (ACE_HAS_ATM)
24 #include "ace/ATM_Stream.h"
25 #include "ace/ATM_Params.h"
26 #include "ace/ATM_QoS.h"
28 #if defined (ACE_HAS_LINUX_ATM)
29 #include /**/ "atm.h"
30 #endif /* ACE_HAS_LINUX_ATM */
32 #if defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM)
33 #include "ace/SOCK_Acceptor.h"
34 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
35 typedef ACE_SOCK_Acceptor ATM_Acceptor;
36 ACE_END_VERSIONED_NAMESPACE_DECL
37 #elif defined (ACE_HAS_FORE_ATM_XTI)
38 #include "ace/TLI_Acceptor.h"
39 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
40 typedef ACE_TLI_Acceptor ATM_Acceptor;
41 ACE_END_VERSIONED_NAMESPACE_DECL
42 #endif // ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM
44 // Open versioned namespace, if enabled by the user.
45 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
47 // Forward declarations.
48 class ACE_Time_Value;
50 /**
51 * @class ACE_ATM_Acceptor
53 * @brief Defines the member functions for ACE_ATM_Acceptor abstraction.
55 * This class wraps up the ACE_SOCK_Acceptor and ACE_TLI_Acceptor
56 * to make the mechanism for the ATM protocol transparent.
58 class ACE_Export ACE_ATM_Acceptor
60 public:
61 /// Default constructor.
62 ACE_ATM_Acceptor ();
64 ~ACE_ATM_Acceptor ();
66 /// Initiate a passive mode connection.
67 ACE_ATM_Acceptor (const ACE_Addr &remote_sap,
68 int backlog = ACE_DEFAULT_BACKLOG,
69 ACE_ATM_Params params = ACE_ATM_Params());
71 /// Initiate a passive mode socket.
72 ACE_HANDLE open (const ACE_Addr &remote_sap,
73 int backlog = ACE_DEFAULT_BACKLOG,
74 ACE_ATM_Params params = ACE_ATM_Params());
76 /// Close down the acceptor and release resources.
77 int close ();
79 // = Passive connection acceptance method.
81 /// Accept a new data transfer connection. A @a timeout of 0 means
82 /// block forever, a @a timeout of {0, 0} means poll. @a restart == 1
83 /// means "restart if interrupted."
84 int accept (ACE_ATM_Stream &new_sap,
85 ACE_Addr *remote_addr = 0,
86 ACE_Time_Value *timeout = 0,
87 bool restart = true,
88 bool reset_new_handle = false,
89 ACE_ATM_Params params = ACE_ATM_Params(),
90 ACE_ATM_QoS qos = ACE_ATM_QoS());
92 /// Get the local address currently listening on
93 int get_local_addr(ACE_ATM_Addr &local_addr);
95 // = Meta-type info
96 typedef ACE_ATM_Addr PEER_ADDR;
97 typedef ACE_ATM_Stream PEER_STREAM;
99 /// Dump the state of an object.
100 void dump () const;
102 /// Declare the dynamic allocation hooks.
103 ACE_ALLOC_HOOK_DECLARE;
105 private:
106 ATM_Acceptor acceptor_;
109 // Close versioned namespace, if enabled by the user.
110 ACE_END_VERSIONED_NAMESPACE_DECL
113 #if defined (__ACE_INLINE__)
114 #include "ace/ATM_Acceptor.inl"
115 #endif /* __ACE_INLINE__ */
117 #endif /* ACE_HAS_ATM */
118 #include /**/ "ace/post.h"
119 #endif /* ACE_ATM_ACCEPTOR_H */