Add stubs for profile module.
[tweakr] / modules / tweakr-profile.c
1 /*
2  * vim:ts=4:sw=4:et:cindent:cino=(0
3  */ 
4
5 #include <config.h>
6 #include <glib.h>
7 #include <glib/gi18n-lib.h>
8
9 #include <gtk/gtk.h>
10 #include <hildon/hildon-picker-button.h>
11 #include <hildon/hildon-touch-selector.h>
12 #include <hildon/hildon-button.h>
13 #include <hildon/hildon-entry.h>
14 #include <hildon/hildon-pannable-area.h>
15 #include <hildon/hildon-defines.h>
16 #include <gconf/gconf-client.h>
17
18 #include "libtweakr-section/tweakr-section.h"
19 #include "libtweakr-section/tweakr-module.h"
20
21
22 #define TWEAKR_TYPE_PROFILE_SECTION \
23         (tweakr_profile_section_type)
24 #define TWEAKR_PROFILE_SECTION(obj) \
25         (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
26         TWEAKR_TYPE_PROFILE_SECTION, \
27         TweakrProfileSection))
28 #define TWEAKR_PROFILE_SECTION_CLASS(k) \
29         (G_TYPE_CHECK_CLASS_CAST((k), \
30         TWEAKR_TYPE_PROFILE_SECTION, \
31         TweakrProfileSectionClass))
32 #define TWEAKR_IS_PROFILE_SECTION(obj) \
33         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
34         TWEAKR_TYPE_PROFILE_SECTION))
35
36 typedef struct _TweakrProfileSection TweakrProfileSection;
37 typedef struct _TweakrProfileSectionClass
38                TweakrProfileSectionClass;
39
40 struct _TweakrProfileSection
41 {
42     TweakrSection parent_instance;
43 };
44
45 struct _TweakrProfileSectionClass
46 {
47     TweakrSectionClass parent_class;
48 };
49
50
51 static GType tweakr_profile_section_get_type (GTypeModule *module);
52 static void tweakr_profile_section_class_init
53     (TweakrProfileSectionClass *class);
54 static void tweakr_profile_section_init
55     (TweakrProfileSection *section);
56 static void tweakr_profile_section_dispose (GObject *obj);
57
58 static gboolean _save (TweakrSection *section,
59                        gboolean *requires_restart);
60
61 static GType tweakr_profile_section_type = 0;
62 static TweakrSectionClass *
63     tweakr_profile_section_parent_class = NULL;
64
65
66 G_MODULE_EXPORT void
67 tweakr_module_load (TweakrModule *module)
68 {
69     tweakr_profile_section_get_type (G_TYPE_MODULE (module));
70 }
71
72 G_MODULE_EXPORT void
73 tweakr_module_unload (TweakrModule *module)
74 {
75 }
76
77 static GType
78 tweakr_profile_section_get_type (GTypeModule *module)
79 {
80     if (!tweakr_profile_section_type)
81     {
82         static const GTypeInfo section_info =
83         {
84             sizeof (TweakrProfileSectionClass),
85             (GBaseInitFunc) NULL,
86             (GBaseFinalizeFunc) NULL,
87             (GClassInitFunc) tweakr_profile_section_class_init,
88             NULL,           /* class_finalize */
89             NULL,           /* class_data     */
90             sizeof (TweakrProfileSection),
91             0,              /* n_preallocs    */
92             (GInstanceInitFunc) tweakr_profile_section_init
93         };
94
95         tweakr_profile_section_type =
96             g_type_module_register_type (module, TWEAKR_TYPE_SECTION,
97                                          "TweakrProfileSection",
98                                          &section_info, 0);
99     }
100
101     return tweakr_profile_section_type;
102 }
103
104 static void
105 tweakr_profile_section_class_init
106     (TweakrProfileSectionClass *klass)
107 {
108     GObjectClass *object_class = G_OBJECT_CLASS (klass);
109     TweakrSectionClass *section_class =
110         TWEAKR_SECTION_CLASS (klass);
111
112     tweakr_profile_section_parent_class =
113         g_type_class_peek_parent (klass);
114
115     section_class->name   = "_Profile";
116     section_class->save = _save;
117
118     object_class->dispose = tweakr_profile_section_dispose;
119 }
120
121 static void
122 tweakr_profile_section_init (TweakrProfileSection *section)
123 {
124     TweakrSection *iface;
125
126     iface = TWEAKR_SECTION (section);
127     iface->name = _("Profile");
128 }
129
130 static void
131 tweakr_profile_section_dispose (GObject *obj)
132 {
133     G_OBJECT_CLASS (tweakr_profile_section_parent_class)->dispose (obj);
134 }
135
136 static gboolean _save (TweakrSection *section, gboolean *requires_restart)
137 {
138     return TRUE;
139 }
140