[samples][fidl] Rename sample protocol libraries.
Replace all instances of 'fuchsia.*' in example libraries.
The fuchsia prefix is a reserved namespace for APIs meant to be
versioned with the SDK.
Bug: 114095
Change-Id: I6ad3fe93857537f299b5c3a97e539233d116fe79
Reviewed-on: https://fuchsia-review.googlesource.com/c/sdk-samples/drivers/+/754605
Reviewed-by: Novin Changizi <novinc@google.com>
Commit-Queue: Dave Smith <smithdave@google.com>
diff --git a/src/acpi_multiply/README.md b/src/acpi_multiply/README.md
index d575846..0bfa4fa 100644
--- a/src/acpi_multiply/README.md
+++ b/src/acpi_multiply/README.md
@@ -3,7 +3,7 @@
This sample project contains a driver component name `acpi_multiply` for a virtual "multiplier"
device described the ACPI hardware ID `FDFS0001`.
The driver interacts with the device hardware using the `fuchsia.hardware.acpi` protocol,
-and exposes a custom FIDL protocol (`fuchsia.examples.acpi.multiply`) for other components to
+and exposes a custom FIDL protocol (`examples.acpi.multiply`) for other components to
consume.
The `acpi_controller` driver component emulates an ACPI controller, creating the child device
@@ -54,5 +54,5 @@
* `controller/` — Source code of the `acpi_controller` driver component.
* `driver/` — Source code of the `acpi_multiply` driver component.
-* `fidl/` — FIDL library definition for `fuchsia.examples.acpi.multiply`.
+* `fidl/` — FIDL library definition for `examples.acpi.multiply`.
* `lib/` — Common device registers shared between the controller and driver components.
diff --git a/src/acpi_multiply/driver/BUILD.bazel b/src/acpi_multiply/driver/BUILD.bazel
index 8941d43..592274f 100644
--- a/src/acpi_multiply/driver/BUILD.bazel
+++ b/src/acpi_multiply/driver/BUILD.bazel
@@ -32,7 +32,7 @@
],
linkshared = True,
deps = [
- "//src/acpi_multiply/fidl:fuchsia.examples.acpi.multiply_cc",
+ "//src/acpi_multiply/fidl:examples.acpi.multiply_cc",
"//src/acpi_multiply/lib",
"@fuchsia_sdk//fidl/fuchsia.hardware.acpi:fuchsia.hardware.acpi_llcpp_cc",
"@fuchsia_sdk//pkg/async-cpp",
diff --git a/src/acpi_multiply/driver/acpi_multiply.cc b/src/acpi_multiply/driver/acpi_multiply.cc
index 524fff4..0073d9e 100644
--- a/src/acpi_multiply/driver/acpi_multiply.cc
+++ b/src/acpi_multiply/driver/acpi_multiply.cc
@@ -31,20 +31,19 @@
return init_result.take_error();
}
- // Serve the fuchsia.examples.acpi.multiply/Device protocol to clients through the
- // fuchsia.examples.acpi.multiply/Service wrapper.
+ // Serve the examples.acpi.multiply/Device protocol to clients through the
+ // examples.acpi.multiply/Service wrapper.
driver::ServiceInstanceHandler handler;
- fuchsia_examples_acpi_multiply::Service::Handler service(&handler);
+ examples_acpi_multiply::Service::Handler service(&handler);
- auto result = service.add_device(
- [this](fidl::ServerEnd<fuchsia_examples_acpi_multiply::Device> request) -> void {
+ auto result =
+ service.add_device([this](fidl::ServerEnd<examples_acpi_multiply::Device> request) -> void {
AcpiMultiplyServer::BindDeviceClient(&logger(), dispatcher(), multiplier_,
std::move(request));
});
ZX_ASSERT(result.is_ok());
- result =
- context().outgoing()->AddService<fuchsia_examples_acpi_multiply::Service>(std::move(handler));
+ result = context().outgoing()->AddService<examples_acpi_multiply::Service>(std::move(handler));
if (result.is_error()) {
FDF_SLOG(ERROR, "Failed to add service", KV("status", result.status_string()));
return result.take_error();
@@ -53,7 +52,7 @@
// This is not strictly necessary, but it does a multiplication to prove that the driver
// behaves as expected.
async::PostTask(dispatcher(), [this]() {
- auto endpoints = fidl::CreateEndpoints<fuchsia_examples_acpi_multiply::Device>();
+ auto endpoints = fidl::CreateEndpoints<examples_acpi_multiply::Device>();
if (endpoints.is_error()) {
FDF_LOG(ERROR, "Failed to create endpoints");
return;
@@ -65,8 +64,7 @@
client_.Bind(std::move(endpoints->client), dispatcher());
// Do the multiply
client_->Multiply(UINT32_MAX, 9)
- .Then([this](fidl::WireUnownedResult<fuchsia_examples_acpi_multiply::Device::Multiply>&
- response) {
+ .Then([this](fidl::WireUnownedResult<examples_acpi_multiply::Device::Multiply>& response) {
if (response.ok() && response->is_ok()) {
FDF_SLOG(INFO, "UINT32_MAX*9: Got result",
KV("result", response.value().value()->result),
@@ -79,8 +77,7 @@
}
});
client_->Multiply(2, 9).Then(
- [this](
- fidl::WireUnownedResult<fuchsia_examples_acpi_multiply::Device::Multiply>& response) {
+ [this](fidl::WireUnownedResult<examples_acpi_multiply::Device::Multiply>& response) {
if (response.ok() && response->is_ok()) {
FDF_SLOG(INFO, "2*9: Got result", KV("result", response.value().value()->result),
KV("overflowed", response.value().value()->overflowed));
diff --git a/src/acpi_multiply/driver/acpi_multiply.h b/src/acpi_multiply/driver/acpi_multiply.h
index ab5dfef..b4f5269 100644
--- a/src/acpi_multiply/driver/acpi_multiply.h
+++ b/src/acpi_multiply/driver/acpi_multiply.h
@@ -5,7 +5,7 @@
#ifndef SRC_ACPI_MULTIPLY_ACPI_MULTIPLY_H_
#define SRC_ACPI_MULTIPLY_ACPI_MULTIPLY_H_
-#include <fidl/fuchsia.examples.acpi.multiply/cpp/wire.h>
+#include <fidl/examples.acpi.multiply/cpp/wire.h>
#include <lib/driver2/driver2_cpp.h>
#include "multiplier.h"
@@ -26,7 +26,7 @@
std::shared_ptr<AcpiMultiplier> multiplier_;
// Used by the self-test.
- fidl::WireClient<fuchsia_examples_acpi_multiply::Device> client_;
+ fidl::WireClient<examples_acpi_multiply::Device> client_;
};
} // namespace acpi_multiply
diff --git a/src/acpi_multiply/driver/meta/acpi_multiply.cml b/src/acpi_multiply/driver/meta/acpi_multiply.cml
index a6f8154..6827475 100644
--- a/src/acpi_multiply/driver/meta/acpi_multiply.cml
+++ b/src/acpi_multiply/driver/meta/acpi_multiply.cml
@@ -17,11 +17,11 @@
],
// Provide the multiply device capability to other components
capabilities: [
- { service: 'fuchsia.examples.acpi.multiply.Service' },
+ { service: 'examples.acpi.multiply.Service' },
],
expose: [
{
- service: 'fuchsia.examples.acpi.multiply.Service',
+ service: 'examples.acpi.multiply.Service',
from: 'self',
},
],
diff --git a/src/acpi_multiply/driver/multiply_server.cc b/src/acpi_multiply/driver/multiply_server.cc
index c8f20a0..0c178c3 100644
--- a/src/acpi_multiply/driver/multiply_server.cc
+++ b/src/acpi_multiply/driver/multiply_server.cc
@@ -8,10 +8,10 @@
// Static
// Handle incoming connection requests from FIDL clients
-fidl::ServerBindingRef<fuchsia_examples_acpi_multiply::Device> AcpiMultiplyServer::BindDeviceClient(
+fidl::ServerBindingRef<examples_acpi_multiply::Device> AcpiMultiplyServer::BindDeviceClient(
driver::Logger* logger, async_dispatcher_t* dispatcher,
std::weak_ptr<AcpiMultiplier> multiplier,
- fidl::ServerEnd<fuchsia_examples_acpi_multiply::Device> request) {
+ fidl::ServerEnd<examples_acpi_multiply::Device> request) {
// Bind each connection request to a unique FIDL server instance
auto server_impl = std::make_unique<AcpiMultiplyServer>(logger, multiplier);
return fidl::BindServer(dispatcher, std::move(request), std::move(server_impl),
@@ -19,8 +19,8 @@
}
// This method is called when a server connection is torn down.
-void AcpiMultiplyServer::OnUnbound(
- fidl::UnbindInfo info, fidl::ServerEnd<fuchsia_examples_acpi_multiply::Device> server_end) {
+void AcpiMultiplyServer::OnUnbound(fidl::UnbindInfo info,
+ fidl::ServerEnd<examples_acpi_multiply::Device> server_end) {
if (info.is_peer_closed()) {
FDF_LOG(DEBUG, "Client disconnected");
} else if (!info.is_user_initiated()) {
@@ -28,7 +28,7 @@
}
}
-// Protocol method in `fuchsia.examples.acpi.multiply` to execute a multiply operation
+// Protocol method in `examples.acpi.multiply` to execute a multiply operation
void AcpiMultiplyServer::Multiply(MultiplyRequestView request, MultiplyCompleter::Sync& completer) {
auto multiplier = multiplier_.lock();
if (!multiplier) {
diff --git a/src/acpi_multiply/driver/multiply_server.h b/src/acpi_multiply/driver/multiply_server.h
index 78f35e1..f24ed87 100644
--- a/src/acpi_multiply/driver/multiply_server.h
+++ b/src/acpi_multiply/driver/multiply_server.h
@@ -5,28 +5,27 @@
#ifndef SRC_ACPI_MULTIPLY_MULTIPLY_SERVER_H_
#define SRC_ACPI_MULTIPLY_MULTIPLY_SERVER_H_
-#include <fidl/fuchsia.examples.acpi.multiply/cpp/wire.h>
+#include <fidl/examples.acpi.multiply/cpp/wire.h>
#include <lib/driver2/logger.h>
#include "multiplier.h"
namespace acpi_multiply {
-// FIDL server implementation for the `fuchsia.examples.acpi.multiply/Device` protocol
-class AcpiMultiplyServer : public fidl::WireServer<fuchsia_examples_acpi_multiply::Device> {
+// FIDL server implementation for the `examples.acpi.multiply/Device` protocol
+class AcpiMultiplyServer : public fidl::WireServer<examples_acpi_multiply::Device> {
public:
AcpiMultiplyServer(driver::Logger* logger, std::weak_ptr<AcpiMultiplier> multiplier)
: logger_(logger), multiplier_(multiplier) {}
- static fidl::ServerBindingRef<fuchsia_examples_acpi_multiply::Device> BindDeviceClient(
+ static fidl::ServerBindingRef<examples_acpi_multiply::Device> BindDeviceClient(
driver::Logger* logger, async_dispatcher_t* dispatcher,
std::weak_ptr<AcpiMultiplier> multiplier,
- fidl::ServerEnd<fuchsia_examples_acpi_multiply::Device> request);
+ fidl::ServerEnd<examples_acpi_multiply::Device> request);
- void OnUnbound(fidl::UnbindInfo info,
- fidl::ServerEnd<fuchsia_examples_acpi_multiply::Device> server_end);
+ void OnUnbound(fidl::UnbindInfo info, fidl::ServerEnd<examples_acpi_multiply::Device> server_end);
- // fidl::WireServer<fuchsia_examples_acpi_multiply::Device>
+ // fidl::WireServer<examples_acpi_multiply::Device>
void Multiply(MultiplyRequestView request, MultiplyCompleter::Sync& completer) override;
diff --git a/src/acpi_multiply/fidl/BUILD.bazel b/src/acpi_multiply/fidl/BUILD.bazel
index 57a0423..afbf8f4 100644
--- a/src/acpi_multiply/fidl/BUILD.bazel
+++ b/src/acpi_multiply/fidl/BUILD.bazel
@@ -9,11 +9,11 @@
)
fuchsia_fidl_library(
- name = "fuchsia.examples.acpi.multiply",
+ name = "examples.acpi.multiply",
srcs = [
"acpi_multiply.fidl",
],
- library = "fuchsia.examples.acpi.multiply",
+ library = "examples.acpi.multiply",
visibility = ["//visibility:public"],
deps = [
"@fuchsia_sdk//fidl/zx",
@@ -21,8 +21,8 @@
)
fuchsia_fidl_llcpp_library(
- name = "fuchsia.examples.acpi.multiply_cc",
- library = ":fuchsia.examples.acpi.multiply",
+ name = "examples.acpi.multiply_cc",
+ library = ":examples.acpi.multiply",
visibility = ["//visibility:public"],
deps = [
"@fuchsia_sdk//fidl/zx:zx_llcpp_cc",
diff --git a/src/acpi_multiply/fidl/acpi_multiply.fidl b/src/acpi_multiply/fidl/acpi_multiply.fidl
index c4a1ebe..8191b3e 100644
--- a/src/acpi_multiply/fidl/acpi_multiply.fidl
+++ b/src/acpi_multiply/fidl/acpi_multiply.fidl
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-library fuchsia.examples.acpi.multiply;
+library examples.acpi.multiply;
using zx;
diff --git a/src/bind_library/child/BUILD.bazel b/src/bind_library/child/BUILD.bazel
index dedf3b1..325e79c 100644
--- a/src/bind_library/child/BUILD.bazel
+++ b/src/bind_library/child/BUILD.bazel
@@ -18,7 +18,7 @@
],
linkshared = True,
deps = [
- "//src/bind_library/lib:fuchsia.examples.gizmo_cc",
+ "//src/bind_library/lib:examples.gizmo_cc",
"@fuchsia_sdk//pkg/driver2_cpp",
],
)
@@ -30,9 +30,9 @@
rules = "child-driver.bind",
deps = [
# This bind library is one we created manually.
- "//src/bind_library/lib:fuchsia.examples.gizmo.bind",
+ "//src/bind_library/lib:examples.gizmo.bind",
# This bind library is from a FIDL library that we created manually.
- "//src/bind_library/lib:fuchsia.examples.gizmo_bindlib",
+ "//src/bind_library/lib:examples.gizmo_bindlib",
# This bind library is from an SDK FIDL library.
"@fuchsia_sdk//fidl/fuchsia.device.fs:fuchsia.device.fs_bindlib",
],
diff --git a/src/bind_library/child/child-driver.bind b/src/bind_library/child/child-driver.bind
index f0cf2bf..1ff1813 100644
--- a/src/bind_library/child/child-driver.bind
+++ b/src/bind_library/child/child-driver.bind
@@ -4,20 +4,20 @@
// [START bind_imports]
using fuchsia.acpi;
-using fuchsia.examples.gizmo.bind;
+using examples.gizmo.bind;
// [END bind_imports]
// [START fidl_imports]
using fuchsia.device.fs;
-using fuchsia.examples.gizmo;
+using examples.gizmo;
// [END fidl_imports]
// [START bind_properties]
fuchsia.BIND_PROTOCOL == fuchsia.acpi.BIND_PROTOCOL.DEVICE;
fuchsia.acpi.hid == "GOOG";
-fuchsia.examples.gizmo.bind.ModelName == "GIZMO3000";
-fuchsia.examples.gizmo.bind.GizmoType == fuchsia.examples.gizmo.bind.GizmoType.MEM_64K;
+examples.gizmo.bind.ModelName == "GIZMO3000";
+examples.gizmo.bind.GizmoType == examples.gizmo.bind.GizmoType.MEM_64K;
// [END bind_properties]
// [START fidl_properties]
fuchsia.device.fs.Exporter == fuchsia.device.fs.Exporter.ZirconTransport;
-fuchsia.examples.gizmo.TestingProtocol == fuchsia.examples.gizmo.TestingProtocol.ZirconTransport;
+examples.gizmo.TestingProtocol == examples.gizmo.TestingProtocol.ZirconTransport;
// [END fidl_properties]
diff --git a/src/bind_library/child/child-driver.cc b/src/bind_library/child/child-driver.cc
index 28b3020..fa8fd94 100644
--- a/src/bind_library/child/child-driver.cc
+++ b/src/bind_library/child/child-driver.cc
@@ -4,14 +4,13 @@
#include "child-driver.h"
-#include <fidl/fuchsia.examples.gizmo/cpp/wire.h>
+#include <fidl/examples.gizmo/cpp/wire.h>
#include <lib/driver2/service_client.h>
namespace child_driver {
zx::result<> ChildDriver::Start() {
- auto connect_result =
- driver::Connect<fuchsia_examples_gizmo::Service::Testing>(*context().incoming());
+ auto connect_result = driver::Connect<examples_gizmo::Service::Testing>(*context().incoming());
if (connect_result.is_error()) {
FDF_SLOG(WARNING, "Failed to connect to gizmo service.",
KV("status", connect_result.status_string()));
diff --git a/src/bind_library/child/meta/child-driver.cml b/src/bind_library/child/meta/child-driver.cml
index cf7048f..b97b06d 100644
--- a/src/bind_library/child/meta/child-driver.cml
+++ b/src/bind_library/child/meta/child-driver.cml
@@ -11,6 +11,6 @@
bind: 'meta/bind/child-driver.bindbc'
},
use: [
- { service: 'fuchsia.examples.gizmo.Service' },
+ { service: 'examples.gizmo.Service' },
],
}
diff --git a/src/bind_library/lib/BUILD.bazel b/src/bind_library/lib/BUILD.bazel
index 17de7e9..e847ceb 100644
--- a/src/bind_library/lib/BUILD.bazel
+++ b/src/bind_library/lib/BUILD.bazel
@@ -14,7 +14,7 @@
#[START fuchsia_gizmo_library]
# This is a bind library that we manually define.
fuchsia_bind_library(
- name = "fuchsia.examples.gizmo.bind",
+ name = "examples.gizmo.bind",
srcs = [
"testlibrary.bind",
],
@@ -26,8 +26,8 @@
# We have to create the C++ library for it manually as well.
fuchsia_bind_cc_library(
- name = "fuchsia.examples.gizmo.bind_cc",
- library = ":fuchsia.examples.gizmo.bind",
+ name = "examples.gizmo.bind_cc",
+ library = ":examples.gizmo.bind",
visibility = ["//visibility:public"],
# Has to have the C++ libraries of all the deps of the bind library.
deps = [
@@ -39,17 +39,17 @@
#[START fuchsia_gizmo_protocol]
# This is a FIDL library that we manually define.
fuchsia_fidl_library(
- name = "fuchsia.examples.gizmo",
+ name = "examples.gizmo",
srcs = [
"testfidl.fidl",
],
- library = "fuchsia.examples.gizmo",
+ library = "examples.gizmo",
)
# The C++ bindings for the FIDL library.
fuchsia_fidl_llcpp_library(
- name = "fuchsia.examples.gizmo_cc",
- library = ":fuchsia.examples.gizmo",
+ name = "examples.gizmo_cc",
+ library = ":examples.gizmo",
visibility = ["//visibility:public"],
deps = [
"@fuchsia_sdk//pkg/fidl_cpp_v2",
@@ -59,15 +59,15 @@
# We have to manually create the bind library from it.
fuchsia_fidl_bind_library(
- name = "fuchsia.examples.gizmo_bindlib",
- library = ":fuchsia.examples.gizmo",
+ name = "examples.gizmo_bindlib",
+ library = ":examples.gizmo",
visibility = ["//visibility:public"],
)
# We have to manually create the C++ lib for the FIDL based bind library we created.
fuchsia_bind_cc_library(
- name = "fuchsia.examples.gizmo_bindlib_cc",
- library = ":fuchsia.examples.gizmo_bindlib",
+ name = "examples.gizmo_bindlib_cc",
+ library = ":examples.gizmo_bindlib",
visibility = ["//visibility:public"],
)
#[END fuchsia_gizmo_protocol]
diff --git a/src/bind_library/lib/testfidl.fidl b/src/bind_library/lib/testfidl.fidl
index 5642ba7..d8f372c 100644
--- a/src/bind_library/lib/testfidl.fidl
+++ b/src/bind_library/lib/testfidl.fidl
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-library fuchsia.examples.gizmo;
+library examples.gizmo;
@discoverable
protocol TestingProtocol {
diff --git a/src/bind_library/lib/testlibrary.bind b/src/bind_library/lib/testlibrary.bind
index bec28d4..6b1bc51 100644
--- a/src/bind_library/lib/testlibrary.bind
+++ b/src/bind_library/lib/testlibrary.bind
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// [START bind_library]
-library fuchsia.examples.gizmo.bind;
+library examples.gizmo.bind;
// Include properties from other libraries
using fuchsia.acpi;
diff --git a/src/bind_library/parent/BUILD.bazel b/src/bind_library/parent/BUILD.bazel
index 48b58e6..e26ce8b 100644
--- a/src/bind_library/parent/BUILD.bazel
+++ b/src/bind_library/parent/BUILD.bazel
@@ -22,10 +22,10 @@
linkshared = True,
deps = [
# This is a C++ lib from our manually created bind library.
- "//src/bind_library/lib:fuchsia.examples.gizmo.bind_cc",
+ "//src/bind_library/lib:examples.gizmo.bind_cc",
# This is a C++ lib from our manually created FIDL based bind library.
- "//src/bind_library/lib:fuchsia.examples.gizmo_bindlib_cc",
- "//src/bind_library/lib:fuchsia.examples.gizmo_cc",
+ "//src/bind_library/lib:examples.gizmo_bindlib_cc",
+ "//src/bind_library/lib:examples.gizmo_cc",
# This is a C++ lib from an SDK FIDL based bind library.
"@fuchsia_sdk//fidl/fuchsia.device.fs:fuchsia.device.fs_bindlib_cc",
"@fuchsia_sdk//pkg/driver2_cpp",
diff --git a/src/bind_library/parent/gizmo_server.h b/src/bind_library/parent/gizmo_server.h
index d6d1154..870ef1f 100644
--- a/src/bind_library/parent/gizmo_server.h
+++ b/src/bind_library/parent/gizmo_server.h
@@ -5,26 +5,26 @@
#ifndef SRC_BIND_LIBRARY_PARENT_GIZMO_SERVER_H_
#define SRC_BIND_LIBRARY_PARENT_GIZMO_SERVER_H_
-#include <fidl/fuchsia.examples.gizmo/cpp/wire.h>
+#include <fidl/examples.gizmo/cpp/wire.h>
#include <lib/driver2/logger.h>
namespace parent_driver {
-class GizmoServer : public fidl::WireServer<fuchsia_examples_gizmo::TestingProtocol> {
+class GizmoServer : public fidl::WireServer<examples_gizmo::TestingProtocol> {
public:
GizmoServer(driver::Logger* logger) : logger_(logger) {}
virtual ~GizmoServer() = default;
- static fidl::ServerBindingRef<fuchsia_examples_gizmo::TestingProtocol> BindDeviceClient(
+ static fidl::ServerBindingRef<examples_gizmo::TestingProtocol> BindDeviceClient(
std::shared_ptr<GizmoServer> server_impl, async_dispatcher_t* dispatcher,
- fidl::ServerEnd<fuchsia_examples_gizmo::TestingProtocol> request) {
+ fidl::ServerEnd<examples_gizmo::TestingProtocol> request) {
// Bind each connection request to the shared instance.
return fidl::BindServer(dispatcher, std::move(request), server_impl,
std::mem_fn(&GizmoServer::OnUnbound));
}
void OnUnbound(fidl::UnbindInfo info,
- fidl::ServerEnd<fuchsia_examples_gizmo::TestingProtocol> server_end) {
+ fidl::ServerEnd<examples_gizmo::TestingProtocol> server_end) {
if (info.is_peer_closed()) {
FDF_LOG(DEBUG, "Client disconnected");
} else if (!info.is_user_initiated()) {
@@ -32,7 +32,7 @@
}
}
- // fidl::WireServer<fuchsia_examples_gizmo::TestingProtocol>
+ // fidl::WireServer<examples_gizmo::TestingProtocol>
void Get(GetCompleter::Sync& completer) {
FDF_LOG(INFO, "Received TestingProtocol.Get request.");
diff --git a/src/bind_library/parent/meta/parent-driver.cml b/src/bind_library/parent/meta/parent-driver.cml
index 580696e..2b51738 100644
--- a/src/bind_library/parent/meta/parent-driver.cml
+++ b/src/bind_library/parent/meta/parent-driver.cml
@@ -11,11 +11,11 @@
bind: 'meta/bind/parent-driver.bindbc'
},
capabilities: [
- { service: 'fuchsia.examples.gizmo.Service' },
+ { service: 'examples.gizmo.Service' },
],
expose: [
{
- service: 'fuchsia.examples.gizmo.Service',
+ service: 'examples.gizmo.Service',
from: 'self',
},
],
diff --git a/src/bind_library/parent/parent-driver.cc b/src/bind_library/parent/parent-driver.cc
index 4f55e99..342a64e 100644
--- a/src/bind_library/parent/parent-driver.cc
+++ b/src/bind_library/parent/parent-driver.cc
@@ -5,9 +5,9 @@
#include "parent-driver.h"
// [START bind_imports]
+#include <bind/examples/gizmo/bind/cpp/bind.h>
+#include <bind/examples/gizmo/cpp/bind.h>
#include <bind/fuchsia/device/fs/cpp/bind.h>
-#include <bind/fuchsia/examples/gizmo/bind/cpp/bind.h>
-#include <bind/fuchsia/examples/gizmo/cpp/bind.h>
// [END bind_imports]
namespace parent_driver {
@@ -16,17 +16,17 @@
node_.Bind(std::move(node()), dispatcher());
gizmo_server_ = std::make_shared<GizmoServer>(&logger());
- // Add gizmo fuchsia_examples_gizmo::Service to outgoing.
+ // Add gizmo examples_gizmo::Service to outgoing.
{
driver::ServiceInstanceHandler handler;
- fuchsia_examples_gizmo::Service::Handler service(&handler);
+ examples_gizmo::Service::Handler service(&handler);
auto result = service.add_testing(
- [this](fidl::ServerEnd<fuchsia_examples_gizmo::TestingProtocol> server_end) -> void {
+ [this](fidl::ServerEnd<examples_gizmo::TestingProtocol> server_end) -> void {
GizmoServer::BindDeviceClient(gizmo_server_, dispatcher(), std::move(server_end));
});
ZX_ASSERT(result.is_ok());
- result = context().outgoing()->AddService<fuchsia_examples_gizmo::Service>(std::move(handler));
+ result = context().outgoing()->AddService<examples_gizmo::Service>(std::move(handler));
if (result.is_error()) {
FDF_SLOG(ERROR, "Failed to add service", KV("status", result.status_string()));
return result.take_error();
@@ -44,10 +44,9 @@
zx::result<> ParentDriver::AddChild() {
fidl::Arena arena;
- // Offer `fuchsia.examples.gizmo.Service` to the driver that binds to the node.
+ // Offer `examples.gizmo.Service` to the driver that binds to the node.
auto offers = fidl::VectorView<fuchsia_component_decl::wire::Offer>(arena, 1);
- offers[0] =
- driver::MakeOffer<fuchsia_examples_gizmo::Service>(arena, component::kDefaultInstance);
+ offers[0] = driver::MakeOffer<examples_gizmo::Service>(arena, component::kDefaultInstance);
// Set the properties of the node that the child will bind to based on the child-driver.bind
auto properties = fidl::VectorView<fuchsia_driver_framework::wire::NodeProperty>(arena, 6);
@@ -55,10 +54,9 @@
properties[0] =
driver::MakeProperty(arena, 1 /* BIND_PROTOCOL */, bind_fuchsia_acpi::BIND_PROTOCOL_DEVICE);
properties[1] = driver::MakeProperty(arena, bind_fuchsia_acpi::HID, "GOOG");
- properties[2] =
- driver::MakeProperty(arena, bind_fuchsia_examples_gizmo_bind::MODELNAME, "GIZMO3000");
- properties[3] = driver::MakeEnumProperty(arena, bind_fuchsia_examples_gizmo_bind::GIZMOTYPE,
- bind_fuchsia_examples_gizmo_bind::GIZMOTYPE_MEM_64K);
+ properties[2] = driver::MakeProperty(arena, bind_examples_gizmo_bind::MODELNAME, "GIZMO3000");
+ properties[3] = driver::MakeEnumProperty(arena, bind_examples_gizmo_bind::GIZMOTYPE,
+ bind_examples_gizmo_bind::GIZMOTYPE_MEM_64K);
// [END add_bind_properties]
// We are not actually offering the Exporter protocol to the child, nor using it from the child.
@@ -66,9 +64,8 @@
// [START add_fidl_bind_properties]
properties[4] = driver::MakeEnumProperty(arena, bind_fuchsia_device_fs::EXPORTER,
bind_fuchsia_device_fs::EXPORTER_ZIRCONTRANSPORT);
- properties[5] =
- driver::MakeEnumProperty(arena, bind_fuchsia_examples_gizmo::TESTINGPROTOCOL,
- bind_fuchsia_examples_gizmo::TESTINGPROTOCOL_ZIRCONTRANSPORT);
+ properties[5] = driver::MakeEnumProperty(arena, bind_examples_gizmo::TESTINGPROTOCOL,
+ bind_examples_gizmo::TESTINGPROTOCOL_ZIRCONTRANSPORT);
// [END add_fidl_bind_properties]
auto args = fuchsia_driver_framework::wire::NodeAddArgs::Builder(arena)
diff --git a/src/composite_sample/README.md b/src/composite_sample/README.md
index 81d5467..7e69780 100644
--- a/src/composite_sample/README.md
+++ b/src/composite_sample/README.md
@@ -19,7 +19,7 @@
1. Add a test node for the controller:
```
- tools/ffx driver test-node add controller-node fuchsia.driver.test.property=controller
+ tools/ffx driver test-node add controller-node examples.driver.test.property=controller
```
1. Load the `controller` driver component:
diff --git a/src/composite_sample/controller/BUILD.bazel b/src/composite_sample/controller/BUILD.bazel
index 291b8c5..586739b 100644
--- a/src/composite_sample/controller/BUILD.bazel
+++ b/src/composite_sample/controller/BUILD.bazel
@@ -18,7 +18,7 @@
],
linkshared = True,
deps = [
- "//src/composite_sample/lib:fuchsia.driver.test_cc",
+ "//src/composite_sample/lib:examples.driver.test_cc",
"@fuchsia_sdk//pkg/driver2_cpp",
"@fuchsia_sdk//pkg/driver_compat",
],
@@ -29,7 +29,7 @@
output = "controller-driver.bindbc",
rules = "controller-driver.bind",
deps = [
- "//src/composite_sample/lib:fuchsia.driver.test",
+ "//src/composite_sample/lib:examples.driver.test",
],
)
diff --git a/src/composite_sample/controller/controller-driver.bind b/src/composite_sample/controller/controller-driver.bind
index 3baffc7..9f9eaf4 100644
--- a/src/composite_sample/controller/controller-driver.bind
+++ b/src/composite_sample/controller/controller-driver.bind
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-using fuchsia.driver.test;
+using examples.driver.test;
-fuchsia.driver.test.property == "controller";
+examples.driver.test.property == "controller";
diff --git a/src/composite_sample/controller/controller.cc b/src/composite_sample/controller/controller.cc
index 9eeaf20..b35133e 100644
--- a/src/composite_sample/controller/controller.cc
+++ b/src/composite_sample/controller/controller.cc
@@ -4,7 +4,7 @@
#include "controller.h"
-#include <bind/fuchsia/driver/test/cpp/bind.h>
+#include <bind/examples/driver/test/cpp/bind.h>
namespace controller_driver {
@@ -45,7 +45,7 @@
auto offers = compat.CreateOffers(arena);
auto properties = fidl::VectorView<fuchsia_driver_framework::wire::NodeProperty>(arena, 1);
- properties[0] = driver::MakeProperty(arena, bind_fuchsia_driver_test::PROPERTY, name);
+ properties[0] = driver::MakeProperty(arena, bind_examples_driver_test::PROPERTY, name);
auto args = fuchsia_driver_framework::wire::NodeAddArgs::Builder(arena)
.name(arena, name)
diff --git a/src/composite_sample/driver/BUILD.bazel b/src/composite_sample/driver/BUILD.bazel
index fd60814..c6768d6 100644
--- a/src/composite_sample/driver/BUILD.bazel
+++ b/src/composite_sample/driver/BUILD.bazel
@@ -15,7 +15,7 @@
output = "composite_sample.bindbc",
rules = "composite_sample.bind",
deps = [
- "//src/composite_sample/lib:fuchsia.driver.test",
+ "//src/composite_sample/lib:examples.driver.test",
],
)
diff --git a/src/composite_sample/driver/composite_sample.bind b/src/composite_sample/driver/composite_sample.bind
index 19968ef..4b5912f 100644
--- a/src/composite_sample/driver/composite_sample.bind
+++ b/src/composite_sample/driver/composite_sample.bind
@@ -4,12 +4,12 @@
composite composite_sample;
-using fuchsia.driver.test;
+using examples.driver.test;
primary node "acpi-GFBY" {
- fuchsia.driver.test.property == "node-one";
+ examples.driver.test.property == "node-one";
}
node "acpi-GFRT" {
- fuchsia.driver.test.property == "node-two";
+ examples.driver.test.property == "node-two";
}
diff --git a/src/composite_sample/lib/BUILD.bazel b/src/composite_sample/lib/BUILD.bazel
index 64564fd..429dbbb 100644
--- a/src/composite_sample/lib/BUILD.bazel
+++ b/src/composite_sample/lib/BUILD.bazel
@@ -9,7 +9,7 @@
)
fuchsia_bind_library(
- name = "fuchsia.driver.test",
+ name = "examples.driver.test",
srcs = [
"fuchsia_driver_test.bind",
],
@@ -17,7 +17,7 @@
)
fuchsia_bind_cc_library(
- name = "fuchsia.driver.test_cc",
- library = ":fuchsia.driver.test",
+ name = "examples.driver.test_cc",
+ library = ":examples.driver.test",
visibility = ["//visibility:public"],
)
diff --git a/src/composite_sample/lib/fuchsia_driver_test.bind b/src/composite_sample/lib/fuchsia_driver_test.bind
index 796890a..935bb0b 100644
--- a/src/composite_sample/lib/fuchsia_driver_test.bind
+++ b/src/composite_sample/lib/fuchsia_driver_test.bind
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-library fuchsia.driver.test;
+library examples.driver.test;
string property;
diff --git a/src/i2c_temperature/README.md b/src/i2c_temperature/README.md
index 9cfcd14..7237024 100644
--- a/src/i2c_temperature/README.md
+++ b/src/i2c_temperature/README.md
@@ -3,7 +3,7 @@
This sample project contains a driver component named `i2c_temperature` for a temperature
sensor device connected to an I2C bus with device address `0xFF`.
The driver interacts with the device hardware using the `fuchsia.hardware.i2c` protocol,
-and exposes a custom FIDL protocol (`fuchsia.examples.i2c.temperature`) for other components
+and exposes a custom FIDL protocol (`examples.i2c.temperature`) for other components
to consume.
The `i2c_controller` driver component emulates an I2C bus controller, creating the child
@@ -56,5 +56,5 @@
* `controller/` — Source code of the `i2c_controller` driver component.
* `driver/` — Source code of the `i2c_temperature` driver component.
-* `fidl/` — FIDL library definition for `fuchsia.examples.i2c.temperature`.
+* `fidl/` — FIDL library definition for `examples.i2c.temperature`.
* `lib/` — Common I2C constants shared between the controller and driver components.
diff --git a/src/i2c_temperature/driver/BUILD.bazel b/src/i2c_temperature/driver/BUILD.bazel
index d68838f..64364e7 100644
--- a/src/i2c_temperature/driver/BUILD.bazel
+++ b/src/i2c_temperature/driver/BUILD.bazel
@@ -34,7 +34,7 @@
],
linkshared = True,
deps = [
- "//src/i2c_temperature/fidl:fuchsia.examples.i2c.temperature_cc",
+ "//src/i2c_temperature/fidl:examples.i2c.temperature_cc",
"//src/i2c_temperature/lib",
"@fuchsia_sdk//fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_llcpp_cc",
"@fuchsia_sdk//pkg/driver2_cpp",
diff --git a/src/i2c_temperature/driver/i2c_temperature.cc b/src/i2c_temperature/driver/i2c_temperature.cc
index 453d79f..7995f03 100644
--- a/src/i2c_temperature/driver/i2c_temperature.cc
+++ b/src/i2c_temperature/driver/i2c_temperature.cc
@@ -4,7 +4,7 @@
#include "i2c_temperature.h"
-#include <fidl/fuchsia.examples.i2c.temperature/cpp/wire.h>
+#include <fidl/examples.i2c.temperature/cpp/wire.h>
#include <lib/driver2/service_client.h>
#include "constants.h"
@@ -19,20 +19,19 @@
return channel_result.take_error();
}
- // Serve the fuchsia.examples.i2c.temperature/Device protocol to clients through the
- // fuchsia.examples.i2c.temperature/Service wrapper.
+ // Serve the examples.i2c.temperature/Device protocol to clients through the
+ // examples.i2c.temperature/Service wrapper.
driver::ServiceInstanceHandler handler;
- fuchsia_examples_i2c_temperature::Service::Handler service(&handler);
+ examples_i2c_temperature::Service::Handler service(&handler);
- auto result = service.add_device(
- [this](fidl::ServerEnd<fuchsia_examples_i2c_temperature::Device> request) -> void {
+ auto result =
+ service.add_device([this](fidl::ServerEnd<examples_i2c_temperature::Device> request) -> void {
I2cTemperatureServer::BindDeviceClient(dispatcher(), &logger(), i2c_channel_,
std::move(request));
});
ZX_ASSERT(result.is_ok());
- result = context().outgoing()->AddService<fuchsia_examples_i2c_temperature::Service>(
- std::move(handler));
+ result = context().outgoing()->AddService<examples_i2c_temperature::Service>(std::move(handler));
if (result.is_error()) {
FDF_SLOG(ERROR, "Failed to add service", KV("status", result.status_string()));
return result.take_error();
diff --git a/src/i2c_temperature/driver/meta/i2c_temperature.cml b/src/i2c_temperature/driver/meta/i2c_temperature.cml
index 6714af0..9abec17 100644
--- a/src/i2c_temperature/driver/meta/i2c_temperature.cml
+++ b/src/i2c_temperature/driver/meta/i2c_temperature.cml
@@ -17,11 +17,11 @@
],
// Provide the temperature device capability to other components
capabilities: [
- { service: 'fuchsia.examples.i2c.temperature.Service' },
+ { service: 'examples.i2c.temperature.Service' },
],
expose: [
{
- service: 'fuchsia.examples.i2c.temperature.Service',
+ service: 'examples.i2c.temperature.Service',
from: 'self',
},
],
diff --git a/src/i2c_temperature/driver/temperature_server.cc b/src/i2c_temperature/driver/temperature_server.cc
index 923ca36..9e8dd87 100644
--- a/src/i2c_temperature/driver/temperature_server.cc
+++ b/src/i2c_temperature/driver/temperature_server.cc
@@ -13,10 +13,9 @@
// Static
// Handle incoming connection requests from FIDL clients
-fidl::ServerBindingRef<fuchsia_examples_i2c_temperature::Device>
-I2cTemperatureServer::BindDeviceClient(
+fidl::ServerBindingRef<examples_i2c_temperature::Device> I2cTemperatureServer::BindDeviceClient(
async_dispatcher_t* dispatcher, driver::Logger* logger, std::weak_ptr<I2cChannel> i2c_channel,
- fidl::ServerEnd<fuchsia_examples_i2c_temperature::Device> request) {
+ fidl::ServerEnd<examples_i2c_temperature::Device> request) {
// Bind each connection request to the shared instance.
auto server_impl = std::make_unique<I2cTemperatureServer>(logger, i2c_channel);
return fidl::BindServer(dispatcher, std::move(request), std::move(server_impl),
@@ -24,8 +23,8 @@
}
// This method is called when a server connection is torn down.
-void I2cTemperatureServer::OnUnbound(
- fidl::UnbindInfo info, fidl::ServerEnd<fuchsia_examples_i2c_temperature::Device> server_end) {
+void I2cTemperatureServer::OnUnbound(fidl::UnbindInfo info,
+ fidl::ServerEnd<examples_i2c_temperature::Device> server_end) {
if (info.is_peer_closed()) {
FDF_LOG(DEBUG, "Client disconnected");
} else if (!info.is_user_initiated()) {
@@ -33,7 +32,7 @@
}
}
-// Protocol method in `fuchsia.examples.i2c.temperature` to return the current temperature
+// Protocol method in `examples.i2c.temperature` to return the current temperature
void I2cTemperatureServer::ReadTemperature(ReadTemperatureCompleter::Sync& completer) {
auto channel = i2c_channel_.lock();
if (!channel) {
@@ -63,7 +62,7 @@
return completer.ReplySuccess(temp_value);
}
-// Protocol method in `fuchsia.examples.i2c.temperature` to reset the temperature sensor
+// Protocol method in `examples.i2c.temperature` to reset the temperature sensor
void I2cTemperatureServer::ResetSensor(ResetSensorCompleter::Sync& completer) {
auto channel = i2c_channel_.lock();
if (!channel) {
diff --git a/src/i2c_temperature/driver/temperature_server.h b/src/i2c_temperature/driver/temperature_server.h
index ba00fb2..506ce28 100644
--- a/src/i2c_temperature/driver/temperature_server.h
+++ b/src/i2c_temperature/driver/temperature_server.h
@@ -5,27 +5,27 @@
#ifndef FUCHSIA_SDK_EXAMPLES_CC_I2C_TEMPERATURE_TEMPERATURE_SERVER_H_
#define FUCHSIA_SDK_EXAMPLES_CC_I2C_TEMPERATURE_TEMPERATURE_SERVER_H_
-#include <fidl/fuchsia.examples.i2c.temperature/cpp/wire.h>
+#include <fidl/examples.i2c.temperature/cpp/wire.h>
#include <lib/driver2/logger.h>
#include "i2c_channel.h"
namespace i2c_temperature {
-// FIDL server implementation for the `fuchsia.examples.i2c.temperature/Device` protocol
-class I2cTemperatureServer : public fidl::WireServer<fuchsia_examples_i2c_temperature::Device> {
+// FIDL server implementation for the `examples.i2c.temperature/Device` protocol
+class I2cTemperatureServer : public fidl::WireServer<examples_i2c_temperature::Device> {
public:
I2cTemperatureServer(driver::Logger* logger, std::weak_ptr<I2cChannel> i2c_channel)
: logger_(logger), i2c_channel_(i2c_channel) {}
- static fidl::ServerBindingRef<fuchsia_examples_i2c_temperature::Device> BindDeviceClient(
+ static fidl::ServerBindingRef<examples_i2c_temperature::Device> BindDeviceClient(
async_dispatcher_t* dispatcher, driver::Logger* logger, std::weak_ptr<I2cChannel> i2c_channel,
- fidl::ServerEnd<fuchsia_examples_i2c_temperature::Device> request);
+ fidl::ServerEnd<examples_i2c_temperature::Device> request);
void OnUnbound(fidl::UnbindInfo info,
- fidl::ServerEnd<fuchsia_examples_i2c_temperature::Device> server_end);
+ fidl::ServerEnd<examples_i2c_temperature::Device> server_end);
- // fidl::WireServer<fuchsia_examples_i2c_temperature::Device>
+ // fidl::WireServer<examples_i2c_temperature::Device>
void ReadTemperature(ReadTemperatureCompleter::Sync& completer) override;
diff --git a/src/i2c_temperature/fidl/BUILD.bazel b/src/i2c_temperature/fidl/BUILD.bazel
index d8ac1c3..db8ceef 100644
--- a/src/i2c_temperature/fidl/BUILD.bazel
+++ b/src/i2c_temperature/fidl/BUILD.bazel
@@ -9,11 +9,11 @@
)
fuchsia_fidl_library(
- name = "fuchsia.examples.i2c.temperature",
+ name = "examples.i2c.temperature",
srcs = [
"i2c_temperature.fidl",
],
- library = "fuchsia.examples.i2c.temperature",
+ library = "examples.i2c.temperature",
visibility = ["//visibility:public"],
deps = [
"@fuchsia_sdk//fidl/zx:zx",
@@ -21,8 +21,8 @@
)
fuchsia_fidl_llcpp_library(
- name = "fuchsia.examples.i2c.temperature_cc",
- library = ":fuchsia.examples.i2c.temperature",
+ name = "examples.i2c.temperature_cc",
+ library = ":examples.i2c.temperature",
visibility = ["//visibility:public"],
deps = [
"@fuchsia_sdk//fidl/zx:zx_llcpp_cc",
diff --git a/src/i2c_temperature/fidl/i2c_temperature.fidl b/src/i2c_temperature/fidl/i2c_temperature.fidl
index 6e3b61c..965f749 100644
--- a/src/i2c_temperature/fidl/i2c_temperature.fidl
+++ b/src/i2c_temperature/fidl/i2c_temperature.fidl
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-library fuchsia.examples.i2c.temperature;
+library examples.i2c.temperature;
using zx;
diff --git a/src/qemu_edu/README.md b/src/qemu_edu/README.md
index c85b146..1409673 100644
--- a/src/qemu_edu/README.md
+++ b/src/qemu_edu/README.md
@@ -3,7 +3,7 @@
This sample project contains a Fuchsia driver for the QEMU `edu` device, a virtual PCI
device built into the Fuchsia emulator (based on QEMU) that computes factorial values.
The driver interacts with the device hardware using the `fuchsia.hardware.pci` protocol,
-and exposes a custom FIDL protocol (`fuchsia.examples.qemuedu`) for other components to
+and exposes a custom FIDL protocol (`examples.qemuedu`) for other components to
consume.
## Building
@@ -86,6 +86,6 @@
## Source layout
* `driver/` — Source code of the `qemu_edu` PCI device driver.
-* `fidl/` — FIDL library definition for `fuchsia.examples.qemuedu`.
+* `fidl/` — FIDL library definition for `examples.qemuedu`.
* `test/` — System test component that exercises the `qemu_edu` driver.
* `tools/` — Command line tool (`eductl`) that interacts with the `qemu_edu` driver.
diff --git a/src/qemu_edu/drivers/BUILD.bazel b/src/qemu_edu/drivers/BUILD.bazel
index a88ef90..99d32ff 100644
--- a/src/qemu_edu/drivers/BUILD.bazel
+++ b/src/qemu_edu/drivers/BUILD.bazel
@@ -36,7 +36,7 @@
],
linkshared = True,
deps = [
- "//src/qemu_edu/fidl:fuchsia.examples.qemuedu_cc",
+ "//src/qemu_edu/fidl:examples.qemuedu_cc",
"@fuchsia_sdk//fidl/fuchsia.hardware.pci:fuchsia.hardware.pci_llcpp_cc",
"@fuchsia_sdk//pkg/driver2_cpp",
"@fuchsia_sdk//pkg/driver_compat",
diff --git a/src/qemu_edu/drivers/edu_server.h b/src/qemu_edu/drivers/edu_server.h
index 78642ed..e1c1ccc 100644
--- a/src/qemu_edu/drivers/edu_server.h
+++ b/src/qemu_edu/drivers/edu_server.h
@@ -6,7 +6,7 @@
#define FUCHSIA_SDK_EXAMPLES_CC_QEMU_EDU_DRIVERS_EDU_SERVER_H_
// [START imports]
-#include <fidl/fuchsia.examples.qemuedu/cpp/wire.h>
+#include <fidl/examples.qemuedu/cpp/wire.h>
#include <lib/driver2/logger.h>
#include "edu_device.h"
@@ -17,16 +17,16 @@
// [END namespace_start]
// [START fidl_server]
-// FIDL server implementation for the `fuchsia.examples.qemuedu/Device` protocol.
-class QemuEduServer : public fidl::WireServer<fuchsia_examples_qemuedu::Device> {
+// FIDL server implementation for the `examples.qemuedu/Device` protocol.
+class QemuEduServer : public fidl::WireServer<examples_qemuedu::Device> {
public:
explicit QemuEduServer(driver::Logger* logger, std::weak_ptr<edu_device::QemuEduDevice> device)
: logger_(logger), device_(std::move(device)) {}
- static fidl::ServerBindingRef<fuchsia_examples_qemuedu::Device> BindDeviceClient(
+ static fidl::ServerBindingRef<examples_qemuedu::Device> BindDeviceClient(
driver::Logger* logger, async_dispatcher_t* dispatcher,
std::weak_ptr<edu_device::QemuEduDevice> device,
- fidl::ServerEnd<fuchsia_examples_qemuedu::Device> request) {
+ fidl::ServerEnd<examples_qemuedu::Device> request) {
// Bind each connection request to a unique FIDL server instance
auto server_impl = std::make_unique<QemuEduServer>(logger, device);
return fidl::BindServer(dispatcher, std::move(request), std::move(server_impl),
@@ -34,8 +34,7 @@
}
// This method is called when a server connection is torn down.
- void OnUnbound(fidl::UnbindInfo info,
- fidl::ServerEnd<fuchsia_examples_qemuedu::Device> server_end) {
+ void OnUnbound(fidl::UnbindInfo info, fidl::ServerEnd<examples_qemuedu::Device> server_end) {
if (info.is_peer_closed()) {
FDF_LOG(DEBUG, "Client disconnected");
} else if (!info.is_user_initiated()) {
@@ -43,7 +42,7 @@
}
}
- // fidl::WireServer<fuchsia_examples_qemuedu::Device>
+ // fidl::WireServer<examples_qemuedu::Device>
void ComputeFactorial(ComputeFactorialRequestView request,
ComputeFactorialCompleter::Sync& completer) override;
diff --git a/src/qemu_edu/drivers/meta/qemu_edu.cml b/src/qemu_edu/drivers/meta/qemu_edu.cml
index 9ad84be..07005ac0 100644
--- a/src/qemu_edu/drivers/meta/qemu_edu.cml
+++ b/src/qemu_edu/drivers/meta/qemu_edu.cml
@@ -23,11 +23,11 @@
// [START expose_capabilities]
// Provide the device capability to other components
capabilities: [
- { service: 'fuchsia.examples.qemuedu.Service' },
+ { service: 'examples.qemuedu.Service' },
],
expose: [
{
- service: 'fuchsia.examples.qemuedu.Service',
+ service: 'examples.qemuedu.Service',
from: 'self',
},
],
diff --git a/src/qemu_edu/drivers/qemu_edu.cc b/src/qemu_edu/drivers/qemu_edu.cc
index 81783a9..58d2868 100644
--- a/src/qemu_edu/drivers/qemu_edu.cc
+++ b/src/qemu_edu/drivers/qemu_edu.cc
@@ -66,17 +66,17 @@
// [END device_registers]
// [START serve_outgoing]
- // Serve the fuchsia.examples.qemuedu/Service capability.
+ // Serve the examples.qemuedu/Service capability.
driver::ServiceInstanceHandler handler;
- fuchsia_examples_qemuedu::Service::Handler service(&handler);
+ examples_qemuedu::Service::Handler service(&handler);
auto result =
- service.add_device([this](fidl::ServerEnd<fuchsia_examples_qemuedu::Device> request) -> void {
+ service.add_device([this](fidl::ServerEnd<examples_qemuedu::Device> request) -> void {
QemuEduServer::BindDeviceClient(&logger(), dispatcher(), device_, std::move(request));
});
ZX_ASSERT(result.is_ok());
- result = context().outgoing()->AddService<fuchsia_examples_qemuedu::Service>(std::move(handler));
+ result = context().outgoing()->AddService<examples_qemuedu::Service>(std::move(handler));
if (result.is_error()) {
FDF_SLOG(ERROR, "Failed to add Device service", KV("status", result.status_string()));
return result.take_error();
@@ -98,11 +98,11 @@
// Construct a devfs path that matches the device nodes topological path
auto devfs_path = compat_context_->TopologicalPath(name());
- auto service_path = std::string(fuchsia_examples_qemuedu::Service::Name) + "/" +
+ auto service_path = std::string(examples_qemuedu::Service::Name) + "/" +
component::kDefaultInstance + "/" +
- fuchsia_examples_qemuedu::Service::Device::Name;
+ examples_qemuedu::Service::Device::Name;
- // Export an entry to devfs for fuchsia.examples.qemuedu as a generic device
+ // Export an entry to devfs for examples.qemuedu as a generic device
auto status = compat_context_->devfs_exporter().ExportSync(
service_path, devfs_path, fuchsia_device_fs::ExportOptions(), 0);
if (status != ZX_OK) {
diff --git a/src/qemu_edu/fidl/BUILD.bazel b/src/qemu_edu/fidl/BUILD.bazel
index 98aa50f..4944263 100644
--- a/src/qemu_edu/fidl/BUILD.bazel
+++ b/src/qemu_edu/fidl/BUILD.bazel
@@ -12,11 +12,11 @@
# [START fidl_library]
fuchsia_fidl_library(
- name = "fuchsia.examples.qemuedu",
+ name = "examples.qemuedu",
srcs = [
"qemu_edu.fidl",
],
- library = "fuchsia.examples.qemuedu",
+ library = "examples.qemuedu",
visibility = ["//visibility:public"],
deps = [
"@fuchsia_sdk//fidl/zx",
@@ -24,8 +24,8 @@
)
fuchsia_fidl_llcpp_library(
- name = "fuchsia.examples.qemuedu_cc",
- library = ":fuchsia.examples.qemuedu",
+ name = "examples.qemuedu_cc",
+ library = ":examples.qemuedu",
visibility = ["//visibility:public"],
deps = [
"@fuchsia_sdk//fidl/zx:zx_llcpp_cc",
diff --git a/src/qemu_edu/fidl/qemu_edu.fidl b/src/qemu_edu/fidl/qemu_edu.fidl
index 68f2b20..0404efd 100644
--- a/src/qemu_edu/fidl/qemu_edu.fidl
+++ b/src/qemu_edu/fidl/qemu_edu.fidl
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// [START example_snippet]
-library fuchsia.examples.qemuedu;
+library examples.qemuedu;
using zx;
diff --git a/src/qemu_edu/tests/BUILD.bazel b/src/qemu_edu/tests/BUILD.bazel
index 44f6f2a..71a455f 100644
--- a/src/qemu_edu/tests/BUILD.bazel
+++ b/src/qemu_edu/tests/BUILD.bazel
@@ -21,7 +21,7 @@
"qemu_edu_system_test.cc",
],
deps = ["@com_google_googletest//:gtest_main"] + if_fuchsia([
- "//src/qemu_edu/fidl:fuchsia.examples.qemuedu_cc",
+ "//src/qemu_edu/fidl:examples.qemuedu_cc",
"@fuchsia_sdk//pkg/fdio",
]),
)
diff --git a/src/qemu_edu/tests/qemu_edu_system_test.cc b/src/qemu_edu/tests/qemu_edu_system_test.cc
index c3f7770..6b951e8 100644
--- a/src/qemu_edu/tests/qemu_edu_system_test.cc
+++ b/src/qemu_edu/tests/qemu_edu_system_test.cc
@@ -5,7 +5,7 @@
// [START imports]
#include <dirent.h>
#include <fcntl.h>
-#include <fidl/fuchsia.examples.qemuedu/cpp/wire.h>
+#include <fidl/examples.qemuedu/cpp/wire.h>
#include <lib/fdio/directory.h>
#include <sys/types.h>
@@ -23,15 +23,15 @@
int device = open(kEduDevicePath, O_RDWR);
ASSERT_GE(device, 0);
- fidl::ClientEnd<fuchsia_examples_qemuedu::Device> client_end;
+ fidl::ClientEnd<examples_qemuedu::Device> client_end;
ASSERT_EQ(fdio_get_service_handle(device, client_end.channel().reset_and_get_address()), ZX_OK);
device_ = fidl::WireSyncClient(std::move(client_end));
}
- fidl::WireSyncClient<fuchsia_examples_qemuedu::Device>& device() { return device_; }
+ fidl::WireSyncClient<examples_qemuedu::Device>& device() { return device_; }
private:
- fidl::WireSyncClient<fuchsia_examples_qemuedu::Device> device_;
+ fidl::WireSyncClient<examples_qemuedu::Device> device_;
};
TEST_F(QemuEduSystemTest, LivenessCheck) {
diff --git a/src/qemu_edu/tools/BUILD.bazel b/src/qemu_edu/tools/BUILD.bazel
index ee17f6e..d9e6259 100644
--- a/src/qemu_edu/tools/BUILD.bazel
+++ b/src/qemu_edu/tools/BUILD.bazel
@@ -20,7 +20,7 @@
"eductl.cc",
],
deps = [
- "//src/qemu_edu/fidl:fuchsia.examples.qemuedu_cc",
+ "//src/qemu_edu/fidl:examples.qemuedu_cc",
"@fuchsia_sdk//pkg/fdio",
"@fuchsia_sdk//pkg/fidl_cpp_wire",
],
diff --git a/src/qemu_edu/tools/eductl.cc b/src/qemu_edu/tools/eductl.cc
index b654fb3..e76edce 100644
--- a/src/qemu_edu/tools/eductl.cc
+++ b/src/qemu_edu/tools/eductl.cc
@@ -17,7 +17,7 @@
// [END imports]
// [START fidl_imports]
-#include <fidl/fuchsia.examples.qemuedu/cpp/wire.h>
+#include <fidl/examples.qemuedu/cpp/wire.h>
// [END fidl_imports]
// [START device_path]
@@ -57,8 +57,8 @@
// [END cli_helpers]
// [START device_client]
-// Open a FIDL client connection to the fuchsia.examples.qemuedu.Device
-fidl::WireSyncClient<fuchsia_examples_qemuedu::Device> OpenDevice() {
+// Open a FIDL client connection to the examples.qemuedu.Device
+fidl::WireSyncClient<examples_qemuedu::Device> OpenDevice() {
int device = open(kEduDevicePath, O_RDWR);
if (device < 0) {
@@ -66,7 +66,7 @@
return {};
}
- fidl::ClientEnd<fuchsia_examples_qemuedu::Device> client_end;
+ fidl::ClientEnd<examples_qemuedu::Device> client_end;
zx_status_t st = fdio_get_service_handle(device, client_end.channel().reset_and_get_address());
if (st != ZX_OK) {
fprintf(stderr, "Failed to get service handle: %s\n", zx_status_get_string(st));