Stop receiving further notifications. Ends background activity.

Syntax

void ServiceInterfaceProxy::StopFindService(FindServiceHandle handle)

Parameters

in

handle

The FindServiceHandle returned by the FindService() method with handler registration has to be provided as input parameter.

Returns

void

Precondition

Thread-safety, Reentrance, Result Delivery

Example

void RPortExampleServiceClient::ShutdownClient() noexcept {
  if (IsClientConnected()) {
    uptr_consumer_proxy_->ExampleOverLimitEvent.Unsubscribe();
    uptr_consumer_proxy_->ExampleOverLimitEvent.UnsetReceiveHandler();
    uptr_consumer_proxy_->ExampleOverLimitEvent.UnsetSubscriptionStateHandler();
    uptr_consumer_proxy_->StopFindService(opt_find_service_handle_.value());
  }
  if (opt_find_service_handle_.has_value()) {
    opt_find_service_handle_.value().Deactivate();
  }
  service_provider_found_ = false;
  uptr_consumer_proxy_.reset();
}