Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / remoting / base / service_urls.h
blob6d1b6258fbc844e2674fec183abbaf634463f29c
1 // Copyright 2014 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.
5 #ifndef REMOTING_BASE_SERVICE_URLS_H_
6 #define REMOTING_BASE_SERVICE_URLS_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/singleton.h"
13 namespace remoting {
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();
23 // Remoting directory REST API URLs.
24 const std::string& directory_base_url() const;
25 const std::string& directory_hosts_url() const;
26 const std::string& gcd_base_url() const;
28 // XMPP Server configuration.
29 const std::string& xmpp_server_address() const;
30 const std::string& xmpp_server_address_for_me2me_host() const;
31 bool xmpp_server_use_tls() const;
33 // Remoting directory bot JID (for registering hosts, logging, heartbeats).
34 const std::string& directory_bot_jid() const;
36 // JID for communicating with GCD.
37 const std::string& gcd_jid() const;
39 private:
40 friend struct DefaultSingletonTraits<ServiceUrls>;
42 ServiceUrls();
43 virtual ~ServiceUrls();
45 std::string directory_base_url_;
46 std::string directory_hosts_url_;
47 std::string gcd_base_url_;
48 std::string xmpp_server_address_;
49 std::string xmpp_server_address_for_me2me_host_;
50 bool xmpp_server_use_tls_;
51 std::string directory_bot_jid_;
52 std::string gcd_jid_;
54 DISALLOW_COPY_AND_ASSIGN(ServiceUrls);
57 } // namespace remoting
59 #endif // REMOTING_BASE_SERVICE_URLS_H_