Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / dep / ACE_wrappers / ace / IO_SAP.h
blobb460c2346aa54678bad907e5a9ee85d466c7f7ba
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file IO_SAP.h
7 * $Id: IO_SAP.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt
11 //=============================================================================
14 #ifndef ACE_IO_SAP_H
15 #define ACE_IO_SAP_H
16 #include /**/ "ace/pre.h"
18 #include "ace/Flag_Manip.h"
19 #include "ace/os_include/sys/os_types.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 /**
29 * @class ACE_IO_SAP
31 * @brief Defines the methods for the base class of the ACE_IO_SAP
32 * abstraction, which includes ACE_FILE and ACE_DEV.
34 class ACE_Export ACE_IO_SAP
36 public:
37 enum
39 /// Be consistent with Winsock
40 INVALID_HANDLE = -1
43 /// Default dtor.
44 ~ACE_IO_SAP (void);
46 /// Interface for ioctl.
47 int control (int cmd, void *) const;
49 // = Common I/O handle options related to files.
51 /**
52 * Enable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
53 * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
54 * which is passed as the @a value.
56 int enable (int value) const;
58 /**
59 * Disable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
60 * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
61 * which is passed as the @a value.
63 int disable (int value) const;
65 /// Get the underlying handle.
66 ACE_HANDLE get_handle (void) const;
68 /// Set the underlying handle.
69 void set_handle (ACE_HANDLE handle);
71 /// Dump the state of an object.
72 void dump (void) const;
74 /// Declare the dynamic allocation hooks.
75 ACE_ALLOC_HOOK_DECLARE;
77 protected:
78 /// Ensure that ACE_IO_SAP is an abstract base class.
79 ACE_IO_SAP (void);
81 private:
82 /// Underlying I/O handle.
83 ACE_HANDLE handle_;
85 /// Cache the process ID.
86 static pid_t pid_;
89 ACE_END_VERSIONED_NAMESPACE_DECL
91 #if defined (__ACE_INLINE__)
92 #include "ace/IO_SAP.inl"
93 #endif /* __ACE_INLINE__ */
95 #include /**/ "ace/post.h"
96 #endif /* ACE_IO_SAP_H */