Stop receiving further notifications. Ends background activity.
Syntax
void ServiceInterfaceProxy::StopFindService(FindServiceHandle handle)
Parameters
in |
| The |
Returns
void
Precondition
- This API should not be called if any user-defined mutex is locked inside
FindServiceHandler
and the thread from where this API is called.
Thread-safety, Reentrance, Result Delivery
- Threadsafe : FALSE for same FindServiceHandle instance, TRUE for different instances
- Reentrant : FALSE for same FindServiceHandle instance, TRUE for different instances
- Synchronous : TRUE
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();
}