12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef RTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_
- #define RTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_
- #include <fstream>
- #include <string>
- #include "absl/types/optional.h"
- #include "rtc_base/constructor_magic.h"
- #include "rtc_base/ignore_wundef.h"
- #ifdef WEBRTC_NETWORK_TESTER_PROTO
- RTC_PUSH_IGNORING_WUNDEF()
- #include "rtc_tools/network_tester/network_tester_config.pb.h"
- RTC_POP_IGNORING_WUNDEF()
- using webrtc::network_tester::config::NetworkTesterAllConfigs;
- #else
- class NetworkTesterConfigs;
- #endif
- namespace webrtc {
- class ConfigReader {
- public:
- struct Config {
- int packet_send_interval_ms;
- int packet_size;
- int execution_time_ms;
- };
- explicit ConfigReader(const std::string& config_file_path);
- ~ConfigReader();
- absl::optional<Config> GetNextConfig();
- private:
- NetworkTesterAllConfigs proto_all_configs_;
- int proto_config_index_;
- RTC_DISALLOW_COPY_AND_ASSIGN(ConfigReader);
- };
- }
- #endif
|