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.
|
#include "celix_types.h"
#include "celix_bundle_state.h"
#include "celix_properties.h"
#include "celix_array_list.h"
#include "celix_version.h"
#include "celix_framework_export.h"
Go to the source code of this file.
Classes | |
struct | celix_bundle_service_list_entry |
struct | celix_bundle_service_tracker_list_entry |
Typedefs | |
typedef struct celix_bundle_service_list_entry | celix_bundle_service_list_entry_t |
typedef struct celix_bundle_service_tracker_list_entry | celix_bundle_service_tracker_list_entry_t |
Functions | |
CELIX_FRAMEWORK_EXPORT long | celix_bundle_getId (const celix_bundle_t *bnd) |
Return the bundle id. More... | |
CELIX_FRAMEWORK_EXPORT celix_bundle_state_e | celix_bundle_getState (const celix_bundle_t *bnd) |
Return the bundle state. More... | |
CELIX_FRAMEWORK_EXPORT char * | celix_bundle_getEntry (const celix_bundle_t *bnd, const char *path) |
CELIX_FRAMEWORK_EXPORT char * | celix_bundle_getDataFile (const celix_bundle_t *bnd, const char *path) |
const CELIX_FRAMEWORK_EXPORT char * | celix_bundle_getManifestValue (const celix_bundle_t *bnd, const char *attribute) |
Get a manifest attribute value from the bundle manifest. More... | |
const CELIX_FRAMEWORK_EXPORT char * | celix_bundle_getGroup (const celix_bundle_t *bnd) |
Return the group of the bundle. Groups are used to order bundles. Note the return value is valid as long as the bundle is installed. More... | |
const CELIX_FRAMEWORK_EXPORT char * | celix_bundle_getSymbolicName (const celix_bundle_t *bnd) |
Return the symbolic name of the bundle. Note the return value is valid as long as the bundle is installed. More... | |
const CELIX_FRAMEWORK_EXPORT char * | celix_bundle_getName (const celix_bundle_t *bnd) |
Return the name of the bundle. Note the return value is valid as long as the bundle is installed. More... | |
const CELIX_FRAMEWORK_EXPORT char * | celix_bundle_getDescription (const celix_bundle_t *bnd) |
Return the description of the bundle. Note the return value is valid as long as the bundle is installed. More... | |
CELIX_FRAMEWORK_EXPORT char * | celix_bundle_getLocation (const celix_bundle_t *bnd) |
Return the update location of the bundle. The location the location passed to celix_bundleContext_installBundle when a bundle is installed. For the framework bundle, the location will be NULL. More... | |
const CELIX_FRAMEWORK_EXPORT celix_version_t * | celix_bundle_getVersion (const celix_bundle_t *bnd) |
Return the bundle version. Note the return value is valid as long as the bundle is installed. More... | |
CELIX_FRAMEWORK_EXPORT bool | celix_bundle_isSystemBundle (const celix_bundle_t *bnd) |
Return whether the bundle is the system bundle. More... | |
CELIX_FRAMEWORK_EXPORT celix_array_list_t * | celix_bundle_listRegisteredServices (const celix_bundle_t *bnd) |
CELIX_FRAMEWORK_EXPORT void | celix_bundle_destroyRegisteredServicesList (celix_array_list_t *list) |
CELIX_FRAMEWORK_EXPORT celix_array_list_t * | celix_bundle_listServiceTrackers (const celix_bundle_t *bnd) |
typedef struct celix_bundle_service_list_entry celix_bundle_service_list_entry_t |
Service Tracker Info provided to the service tracker tracker callbacks.
CELIX_FRAMEWORK_EXPORT void celix_bundle_destroyRegisteredServicesList | ( | celix_array_list_t * | list | ) |
Utils function to free memory for the return of a celix_bundle_listRegisteredServices call.
CELIX_FRAMEWORK_EXPORT char* celix_bundle_getDataFile | ( | const celix_bundle_t * | bnd, |
const char * | path | ||
) |
Return a use-able entry path for the provided relative path to a bundle persistent storage.
For example if there is a resource entry in the bundle persistent storage at path 'resources/counters.txt` this call will return a relative path to entry in the bundle persistent storage. .cache/bundle5/storage/resources/counters.txt
A provided path is always relative to the bundle persistent storage root and can start with a "/". A provided path NULL, "", "." or "/" indicates the root of this bundle cache store.
The returned entry path should can be treated as read-write.
The caller is responsible for freeing the returned path entry.
path | The relative path to a bundle persistent storage entry. |
bnd | The bundle. |
const CELIX_FRAMEWORK_EXPORT char* celix_bundle_getDescription | ( | const celix_bundle_t * | bnd | ) |
Return the description of the bundle. Note the return value is valid as long as the bundle is installed.
CELIX_FRAMEWORK_EXPORT char* celix_bundle_getEntry | ( | const celix_bundle_t * | bnd, |
const char * | path | ||
) |
Return a use-able entry path for the provided relative path to a bundle resource cache.
For example if there is a resource entry in the bundle at path 'META-INF/descriptors/foo.descriptor` this call will return a relative path to the extracted location of the bundle resource, e.g.: .cache/bundle5/version0.0/META-INF/descriptors/foo.descriptor
A provided path is always relative to the bundle root and can start with a "/". A provided path NULL, "", "." or "/" indicates the root of this bundle.
The returned entry path should be treated as read-only, use celix_bundle_getDataFile to access the bundle's persistent storage.
The caller is responsible for freeing the returned path entry.
path | The relative path to a bundle resource. |
bnd | The bundle. |
const CELIX_FRAMEWORK_EXPORT char* celix_bundle_getGroup | ( | const celix_bundle_t * | bnd | ) |
Return the group of the bundle. Groups are used to order bundles. Note the return value is valid as long as the bundle is installed.
CELIX_FRAMEWORK_EXPORT long celix_bundle_getId | ( | const celix_bundle_t * | bnd | ) |
Return the bundle id.
bnd | The bundle |
CELIX_FRAMEWORK_EXPORT char* celix_bundle_getLocation | ( | const celix_bundle_t * | bnd | ) |
Return the update location of the bundle. The location the location passed to celix_bundleContext_installBundle when a bundle is installed. For the framework bundle, the location will be NULL.
const CELIX_FRAMEWORK_EXPORT char* celix_bundle_getManifestValue | ( | const celix_bundle_t * | bnd, |
const char * | attribute | ||
) |
Get a manifest attribute value from the bundle manifest.
bnd | The bundle. |
attribute | The attribute to get the value from. |
const CELIX_FRAMEWORK_EXPORT char* celix_bundle_getName | ( | const celix_bundle_t * | bnd | ) |
Return the name of the bundle. Note the return value is valid as long as the bundle is installed.
CELIX_FRAMEWORK_EXPORT celix_bundle_state_e celix_bundle_getState | ( | const celix_bundle_t * | bnd | ) |
Return the bundle state.
bnd | The bundle |
const CELIX_FRAMEWORK_EXPORT char* celix_bundle_getSymbolicName | ( | const celix_bundle_t * | bnd | ) |
Return the symbolic name of the bundle. Note the return value is valid as long as the bundle is installed.
const CELIX_FRAMEWORK_EXPORT celix_version_t* celix_bundle_getVersion | ( | const celix_bundle_t * | bnd | ) |
Return the bundle version. Note the return value is valid as long as the bundle is installed.
CELIX_FRAMEWORK_EXPORT bool celix_bundle_isSystemBundle | ( | const celix_bundle_t * | bnd | ) |
Return whether the bundle is the system bundle.
CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundle_listRegisteredServices | ( | const celix_bundle_t * | bnd | ) |
Return a array list of registered service info entries for this bundle.
ctx | The bundle context |
bndId | The bundle id for which the services should be listed |
CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundle_listServiceTrackers | ( | const celix_bundle_t * | bnd | ) |
Returns a array list of service tracker info entries for this bundle.
ctx | The bundle context |
bndId | The bundle id for which the services should be listed |