PackageKit Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#define PK_BITFIELD_FORMAT typedef PkBitfield; #define pk_bitfield_add (bitfield, enum) #define pk_bitfield_contain (bitfield, enum) gint pk_bitfield_contain_priority (PkBitfield values
,gint value
,...
); PkBitfield pk_bitfield_from_enums (gint value
,...
); #define pk_bitfield_invert (bitfield, enum) #define pk_bitfield_remove (bitfield, enum) void pk_bitfield_test (gpointer user_data
); #define pk_bitfield_value (enum) PkBitfield pk_filter_bitfield_from_string (const gchar *filters
); gchar * pk_filter_bitfield_to_string (PkBitfield filters
); PkBitfield pk_group_bitfield_from_string (const gchar *groups
); gchar * pk_group_bitfield_to_string (PkBitfield groups
); PkBitfield pk_role_bitfield_from_string (const gchar *roles
); gchar * pk_role_bitfield_to_string (PkBitfield roles
);
#define pk_bitfield_add(bitfield,enum) do { ((bitfield) |= (pk_bitfield_value(enum))); } while (0)
#define pk_bitfield_contain(bitfield,enum) (((bitfield) & (pk_bitfield_value(enum))) > 0)
gint pk_bitfield_contain_priority (PkBitfield values
,gint value
,...
);
Finds elements in a list, but with priority going to the preceeding entry
|
a valid bitfield instance |
|
the values we are searching for |
Returns : |
The return enumerated type, or -1 if none are found |
Since 0.5.2
PkBitfield pk_bitfield_from_enums (gint value
,...
);
|
the values we want to add to the bitfield |
Returns : |
The return bitfield, or 0 if invalid |
Since 0.5.2
#define pk_bitfield_invert(bitfield,enum) do { ((bitfield) ^= (pk_bitfield_value(enum))); } while (0)
#define pk_bitfield_remove(bitfield,enum) do { ((bitfield) &= ~(pk_bitfield_value(enum))); } while (0)
PkBitfield pk_filter_bitfield_from_string (const gchar *filters
);
Converts text representation to its enumerated type bitfield, or 0 for invalid
|
the enumerated constant value, e.g. "available;~gui" |
Returns : |
The enumerated type values |
Since 0.5.2
gchar * pk_filter_bitfield_to_string (PkBitfield filters
);
Converts a enumerated type bitfield to its text representation
|
The enumerated type values |
Returns : |
the enumerated constant value, e.g. "available;~gui" |
Since 0.5.2
PkBitfield pk_group_bitfield_from_string (const gchar *groups
);
Converts text representation to its enumerated type bitfield
|
the enumerated constant value, e.g. "available;~gui" |
Returns : |
The enumerated type values, or 0 for invalid |
Since 0.5.2
PkBitfield pk_role_bitfield_from_string (const gchar *roles
);
Converts text representation to its enumerated type bitfield
|
the enumerated constant value, e.g. "search-file;update-system" |
Returns : |
The enumerated type values, or 0 for invalid |
Since 0.5.2
gchar * pk_role_bitfield_to_string (PkBitfield roles
);
Converts a enumerated type bitfield to its text representation
|
The enumerated type values |
Returns : |
the enumerated constant value, e.g. "install-file;update-system" |
Since 0.5.2