# component::OutgoingDirectory

## Summary

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a5b585ba469feff30c4325c80a2f95cfd(async_dispatcher_t *dispatcher)` ||
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a9cc709341e2fa1aace50034e5012e4d9()` ||
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1ac5263d34fb56fcece7e150650f40c848(https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory &&)` ||
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a9c3dc6ebfd9d036c7f48bcffc5ba6015(const https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory &)` ||
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1aa81b8854d56347b216e1f183c6bb080a()` ||

| ### Public static attributes ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1aeef255bfa4be0a511b20b05e0546dd2a = "default"[]` | `constexpr const char` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a8214a4981918da7248ae43f4b520019c = "svc"[]` | `constexpr const char` |

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a9fec5260253e4fb034c2608ab49bc59c(https://fuchsia.dev/reference/cpp/other/singletonfidl/client-end#singletonfidl_1_1_client_end< fuchsia_io::Directory > remote_dir, std::string_view directory_name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a0326a311914fd60420443f0b7a7fc27c(https://fuchsia.dev/reference/cpp/other/singletonfidl/client-end#singletonfidl_1_1_client_end< fuchsia_io::Directory > remote_dir, std::string_view path, std::string_view directory_name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1af666aee5a5201ee06836e707e495cc9d(std::unique_ptr< ServerImpl > impl, std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a658323b0820ea67a995aa789d2052a37(std::string_view path, std::unique_ptr< ServerImpl > impl, std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1ac8776b4a2fd52320b5fc2983c45d9e21(ServiceInstanceHandler handler, std::string_view instance)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a4a3dfe2c2c9f567996646ad789eb16db(ServiceInstanceHandler handler, std::string_view service, std::string_view instance)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a05fcc0193b68522483300ec2e3d32572(ServiceInstanceHandler handler, std::string_view path, std::string_view instance)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a1c72b7da1be41218a6d9343af3247e78(ServiceInstanceHandler handler, std::string_view path, std::string_view service, std::string_view instance)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a99f837ceb6dcd9eb865bc9a21aa69a82(https://fuchsia.dev/reference/cpp/class/fit/function-impl#classfit_1_1function__impl< Protocol > handler, std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a80ee364db28cb3db01396cfd8abaf3e8(https://fuchsia.dev/reference/cpp/class/fit/function-impl#classfit_1_1function__impl handler, std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1abca29769b1a5d37ad985261c362c32cf(std::string_view path, https://fuchsia.dev/reference/cpp/class/fit/function-impl#classfit_1_1function__impl< Protocol > handler, std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a80a0472940f35b3bb5a6838510e97103(https://fuchsia.dev/reference/cpp/class/fit/function-impl#classfit_1_1function__impl handler, std::string_view path, std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a95b4c4b429f7b113445d54e5fee375be(std::string_view directory_name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1ac3e1e6bd838288c6a8ad91ce6cdde5a2(std::string_view path, std::string_view directory_name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a275e5a8e1aafb32f6fb6d835f31fd37e(std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1adb07ce62071cc48ef2e547aa63aec696(std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a5fd0d72622e785d91cf9bb9ea779f9d6(std::string_view path, std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1aa512d41c64dd932cc1f421ee6230c34d(std::string_view directory, std::string_view name)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a4faad9f6649529df5a89dd8405709145(std::string_view instance)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a2bc4bf54adde7142918e6924b41197d1(std::string_view service, std::string_view instance)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1aaab27b8fec351daff69dba5aa207a2ae(std::string_view path, std::string_view instance)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1ab6c84a1ec342e005cfdc0d6a58d82597(std::string_view path, std::string_view service, std::string_view instance)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1af173d35739b10dd3858539065883bb48(https://fuchsia.dev/reference/cpp/other/singletonfidl/server-end#singletonfidl_1_1_server_end< fuchsia_io::Directory > directory_server_end)` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1ac5fc65a20528859080f7a74c6b6f0347()` | `https://fuchsia.dev/reference/cpp/other/singletonzx/result#singletonzx_1_1result` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1af50276843100e4879237aa4dd1e338cf(https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory &&) noexcept` | `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory &` |
| `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory_1a352e883eae65c03186a02517975243c1(const https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory &)=delete` | `https://fuchsia.dev/reference/cpp/class/component/outgoing-directory#classcomponent_1_1_outgoing_directory &` |

## Public static attributes

### kDefaultServiceInstance

```c++
constexpr const char kDefaultServiceInstance[] = "default"
```

### kServiceDirectory

```c++
constexpr const char kServiceDirectory[] = "svc"
```

## Public functions

### AddDirectory

```c++
zx::result AddDirectory(
  fidl::ClientEnd< fuchsia_io::Directory > remote_dir,
  std::string_view directory_name
)
```

### AddDirectoryAt

```c++
zx::result AddDirectoryAt(
  fidl::ClientEnd< fuchsia_io::Directory > remote_dir,
  std::string_view path,
  std::string_view directory_name
)
```

### AddProtocol

```c++
zx::result AddProtocol(
  std::unique_ptr< ServerImpl > impl,
  std::string_view name
)
```

### AddProtocolAt

```c++
zx::result AddProtocolAt(
  std::string_view path,
  std::unique_ptr< ServerImpl > impl,
  std::string_view name
)
```

### AddService

```c++
zx::result AddService(
  ServiceInstanceHandler handler,
  std::string_view instance
)
```

### AddService

```c++
zx::result AddService(
  ServiceInstanceHandler handler,
  std::string_view service,
  std::string_view instance
)
```

### AddServiceAt

```c++
zx::result AddServiceAt(
  ServiceInstanceHandler handler,
  std::string_view path,
  std::string_view instance
)
```

### AddServiceAt

```c++
zx::result AddServiceAt(
  ServiceInstanceHandler handler,
  std::string_view path,
  std::string_view service,
  std::string_view instance
)
```

### AddUnmanagedProtocol

```c++
zx::result AddUnmanagedProtocol(
  TypedHandler< Protocol > handler,
  std::string_view name
)
```

### AddUnmanagedProtocol

```c++
zx::result AddUnmanagedProtocol(
  AnyHandler handler,
  std::string_view name
)
```

### AddUnmanagedProtocolAt

```c++
zx::result AddUnmanagedProtocolAt(
  std::string_view path,
  TypedHandler< Protocol > handler,
  std::string_view name
)
```

### AddUnmanagedProtocolAt

```c++
zx::result AddUnmanagedProtocolAt(
  AnyHandler handler,
  std::string_view path,
  std::string_view name
)
```

### OutgoingDirectory

```c++
 OutgoingDirectory(
  async_dispatcher_t *dispatcher
)
```

### OutgoingDirectory

```c++
 OutgoingDirectory()=delete
```

### OutgoingDirectory

```c++
 OutgoingDirectory(
  OutgoingDirectory &&
) noexcept
```

### OutgoingDirectory

```c++
 OutgoingDirectory(
  const OutgoingDirectory &
)=delete
```

### RemoveDirectory

```c++
zx::result RemoveDirectory(
  std::string_view directory_name
)
```

### RemoveDirectoryAt

```c++
zx::result RemoveDirectoryAt(
  std::string_view path,
  std::string_view directory_name
)
```

### RemoveProtocol

```c++
zx::result RemoveProtocol(
  std::string_view name
)
```

### RemoveProtocol

```c++
zx::result RemoveProtocol(
  std::string_view name
)
```

### RemoveProtocolAt

```c++
zx::result RemoveProtocolAt(
  std::string_view path,
  std::string_view name
)
```

### RemoveProtocolAt

```c++
zx::result RemoveProtocolAt(
  std::string_view directory,
  std::string_view name
)
```

### RemoveService

```c++
zx::result RemoveService(
  std::string_view instance
)
```

### RemoveService

```c++
zx::result RemoveService(
  std::string_view service,
  std::string_view instance
)
```

### RemoveServiceAt

```c++
zx::result RemoveServiceAt(
  std::string_view path,
  std::string_view instance
)
```

### RemoveServiceAt

```c++
zx::result RemoveServiceAt(
  std::string_view path,
  std::string_view service,
  std::string_view instance
)
```

### Serve

```c++
zx::result Serve(
  fidl::ServerEnd< fuchsia_io::Directory > directory_server_end
)
```

### ServeFromStartupInfo

```c++
zx::result ServeFromStartupInfo()
```

### operator=

```c++
OutgoingDirectory & operator=(
  OutgoingDirectory &&
) noexcept
```

### operator=

```c++
OutgoingDirectory & operator=(
  const OutgoingDirectory &
)=delete
```

### \~OutgoingDirectory

```c++
 ~OutgoingDirectory()
```