• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 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 JINGLE_NOTIFIER_BASE_NOTIFIER_OPTIONS_H_
6 #define JINGLE_NOTIFIER_BASE_NOTIFIER_OPTIONS_H_
7 
8 #include <string>
9 
10 #include "base/memory/ref_counted.h"
11 #include "jingle/notifier/base/notification_method.h"
12 #include "net/base/host_port_pair.h"
13 #include "net/url_request/url_request_context_getter.h"
14 
15 namespace notifier {
16 
17 struct NotifierOptions {
18   NotifierOptions();
19   ~NotifierOptions();
20 
21   // Indicates that the SSLTCP port (443) is to be tried before the the XMPP
22   // port (5222) during login.
23   bool try_ssltcp_first;
24 
25   // Indicates that insecure connections (e.g., plain authentication,
26   // no TLS) are allowed.  Only used for testing.
27   bool allow_insecure_connection;
28 
29   // Indicates that the login info passed to XMPP is invalidated so
30   // that login fails.
31   bool invalidate_xmpp_login;
32 
33   // Contains a custom URL and port for the notification server, if one is to
34   // be used. Empty otherwise.
35   net::HostPortPair xmpp_host_port;
36 
37   // Indicates the method used by sync clients while sending and listening to
38   // notifications.
39   NotificationMethod notification_method;
40 
41   // Specifies the auth mechanism to use ("X-GOOGLE-TOKEN", "X-OAUTH2", etc),
42   std::string auth_mechanism;
43 
44   // The URLRequestContextGetter to use for doing I/O.
45   scoped_refptr<net::URLRequestContextGetter> request_context_getter;
46 };
47 
48 }  // namespace notifier
49 
50 #endif  // JINGLE_NOTIFIER_BASE_NOTIFIER_OPTIONS_H_
51