[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / SPIPE_Addr.h
blob100d93b9658c3e4549cfc5b36485cec49240e47c
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file SPIPE_Addr.h
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)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/Addr.h"
25 #include "ace/os_include/sys/os_types.h"
26 #include "ace/os_include/os_dirent.h"
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 /**
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
37 public:
38 // = Initialization methods.
39 /// Default constructor.
40 ACE_SPIPE_Addr (void);
42 /// Copy constructor.
43 ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa);
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 (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;
79 /// Get user id.
80 uid_t user_id (void) 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 (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;
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];
110 } SPIPE_addr_;
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 */