summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-checksum.h
diff options
context:
space:
mode:
authorKalev Lember <klember@redhat.com>2015-09-08 12:53:35 +0200
committerKalev Lember <klember@redhat.com>2015-09-08 13:27:50 +0200
commit0bb28983f4f865a45cefcfdb4db66b6170bf8538 (patch)
treeebddd6cb2fff7b1fdeccaa1a9be031382a57e32d /libappstream-glib/as-checksum.h
parent7734222518eb376c68092446fe1bba922fa8bee0 (diff)
downloadappstream-glib-0bb28983f4f865a45cefcfdb4db66b6170bf8538.tar.gz
libappstream-glib: Port to G_DECLARE_DERIVABLE_TYPE macro
... and bump glib dep to 2.44.0 for the macro.
Diffstat (limited to 'libappstream-glib/as-checksum.h')
-rw-r--r--libappstream-glib/as-checksum.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/libappstream-glib/as-checksum.h b/libappstream-glib/as-checksum.h
index 485ae6b..929927f 100644
--- a/libappstream-glib/as-checksum.h
+++ b/libappstream-glib/as-checksum.h
@@ -28,22 +28,10 @@
#include <glib-object.h>
-#define AS_TYPE_CHECKSUM (as_checksum_get_type())
-#define AS_CHECKSUM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AS_TYPE_CHECKSUM, AsChecksum))
-#define AS_CHECKSUM_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST((cls), AS_TYPE_CHECKSUM, AsChecksumClass))
-#define AS_IS_CHECKSUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AS_TYPE_CHECKSUM))
-#define AS_IS_CHECKSUM_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE((cls), AS_TYPE_CHECKSUM))
-#define AS_CHECKSUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AS_TYPE_CHECKSUM, AsChecksumClass))
-
G_BEGIN_DECLS
-typedef struct _AsChecksum AsChecksum;
-typedef struct _AsChecksumClass AsChecksumClass;
-
-struct _AsChecksum
-{
- GObject parent;
-};
+#define AS_TYPE_CHECKSUM (as_checksum_get_type ())
+G_DECLARE_DERIVABLE_TYPE (AsChecksum, as_checksum, AS, CHECKSUM, GObject)
struct _AsChecksumClass
{
@@ -75,7 +63,6 @@ typedef enum {
AS_CHECKSUM_TARGET_LAST
} AsChecksumTarget;
-GType as_checksum_get_type (void);
AsChecksum *as_checksum_new (void);
AsChecksumTarget as_checksum_target_from_string (const gchar *target);
const gchar *as_checksum_target_to_string (AsChecksumTarget target);