• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef REMOTING_HOST_SERVICE_URLS_H_
6 #define REMOTING_HOST_SERVICE_URLS_H_
7 
8 #include <string>
9 
10 #include "base/basictypes.h"
11 #include "base/memory/singleton.h"
12 
13 namespace remoting {
14 
15 // This class contains the URLs to the services used by the host (except for
16 // Gaia, which has its own GaiaUrls class. In debug builds, it allows these URLs
17 // to be overriden by command line switches, allowing the host process to be
18 // pointed at alternate/test servers.
19 class ServiceUrls {
20  public:
21   static ServiceUrls* GetInstance();
22 
23   // Remoting directory REST API URLs.
24   const std::string& directory_base_url() const;
25   const std::string& directory_hosts_url() const;
26 
27   // XMPP Server configuration.
28   const std::string& xmpp_server_address() const;
29   bool xmpp_server_use_tls() const;
30 
31   // Remoting directory bot JID (for registering hosts, logging, heartbeats).
32   const std::string& directory_bot_jid() const;
33 
34  private:
35   friend struct DefaultSingletonTraits<ServiceUrls>;
36 
37   ServiceUrls();
38   virtual ~ServiceUrls();
39 
40   std::string directory_base_url_;
41   std::string directory_hosts_url_;
42   std::string xmpp_server_address_;
43   bool xmpp_server_use_tls_;
44   std::string directory_bot_jid_;
45 
46   DISALLOW_COPY_AND_ASSIGN(ServiceUrls);
47 };
48 
49 }  // namespace remoting
50 
51 #endif  // REMOTING_HOST_SERVICE_URLS_H_
52