Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / FIFO_Recv.h
blobc34bd2180adaa0e55a5f0040e5e71016342a8a4d
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file FIFO_Recv.h
7 * @author Doug Schmidt
8 */
9 //==========================================================================
12 #ifndef ACE_FIFO_RECV_H
13 #define ACE_FIFO_RECV_H
15 #include /**/ "ace/pre.h"
17 #include "ace/FIFO.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ace/os_include/os_fcntl.h"
24 #include "ace/Default_Constants.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 /**
29 * @class ACE_FIFO_Recv
31 * @brief Receiver side of the bytestream C++ wrapper for UNIX
32 * FIFOs.
34 class ACE_Export ACE_FIFO_Recv : public ACE_FIFO
36 public:
37 /// @name Initialization methods.
38 ///
39 /// Note that @c ACE_NONBLOCK will be added to any @a flags value passed.
40 /// This causes the open to succeed even if no writer has yet opened the
41 /// fifo. There is no way to disable this behavior.
42 ///
43 /// @arg persistent Means "open fifo for writing, as well as
44 /// reading." This ensures that the fifo never gets EOF, even if there
45 /// aren't any writers at the moment!
46 //@{
47 /// Default constructor.
48 ACE_FIFO_Recv ();
50 /// Open up a bytestream named pipe for reading.
51 ACE_FIFO_Recv (const ACE_TCHAR *rendezvous,
52 int flags = O_CREAT | O_RDONLY,
53 mode_t perms = ACE_DEFAULT_FILE_PERMS,
54 int persistent = 1,
55 LPSECURITY_ATTRIBUTES sa = 0);
57 /// Open up a bytestream named pipe for reading.
58 int open (const ACE_TCHAR *rendezvous,
59 int flags = O_CREAT | O_RDONLY,
60 mode_t perms = ACE_DEFAULT_FILE_PERMS,
61 int persistent = 1,
62 LPSECURITY_ATTRIBUTES sa = 0);
63 //@}
65 /// Close down the fifo.
66 int close ();
68 /// Recv @a buf of up to @a len bytes.
69 ssize_t recv (void *buf, size_t len);
71 /// Recv @a buf of exactly @a len bytes (block until done).
72 ssize_t recv_n (void *buf, size_t len);
74 /// Dump the state of an object.
75 void dump () const;
77 /// Declare the dynamic allocation hooks.
78 ACE_ALLOC_HOOK_DECLARE;
80 private:
81 /// Auxiliary handle that is used to implement persistent FIFOs.
82 ACE_HANDLE aux_handle_;
85 ACE_END_VERSIONED_NAMESPACE_DECL
87 #if defined (__ACE_INLINE__)
88 #include "ace/FIFO_Recv.inl"
89 #endif /* __ACE_INLINE__ */
91 #include /**/ "ace/post.h"
93 #endif /* ACE_FIFO_RECV_H */