| ZIF Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#define ZIF_LEGAL_ERROR struct ZifLegal; struct 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.
struct ZifLegalClass {
GObjectClass parent_class;
/* Padding for future expansion */
void (*_zif_reserved1) (void);
void (*_zif_reserved2) (void);
void (*_zif_reserved3) (void);
void (*_zif_reserved4) (void);
};
void zif_legal_set_filename (ZifLegal *legal,const gchar *filename);
Sets the filename to use as the system wide licences file.
|
A ZifLegal |
|
The system wide licences file, e.g. "/usr/share/zif/licences.txt" |
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.
|
A ZifLegal |
|
String to check, e.g. "Zend and wxWidgets" |
|
If the string is a can be considered free |
|
A GError, or NULL
|
Returns : |
FALSE for failure to load legal data. |
Since 0.1.0