| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BASE_NOTIFIER_OPTIONS_H_ | 5 #ifndef JINGLE_NOTIFIER_BASE_NOTIFIER_OPTIONS_H_ |
| 6 #define JINGLE_NOTIFIER_BASE_NOTIFIER_OPTIONS_H_ | 6 #define JINGLE_NOTIFIER_BASE_NOTIFIER_OPTIONS_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 8 #include "jingle/notifier/base/notification_method.h" | 10 #include "jingle/notifier/base/notification_method.h" |
| 9 #include "net/base/host_port_pair.h" | 11 #include "net/base/host_port_pair.h" |
| 10 | 12 |
| 11 namespace notifier { | 13 namespace notifier { |
| 12 | 14 |
| 13 struct NotifierOptions { | 15 struct NotifierOptions { |
| 14 NotifierOptions() | 16 NotifierOptions(); |
| 15 : try_ssltcp_first(false), | |
| 16 allow_insecure_connection(false), | |
| 17 invalidate_xmpp_login(false), | |
| 18 notification_method(kDefaultNotificationMethod) {} | |
| 19 | 17 |
| 20 // Indicates that the SSLTCP port (443) is to be tried before the the XMPP | 18 // Indicates that the SSLTCP port (443) is to be tried before the the XMPP |
| 21 // port (5222) during login. | 19 // port (5222) during login. |
| 22 bool try_ssltcp_first; | 20 bool try_ssltcp_first; |
| 23 | 21 |
| 24 // Indicates that insecure connections (e.g., plain authentication, | 22 // Indicates that insecure connections (e.g., plain authentication, |
| 25 // no TLS) are allowed. Only used for testing. | 23 // no TLS) are allowed. Only used for testing. |
| 26 bool allow_insecure_connection; | 24 bool allow_insecure_connection; |
| 27 | 25 |
| 28 // Indicates that the login info passed to XMPP is invalidated so | 26 // Indicates that the login info passed to XMPP is invalidated so |
| 29 // that login fails. | 27 // that login fails. |
| 30 bool invalidate_xmpp_login; | 28 bool invalidate_xmpp_login; |
| 31 | 29 |
| 32 // Contains a custom URL and port for the notification server, if one is to | 30 // Contains a custom URL and port for the notification server, if one is to |
| 33 // be used. Empty otherwise. | 31 // be used. Empty otherwise. |
| 34 net::HostPortPair xmpp_host_port; | 32 net::HostPortPair xmpp_host_port; |
| 35 | 33 |
| 36 // Indicates the method used by sync clients while sending and listening to | 34 // Indicates the method used by sync clients while sending and listening to |
| 37 // notifications. | 35 // notifications. |
| 38 NotificationMethod notification_method; | 36 NotificationMethod notification_method; |
| 37 |
| 38 // Specifies the auth mechanism to use ("X-GOOGLE-TOKEN", "X-OAUTH2", etc), |
| 39 std::string auth_mechanism; |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 } // namespace notifier | 42 } // namespace notifier |
| 42 | 43 |
| 43 #endif // JINGLE_NOTIFIER_BASE_NOTIFIER_OPTIONS_H_ | 44 #endif // JINGLE_NOTIFIER_BASE_NOTIFIER_OPTIONS_H_ |
| OLD | NEW |