blob: 3c3bb1e703033dc3839e286e072f9eac94c4a503 [file] [log] [blame]
Zach Steine20867f2018-08-02 13:20:15 -07001/*
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
11#ifndef API_ASYNCRESOLVERFACTORY_H_
12#define API_ASYNCRESOLVERFACTORY_H_
13
14#include "rtc_base/asyncresolverinterface.h"
15
16namespace webrtc {
17
18// An abstract factory for creating AsyncResolverInterfaces. This allows
19// client applications to provide WebRTC with their own mechanism for
20// performing DNS resolution.
21class AsyncResolverFactory {
22 public:
23 AsyncResolverFactory() = default;
24 virtual ~AsyncResolverFactory() = default;
25
26 // The returned object is responsible for deleting itself after address
27 // resolution has completed.
28 virtual rtc::AsyncResolverInterface* Create() = 0;
29};
30
31} // namespace webrtc
32
33#endif // API_ASYNCRESOLVERFACTORY_H_