Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: jingle/notifier/communicator/connection_options.h

Issue 2809056: Rewrote handing of auto-reconnection and network changes for sync notifier. (Closed)
Patch Set: Fixed bug Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_ 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_
6 #define JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_ 6 #define JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "talk/base/cryptstring.h" 10 #include "talk/base/cryptstring.h"
11 #include "talk/base/helpers.h" 11 #include "talk/base/helpers.h"
12 12
13 namespace notifier { 13 namespace notifier {
14 14
15 class ConnectionOptions { 15 class ConnectionOptions {
16 public: 16 public:
17 ConnectionOptions(); 17 ConnectionOptions();
18 18
19 bool autodetect_proxy() const { return autodetect_proxy_; } 19 bool autodetect_proxy() const { return autodetect_proxy_; }
20 bool auto_reconnect() const { return auto_reconnect_; }
21 const std::string& proxy_host() const { return proxy_host_; } 20 const std::string& proxy_host() const { return proxy_host_; }
22 int proxy_port() const { return proxy_port_; } 21 int proxy_port() const { return proxy_port_; }
23 bool use_proxy_auth() const { return use_proxy_auth_; } 22 bool use_proxy_auth() const { return use_proxy_auth_; }
24 const std::string& auth_user() const { return auth_user_; } 23 const std::string& auth_user() const { return auth_user_; }
25 const talk_base::CryptString& auth_pass() const { return auth_pass_; } 24 const talk_base::CryptString& auth_pass() const { return auth_pass_; }
26 bool allow_unverified_certs() const { return allow_unverified_certs_; } 25 bool allow_unverified_certs() const { return allow_unverified_certs_; }
27 26
28 void set_autodetect_proxy(bool f) { autodetect_proxy_ = f; } 27 void set_autodetect_proxy(bool f) { autodetect_proxy_ = f; }
29 void set_auto_reconnect(bool f) { auto_reconnect_ = f; }
30 void set_proxy_host(const std::string& val) { proxy_host_ = val; } 28 void set_proxy_host(const std::string& val) { proxy_host_ = val; }
31 void set_proxy_port(int val) { proxy_port_ = val; } 29 void set_proxy_port(int val) { proxy_port_ = val; }
32 void set_use_proxy_auth(bool f) { use_proxy_auth_ = f; } 30 void set_use_proxy_auth(bool f) { use_proxy_auth_ = f; }
33 void set_auth_user(const std::string& val) { auth_user_ = val; } 31 void set_auth_user(const std::string& val) { auth_user_ = val; }
34 void set_auth_pass(const talk_base::CryptString& val) { auth_pass_ = val; } 32 void set_auth_pass(const talk_base::CryptString& val) { auth_pass_ = val; }
35 33
36 // Setting this to true opens a security hole, so it is *highly* recommended 34 // Setting this to true opens a security hole, so it is *highly* recommended
37 // that you don't do this. 35 // that you don't do this.
38 void set_allow_unverified_certs(bool allow_unverified_certs) { 36 void set_allow_unverified_certs(bool allow_unverified_certs) {
39 allow_unverified_certs_ = allow_unverified_certs; 37 allow_unverified_certs_ = allow_unverified_certs;
40 } 38 }
41 39
42 private: 40 private:
43 bool autodetect_proxy_; 41 bool autodetect_proxy_;
44 bool auto_reconnect_;
45 std::string proxy_host_; 42 std::string proxy_host_;
46 int proxy_port_; 43 int proxy_port_;
47 bool use_proxy_auth_; 44 bool use_proxy_auth_;
48 std::string auth_user_; 45 std::string auth_user_;
49 talk_base::CryptString auth_pass_; 46 talk_base::CryptString auth_pass_;
50 bool allow_unverified_certs_; 47 bool allow_unverified_certs_;
51 // Allow the copy constructor and operator=. 48 // Allow the copy constructor and operator=.
52 }; 49 };
53 50
54 } // namespace notifier 51 } // namespace notifier
55 52
56 #endif // JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_ 53 #endif // JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_
OLDNEW
« no previous file with comments | « jingle/notifier/communicator/auto_reconnect.cc ('k') | jingle/notifier/communicator/connection_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698