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