OLD | NEW |
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_SETTINGS_H_ | 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_SETTINGS_H_ |
6 #define JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_SETTINGS_H_ | 6 #define JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_SETTINGS_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 #include "base/basictypes.h" |
12 #include "talk/xmpp/xmppclientsettings.h" | 13 #include "talk/xmpp/xmppclientsettings.h" |
13 | 14 |
14 namespace notifier { | 15 namespace notifier { |
15 | 16 |
16 class ConnectionSettings { | 17 class ConnectionSettings { |
17 public: | 18 public: |
18 ConnectionSettings(); | 19 ConnectionSettings(); |
19 ~ConnectionSettings(); | 20 ~ConnectionSettings(); |
20 | 21 |
21 cricket::ProtocolType protocol() { return protocol_; } | 22 cricket::ProtocolType protocol() { return protocol_; } |
(...skipping 18 matching lines...) Expand all Loading... |
40 int GetCount() { return list_.size(); } | 41 int GetCount() { return list_.size(); } |
41 ConnectionSettings* GetSettings(size_t index) { return &list_[index]; } | 42 ConnectionSettings* GetSettings(size_t index) { return &list_[index]; } |
42 | 43 |
43 void ClearPermutations() { | 44 void ClearPermutations() { |
44 list_.clear(); | 45 list_.clear(); |
45 iplist_seen_.clear(); | 46 iplist_seen_.clear(); |
46 } | 47 } |
47 | 48 |
48 void AddPermutations(const std::string& hostname, | 49 void AddPermutations(const std::string& hostname, |
49 const std::vector<uint32>& iplist, | 50 const std::vector<uint32>& iplist, |
50 int16 port, | 51 uint16 port, |
51 bool special_port_magic, | 52 bool special_port_magic, |
52 bool try_ssltcp_first); | 53 bool try_ssltcp_first); |
53 private: | 54 private: |
54 void PermuteForAddress(const talk_base::SocketAddress& server, | 55 void PermuteForAddress(const talk_base::SocketAddress& server, |
55 bool special_port_magic, | 56 bool special_port_magic, |
56 bool try_ssltcp_first, | 57 bool try_ssltcp_first, |
57 std::deque<ConnectionSettings>* list_temp); | 58 std::deque<ConnectionSettings>* list_temp); |
58 | 59 |
59 ConnectionSettings template_; | 60 ConnectionSettings template_; |
60 std::deque<ConnectionSettings> list_; | 61 std::deque<ConnectionSettings> list_; |
61 std::vector<uint32> iplist_seen_; | 62 std::vector<uint32> iplist_seen_; |
62 DISALLOW_COPY_AND_ASSIGN(ConnectionSettingsList); | 63 DISALLOW_COPY_AND_ASSIGN(ConnectionSettingsList); |
63 }; | 64 }; |
64 | 65 |
65 } // namespace notifier | 66 } // namespace notifier |
66 | 67 |
67 #endif // JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_SETTINGS_H_ | 68 #endif // JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_SETTINGS_H_ |
OLD | NEW |