![]() |
![]() |
![]() |
AppStream-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <appstream-glib.h> #define AS_TYPE_CHECKSUM struct AsChecksumClass; enum AsChecksumTarget; AsChecksum * as_checksum_new (void
); AsChecksumTarget as_checksum_target_from_string (const gchar *target
); const gchar * as_checksum_target_to_string (AsChecksumTarget target
); const gchar * as_checksum_get_filename (AsChecksum *checksum
); const gchar * as_checksum_get_value (AsChecksum *checksum
); GChecksumType as_checksum_get_kind (AsChecksum *checksum
); AsChecksumTarget as_checksum_get_target (AsChecksum *checksum
); void as_checksum_set_filename (AsChecksum *checksum
,const gchar *filename
); void as_checksum_set_value (AsChecksum *checksum
,const gchar *value
); void as_checksum_set_kind (AsChecksum *checksum
,GChecksumType kind
); void as_checksum_set_target (AsChecksum *checksum
,AsChecksumTarget target
);
typedef enum { AS_CHECKSUM_TARGET_UNKNOWN, /* Since: 0.4.2 */ AS_CHECKSUM_TARGET_CONTAINER, /* Since: 0.4.2 */ AS_CHECKSUM_TARGET_CONTENT, /* Since: 0.4.2 */ } AsChecksumTarget;
The checksum target type.
AsChecksum * as_checksum_new (void
);
Creates a new AsChecksum.
Returns : |
a AsChecksum. [transfer full] |
Since 0.4.2
AsChecksumTarget as_checksum_target_from_string (const gchar *target
);
Converts the text representation to an enumerated value.
|
a source kind string |
Returns : |
A AsChecksumTarget, e.g. AS_CHECKSUM_TARGET_CONTAINER . |
Since 0.4.2
const gchar * as_checksum_target_to_string (AsChecksumTarget target
);
Converts the enumerated value to an text representation.
|
the AsChecksumTarget. |
Returns : |
string version of target , or NULL for unknown |
Since 0.4.2
const gchar * as_checksum_get_filename (AsChecksum *checksum
);
Gets the full qualified URL for the checksum, usually pointing at some mirror.
|
a AsChecksum instance. |
Returns : |
URL |
Since 0.4.2
const gchar * as_checksum_get_value (AsChecksum *checksum
);
Gets the suggested value the checksum, including file extension.
|
a AsChecksum instance. |
Returns : |
filename |
Since 0.4.2
GChecksumType as_checksum_get_kind (AsChecksum *checksum
);
Gets the checksum kind.
|
a AsChecksum instance. |
Returns : |
the GChecksumType |
Since 0.4.2
AsChecksumTarget as_checksum_get_target (AsChecksum *checksum
);
Gets the checksum target.
|
a AsChecksum instance. |
Returns : |
the GChecksumType |
Since 0.4.2
void as_checksum_set_filename (AsChecksum *checksum
,const gchar *filename
);
Sets the filename used to generate the checksum.
|
a AsChecksum instance. |
|
the URL. |
Since 0.4.2
void as_checksum_set_value (AsChecksum *checksum
,const gchar *value
);
Sets the checksum value filename.
|
a AsChecksum instance. |
|
the new filename value. |
Since 0.4.2
void as_checksum_set_kind (AsChecksum *checksum
,GChecksumType kind
);
Sets the checksum kind.
|
a AsChecksum instance. |
|
the GChecksumType, e.g. G_CHECKSUM_SHA1 . |
Since 0.4.2
void as_checksum_set_target (AsChecksum *checksum
,AsChecksumTarget target
);
Sets the checksum target.
|
a AsChecksum instance. |
|
the GChecksumType, e.g. AS_CHECKSUM_TARGET_CONTAINER . |
Since 0.4.2