[6916] Fixed typos in spell checking code.
[getmangos.git] / dep / ACE_wrappers / ace / TLI.h
blob076f59640711424b1b41f3b7a1756b522d6c32e4
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file TLI.h
7 * $Id: TLI.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt
11 //=============================================================================
14 #ifndef ACE_TLI_H
15 #define ACE_TLI_H
16 #include /**/ "ace/pre.h"
18 #include "ace/config-lite.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/OS_TLI.h"
26 #if defined (ACE_HAS_TLI)
28 #include "ace/IPC_SAP.h"
29 #include "ace/Addr.h"
30 #include "ace/os_include/os_fcntl.h"
32 // There's not a universal device name for TLI devices. If the platform
33 // needs something other than /dev/tcp, it needs to be set up in the config.h
34 // file as ACE_TLI_TCP_DEVICE.
35 #ifndef ACE_TLI_TCP_DEVICE
36 #define ACE_TLI_TCP_DEVICE "/dev/tcp"
37 #endif
39 // There's not a universal device name for XTI/ATM devices. If the platform
40 // needs something other than /dev/xtisvc0, it needs to be set up in the
41 // config.h file as ACE_XTI_ATM_DEVICE. This may be FORE vendor specific and
42 // there may be no good default.
43 #ifndef ACE_XTI_ATM_DEVICE
44 #define ACE_XTI_ATM_DEVICE "/dev/xtisvc0"
45 #endif
47 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
49 /**
50 * @class ACE_TLI
52 * @brief Defines the member functions for the base class of the
53 * ACE_TLI abstraction.
55 class ACE_Export ACE_TLI : public ACE_IPC_SAP
57 public:
58 // = Initialization and termination methods.
59 /// Initialize a TLI endpoint.
60 ACE_HANDLE open (const char device[],
61 int oflag = O_RDWR,
62 struct t_info *info = 0);
64 /// Close a TLI endpoint and release resources.
65 int close (void);
67 /// Set underlying protocol options.
68 int set_option (int level, int option, void *optval, int optlen);
70 /// Get underlying protocol options.
71 int get_option (int level, int option, void *optval, int &optlen);
73 // = Calls to underlying TLI operations.
74 int look (void) const;
75 int rcvdis (struct t_discon * = 0) const;
76 int snddis (struct t_call * = 0) const;
77 int sndrel (void) const;
78 int rcvrel (void) const;
80 /// Return our local endpoint address.
81 int get_local_addr (ACE_Addr &) const;
83 /// Dump the state of an object.
84 void dump (void) const;
86 /// Declare the dynamic allocation hooks.
87 ACE_ALLOC_HOOK_DECLARE;
89 protected:
90 // = Ensure we are an abstract class.
91 /// Default constructor.
92 ACE_TLI (void);
94 /// Destructor.
95 ~ACE_TLI (void);
97 /// Initialize a TLI endpoint.
98 ACE_TLI (const char device[], int oflag = O_RDWR, struct t_info *info = 0);
100 private:
101 #if defined (ACE_HAS_SVR4_TLI)
102 // XTI/TLI option management.
103 struct t_optmgmt so_opt_req;
104 struct t_optmgmt so_opt_ret;
105 #endif /* ACE_HAS_SVR4_TLI */
108 ACE_END_VERSIONED_NAMESPACE_DECL
110 #if defined (__ACE_INLINE__)
111 #include "ace/TLI.inl"
112 #endif /* __ACE_INLINE__ */
114 #endif /* ACE_HAS_TLI */
115 #include /**/ "ace/post.h"
116 #endif /* ACE_TLI_H */