![]() |
![]() |
![]() |
ZIF Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
ZifLegalZifLegal — A ZifLegal object allows the user to check licenses |
#define ZIF_LEGAL_ERROR ZifLegal; ZifLegalPrivate; ZifLegalClass; enum ZifLegalError; GQuark zif_legal_error_quark (void
); ZifLegal * zif_legal_new (void
); void zif_legal_set_filename (ZifLegal *legal
,const gchar *filename
); gboolean zif_legal_is_free (ZifLegal *legal
,const gchar *string
,gboolean *is_free
,GError **error
);
ZifLegal allows the user to see if a specific license string is free
according to the FSF.
Before checking any strings, the backing legal file has to be set with
zif_legal_set_filename()
and any checks prior to that will fail.
GQuark zif_legal_error_quark (void
);
Returns : |
Our personal error quark. |
Since 0.1.0
ZifLegal * zif_legal_new (void
);
Returns : |
A new ZifLegal class instance. |
Since 0.1.0
void zif_legal_set_filename (ZifLegal *legal
,const gchar *filename
);
Sets the filename to use as the system wide legal file.
|
the ZifLegal object |
|
the system wide legal file, e.g. "/etc/yum.conf" |
Since 0.1.0
gboolean zif_legal_is_free (ZifLegal *legal
,const gchar *string
,gboolean *is_free
,GError **error
);
Finds out if the package is classified as free software.
|
the ZifLegal object |
|
the legal string to check, e.g. ""Zend and wxWidgets"" |
|
if the string is a valid free legal |
|
a GError which is used on failure, or NULL
|
Returns : |
FALSE for failure to load legal data.
|
Since 0.1.0