]> git.draconx.ca Git - upkg.git/blob - src/exportable.h
module: add missing return value to module_exit.
[upkg.git] / src / exportable.h
1 #ifndef EXPORTABLE_H_
2 #define EXPORTABLE_H_
3
4 #include <stdio.h>
5 #include <glib-object.h>
6
7 #define U_OBJECT_TYPE_EXPORTABLE (u_object_exportable_get_type())
8 #define U_OBJECT_EXPORTABLE(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, \
9         U_OBJECT_TYPE_EXPORTABLE, UObjectExportable)
10 #define U_OBJECT_IS_EXPORTABLE(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, \
11         U_OBJECT_TYPE_EXPORTABLE)
12 #define U_OBJECT_EXPORTABLE_GET_INTERFACE(inst) G_TYPE_INSTANCE_GET_INTERFACE \
13         (inst, U_OBJECT_TYPE_EXPORTABLE, UObjectExportable)
14
15 typedef struct UObjectExportable UObjectExportable;
16
17 struct UObjectExportable {
18         GTypeInterface parent;
19
20         int (*export)(GObject *obj, FILE *f);
21         int (*export_name)(GObject *obj, char *buf, size_t n);
22 };
23
24 GType u_object_exportable_get_type(void);
25
26 int u_object_export(GObject *obj, FILE *f);
27 int u_object_export_name(GObject *obj, char *buf, size_t n);
28
29 #endif