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 REMOTING_CLIENT_CLIENT_UTIL_H_ | 5 #ifndef REMOTING_CLIENT_CLIENT_UTIL_H_ |
6 #define REMOTING_CLIENT_CLIENT_UTIL_H_ | 6 #define REMOTING_CLIENT_CLIENT_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
| 12 class ClientConfig; |
| 13 |
12 // Get the login info from the cmdline args (or request from the console if | 14 // Get the login info from the cmdline args (or request from the console if |
13 // not present) and write values into |host_jid|, |username| and |auth_token|. | 15 // not present) and write values into |config|. |
14 // Return true if successful. | 16 // Return true if successful. |
15 bool GetLoginInfo(int argc, char** argv, | 17 bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config); |
16 std::string* host_jid, std::string* username, | 18 |
17 std::string* auth_token); | 19 // Get the login info from the URL params and write values into |config|. |
| 20 // Return true if successful. |
| 21 bool GetLoginInfoFromUrlParams(const std::string& url, ClientConfig* config); |
18 | 22 |
19 } // namespace remoting | 23 } // namespace remoting |
20 | 24 |
21 #endif // REMOTING_CLIENT_CLIENT_UTIL_H_ | 25 #endif // REMOTING_CLIENT_CLIENT_UTIL_H_ |
OLD | NEW |