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.
|
An installed bundle in the Celix framework. More...
#include <Bundle.h>
Public Member Functions | |
Bundle (celix_bundle_t *_cBnd) | |
long | getId () const |
get the bundle id. More... | |
std::string | getEntry (const std::string &path) const |
Get a use-able entry path for the provided relative path to a bundle resource cache. More... | |
std::string | getDataFile (const std::string &path) const |
Return a use-able entry path for the provided relative path to a bundle persistent storage. More... | |
std::string | getManifestValue (const std::string &attribute) const |
Get a manifest attribute value from the bundle manifest. More... | |
std::string | getSymbolicName () const |
the symbolic name of the bundle. More... | |
std::string | getName () const |
The name of the bundle. More... | |
std::string | getGroup () const |
The group of the bundle. More... | |
std::string | getDescription () const |
The description of the bundle. More... | |
std::string | getLocation () const |
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 "". More... | |
celix::BundleState | getState () const |
The current bundle state. More... | |
bool | isSystemBundle () const |
whether the bundle is the system (framework) bundle More... | |
celix_bundle_t * | getCBundle () const |
Get the C bundle handle. More... | |
An installed bundle in the Celix framework.
Each bundle installed in the Celix framework must have an associated Bundle object. A bundle must have a unique identity, a long, chosen by the Celix framework.
std::string_view
values must be null terminated strings.
|
inlineexplicit |
|
inline |
Get the C bundle handle.
|
inline |
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.
path | The relative path to a bundle persistent storage entry. |
|
inline |
The description of the bundle.
|
inline |
Get 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 path is always relative to the bundle root and can start with a "/". A path "." or "/" indicated 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.
path | The relative path to a bundle resource. |
|
inline |
The group of the bundle.
|
inline |
get the bundle id.
|
inline |
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 "".
|
inline |
Get a manifest attribute value from the bundle manifest.
attribute | The attribute to get the value from. |
|
inline |
The name of the bundle.
|
inline |
The current bundle state.
|
inline |
the symbolic name of the bundle.
|
inline |
whether the bundle is the system (framework) bundle