celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pepijn Noltes (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CELIX-439) Add bundle functions to reduce the need of bundle archive/revision/module
Date Tue, 10 Apr 2018 19:01:00 GMT

     [ https://issues.apache.org/jira/browse/CELIX-439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pepijn Noltes updated CELIX-439:
--------------------------------
    Summary: Add bundle functions to reduce the need of bundle archive/revision/module  (was:
Add bundle function to reduce the need of bundle archive/revision/module)

> Add bundle functions to reduce the need of bundle archive/revision/module
> -------------------------------------------------------------------------
>
>                 Key: CELIX-439
>                 URL: https://issues.apache.org/jira/browse/CELIX-439
>             Project: Celix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 2.3.0
>            Reporter: Pepijn Noltes
>            Priority: Major
>
> To retrieve some info about the bundle current required functiions can be cumbersome.
e..g to retrieve the cache root, your need:
> bundle_context_t *ctx = ...
> bundle_pt and = NULL;
> bundle_archive_pt arch = NULL;
> bundle_revision_pt rev = NULL;
> const char *root = NULL;
> bundleContext_getBundle(ctx, &bnd);
> bundle_getArchive(and, &arch)
> bundleArchive_getCurrentRevision(arch, &rev);
> bundleRevision_getRoot(rev, &root);
> And this is without error checking.
> Adds some api to the bundle.h to that most data can be received from the bundle. In the
future it should be possible to make bundle_archive/module/revision private.
> Proposed added API:
> /**
>  * Returns the bundle version or NULL of bnd is NULL.
>  * Caller needs to free the returned char pointer.
>  */
> char * bundle_getBundleVersion(bundle_t *bnd);
> /**
>  * Returns the bundle name or NULL of bnd is NULL.
>  * Caller needs to free the returned char pointer.
>  */
> char * bundle_getBundleName(bundle_t *bnd);
> /**
>  * Returns the bundle symbolic name or NULL of bnd is NULL.
>  * Caller needs to free the returned char pointer.
>  */
> char * bundle_getBundleSymbolic(bundle_t *bnd);
> /**
>  * Returns the bundle manifest as properties or NULL of bnd is NULL.
>  * Caller needs to destroy the returned properties.
>  */
> properties_t *bundle_getManifestAsProperties(bundle_t* bnd);
> /**
>  * Returns the bundle cache dir (i.e. bundle revision root) or NULL of bnd is NULL.
>  * Caller needs to free the returned char pointer.
>  */
> char *bundleRevision_getCacheDir(bundle_t *bnd);



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message