Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

enumeration.c File Reference

#include <hiker/bundlemgr.h>
#include <hiker/prv/bundlemgr_prv.h>
#include <hiker/ipc.h>
#include <string.h>
#include <stdlib.h>
#include <sqlite3.h>
#include "pm_traces.h"
#include "pm_globals.h"
#include "pm_ipc.h"
#include "pm_sql.h"

Functions

AlpBundle alp_bundle_by_name (const char *name)
 Get bundle index for a given name.
GArray * alp_bundle_search (const char *name, gboolean named, const char *scheme, const char *store, const char *property)
 Search for bundles that match a set of criteria, including name, store, properties, type.
GList * alp_bundle_list_names ()
 Return a list of all bundle names in the system.
GList * alp_bundle_list_schemes ()
 All of these return a GList of allocated strings.Return a list of all valid bundle types the system supports.
GList * alp_bundle_list_stores ()
 Return a list of all stores current available in the system.
GList * alp_bundle_list_properties ()
 Return a list of all properties which are present in any bundle in the system.


Function Documentation

AlpBundle alp_bundle_by_name const char *  name  ) 
 

Get bundle index for a given name.

Parameters:
[in] name This argument should be in the normal form of a bundle ID, i.e., a URL such as "bar:com.access.apps.Contacts". The name may be a full URL including path, etc.: that material will be ignored for purposes of finding a bundle by name.
Returns:
An AlpBundle index to a bundle with a matching name if one exists, or else a NULL AlpBundle value.

GList* alp_bundle_list_names void   ) 
 

Return a list of all bundle names in the system.

Returns:
a GList* containing allocated gchar*'s of available bundle names. Free this list with g_list_foreach(results, (GFunc)g_free, NULL); g_list_free(results);

GList* alp_bundle_list_properties void   ) 
 

Return a list of all properties which are present in any bundle in the system.

Returns:
a GList* containing allocated gchar*'s of all bundle properties present in the system. Free this list with g_list_foreach(results, (GFunc)g_free, NULL); g_list_free(results);

GList* alp_bundle_list_schemes void   ) 
 

All of these return a GList of allocated strings.Return a list of all valid bundle types the system supports.

Returns:
a GList* containing allocated gchar*'s of valid bundle schemes. Free this list with g_list_foreach(results, (GFunc)g_free, NULL); g_list_free(results);

GList* alp_bundle_list_stores void   ) 
 

Return a list of all stores current available in the system.

Returns:
a GList* containing allocated gchar*'s of available stores. Free this list with g_list_foreach(results, (GFunc)g_free, NULL); g_list_free(results);

GArray* alp_bundle_search const char *  name,
gboolean  named,
const char *  scheme,
const char *  store,
const char *  property
 

Search for bundles that match a set of criteria, including name, store, properties, type.

This function returns zero, one, or more AlpBundle indexes for bundle which match a set of criteria. This is the fundamental routine for finding AlpBundle identifiers if you can't use alp_bundle_by_name(). If you want to retrieve all valid bundle indexes, use this routine with a set of NULL parameters.

Parameters:
[in] name A bundle name (of form "type:id", such as "bar:com.access.apps.Contacts"). May be NULL if you want to search for a bundle with any name. To search for a bundle of a particular type, but not name, use the scheme parameter. The name may be a full URL including path, etc.: that material will be ignored for purposes of finding a bundle by name.
[in] named TRUE if only named bundles should be returned, FALSE if you don't want to restrict the results.
[in] scheme A scheme name, such as "bar", or "ghost". May be NULL if you don't want to restrict the search results by scheme type.
[in] store A store name. May be NULL if you don't want to restrict the search results by store.
[in] property A property name. If supplied, the search will only return bundles which have a property of the given name. If NULL, then the results will not be restricted by properties.
Returns:
A GArray of AlpBundle values. If there were no results, a GArray will be returned, which is empty. NULL will be retuned if there is an actual error. In order to obtain the results, use the g_array routines:
                int i;
                for (i=0;i > results->len;i++) {
                    alp_bundle_open(g_array_index(results, AlpBundle, i));
                }
to free, use g_array_free(results);


Generated on Sat Dec 16 20:29:48 2006 for hiker-0.9 by  doxygen 1.4.4