test_interface_impl.h 873 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2018 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 BASE_FUCHSIA_FAKE_INTERFACE_IMPL_H_
  5. #define BASE_FUCHSIA_FAKE_INTERFACE_IMPL_H_
  6. #include <lib/fidl/cpp/binding_set.h>
  7. #include <lib/zx/channel.h>
  8. #include "base/fuchsia/testfidl/cpp/fidl.h"
  9. namespace base {
  10. namespace fuchsia {
  11. class TestInterfaceImpl : public testfidl::TestInterface {
  12. public:
  13. TestInterfaceImpl();
  14. ~TestInterfaceImpl() override;
  15. // TestInterface implementation:
  16. void Add(int32_t a, int32_t b, AddCallback callback) override;
  17. fidl::BindingSet<testfidl::TestInterface>* bindings() { return &bindings_; }
  18. private:
  19. fidl::BindingSet<testfidl::TestInterface> bindings_;
  20. };
  21. } // namespace fuchsia
  22. } // namespace base
  23. #endif // BASE_FUCHSIA_FAKE_INTERFACE_IMPL_H_