00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #ifndef ACE_SPIPE_ADDR_H
00014 #define ACE_SPIPE_ADDR_H
00015 
00016 #include  "ace/pre.h"
00017 
00018 #include  "ace/ACE_export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif 
00023 
00024 #include "ace/Addr.h"
00025 #include "ace/os_include/sys/os_types.h"
00026 #include "ace/os_include/os_dirent.h"
00027 
00028 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 
00031 
00032 
00033 
00034 
00035 class ACE_Export ACE_SPIPE_Addr : public ACE_Addr
00036 {
00037 public:
00038   
00039 
00040   ACE_SPIPE_Addr (void);
00041 
00042 
00043   ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa);
00044 
00045 
00046 
00047   ACE_SPIPE_Addr (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0);
00048 
00049 
00050   int set (const ACE_SPIPE_Addr &sa);
00051 
00052 
00053 
00054   int set (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0);
00055 
00056 
00057   virtual void *get_addr (void) const;
00058 
00059 
00060   virtual void set_addr (void *addr, int len);
00061 
00062 
00063   virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
00064 
00065 
00066   virtual int string_to_addr (const ACE_TCHAR *addr);
00067 
00068   
00069 
00070   bool operator == (const ACE_SPIPE_Addr &SAP) const;
00071 
00072 
00073   bool operator != (const ACE_SPIPE_Addr &SAP) const;
00074 
00075   
00076 
00077   const ACE_TCHAR *get_path_name (void) const;
00078 
00079 
00080   uid_t user_id (void) const;
00081 
00082 
00083   void user_id (uid_t uid);
00084 
00085 
00086   void group_id (gid_t gid);
00087 
00088 
00089   gid_t group_id (void) const;
00090 
00091 
00092   void dump (void) const;
00093 
00094 
00095   ACE_ALLOC_HOOK_DECLARE;
00096 
00097 private:
00098 
00099   struct SPIPE_Addr
00100   {
00101 
00102     gid_t gid_;
00103 
00104 
00105     uid_t uid_;
00106 
00107 
00108     ACE_TCHAR rendezvous_[MAXPATHLEN + 1];
00109 
00110   } SPIPE_addr_;
00111   
00112 };
00113 
00114 ACE_END_VERSIONED_NAMESPACE_DECL
00115 
00116 #if defined (__ACE_INLINE__)
00117 #include "ace/SPIPE_Addr.inl"
00118 #endif 
00119 
00120 #include  "ace/post.h"
00121 
00122 #endif