ListallerAppItem

ListallerAppItem — Application entry

Functions

#define LISTALLER_TYPE_APP_ITEM
gboolean listaller_app_item_load_xml_file ()
gboolean listaller_app_item_load_xml_data ()
void listaller_app_item_set_origin_local ()
gchar * listaller_app_item_to_string ()
void listaller_app_item_fast_check ()
void listaller_app_item_set_license_name ()
void listaller_app_item_set_license_text ()
void listaller_app_item_update_with_appid ()
gchar * listaller_app_item_build_pk_package_id ()
void listaller_app_item_update_with_metadata_file ()
gchar * listaller_app_item_get_raw_cmd ()
gchar * listaller_app_item_get_metadata_xml ()
gint listaller_app_item_compare_version_with ()
ListallerAppItem * listaller_app_item_new ()
ListallerAppItem * listaller_app_item_new_from_id ()
const gchar * listaller_app_item_get_unique_name ()
const gchar * listaller_app_item_get_version ()
void listaller_app_item_set_version ()
void listaller_app_item_get_license ()
void listaller_app_item_set_license ()
AsComponent * listaller_app_item_get_metainfo ()
void listaller_app_item_set_metainfo ()
gint listaller_app_item_get_size_installed ()
void listaller_app_item_set_size_installed ()
const gchar * listaller_app_item_get_metadata_file ()
void listaller_app_item_set_metadata_file ()
const gchar * listaller_app_item_get_desktop_file ()
void listaller_app_item_set_desktop_file ()
ListallerAppState listaller_app_item_get_state ()
void listaller_app_item_set_state ()
gint64 listaller_app_item_get_install_time ()
void listaller_app_item_set_install_time ()
const gchar * listaller_app_item_get_replaces ()
void listaller_app_item_set_replaces ()
const gchar * listaller_app_item_get_origin ()
void listaller_app_item_set_origin ()
const gchar * listaller_app_item_get_appid ()
GPtrArray * listaller_app_item_get_dependencies ()
void listaller_app_item_set_dependencies ()
gboolean listaller_app_item_validate_appid ()
gchar * listaller_app_state_to_string ()
gboolean listaller_app_state_is_all_set ()
gboolean listaller_app_state_is_any_set ()
ListallerAppState listaller_app_state_set ()
ListallerAppState listaller_app_state_unset ()
ListallerAppLicense * listaller_app_license_dup ()
void listaller_app_license_free ()
void listaller_app_license_copy ()
void listaller_app_license_destroy ()

Properties

gchar * appid Read
gint dbid Read / Write
GPtrArray * dependencies Read / Write
gchar * desktop-file Read / Write
gint64 install-time Read / Write
ListallerAppLicense * license Read / Write
gchar * metadata-file Read / Write
AsComponent * metainfo Read / Write
gchar * origin Read / Write
gchar * replaces Read / Write
gint size-installed Read / Write
ListallerAppState state Read / Write
gchar * unique-name Read / Write
gchar * version Read / Write

Types and Values

Object Hierarchy

    GBoxed
    ╰── ListallerAppLicense
    GFlags
    ╰── ListallerAppState
    GObject
    ╰── ListallerAppItem

Description

Objects of this class contain information about an application (installed or not installed) and associated Listaller state data.

Functions

LISTALLER_TYPE_APP_ITEM

#define LISTALLER_TYPE_APP_ITEM (listaller_app_item_get_type ())

The type for ListallerAppItem.


listaller_app_item_load_xml_file ()

gboolean
listaller_app_item_load_xml_file (ListallerAppItem *self,
                                  const gchar *asdata_fname,
                                  GError **error);

Parameters

self

the ListallerAppItem instance

 

asdata_fname

 

 

error

location to store the error occuring, or NULL to ignore

 

listaller_app_item_load_xml_data ()

gboolean
listaller_app_item_load_xml_data (ListallerAppItem *self,
                                  const gchar *xmld,
                                  GError **error);

Parameters

self

the ListallerAppItem instance

 

xmld

 

 

error

location to store the error occuring, or NULL to ignore

 

listaller_app_item_set_origin_local ()

void
listaller_app_item_set_origin_local (ListallerAppItem *self);

Parameters

self

the ListallerAppItem instance

 

listaller_app_item_to_string ()

gchar *
listaller_app_item_to_string (ListallerAppItem *self);

Parameters

self

the ListallerAppItem instance

 

listaller_app_item_fast_check ()

void
listaller_app_item_fast_check (ListallerAppItem *self);

Parameters

self

the ListallerAppItem instance

 

listaller_app_item_set_license_name ()

void
listaller_app_item_set_license_name (ListallerAppItem *self,
                                     const gchar *name);

Parameters

self

the ListallerAppItem instance

 

name

 

 

listaller_app_item_set_license_text ()

void
listaller_app_item_set_license_text (ListallerAppItem *self,
                                     const gchar *lText);

Parameters

self

the ListallerAppItem instance

 

lText

 

 

listaller_app_item_update_with_appid ()

void
listaller_app_item_update_with_appid (ListallerAppItem *self,
                                      gboolean fast);

Parameters

self

the ListallerAppItem instance

 

fast

 

 

listaller_app_item_build_pk_package_id ()

gchar *
listaller_app_item_build_pk_package_id
                               (ListallerAppItem *self);

Generate a PackageKit package-id for this application

Parameters

self

the ListallerAppItem instance

 

listaller_app_item_update_with_metadata_file ()

void
listaller_app_item_update_with_metadata_file
                               (ListallerAppItem *self);

Parameters

self

the ListallerAppItem instance

 

listaller_app_item_get_raw_cmd ()

gchar *
listaller_app_item_get_raw_cmd (ListallerAppItem *self,
                                gboolean subst_cmd);

Parameters

self

the ListallerAppItem instance

 

subst_cmd

 

 

listaller_app_item_get_metadata_xml ()

gchar *
listaller_app_item_get_metadata_xml (ListallerAppItem *self);

Parameters

self

the ListallerAppItem instance

 

listaller_app_item_compare_version_with ()

gint
listaller_app_item_compare_version_with
                               (ListallerAppItem *self,
                                const gchar *bversion);

Parameters

self

the ListallerAppItem instance

 

bversion

 

 

listaller_app_item_new ()

ListallerAppItem *
listaller_app_item_new (void);

listaller_app_item_new_from_id ()

ListallerAppItem *
listaller_app_item_new_from_id (const gchar *application_id);

Parameters

application_id

 

 

listaller_app_item_get_unique_name ()

const gchar *
listaller_app_item_get_unique_name (ListallerAppItem *self);

Get and return the current value of the "unique-name" property.

Application identifier

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "unique-name" property


listaller_app_item_get_version ()

const gchar *
listaller_app_item_get_version (ListallerAppItem *self);

Get and return the current value of the "version" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "version" property


listaller_app_item_set_version ()

void
listaller_app_item_set_version (ListallerAppItem *self,
                                const gchar *value);

Set the value of the "version" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "version" property

 

listaller_app_item_get_license ()

void
listaller_app_item_get_license (ListallerAppItem *self,
                                ListallerAppLicense *result);

Get and return the current value of the "license" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "license" property


listaller_app_item_set_license ()

void
listaller_app_item_set_license (ListallerAppItem *self,
                                ListallerAppLicense *value);

Set the value of the "license" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "license" property

 

listaller_app_item_get_metainfo ()

AsComponent *
listaller_app_item_get_metainfo (ListallerAppItem *self);

Get and return the current value of the "metainfo" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "metainfo" property


listaller_app_item_set_metainfo ()

void
listaller_app_item_set_metainfo (ListallerAppItem *self,
                                 AsComponent *value);

Set the value of the "metainfo" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "metainfo" property

 

listaller_app_item_get_size_installed ()

gint
listaller_app_item_get_size_installed (ListallerAppItem *self);

Get and return the current value of the "size-installed" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "size-installed" property


listaller_app_item_set_size_installed ()

void
listaller_app_item_set_size_installed (ListallerAppItem *self,
                                       gint value);

Set the value of the "size-installed" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "size-installed" property

 

listaller_app_item_get_metadata_file ()

const gchar *
listaller_app_item_get_metadata_file (ListallerAppItem *self);

Get and return the current value of the "metadata-file" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "metadata-file" property


listaller_app_item_set_metadata_file ()

void
listaller_app_item_set_metadata_file (ListallerAppItem *self,
                                      const gchar *value);

Set the value of the "metadata-file" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "metadata-file" property

 

listaller_app_item_get_desktop_file ()

const gchar *
listaller_app_item_get_desktop_file (ListallerAppItem *self);

Get and return the current value of the "desktop-file" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "desktop-file" property


listaller_app_item_set_desktop_file ()

void
listaller_app_item_set_desktop_file (ListallerAppItem *self,
                                     const gchar *value);

Set the value of the "desktop-file" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "desktop-file" property

 

listaller_app_item_get_state ()

ListallerAppState
listaller_app_item_get_state (ListallerAppItem *self);

Get and return the current value of the "state" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "state" property


listaller_app_item_set_state ()

void
listaller_app_item_set_state (ListallerAppItem *self,
                              ListallerAppState value);

Set the value of the "state" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "state" property

 

listaller_app_item_get_install_time ()

gint64
listaller_app_item_get_install_time (ListallerAppItem *self);

Get and return the current value of the "install-time" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "install-time" property


listaller_app_item_set_install_time ()

void
listaller_app_item_set_install_time (ListallerAppItem *self,
                                     gint64 value);

Set the value of the "install-time" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "install-time" property

 

listaller_app_item_get_replaces ()

const gchar *
listaller_app_item_get_replaces (ListallerAppItem *self);

Get and return the current value of the "replaces" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "replaces" property


listaller_app_item_set_replaces ()

void
listaller_app_item_set_replaces (ListallerAppItem *self,
                                 const gchar *value);

Set the value of the "replaces" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "replaces" property

 

listaller_app_item_get_origin ()

const gchar *
listaller_app_item_get_origin (ListallerAppItem *self);

Get and return the current value of the "origin" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "origin" property


listaller_app_item_set_origin ()

void
listaller_app_item_set_origin (ListallerAppItem *self,
                               const gchar *value);

Set the value of the "origin" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "origin" property

 

listaller_app_item_get_appid ()

const gchar *
listaller_app_item_get_appid (ListallerAppItem *self);

Get and return the current value of the "appid" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "appid" property


listaller_app_item_get_dependencies ()

GPtrArray *
listaller_app_item_get_dependencies (ListallerAppItem *self);

Get and return the current value of the "dependencies" property.

Parameters

self

the ListallerAppItem instance to query

 

Returns

the value of the "dependencies" property


listaller_app_item_set_dependencies ()

void
listaller_app_item_set_dependencies (ListallerAppItem *self,
                                     GPtrArray *value);

Set the value of the "dependencies" property to value .

Parameters

self

the ListallerAppItem instance to modify

 

value

the new value of the "dependencies" property

 

listaller_app_item_validate_appid ()

gboolean
listaller_app_item_validate_appid (const gchar *application_id);

Parameters

application_id

 

 

listaller_app_state_to_string ()

gchar *
listaller_app_state_to_string (ListallerAppState self);

Parameters

self

the ListallerAppState instance

 

listaller_app_state_is_all_set ()

gboolean
listaller_app_state_is_all_set (ListallerAppState self,
                                ListallerAppState flags);

Parameters

self

the ListallerAppState instance

 

flags

 

 

listaller_app_state_is_any_set ()

gboolean
listaller_app_state_is_any_set (ListallerAppState self,
                                ListallerAppState flags);

Parameters

self

the ListallerAppState instance

 

flags

 

 

listaller_app_state_set ()

ListallerAppState
listaller_app_state_set (ListallerAppState self,
                         ListallerAppState mode);

Parameters

self

the ListallerAppState instance

 

mode

 

 

listaller_app_state_unset ()

ListallerAppState
listaller_app_state_unset (ListallerAppState self,
                           ListallerAppState mode);

Parameters

self

the ListallerAppState instance

 

mode

 

 

listaller_app_license_dup ()

ListallerAppLicense *
listaller_app_license_dup (const ListallerAppLicense *self);

Creates a copy of self.

See also: listaller_app_license_copy(), listaller_app_license_destroy(), listaller_app_license_free()

Parameters

self

the instance to duplicate

 

Returns

a copy of self , free with listaller_app_license_free()


listaller_app_license_free ()

void
listaller_app_license_free (ListallerAppLicense *self);

Frees the heap-allocated struct.

See also: listaller_app_license_dup(), listaller_app_license_copy(), listaller_app_license_destroy()

Parameters

self

the struct to free

 

listaller_app_license_copy ()

void
listaller_app_license_copy (const ListallerAppLicense *self,
                            ListallerAppLicense *dest);

Creates a copy of self.

See also: listaller_app_license_dup(), listaller_app_license_destroy(), listaller_app_license_free()

Parameters

self

the struct to copy

 

dest

a unused struct. Use listaller_app_license_destroy() to free the content.

 

listaller_app_license_destroy ()

void
listaller_app_license_destroy (ListallerAppLicense *self);

Frees the content of the struct pointed by self .

See also: listaller_app_license_dup(), listaller_app_license_copy(), listaller_app_license_free()

Parameters

self

the struct to destroy

 

Types and Values

struct ListallerAppItem

struct ListallerAppItem;

Application entry

Objects of this class contain information about an application (installed or not installed) and associated Listaller state data.


struct ListallerAppItemClass

struct ListallerAppItemClass {
	GObjectClass parent_class;
};

The class structure for LISTALLER_TYPE_APP_ITEM. All the fields in this structure are private and should never be accessed directly.

Members

GObjectClass parent_class;

the parent class structure

 

enum ListallerAppState

Status of an application

Indicates if an application is installed (and in which mode it was installed), or if it is in any other, different state.

Members

LISTALLER_APP_STATE_UNKNOWN

   

LISTALLER_APP_STATE_INSTALLED_SHARED

   

LISTALLER_APP_STATE_INSTALLED_PRIVATE

   

LISTALLER_APP_STATE_AVAILABLE

   

struct ListallerAppLicense

struct ListallerAppLicense {
	gchar* name;
	gchar* text;
};

License name and text pair

Describes a software license

Property Details

The “appid” property

  “appid”                    gchar *

appid.

Flags: Read

Default value: NULL


The “dbid” property

  “dbid”                     gint

dbid.

Flags: Read / Write

Default value: 0


The “dependencies” property

  “dependencies”             GPtrArray *

dependencies.

Flags: Read / Write


The “desktop-file” property

  “desktop-file”             gchar *

desktop-file.

Flags: Read / Write

Default value: NULL


The “install-time” property

  “install-time”             gint64

install-time.

Flags: Read / Write

Default value: 0


The “license” property

  “license”                  ListallerAppLicense *

license.

Flags: Read / Write


The “metadata-file” property

  “metadata-file”            gchar *

metadata-file.

Flags: Read / Write

Default value: NULL


The “metainfo” property

  “metainfo”                 AsComponent *

metainfo.

Flags: Read / Write


The “origin” property

  “origin”                   gchar *

origin.

Flags: Read / Write

Default value: NULL


The “replaces” property

  “replaces”                 gchar *

replaces.

Flags: Read / Write

Default value: NULL


The “size-installed” property

  “size-installed”           gint

size-installed.

Flags: Read / Write

Default value: 0


The “state” property

  “state”                    ListallerAppState

state.

Flags: Read / Write


The “unique-name” property

  “unique-name”              gchar *

Application identifier

Flags: Read / Write

Default value: NULL


The “version” property

  “version”                  gchar *

version.

Flags: Read / Write

Default value: NULL