webrtc_key_value_config.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 2019 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef API_TRANSPORT_WEBRTC_KEY_VALUE_CONFIG_H_
  11. #define API_TRANSPORT_WEBRTC_KEY_VALUE_CONFIG_H_
  12. #include <string>
  13. #include "absl/strings/string_view.h"
  14. #include "rtc_base/system/rtc_export.h"
  15. namespace webrtc {
  16. // An interface that provides a key-value mapping for configuring internal
  17. // details of WebRTC. Note that there's no guarantess that the meaning of a
  18. // particular key value mapping will be preserved over time and no announcements
  19. // will be made if they are changed. It's up to the library user to ensure that
  20. // the behavior does not break.
  21. class RTC_EXPORT WebRtcKeyValueConfig {
  22. public:
  23. virtual ~WebRtcKeyValueConfig() = default;
  24. // The configured value for the given key. Defaults to an empty string.
  25. virtual std::string Lookup(absl::string_view key) const = 0;
  26. };
  27. } // namespace webrtc
  28. #endif // API_TRANSPORT_WEBRTC_KEY_VALUE_CONFIG_H_