class AddChild

Defined at line 154 of file fidling/gen/sdk/fidl/fuchsia.component.test/fuchsia.component.test/cpp/fidl/fuchsia.component.test/cpp/markers.h

Adds a component to the realm.

The `url` can be in one of the following formats:

- an absolute component URL (such as,

"fuchsia-pkg://fuchsia.com/some-package#meta/some-component.cm")

- a relative path component URL to a subpackaged component (like,

"some-subpackage#meta/subpackaged-component.cm"); or

- a relative fragment-only URL (like, `#meta/other-component.cm`;

see https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only)

indicating the path to a component manifest in the `pkg_dir` supplied

to `RealmBuilderFactory::Create*()`.

The realm builder client typically passes a handle to its own `/pkg`

directory, and bundles the `other-component` into the same package.

Of the three URL types, _only_ component declarations added via the

fragment-only URL can be modified, via

`GetComponentDecl`/`ReplaceComponentDecl` because realm builder actually

performs its own component resolution from the component's manifest and

files bundled in the provided `pkg_dir` (typically from the package

shared by the realm builder client component and the components added

via fragment-only URL).

Errors:

- `CHILD_ALREADY_EXISTS`: this realm already contains a child with the

given name.

- `INVALID_MANIFEST_EXTENSION`: `url` does not end with `.cm`

- `DECL_NOT_FOUND`: The test package does not contain the component

declaration referenced by a fragment-only component URL.

- `DECL_READ_ERROR`: Encountered an I/O error when attempting to read a

component declaration referenced by a fragment-only component URL from

the test package.

- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called

for this realm, and thus this `Realm` channel can no longer be used.

Public Members

static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal