ListenersΒΆ
-
using
cppmicroservices::ServiceListener = typedef std::function<void(const ServiceEvent&)> A
ServiceEventlistener.A
ServiceListenercan be any callable object and is registered with the Framework using the BundleContext#AddServiceListener(const ServiceListener&, const std::string&) method.ServiceListenerinstances are called with aServiceEventobject when a service has been registered, unregistered, or modified.- See
- ServiceEvent
-
using
cppmicroservices::BundleListener = typedef std::function<void(const BundleEvent&)> A
BundleEventlistener.When a
BundleEventis fired, it is asynchronously (if threading support is enabled) delivered to aBundleListener. The Framework deliversBundleEventobjects to aBundleListenerin order and does not concurrently call aBundleListener.A
BundleListenercan be any callable object and is registered with the Framework using the BundleContext#AddBundleListener(const BundleListener&) method.BundleListenerinstances are called with aBundleEventobject when a bundle has been installed, resolved, started, stopped, updated, unresolved, or uninstalled.- See
- BundleEvent
-
using
cppmicroservices::FrameworkListener = typedef std::function<void(const FrameworkEvent&)> A
FrameworkEventlistener.When a
BundleEventis fired, it is asynchronously (if threading support is enabled) delivered to aFrameworkListener. The Framework deliversFrameworkEventobjects to aFrameworkListenerin order and does not concurrently call aFrameworkListener.A
FrameworkListenercan be any callable object and is registered with the Framework using the BundleContext#AddFrameworkListener(const FrameworkListener&) method.FrameworkListenerinstances are called with aFrameworkEventobject when a framework life-cycle event or notification message occured.- See
- FrameworkEvent
- template <class R>
-
ServiceListener cppmicroservices::ServiceListenerMemberFunctor(R * receiver, void(R::*)(const ServiceEvent &) callback) A convenience function that binds the member function
callbackof an object of typeRand returns aServiceListenerobject.This object can then be passed into
AddServiceListener().Deprecated since version 3.1.0: This function exists only to maintain backwards compatibility and will be removed in the next major release. Use std::bind instead.
- Return
- a ServiceListener object.
- Template Parameters
R: The type containing the member function.
- Parameters
receiver: The object of type R.callback: The member function pointer.
- template <class R>
-
BundleListener cppmicroservices::BundleListenerMemberFunctor(R * receiver, void(R::*)(const BundleEvent &) callback) A convenience function that binds the member function
callbackof an object of typeRand returns aBundleListenerobject.This object can then be passed into
AddBundleListener().Deprecated since version 3.1.0: This function exists only to maintain backwards compatibility and will be removed in the next major release. Use std::bind instead.
- Return
- a BundleListener object.
- Template Parameters
R: The type containing the member function.
- Parameters
receiver: The object of type R.callback: The member function pointer.
- template <class R>
-
FrameworkListener cppmicroservices::BindFrameworkListenerToFunctor(R * receiver, void(R::*)(const FrameworkEvent &) callback) A convenience function that binds the member function
callbackof an object of typeRand returns aFrameworkListenerobject.This object can then be passed into
AddFrameworkListener().Deprecated since version 3.1.0: This function exists only to maintain backwards compatibility and will be removed in the next major release. Use std::bind instead.
- Return
- a FrameworkListener object.
- Template Parameters
R: The type containing the member function.
- Parameters
receiver: The object of type R.callback: The member function pointer.