3 //==========================================================================
7 * $Id: SPIPE_Addr.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
11 //==========================================================================
13 #ifndef ACE_SPIPE_ADDR_H
14 #define ACE_SPIPE_ADDR_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/ACE_export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "ace/os_include/sys/os_types.h"
26 #include "ace/os_include/os_dirent.h"
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
31 * @class ACE_SPIPE_Addr
33 * @brief Defines the SVR4 STREAM pipe address family address format.
35 class ACE_Export ACE_SPIPE_Addr
: public ACE_Addr
38 // = Initialization methods.
39 /// Default constructor.
40 ACE_SPIPE_Addr (void);
43 ACE_SPIPE_Addr (const ACE_SPIPE_Addr
&sa
);
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 (void) const;
59 /// Set a pointer to the underlying network address.
60 virtual void set_addr (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 (void) const;
80 uid_t
user_id (void) const;
83 void user_id (uid_t uid
);
86 void group_id (gid_t gid
);
89 gid_t
group_id (void) const;
91 /// Dump the state of an object.
92 void dump (void) const;
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];
111 // Contents of an SPIPE address.
114 ACE_END_VERSIONED_NAMESPACE_DECL
116 #if defined (__ACE_INLINE__)
117 #include "ace/SPIPE_Addr.inl"
118 #endif /* __ACE_INLINE__ */
120 #include /**/ "ace/post.h"
122 #endif /* ACE_SPIPE_ADDR_H */