Defines | |
#define | ALP_PRV_BUNDLE_FLAG_DO_NOT_NOTIFY 2 |
Flag to pass to some bundle manager routines to prevent notifications from being generated. | |
#define | ALP_PRV_BUNDLE_FLAG_FORCE_DELETE 4 |
Flag to pass to some bundle manager routines to force a bundle deletion even if the bundle is in use. | |
#define | ALP_PRV_BUNDLE_FLAG_FORCE_UNREGISTER 8 |
Flag to pass to some bundle manager routines to force a bundle unregistration even if the bundle is in use. | |
#define | ALP_PRV_BUNDLE_FLAG_FORCE_UNMOUNT 16 |
Flag to pass to some bundle manager routines to force an unmount even if the bundle is in use. | |
#define | ALP_PRV_BUNDLE_FLAG_DO_NOT_MAKE_STUB 32 |
Flag to pass to some bundle manager routines to prevent unregistration from creating a stub bundle for R/W data retention. | |
#define | ALP_PRV_BUNDLE_FLAG_LAZY_DELETE 64 |
Flag to pass to some bundle manager routines to cause a bundle deletion as soon it is fully closed (or on reboot) If this flag is passed to alp_bundle_delete(), then a lazy delete will always be used if the bundle is open, even if a force unregister is possible, and ALP_PRV_BUNDLE_FLAG_FORCE_UNREGISTER is supplied. | |
#define | ALP_PRV_BUNDLE_FLAG_RECURSE 128 |
Apply to alp_prv_bundle_open() flags to indicate that referenced bundles should be opened first. | |
#define | ALP_PRV_BUNDLE_FLAG_APPLY_LOCAL_EFFECTS 256 |
Apply to alp_prv_bundle_open() flags to indicate that local effects should be applied (updating gettext domain, setting java CLASSPATH, etc. | |
#define | ALP_PRV_BUNDLE_FLAG_NESTED_TRANSACTION 512 |
Flag to pass to some bundle manager routines to prevent them from starting/finishing a SQL transaction, so the caller can set up its own transaction. | |
Functions | |
alp_status_t | alp_prv_bundle_init (gboolean server, const char *database, const char *live_database, const char *ipc_channel, const char *work_path, const char *rw_path, gboolean notify) |
alp_status_t | alp_prv_bundle_init_playground (gboolean server, const char *playground_name, gboolean notify) |
alp_status_t | alp_prv_bundle_fini (void) |
alp_status_t | alp_prv_bundle_wipe () |
int | alp_prv_bundle_state () |
void | alp_prv_bundle_dump () |
AlpBundleRef | alp_prv_bundle_open (AlpBundle idx, int flags) |
Open a bundle Given a bundle index, open the bundle, making its contents available for use, until it is closed. | |
alp_status_t | alp_prv_bundle_close (AlpBundleRef ref, int flags) |
AlpBundle | alp_prv_bundle_register_bundle (const char *id, const char *scheme, const char *store, int flags) |
Register a bundle with the bundle manager. | |
alp_status_t | alp_prv_bundle_unregister_bundle (AlpBundle index, int flags) |
Unregister a bundle from the bundle manager. | |
alp_status_t | alp_prv_bundle_add_store (const char *store, const char *arguments[]) |
Creates a new store. | |
alp_status_t | alp_prv_bundle_delete_store (const char *store) |
Remove a store. Any bundles on that store will be unregistered (not deleted). | |
void | alp_prv_bundle_set_application (AlpBundle index) |
Set the bundle index to return as the index of the running application. | |
void | alp_prv_bundle_set_application_ref (AlpBundleRef ref) |
Set which bundle to return as the index of the running application. | |
alp_status_t | alp_prv_bundle_incref (AlpBundle index, int flags) |
Increment the refcount on a bundle. | |
alp_status_t | alp_prv_bundle_decref (AlpBundle index, int flags) |
Decrement the refcount on an open bundle. | |
alp_status_t | alp_prv_bundle_ref_incref (AlpBundleRef ref) |
Increment the refcount on an open bundle. | |
alp_status_t | alp_prv_bundle_ref_decref (AlpBundleRef ref) |
Decrement the refcount on an open bundle. | |
GList * | alp_prv_bundle_expand_searchpath (const char *path) |
Given a path including escapes, create a list of possible paths using the current locale. | |
GList * | alp_prv_bundle_expand_locale (const char *locale) |
Given an XPG/4 locale name, break off each optional part in turn, giving a list of possible locale paths in preferred order Multiple entries may be separated by colons. | |
alp_status_t | alp_prv_bundle_scan_store (const char *store, int wipe_invalid, int scheme_filter) |
Sync registration of all bundles on a store For bar files, this will scan the contents of the store's bar_folder, and register any bar folders or files which were not previously registered. Any missing folders or files will have their bundle unregistered. | |
alp_status_t | alp_prv_bundle_rescan_volumes (void) |
Sync volumes and stores. | |
alp_status_t | alp_prv_bundle_reg_notify (AlpBundle index, int flags) |
alp_status_t | alp_prv_bundle_unreg_notify (AlpBundle index, int flags) |
alp_status_t | alp_prv_bundle_deactivate (AlpBundle index, int flags) |
void | alp_prv_bundle_update_names (const char *name, int flags) |
Utility routine to update name table, and emit notifications about changes to named bundles. | |
alp_status_t | alp_prv_bundle_force_close (AlpBundle index, int flags) |
Utility routine to close a bundle. | |
alp_status_t | alp_prv_bundle_hold_notifications (gboolean hold) |
|
Apply to alp_prv_bundle_open() flags to indicate that local effects should be applied (updating gettext domain, setting java CLASSPATH, etc. ). This is automatically applied by alp_bundle_open() |
|
Flag to pass to some bundle manager routines to prevent unregistration from creating a stub bundle for R/W data retention.
|
|
Flag to pass to some bundle manager routines to prevent notifications from being generated.
|
|
Flag to pass to some bundle manager routines to force a bundle deletion even if the bundle is in use.
|
|
Flag to pass to some bundle manager routines to force an unmount even if the bundle is in use.
|
|
Flag to pass to some bundle manager routines to force a bundle unregistration even if the bundle is in use.
|
|
Flag to pass to some bundle manager routines to cause a bundle deletion as soon it is fully closed (or on reboot) If this flag is passed to alp_bundle_delete(), then a lazy delete will always be used if the bundle is open, even if a force unregister is possible, and ALP_PRV_BUNDLE_FLAG_FORCE_UNREGISTER is supplied. I.e., if you want a lazy delete only as a last resort, you'll have to try a separate FORCE_UNREGISTER delete before you use LAZY_DELETE. |
|
Flag to pass to some bundle manager routines to prevent them from starting/finishing a SQL transaction, so the caller can set up its own transaction.
|
|
Apply to alp_prv_bundle_open() flags to indicate that referenced bundles should be opened first. This is automatically applied by alp_bundle_open(). |
|
Creates a new store. Create a new store of a given name. The store is defined by a set of arguments supplied as an array of const char*'s, which is terminated by a NULL pointer. The array is read as key/value pairs. Only particular keys are allowed.
|
|
|
|
Utility routine to deactivate a bundle before unregistering it. |
|
Decrement the refcount on an open bundle. Decrement the refcount on a bundle: this undoes the effects of alp_prv_bundle_incref(). Note that this refcount is separate from those maintained by AlpBundleRefs. A bundle will not be considered closed by the system until all AlpBundleRefs on it are destroyed, in addition to not having any active alp_prv_bundle_incref()s. |
|
Remove a store. Any bundles on that store will be unregistered (not deleted).
|
|
Debug routine which will dump out the current bundle manager state via trace mgr |
|
Given an XPG/4 locale name, break off each optional part in turn, giving a list of possible locale paths in preferred order Multiple entries may be separated by colons.
|
|
Given a path including escapes, create a list of possible paths using the current locale. Given a path containing zero or more paths separated by colons, containing escapes marked with carets, expand any ^l escapes with a complete set of locale folders -- the result is the list of expanded folders, in order. |
|
Tear down bundle manager library within a process (either client or server). Is harmless if the bundle manager has not been initialized. Once torn down, the bundle manager will be capable of being reinitialized, potentially in a different state.
|
|
Utility routine to close a bundle.
|
|
This routine can be used to ask the bundlemgr server to not hold notifications pending until such time as they are released. The pending notifications are held in a database table, and will persist along with other data. Some notifications will not be delivered at all if they are held: the bundle delete, move, and copy notifications are synchronous and require real-time action. As such, it makes no sense to pend these, and they will simply be discarded. Notification holds to not stack: holding a second time (or releasing twice) is an error.
|
|
Increment the refcount on a bundle. Increment the refcount on a bundle: this works regardless of whether the bundle is already open, and effectively "pins" the bundle as open (and in-use) until a matching alp_prv_bundle_decref() is invoked. Note that this call does not track caller lifetime: if the calling process exits, the reference still remains on the bundle. The intended use of this is to pin a bundle in use, e.g., for system operations that want to allow a shared library in a bundle to be used by system executables. |
|
Initialize the bundle manager library within the current process. This will fail if the bundle manager has already been initialized.
|
|
Initialize the bundle manager library for private use, for testing purposes. This routine invokes alp_prv_bundle_init() with a set of arguments derived from a "playground" name, which is used to distinguish one invocation from another. All files, paths, etc. will be places into /tmp using names which will not interfere with another playground, or with the primary ALP instantiation of the bundle manager.
|
|
Open a bundle Given a bundle index, open the bundle, making its contents available for use, until it is closed.
|
|
Decrement the refcount on an open bundle. Identical to alp_bundle_close(). Decrement the refcount on an open bundle, in symmetry to alp_prv_bundle_ref_incref(). In operation, this routine is identical to alp_bundle_close(). |
|
Increment the refcount on an open bundle. Increment the refcount on an open bundle: use this if a separate piece of code wishes to retain a reference to an open bundle ref after the original caller invokes alp_bundle_ref_close(). Note that it is also possible to call alp_bundle_open(alp_bundle_ref_bundle(bundleref)) to get a new bundleref on a bundle you already have a bundleref for. This will also serve as an identical refcount to keep the bundle open, but would give you a bundleref with a different value. |
|
Utility routine to send out registration notification for a bundle which was registered with the ALP_PRV_FLAG_DO_NOT_NOTIFY. This also activates the bundle. |
|
Register a bundle with the bundle manager. This puts information about a bundle into the bundle manager's database. This does not copy or move the bundle itself, it merely records information about the bundle (including extracting metadata from it). Notifications are sent about the registered bundle.
|
|
Sync volumes and stores. This routine will create stores for any volumes which don't have appropriate stores. Since this normally happens automatically through notifications, this is unlikely to be useful. |
|
Sync registration of all bundles on a store For bar files, this will scan the contents of the store's bar_folder, and register any bar folders or files which were not previously registered. Any missing folders or files will have their bundle unregistered. Note that this routine will not detect changes to bundles, only new or old ones. to tell the bundle manager about changes, an explicit unregister/register sequence will be needed. If wipe_invalid is true, then any file or folder which is not a valid bundle (or has a specific name indicating it was temporary material, introduced during installation) will be deleted outright.
|
|
Set the bundle index to return as the index of the running application. This will set the application index directly. If the application ref is requested, with alp_bundle_ref_application(), then this index will be opened, and the ref cached. If alp_prv_bundle_set_application() is reinvoked, the cached ref will be closed. There is not an equivalent routine alp_prv_bundle_set_me(): the "me" functionality is implemented using alp_bundle_locate(dladdr(__builtin_return_address(0))) to locate the actual bundle containing the shared library which invoked the me() routine.
|
|
Set which bundle to return as the index of the running application. This will set the application index from a ref. If the application ref is requested, with alp_bundle_ref_application() then this ref will be returned directly. If the application is changed, the supplied ref will be discarded. These routines will not incref or decref it. There is not an equivalent routine alp_prv_bundle_set_me(): the "me" functionality is implemented using alp_bundle_locate(dladdr(__builtin_return_address(0))) to locate the actual bundle containing the shared library which invoked the me() routine.
|
|
Return bundle manager state (initialized as server or client, or unitialized).
|
|
Utility routine to send out unregistration notification for a bundle before actually unregistering it. |
|
Unregister a bundle from the bundle manager. This removes information about a bundle from the bundle manager's database. This does not delete the bundle itself, it only removes the informatino recorded into the database. Notifications are sent, as appropriate, about the unregistration.
|
|
Utility routine to update name table, and emit notifications about changes to named bundles. Update the names table: the mechanism to determine which package should answer to a particular name is not automatic, and requires invocation of this routine to update the names table which keeps track of that information.
|
|
Wipe out bundle manager tables, also creating those tables if necessary. The bundle manager initialization does not currently do this by itself, so the process responsible for booting an instance of the bundle manager should invoke this routine after initializing the bundle manager server.
|