You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by "Pepijn Noltes (Jira)" <ji...@apache.org> on 2019/09/17 17:41:00 UTC

[jira] [Closed] (CELIX-439) Add bundle functions to reduce the need of bundle archive/revision/module

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

Pepijn Noltes closed CELIX-439.
-------------------------------
    Resolution: Won't Do

> 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
>             Fix For: 2.3.0
>
>
> 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
(v8.3.2#803003)