Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / protocols / ace / HTBP / HTBP_ID_Requestor.h
blob03bb0c4cd2e9388b7c292a7c0a2f31e83f19d901
1 // -*- C++ -*-
2 #ifndef HTID_REQUESTOR_H
3 #define HTID_REQUESTOR_H
4 #include /**/ "ace/pre.h"
6 #include "HTBP_Export.h"
7 #include "ace/SString.h"
8 #include "ace/Synch_Traits.h"
10 #if !defined (ACE_LACKS_PRAGMA_ONCE)
11 # pragma once
12 #endif /* ACE_LACKS_PRAGMA_ONCE */
14 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
16 // Forward declarations
17 class ACE_SOCK_Stream;
19 namespace ACE
21 namespace HTBP
23 // Forward declarations
24 class Environment;
26 /**
27 * ACE_HTBP_ID_Requestor
29 * @brief This singleton class is to be used to get a HTID
31 class HTBP_Export ID_Requestor
33 public:
34 /// Constructor.
35 ID_Requestor (Environment * = 0);
37 /// Accessor to HTID
38 ACE_TCHAR *get_HTID ();
40 private:
41 /// Connects to the remote host
42 int connect_to_server (ACE_SOCK_Stream *cli_stream);
44 /// Send HTTP GET request to the server.
45 int send_request (ACE_SOCK_Stream *cli_stream);
47 unsigned port_;
48 ACE_TString host_;
49 ACE_TString url_;
51 static ACE_TString htid_;
52 static ACE_SYNCH_MUTEX htid_lock_;
57 ACE_END_VERSIONED_NAMESPACE_DECL
59 #include /**/ "ace/post.h"
60 #endif /* HTID_REQUESTOR_H */