Restore build on FreeBSD.
[getmangos.git] / dep / ACE_wrappers / ace / FIFO.h
blob2d590563a99a8de77fee60a6e79837f48e9a2765
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file FIFO.h
7 * $Id: FIFO.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt
11 //==========================================================================
14 #ifndef ACE_FIFO_H
15 #define ACE_FIFO_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/ACE_export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/IPC_SAP.h"
25 #include "ace/os_include/os_limits.h"
27 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 /**
30 * @class ACE_FIFO
32 * @brief Abstract base class for UNIX FIFOs
34 * UNIX FIFOs are also known Named Pipes, which are totally
35 * unrelated to Win32 Named Pipes. If you want to use a local
36 * IPC mechanism that will be portable to both UNIX and Win32,
37 * take a look at the <ACE_SPIPE_*> classes.
39 class ACE_Export ACE_FIFO : public ACE_IPC_SAP
41 public:
42 /// Open up the named pipe on the <rendezvous> in accordance with the
43 /// flags.
44 int open (const ACE_TCHAR *rendezvous, int flags, mode_t perms,
45 LPSECURITY_ATTRIBUTES sa = 0);
47 /// Close down the ACE_FIFO without removing the rendezvous point.
48 int close (void);
50 /// Close down the ACE_FIFO and remove the rendezvous point from the
51 /// file system.
52 int remove (void);
54 /// Return the local address of this endpoint.
55 int get_local_addr (const ACE_TCHAR *&rendezvous) const;
57 /// Dump the state of an object.
58 void dump (void) const;
60 /// Declare the dynamic allocation hooks.
61 ACE_ALLOC_HOOK_DECLARE;
63 protected:
64 // = Make these protected to ensure that the class is "abstract."
65 /// Default constructor.
66 ACE_FIFO (void);
68 /// Open up the named pipe on the <rendezvous> in accordance with the
69 /// flags.
70 ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, mode_t perms,
71 LPSECURITY_ATTRIBUTES sa = 0);
73 private:
74 /// Rendezvous point in the file system.
75 ACE_TCHAR rendezvous_[MAXPATHLEN + 1];
78 ACE_END_VERSIONED_NAMESPACE_DECL
80 #if defined (__ACE_INLINE__)
81 #include "ace/FIFO.inl"
82 #endif /* __ACE_INLINE__ */
84 #include /**/ "ace/post.h"
85 #endif /* ACE_FIFO_H */