async_resolver_factory.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright 2018 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_ASYNC_RESOLVER_FACTORY_H_
  11. #define API_ASYNC_RESOLVER_FACTORY_H_
  12. #include "rtc_base/async_resolver_interface.h"
  13. namespace webrtc {
  14. // An abstract factory for creating AsyncResolverInterfaces. This allows
  15. // client applications to provide WebRTC with their own mechanism for
  16. // performing DNS resolution.
  17. class AsyncResolverFactory {
  18. public:
  19. AsyncResolverFactory() = default;
  20. virtual ~AsyncResolverFactory() = default;
  21. // The caller should call Destroy on the returned object to delete it.
  22. virtual rtc::AsyncResolverInterface* Create() = 0;
  23. };
  24. } // namespace webrtc
  25. #endif // API_ASYNC_RESOLVER_FACTORY_H_