Celix  2.2.0
An implementation of the OSGi specification adapted to C and C++
Functions
celix_bundle.h File Reference
#include "celix_types.h"
#include "bundle_state.h"
Include dependency graph for celix_bundle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

long celix_bundle_getId (const celix_bundle_t *bnd)
 
celix_bundle_state_e celix_bundle_getState (const celix_bundle_t *bnd)
 
char * celix_bundle_getEntry (const celix_bundle_t *bnd, const char *path)
 
const char * celix_bundle_getGroup (const celix_bundle_t *bnd)
 
const char * celix_bundle_getSymbolicName (const celix_bundle_t *bnd)
 

Function Documentation

char* celix_bundle_getEntry ( const celix_bundle_t *  bnd,
const char *  path 
)

Returns a the use-able entry path for the provided relative path to a bundle resource.

For example if there is a resource entry in the bundle at path 'META-INF/descriptors/foo.descriptor` this call will return a absolute or relative path to the extracted location of the bundle resource, e.g.: .cache/bundle5/version0.0/META-INF/descriptors/foo.descriptor

The caller is responsible for freeing the returned path entry.

Parameters
bndThe bundle
Returns
A use-able path to the bundle resource entry of NULL if the entry is not found.
const char* celix_bundle_getGroup ( const celix_bundle_t *  bnd)
long celix_bundle_getId ( const celix_bundle_t *  bnd)

Returns the bundle id.

Parameters
bndThe bundle
Returns
The bundle id or < 0 if something went wrong.
celix_bundle_state_e celix_bundle_getState ( const celix_bundle_t *  bnd)

Returns the bundle state.

Parameters
bndThe bundle
Returns
The bundle state or OSGI_FRAMEWORK_BUNDLE_UNKNOWN if something went wrong.
const char* celix_bundle_getSymbolicName ( const celix_bundle_t *  bnd)