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

Side by Side Diff: webrtc/rtc_tools/network_tester/config_reader.h

Issue 2965593002: Move webrtc/{tools => rtc_tools} (Closed)
Patch Set: Adding back root changes Created 3 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 /* 1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_ 11 #ifndef WEBRTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_
12 #define WEBRTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_ 12 #define WEBRTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_
13 13
14 #include <fstream> 14 #include <fstream>
15 #include <string> 15 #include <string>
16 16
17 #include "webrtc/base/constructormagic.h" 17 #include "webrtc/base/constructormagic.h"
18 #include "webrtc/base/optional.h" 18 #include "webrtc/base/optional.h"
19 19
20 #include "webrtc/base/ignore_wundef.h" 20 #include "webrtc/base/ignore_wundef.h"
21 21
22 #ifdef WEBRTC_NETWORK_TESTER_PROTO 22 #ifdef WEBRTC_NETWORK_TESTER_PROTO
23 RTC_PUSH_IGNORING_WUNDEF() 23 RTC_PUSH_IGNORING_WUNDEF()
24 #include "webrtc/tools/network_tester/network_tester_config.pb.h" 24 #include "webrtc/rtc_tools/network_tester/network_tester_config.pb.h"
25 RTC_POP_IGNORING_WUNDEF() 25 RTC_POP_IGNORING_WUNDEF()
26 using webrtc::network_tester::config::NetworkTesterAllConfigs; 26 using webrtc::network_tester::config::NetworkTesterAllConfigs;
27 #else 27 #else
28 class NetworkTesterConfigs; 28 class NetworkTesterConfigs;
29 #endif // WEBRTC_NETWORK_TESTER_PROTO 29 #endif // WEBRTC_NETWORK_TESTER_PROTO
30 30
31 namespace webrtc { 31 namespace webrtc {
32 32
33 class ConfigReader { 33 class ConfigReader {
34 public: 34 public:
35 struct Config { 35 struct Config {
36 int packet_send_interval_ms; 36 int packet_send_interval_ms;
37 int packet_size; 37 int packet_size;
38 int execution_time_ms; 38 int execution_time_ms;
39 }; 39 };
40 explicit ConfigReader(const std::string& config_file_path); 40 explicit ConfigReader(const std::string& config_file_path);
41 ~ConfigReader(); 41 ~ConfigReader();
42 42
43 rtc::Optional<Config> GetNextConfig(); 43 rtc::Optional<Config> GetNextConfig();
44 44
45 private: 45 private:
46 NetworkTesterAllConfigs proto_all_configs_; 46 NetworkTesterAllConfigs proto_all_configs_;
47 int proto_config_index_; 47 int proto_config_index_;
48 RTC_DISALLOW_COPY_AND_ASSIGN(ConfigReader); 48 RTC_DISALLOW_COPY_AND_ASSIGN(ConfigReader);
49 }; 49 };
50 50
51 } // namespace webrtc 51 } // namespace webrtc
52 52
53 #endif // WEBRTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_ 53 #endif // WEBRTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698