ppb_host_resolver_api.h 1013 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2013 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef PPAPI_THUNK_PPB_HOST_RESOLVER_API_H_
  5. #define PPAPI_THUNK_PPB_HOST_RESOLVER_API_H_
  6. #include <stdint.h>
  7. #include "base/memory/ref_counted.h"
  8. #include "ppapi/c/ppb_host_resolver.h"
  9. #include "ppapi/thunk/ppapi_thunk_export.h"
  10. namespace ppapi {
  11. class TrackedCallback;
  12. namespace thunk {
  13. class PPAPI_THUNK_EXPORT PPB_HostResolver_API {
  14. public:
  15. virtual ~PPB_HostResolver_API() {}
  16. virtual int32_t Resolve(const char* host,
  17. uint16_t port,
  18. const PP_HostResolver_Hint* hint,
  19. scoped_refptr<TrackedCallback> callback) = 0;
  20. virtual PP_Var GetCanonicalName() = 0;
  21. virtual uint32_t GetNetAddressCount() = 0;
  22. virtual PP_Resource GetNetAddress(uint32_t index) = 0;
  23. };
  24. } // namespace thunk
  25. } // namespace ppapi
  26. #endif // PPAPI_THUNK_PPB_HOST_RESOLVER_API_H_