![]() |
![]() |
![]() |
PackageKit Reference Manual | ![]() |
---|---|---|---|---|
#define PK_DBUS_SERVICE #define PK_DBUS_PATH #define PK_DBUS_INTERFACE #define PK_DBUS_INTERFACE_TRANSACTION #define PK_SERVICE_PACK_GROUP_NAME #define PK_SYSTEM_PACKAGE_LIST_FILENAME gboolean pk_strvalidate (const gchar *text); gchar* pk_strsafe (const gchar *text); gchar** pk_ptr_array_to_strv (GPtrArray *array); GPtrArray* pk_strv_to_ptr_array (gchar **array); gchar** pk_va_list_to_argv (const gchar *string_first, va_list *args); gchar* pk_iso8601_present (void); guint pk_iso8601_difference (const gchar *isodate); gchar* pk_iso8601_from_date (const GDate *date); GDate* pk_iso8601_to_date (const gchar *iso_date); gchar* pk_get_distro_id (void); gchar* pk_strv_to_text (gchar **package_ids, const gchar *delimiter);
#define PK_DBUS_INTERFACE_TRANSACTION "org.freedesktop.PackageKit.Transaction"
The DBUS interface for the transactions
#define PK_SERVICE_PACK_GROUP_NAME "PackageKit Service Pack"
The group name of the Service Pack config file
#define PK_SYSTEM_PACKAGE_LIST_FILENAME "/var/lib/PackageKit/system.package-list"
gboolean pk_strvalidate (const gchar *text);
Tests a string to see if it may be dangerous or invalid.
|
The text to check for validity |
Returns : |
TRUE if the string is valid
|
gchar* pk_strsafe (const gchar *text);
Replaces chars in the text that may be dangerous, or that may print incorrectly. These chars include new lines, tabs and quotes, and are replaced by spaces.
|
The input text to make safe |
Returns : |
the new string with no insane chars |
gchar** pk_ptr_array_to_strv (GPtrArray *array);
Form a composite string array of strings. The data in the GPtrArray is copied.
|
the GPtrArray of strings |
Returns : |
the string array, or NULL if invalid
|
GPtrArray* pk_strv_to_ptr_array (gchar **array);
Form a GPtrArray array of strings. The data in the array is copied.
|
the gchar** array of strings |
Returns : |
the string array, or NULL if invalid
|
gchar** pk_va_list_to_argv (const gchar *string_first, va_list *args);
Form a composite string array of the va_list
|
the first string |
|
any subsequant string's |
Returns : |
the string array, or NULL if invalid
|
guint pk_iso8601_difference (const gchar *isodate);
|
The ISO8601 date to compare |
Returns : |
The difference in seconds between the iso8601 date and current |
gchar* pk_iso8601_from_date (const GDate *date);
|
a GDate to convert
|
Returns : |
If valid then a new ISO8601 date, else NULL |
GDate* pk_iso8601_to_date (const gchar *iso_date);
|
The ISO8601 date to convert |
Returns : |
If valid then a new GDate , else NULL
|
gchar* pk_get_distro_id (void);
Returns : |
The current distro-id, e.g. fedora-8-i386, or NULL for an
error or not known
|