]> git.draconx.ca Git - upkg.git/blob - src/exportable.c
module: add missing return value to module_exit.
[upkg.git] / src / exportable.c
1 #include <stdio.h>
2 #include <glib-object.h>
3 #include "exportable.h"
4
5 GType u_object_exportable_get_type(void)
6 {
7         static GType type = 0;
8         if (type == 0) {
9                 static const GTypeInfo info = {
10                         sizeof (UObjectExportable),
11                         NULL,
12                         NULL,
13                 };
14
15                 type = g_type_register_static(G_TYPE_INTERFACE,
16                         "UObjectExportable", &info, 0);
17         }
18         return type;
19 }
20
21 int u_object_export(GObject *obj, FILE *f)
22 {
23         g_return_val_if_fail(U_OBJECT_IS_EXPORTABLE(obj), -1);
24         return U_OBJECT_EXPORTABLE_GET_INTERFACE(obj)->export(obj, f);
25 }
26
27 int u_object_export_name(GObject *obj, char *buf, size_t n)
28 {
29         g_return_val_if_fail(U_OBJECT_IS_EXPORTABLE(obj), -1);
30         return U_OBJECT_EXPORTABLE_GET_INTERFACE(obj)->export_name(obj, buf, n);
31 }