Apache Celix  latest
Apache Celix is a framework for C, C++14 and C++17 to develop dynamic modular software applications using component and in-process service-oriented programming.
Public Attributes | List of all members
celix_service_use_options Struct Reference

Service Use Options used to fine tune which services to use and which callbacks to use. More...

#include <celix_bundle_context.h>

Collaboration diagram for celix_service_use_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...
 
double waitTimeoutInSeconds CELIX_OPTS_INIT
 An optional timeout (in seconds), if > 0 the use service call will block until the timeout is expired or when at least one service is found. Note that it will be ignored when use service on the event loop. Default (0) More...
 
void *callbackHandle CELIX_OPTS_INIT
 The optional callback pointer used in all the provided callback function (use, useWithProperties, and useWithOwner). More...
 
void(* use )(void *handle, void *svc) CELIX_OPTS_INIT
 The optional use callback will be called when for every services found conform the service filter options. More...
 
void(* useWithProperties )(void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT
 The optional useWithProperties callback is handled as the use callback, but with the addition that the service properties will also be provided to the callback. More...
 
void(* useWithOwner )(void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT
 The optional useWithOwner callback is handled as the yse callback, but with the addition that the service properties and the bundle owning the service will also be provided to the callback. More...
 

Detailed Description

Service Use Options used to fine tune which services to use and which callbacks to use.

If multiple use callbacks are set, all set callbacks will be called for every service found.

Member Data Documentation

◆ CELIX_OPTS_INIT [1/3]

celix_service_filter_options_t filter celix_service_use_options::CELIX_OPTS_INIT

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

◆ CELIX_OPTS_INIT [2/3]

double waitTimeoutInSeconds celix_service_use_options::CELIX_OPTS_INIT

An optional timeout (in seconds), if > 0 the use service call will block until the timeout is expired or when at least one service is found. Note that it will be ignored when use service on the event loop. Default (0)

Only applicable when using the celix_bundleContext_useService or celix_bundleContext_useServiceWithOptions (use single service calls).

◆ CELIX_OPTS_INIT [3/3]

void* callbackHandle celix_service_use_options::CELIX_OPTS_INIT

The optional callback pointer used in all the provided callback function (use, useWithProperties, and useWithOwner).

◆ use

void(* celix_service_use_options::use) (void *handle, void *svc) CELIX_OPTS_INIT

The optional use callback will be called when for every services found conform the service filter options.

  • in case of findServices - or only for the highest ranking service found - in case of findService -.
Parameters
handleThe callbackHandle pointer as provided in the service tracker options.
svcThe service pointer of the highest ranking service.

◆ useWithOwner

void(* celix_service_use_options::useWithOwner) (void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT

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

◆ useWithProperties

void(* celix_service_use_options::useWithProperties) (void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT

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


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