# sys::testing::ServiceDirectoryProvider

## Summary

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/sys/testing/service-directory-provider#classsys_1_1testing_1_1_service_directory_provider_1a392826488694c6b0e382bda5bf71987c(async_dispatcher_t *dispatcher)` ||
| `https://fuchsia.dev/reference/cpp/class/sys/testing/service-directory-provider#classsys_1_1testing_1_1_service_directory_provider_1a82f1855252e3cd048336db0f89bfd00d()` ||

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/sys/testing/service-directory-provider#classsys_1_1testing_1_1_service_directory_provider_1a6d95c235f8d8afb62adaae2af36fa727(https://fuchsia.dev/reference/cpp/class/fit/function-impl#classfit_1_1function__impl< Interface > handler, std::string name) const ` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/sys/testing/service-directory-provider#classsys_1_1testing_1_1_service_directory_provider_1adfa3c7003a7572ba3dd388c0cdd88829(std::unique_ptr< https://fuchsia.dev/reference/cpp/class/vfs/service#classvfs_1_1_service > service, std::string name) const ` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/sys/testing/service-directory-provider#classsys_1_1testing_1_1_service_directory_provider_1a8416f491722d39b3dc5d90afa922a454()` | `std::shared_ptr< https://fuchsia.dev/reference/cpp/class/sys/service-directory#classsys_1_1_service_directory > &` |

## Public functions

### AddService

```c++
zx_status_t AddService(
  fidl::InterfaceRequestHandler< Interface > handler,
  std::string name
) const 
```

### AddService

```c++
zx_status_t AddService(
  std::unique_ptr< vfs::Service > service,
  std::string name
) const 
```

### ServiceDirectoryProvider

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

### service_directory

```c++
std::shared_ptr< ServiceDirectory > & service_directory()
```

### \~ServiceDirectoryProvider

```c++
 ~ServiceDirectoryProvider()
```