Apache Celix  2.3.0
An implementation of the OSGi specification adapted to C and C++
Public Attributes | List of all members
celix_service_tracking_options Struct Reference

Service Tracker Options used to fine tune which services to track and the callback to be used for the tracked services. More...

#include <celix_bundle_context.h>

Collaboration diagram for celix_service_tracking_options:
Collaboration graph
[legend]

Public Attributes

celix_service_filter_options_t filter CELIX_OPTS_INIT
 The service filter options, used to setup the filter for the service to track. More...
 
void *callbackHandle CELIX_OPTS_INIT
 The optional callback pointer used in all the provided callback function (set, add, remove, setWithProperties, etc). More...
 
void(* set )(void *handle, void *svc) CELIX_OPTS_INIT
 The optional set callback will be called when a new highest ranking service is available conform the provided service filter options. More...
 
void(* setWithProperties )(void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT
 The optional setWithProperties callback is handled as the set callback, but with the addition that the service properties will also be provided to the callback. More...
 
void(* setWithOwner )(void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT
 The optional setWithOwner callback is handled as the set callback, but with the addition that the service properties and the bundle owning the service will also be provided to the callback. More...
 
void(* add )(void *handle, void *svc) CELIX_OPTS_INIT
 The optional add callback will be called for every current and future service found conform the provided service filter options as long as the tracker is active. More...
 
void(* addWithProperties )(void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT
 The optional addWithProperties callback is handled as the add callback, but with the addition that the service properties will also be provided to the callback. More...
 
void(* addWithOwner )(void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT
 The optional addWithOwner callback is handled as the add callback, but with the addition that the service properties and the bundle owning the service will also be provided to the callback. More...
 
void(* remove )(void *handle, void *svc) CELIX_OPTS_INIT
 The optional remove callback will be called for every service conform the provided service filter options that is unregistered. When the remove call is finished the removed services should be considered invalid. This means that the callback provider should ensure that the removed service is not in use or going to be used after the remove callback is finished. More...
 
void(* removeWithProperties )(void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT
 The optional removeWithProperties callback is handled as the remove callback, but with the addition that the service properties will also be provided to the callback. More...
 
void(* removeWithOwner )(void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT
 The optional removeWithOwner callback is handled as the remove callback, but with the addition that the service properties and the bundle owning the service will also be provided to the callback. More...
 
void *trackerCreatedCallbackData CELIX_OPTS_INIT
 Data for the trackerCreatedCallback. More...
 
void(* trackerCreatedCallback )(void *trackerCreatedCallbackData) CELIX_OPTS_INIT
 The callback called when the tracker has ben created (and is active) when using a async call. More...
 

Detailed Description

Service Tracker Options used to fine tune which services to track and the callback to be used for the tracked services.

Member Data Documentation

◆ add

void(* celix_service_tracking_options::add) (void *handle, void *svc) CELIX_OPTS_INIT

The optional add callback will be called for every current and future service found conform the provided service filter options as long as the tracker is active.

Parameters
handleThe callbackHandle pointer as provided in the service tracker options.
svcThe service pointer of a service matching the provided service filter options.

◆ addWithOwner

void(* celix_service_tracking_options::addWithOwner) (void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT

The optional addWithOwner callback is handled as the add callback, but with the addition that the service properties and the bundle owning the service will also be provided to the callback.

◆ addWithProperties

void(* celix_service_tracking_options::addWithProperties) (void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT

The optional addWithProperties callback is handled as the add callback, but with the addition that the service properties will also be provided to the callback.

◆ CELIX_OPTS_INIT [1/3]

celix_service_filter_options_t filter celix_service_tracking_options::CELIX_OPTS_INIT

The service filter options, used to setup the filter for the service to track.

◆ CELIX_OPTS_INIT [2/3]

void* callbackHandle celix_service_tracking_options::CELIX_OPTS_INIT

The optional callback pointer used in all the provided callback function (set, add, remove, setWithProperties, etc).

◆ CELIX_OPTS_INIT [3/3]

void* trackerCreatedCallbackData celix_service_tracking_options::CELIX_OPTS_INIT

Data for the trackerCreatedCallback.

◆ remove

void(* celix_service_tracking_options::remove) (void *handle, void *svc) CELIX_OPTS_INIT

The optional remove callback will be called for every service conform the provided service filter options that is unregistered. When the remove call is finished the removed services should be considered invalid. This means that the callback provider should ensure that the removed service is not in use or going to be used after the remove callback is finished.

Parameters
handleThe callbackHandle pointer as provided in the service tracker options.
svcThe service pointer of a service matching the provided service filter options.

◆ removeWithOwner

void(* celix_service_tracking_options::removeWithOwner) (void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT

The optional removeWithOwner callback is handled as the remove callback, but with the addition that the service properties and the bundle owning the service will also be provided to the callback.

◆ removeWithProperties

void(* celix_service_tracking_options::removeWithProperties) (void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT

The optional removeWithProperties callback is handled as the remove callback, but with the addition that the service properties will also be provided to the callback.

◆ set

void(* celix_service_tracking_options::set) (void *handle, void *svc) CELIX_OPTS_INIT

The optional set callback will be called when a new highest ranking service is available conform the provided service filter options.

Parameters
handleThe callbackHandle pointer as provided in the service tracker options.
svcThe service pointer of the highest ranking service.

◆ setWithOwner

void(* celix_service_tracking_options::setWithOwner) (void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT

The optional setWithOwner callback is handled as the set callback, but with the addition that the service properties and the bundle owning the service will also be provided to the callback.

◆ setWithProperties

void(* celix_service_tracking_options::setWithProperties) (void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT

The optional setWithProperties callback is handled as the set callback, but with the addition that the service properties will also be provided to the callback.

◆ trackerCreatedCallback

void(* celix_service_tracking_options::trackerCreatedCallback) (void *trackerCreatedCallbackData) CELIX_OPTS_INIT

The callback called when the tracker has ben created (and is active) when using a async call.

If a asyns track service is combined with a sync stop tracker, it can happen that "stop tracker" happens before the "create tracker" event is processed. In this case the asyncCallback will not be called.


The documentation for this struct was generated from the following file: