Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / SPIPE_Addr.h
blob7ad05a91feb52b44c27703e798c811b1c6bc862b
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file SPIPE_Addr.h
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
8 */
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)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/Addr.h"
23 #include "ace/os_include/sys/os_types.h"
24 #include "ace/os_include/os_dirent.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 /**
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
35 public:
36 /// Default constructor.
37 ACE_SPIPE_Addr ();
39 /// Copy 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
46 /// system.
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
53 /// system.
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;
79 /// Get user id.
80 uid_t user_id () const;
82 /// Set user id.
83 void user_id (uid_t uid);
85 /// Set group ids.
86 void group_id (gid_t gid);
88 /// Get group ids.
89 gid_t group_id () const;
91 /// Dump the state of an object.
92 void dump () const;
94 /// Declare the dynamic allocation hooks.
95 ACE_ALLOC_HOOK_DECLARE;
97 private:
98 /// Contains security attributes.
99 struct SPIPE_Addr
101 /// Group id.
102 gid_t gid_;
104 /// User id.
105 uid_t uid_;
107 /// Pathname in the file system.
108 ACE_TCHAR rendezvous_[MAXPATHLEN + 1];
109 } SPIPE_addr_;
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 */