3 //==========================================================================
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
9 //==========================================================================
11 #ifndef ACE_SPIPE_ADDR_H
12 #define ACE_SPIPE_ADDR_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/ACE_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ace/os_include/sys/os_types.h"
24 #include "ace/os_include/os_dirent.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @class ACE_SPIPE_Addr
31 * @brief Defines the SVR4 STREAM pipe address family address format.
33 class ACE_Export ACE_SPIPE_Addr
: public ACE_Addr
36 /// Default constructor.
40 ACE_SPIPE_Addr (const ACE_SPIPE_Addr
&sa
);
42 /// Assignment operator
43 ACE_SPIPE_Addr
& operator= (const ACE_SPIPE_Addr
&) = default;
45 /// Create a ACE_SPIPE_Addr from a rendezvous point in the file
47 ACE_SPIPE_Addr (const ACE_TCHAR
*rendezvous_point
, gid_t
= 0, uid_t
= 0);
49 /// Acts like a copy constructor...
50 int set (const ACE_SPIPE_Addr
&sa
);
52 /// Create a ACE_SPIPE_Addr from a rendezvous point in the file
54 int set (const ACE_TCHAR
*rendezvous_point
, gid_t
= 0, uid_t
= 0);
56 /// Return a pointer to the address.
57 virtual void *get_addr () const;
59 /// Set a pointer to the underlying network address.
60 virtual void set_addr (const void *addr
, int len
);
62 /// Transform the current address into string format.
63 virtual int addr_to_string (ACE_TCHAR
*addr
, size_t) const;
65 /// Transform the string into the current addressing format.
66 virtual int string_to_addr (const ACE_TCHAR
*addr
);
68 // = Equality/inequality tests
69 /// Check for equality.
70 bool operator == (const ACE_SPIPE_Addr
&SAP
) const;
72 /// Check for inequality
73 bool operator != (const ACE_SPIPE_Addr
&SAP
) const;
75 // = SPIPE-specific address operations
76 /// Pathname of rendezvous point in file system.
77 const ACE_TCHAR
*get_path_name () const;
80 uid_t
user_id () const;
83 void user_id (uid_t uid
);
86 void group_id (gid_t gid
);
89 gid_t
group_id () const;
91 /// Dump the state of an object.
94 /// Declare the dynamic allocation hooks.
95 ACE_ALLOC_HOOK_DECLARE
;
98 /// Contains security attributes.
107 /// Pathname in the file system.
108 ACE_TCHAR rendezvous_
[MAXPATHLEN
+ 1];
110 // Contents of an SPIPE address.
113 ACE_END_VERSIONED_NAMESPACE_DECL
115 #if defined (__ACE_INLINE__)
116 #include "ace/SPIPE_Addr.inl"
117 #endif /* __ACE_INLINE__ */
119 #include /**/ "ace/post.h"
121 #endif /* ACE_SPIPE_ADDR_H */