![]() |
![]() |
![]() |
Libosinfo Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct OsinfoList; struct OsinfoListClass; void osinfo_list_add (OsinfoList *list
,OsinfoEntity *entity
); void osinfo_list_add_all (OsinfoList *list
,OsinfoList *source
); void osinfo_list_add_filtered (OsinfoList *list
,OsinfoList *source
,OsinfoFilter *filter
); void osinfo_list_add_intersection (OsinfoList *list
,OsinfoList *sourceOne
,OsinfoList *sourceTwo
); void osinfo_list_add_union (OsinfoList *list
,OsinfoList *sourceOne
,OsinfoList *sourceTwo
); OsinfoEntity * osinfo_list_find_by_id (OsinfoList *list
,const gchar *id
); GType osinfo_list_get_element_type (OsinfoList *list
); GList * osinfo_list_get_elements (OsinfoList *list
); gint osinfo_list_get_length (OsinfoList *list
); OsinfoEntity * osinfo_list_get_nth (OsinfoList *list
,gint idx
);
GObject +----OsinfoList +----OsinfoDeploymentList +----OsinfoDeviceLinkList +----OsinfoDeviceList +----OsinfoMediaList +----OsinfoProductList +----OsinfoResourcesList +----OsinfoTreeList
void osinfo_list_add (OsinfoList *list
,OsinfoEntity *entity
);
Adds a new entity to the list.
|
the entity list |
|
the entity to add to the list. [transfer none] |
void osinfo_list_add_all (OsinfoList *list
,OsinfoList *source
);
Adds all entities from source
to list
. Using one
of the constructors in a subclass is preferrable
to this method.
|
the entity list |
|
the list to add. [transfer none] |
void osinfo_list_add_filtered (OsinfoList *list
,OsinfoList *source
,OsinfoFilter *filter
);
Adds all entities from source
which are matched by filter
. Using one
of the constructors in a subclass is preferrable
to this method.
|
the entity list |
|
the source for elements. [transfer none] |
|
filter to process the source with. [transfer none] |
void osinfo_list_add_intersection (OsinfoList *list
,OsinfoList *sourceOne
,OsinfoList *sourceTwo
);
Computes the intersection between sourceOne
and sourceTwo
and
adds the resulting list of entities to the list
. Using one
of the constructors in a subclass is preferrable
to this method.
|
the entity list |
|
the first list to add. [transfer none] |
|
the second list to add. [transfer none] |
void osinfo_list_add_union (OsinfoList *list
,OsinfoList *sourceOne
,OsinfoList *sourceTwo
);
Computes the union between sourceOne
and sourceTwo
and
adds the resulting list of entities to the list
. Using one
of the constructors in a subclass is preferrable
to this method.
|
the entity list |
|
the first list to add. [transfer none] |
|
the second list to add. [transfer none] |
OsinfoEntity * osinfo_list_find_by_id (OsinfoList *list
,const gchar *id
);
Search the list looking for the entity with a matching unique identifier.
|
the entity list |
|
the unique identifier |
Returns : |
the matching entity, or NULL. [transfer none] |
GType osinfo_list_get_element_type (OsinfoList *list
);
Retrieves the type of the subclass of OsinfoEntity that may be stored in the list
|
the entity list |
Returns : |
the type of entity stored |
GList * osinfo_list_get_elements (OsinfoList *list
);
Retrieve a linked list of all elements in the list.
|
the entity list |
Returns : |
the list elements. [transfer container][element-type OsinfoEntity] |
gint osinfo_list_get_length (OsinfoList *list
);
Retrieves the number of elements currently stored in the list
|
the entity list |
Returns : |
the list length |
OsinfoEntity * osinfo_list_get_nth (OsinfoList *list
,gint idx
);
Retrieves the element in the list at position idx
. If
idx
is less than zero, or greater than the number of
elements in the list, the results are undefined.
|
the entity list |
|
the list position to fetch |
Returns : |
the list element. [transfer none] |
"element-type"
property "element-type" GType* : Read / Write / Construct Only
The specialization of the list. The list will be restricted to storing OsinfoEntity objects of the specified type.
Allowed values: OsinfoEntity