Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / protocols / ace / HTBP / HTBP_Addr.h
blob21e6ec353033c72e7b91ea28d654c32bf96355b6
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file HTBP_Addr.h
7 * @author Phil Mesnier
8 */
9 //=============================================================================
11 #ifndef ACE_HTBP_ADDR_H
12 #define ACE_HTBP_ADDR_H
13 #include /**/ "ace/pre.h"
15 #include "HTBP_Export.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "ace/INET_Addr.h"
22 #include "ace/Synch.h"
23 #include "ace/SString.h"
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 namespace ACE
29 namespace HTBP
31 /**
32 * @class Addr
34 * @brief Defines the member functions of the pure virtual class
35 * Addr
37 * This class derives from ACE_INET_Addr. It is the base class for
38 * the Inside, Proxy and Outside classes
40 class HTBP_Export Addr : public ACE_INET_Addr
42 public:
43 /// Constructor
44 Addr () = default;
46 Addr (const Addr &other);
48 /// Create an Addr suitable for use on the inside of a firewall this
49 /// take a string used to populate the htid_ member. With this address,
50 /// the IP addr form is ignored.
51 Addr (const char *htid);
53 /// Initialize an Addr for the outside of a firewall. In this form,
54 /// the htid_ is an empty string and the arguments are passed to the
55 /// base address type.
56 Addr (u_short port_number,
57 const char host_name[],
58 int address_family = AF_UNSPEC);
60 /// Destructor
61 virtual ~Addr () = default;
63 int set (u_short port,
64 const char host [],
65 const char *htid);
67 /// Methods to help convert the OutSide_Addr to a String
68 /// and vice versa
69 int addr_to_string (ACE_TCHAR buffer[],
70 size_t size,
71 int ipaddr_format = 1) const;
72 int string_to_addr (const char address[],
73 int address_facmily = AF_UNSPEC);
75 int set_htid(const char *htid);
76 const char *get_htid () const;
78 private:
79 /// HTID - web-obtained unique-identifier
80 ACE_CString htid_;
85 ACE_END_VERSIONED_NAMESPACE_DECL
87 #include /**/ "ace/post.h"
88 #endif /* ACE_HTBP_ADDR_H */