[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / Name_Proxy.h
bloba60a118f457c536b860635c6e49a7ac919321f7e
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Name_Proxy.h
7 * $Id: Name_Proxy.h 80826 2008-03-04 14:51:23Z wotte $
9 * Proxy for dealing with remote server process managing NET_LOCAL
10 * Name_Bindings.
13 * @author Gerhard Lenzer
14 * @author Douglas C. Schmidt
15 * @author Prashant Jain
17 //=============================================================================
20 #ifndef ACE_NAME_PROXY_H
21 #define ACE_NAME_PROXY_H
22 #include /**/ "ace/pre.h"
24 #include "ace/INET_Addr.h"
26 #if !defined (ACE_LACKS_PRAGMA_ONCE)
27 # pragma once
28 #endif /* ACE_LACKS_PRAGMA_ONCE */
30 #include "ace/SOCK_Connector.h"
31 #include "ace/SOCK_Stream.h"
32 #include "ace/Service_Config.h"
33 #include "ace/Synch_Options.h"
34 #include "ace/Name_Request_Reply.h"
35 #include "ace/Event_Handler.h"
37 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
39 /**
40 * @class ACE_Name_Proxy
42 * @brief Proxy for dealing with remote server process managing NET_LOCAL
43 * NameBindings.
45 * Shields applications from details of interacting with the
46 * ACE_Name Server.
48 class ACE_Export ACE_Name_Proxy : public ACE_Event_Handler
50 public:
51 /// Default constructor.
52 ACE_Name_Proxy (void);
54 // = Establish a binding with the ACE_Name Server.
55 ACE_Name_Proxy (const ACE_INET_Addr &remote_addr, // Address of ACE_Name Server.
56 ACE_Synch_Options& options =
57 ACE_Synch_Options::defaults);
59 int open (const ACE_INET_Addr &remote_addr, // Address of ACE_Name Server.
60 ACE_Synch_Options& options =
61 ACE_Synch_Options::defaults);
63 /// Perform the request and wait for the reply.
64 int request_reply (ACE_Name_Request &request);
66 /// Perform the request.
67 int send_request (ACE_Name_Request &request);
69 /// Receive the reply.
70 int recv_reply (ACE_Name_Request &reply);
72 /// Obtain underlying handle.
73 virtual ACE_HANDLE get_handle (void) const;
75 /// Close down the connection to the server.
76 virtual ~ACE_Name_Proxy (void);
78 /// Dump the state of the object;
79 void dump (void) const;
81 private:
83 /// ACE_Connector factory used to establish connections actively.
84 ACE_SOCK_Connector connector_;
86 /// Connection to ACE_Name Server peer.
87 ACE_SOCK_Stream peer_;
89 /// Pointer to ACE_Reactor (used if we are run in "reactive-mode").
90 ACE_Reactor *reactor_;
92 private:
93 // Prevent copying
94 ACE_Name_Proxy (const ACE_Name_Proxy &);
95 ACE_Name_Proxy &operator= (const ACE_Name_Proxy &);
98 ACE_END_VERSIONED_NAMESPACE_DECL
100 #include /**/ "ace/post.h"
101 #endif /* ACE_NAME_PROXY_H */