00001 /* -*- C++ -*- */ 00002 // $Id: SPIPE_Addr.i,v 1.1.1.3 2001/12/04 14:33:08 chad Exp $ 00003 00004 // SPIPE_Addr.i 00005 00006 #include "ace/SString.h" 00007 00008 // Transform the current address into string format. 00009 00010 ACE_INLINE int 00011 ACE_SPIPE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const 00012 { 00013 ACE_OS::strsncpy (s, 00014 this->SPIPE_addr_.rendezvous_, 00015 len); 00016 return 0; 00017 } 00018 00019 // Return the address. 00020 00021 ACE_INLINE void * 00022 ACE_SPIPE_Addr::get_addr (void) const 00023 { 00024 return (void *) &this->SPIPE_addr_; 00025 } 00026 00027 // Compare two addresses for equality. 00028 00029 ACE_INLINE int 00030 ACE_SPIPE_Addr::operator == (const ACE_SPIPE_Addr &sap) const 00031 { 00032 return ACE_OS::strcmp (this->SPIPE_addr_.rendezvous_, 00033 sap.SPIPE_addr_.rendezvous_ ) == 0; 00034 } 00035 00036 // Compare two addresses for inequality. 00037 00038 ACE_INLINE int 00039 ACE_SPIPE_Addr::operator != (const ACE_SPIPE_Addr &sap) const 00040 { 00041 return !((*this) == sap); // This is lazy, of course... ;-) 00042 } 00043 00044 // Return the path name used for the rendezvous point. 00045 00046 ACE_INLINE const ACE_TCHAR * 00047 ACE_SPIPE_Addr::get_path_name (void) const 00048 { 00049 return this->SPIPE_addr_.rendezvous_; 00050 } 00051 00052 ACE_INLINE uid_t 00053 ACE_SPIPE_Addr::user_id (void) const 00054 { 00055 return this->SPIPE_addr_.uid_; 00056 } 00057 00058 ACE_INLINE void 00059 ACE_SPIPE_Addr::user_id (uid_t uid) 00060 { 00061 this->SPIPE_addr_.uid_ = uid; 00062 } 00063 00064 ACE_INLINE gid_t 00065 ACE_SPIPE_Addr::group_id (void) const 00066 { 00067 return this->SPIPE_addr_.gid_; 00068 } 00069 00070 ACE_INLINE void 00071 ACE_SPIPE_Addr::group_id (gid_t gid) 00072 { 00073 this->SPIPE_addr_.gid_ = gid; 00074 }
1.2.14 written by Dimitri van Heesch,
© 1997-2002