ZIF Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#define ZIF_DEPEND_ERROR enum ZifDependFlag; struct ZifDepend; struct ZifDependClass; ZifDepend * zif_depend_new (void
); ZifDepend * zif_depend_new_from_values (const gchar *name
,ZifDependFlag flag
,const gchar *version
); gchar * zif_depend_to_string (ZifDepend *depend
); const gchar * zif_depend_flag_to_string (ZifDependFlag flag
); gboolean zif_depend_parse_description (ZifDepend *depend
,const gchar *value
,GError **error
); gboolean zif_depend_satisfies (ZifDepend *got
,ZifDepend *need
); gint zif_depend_compare (ZifDepend *a
,ZifDepend *b
); ZifDependFlag zif_depend_get_flag (ZifDepend *depend
); const gchar * zif_depend_get_name (ZifDepend *depend
); const gchar * zif_depend_get_version (ZifDepend *depend
); const gchar * zif_depend_get_description (ZifDepend *depend
);
typedef enum { ZIF_DEPEND_FLAG_ANY = 1, ZIF_DEPEND_FLAG_LESS = 2, ZIF_DEPEND_FLAG_GREATER = 4, ZIF_DEPEND_FLAG_EQUAL = 8, ZIF_DEPEND_FLAG_UNKNOWN = 0 } ZifDependFlag;
struct ZifDependClass { GObjectClass parent_class; /* Padding for future expansion */ void (*_zif_reserved1) (void); void (*_zif_reserved2) (void); void (*_zif_reserved3) (void); void (*_zif_reserved4) (void); };
ZifDepend * zif_depend_new (void
);
Returns : |
A new ZifDepend instance. |
Since 0.1.3
ZifDepend * zif_depend_new_from_values (const gchar *name
,ZifDependFlag flag
,const gchar *version
);
|
The depend name |
|
The depend flag |
|
The depend version |
Returns : |
A new ZifDepend instance, or NULL for error |
Since 0.2.4
gchar * zif_depend_to_string (ZifDepend *depend
);
Returns a string representation of the ZifDepend object.
Note: this function is deprecated, use zif_depend_get_description()
instead as it is more efficient.
|
A ZifDepend |
Returns : |
string value |
Since 0.1.0
const gchar * zif_depend_flag_to_string (ZifDependFlag flag
);
Returns a string representation of the ZifDependFlag.
|
A ZifDependFlag |
Returns : |
string value |
Since 0.1.0
gboolean zif_depend_parse_description (ZifDepend *depend
,const gchar *value
,GError **error
);
Parses a depend string and sets internal state.
|
A ZifDepend |
|
Depend string, e.g. "obsolete-package < 1.0.0" |
|
A GError, or NULL
|
Returns : |
TRUE for success |
Since 0.1.3
gboolean zif_depend_satisfies (ZifDepend *got
,ZifDepend *need
);
Returns if the dependency will be satisfied with what we've got.
Since 0.1.3
gint zif_depend_compare (ZifDepend *a
,ZifDepend *b
);
Compares one dependancy against another.
This is basically a zif_compare_evr()
on the versions.
|
A ZifDepend |
|
A ZifDepend to compare |
Returns : |
1 for a>b, 0 for a==b, -1 for b>a, or G_MAXINT for error |
Since 0.1.3
ZifDependFlag zif_depend_get_flag (ZifDepend *depend
);
Gets the depend flag.
|
A ZifDepend |
Returns : |
A flag of depend, e.g. ZIF_DEPEND_FLAG_LESS . |
Since 0.1.3
const gchar * zif_depend_get_name (ZifDepend *depend
);
Gets the name for this depend.
Since 0.1.3
const gchar * zif_depend_get_version (ZifDepend *depend
);
Gets the version for this depend.
Since 0.1.3