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_tracked_service_use_options Struct Reference

Options for using services tracked by a service tracker. These options enable specifying callbacks to be invoked for each tracked service that matches the selection criteria. If multiple callbacks are provided, each will be called for every matching service. More...

#include <celix_bundle_context.h>

Public Attributes

void *callbackHandle CELIX_OPTS_INIT
 An optional pointer to a user-defined context or data structure, passed to all specified callback functions (use, useWithProperties, and useWithOwner). More...
 
void(* use )(void *handle, void *svc) CELIX_OPTS_INIT
 An optional callback invoked for each tracked service that matches the selection criteria. This callback does not receive the service's properties or information about the service's owning bundle. More...
 
void(* useWithProperties )(void *handle, void *svc, const celix_properties_t *props) CELIX_OPTS_INIT
 An optional callback invoked for each tracked service that matches the selection criteria, providing the service's properties. This enables the callback to utilize additional metadata associated with the service. More...
 
void(* useWithOwner )(void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *svcOwner) CELIX_OPTS_INIT
 An optional callback invoked for each tracked service that matches the selection criteria, along with the service's properties and the service's owning bundle. More...
 

Detailed Description

Options for using services tracked by a service tracker. These options enable specifying callbacks to be invoked for each tracked service that matches the selection criteria. If multiple callbacks are provided, each will be called for every matching service.

Member Data Documentation

◆ CELIX_OPTS_INIT

void* callbackHandle celix_tracked_service_use_options::CELIX_OPTS_INIT

An optional pointer to a user-defined context or data structure, passed to all specified callback functions (use, useWithProperties, and useWithOwner).

Default value: NULL.

◆ use

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

An optional callback invoked for each tracked service that matches the selection criteria. This callback does not receive the service's properties or information about the service's owning bundle.

The svc pointer is only valid during the callback.

Default value: NULL.

◆ useWithOwner

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

An optional callback invoked for each tracked service that matches the selection criteria, along with the service's properties and the service's owning bundle.

The svc, props, and svcOwner pointers are only valid during the callback.

Default value: NULL.

◆ useWithProperties

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

An optional callback invoked for each tracked service that matches the selection criteria, providing the service's properties. This enables the callback to utilize additional metadata associated with the service.

The svc and props pointers are only valid during the callback.

Default value: NULL.


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