Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / TLI.h
blob006b3a95a5156c881d662ebc280a8d0afc8b4998
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file TLI.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
12 #ifndef ACE_TLI_H
13 #define ACE_TLI_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/config-lite.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/OS_TLI.h"
24 #if defined (ACE_HAS_TLI)
26 #include "ace/IPC_SAP.h"
27 #include "ace/Addr.h"
28 #include "ace/os_include/os_fcntl.h"
30 // There's not a universal device name for TLI devices. If the platform
31 // needs something other than /dev/tcp, it needs to be set up in the config.h
32 // file as ACE_TLI_TCP_DEVICE.
33 #ifndef ACE_TLI_TCP_DEVICE
34 #define ACE_TLI_TCP_DEVICE "/dev/tcp"
35 #endif
37 // There's not a universal device name for XTI/ATM devices. If the platform
38 // needs something other than /dev/xtisvc0, it needs to be set up in the
39 // config.h file as ACE_XTI_ATM_DEVICE. This may be FORE vendor specific and
40 // there may be no good default.
41 #ifndef ACE_XTI_ATM_DEVICE
42 #define ACE_XTI_ATM_DEVICE "/dev/xtisvc0"
43 #endif
45 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
47 /**
48 * @class ACE_TLI
50 * @brief Defines the member functions for the base class of the
51 * ACE_TLI abstraction.
53 class ACE_Export ACE_TLI : public ACE_IPC_SAP
55 public:
56 /// Initialize a TLI endpoint.
57 ACE_HANDLE open (const char device[],
58 int oflag = O_RDWR,
59 struct t_info *info = 0);
61 /// Close a TLI endpoint and release resources.
62 int close ();
64 /// Set underlying protocol options.
65 int set_option (int level, int option, void *optval, int optlen);
67 /// Get underlying protocol options.
68 int get_option (int level, int option, void *optval, int &optlen);
70 // = Calls to underlying TLI operations.
71 int look () const;
72 int rcvdis (struct t_discon * = 0) const;
73 int snddis (struct t_call * = 0) const;
74 int sndrel () const;
75 int rcvrel () const;
77 /// Return our local endpoint address.
78 int get_local_addr (ACE_Addr &) const;
80 /// Dump the state of an object.
81 void dump () const;
83 /// Declare the dynamic allocation hooks.
84 ACE_ALLOC_HOOK_DECLARE;
86 protected:
87 // = Ensure we are an abstract class.
88 /// Default constructor.
89 ACE_TLI ();
91 /// Destructor.
92 ~ACE_TLI ();
94 /// Initialize a TLI endpoint.
95 ACE_TLI (const char device[], int oflag = O_RDWR, struct t_info *info = 0);
98 ACE_END_VERSIONED_NAMESPACE_DECL
100 #if defined (__ACE_INLINE__)
101 #include "ace/TLI.inl"
102 #endif /* __ACE_INLINE__ */
104 #endif /* ACE_HAS_TLI */
105 #include /**/ "ace/post.h"
106 #endif /* ACE_TLI_H */