~ubuntu-branches/ubuntu/quantal/libdmapsharing/quantal

« back to all changes in this revision

Viewing changes to libdmapsharing/dmap-record-factory.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2011-03-29 19:52:57 UTC
  • mfrom: (0.1.2 experimental) (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110329195257-0zas0lq4c03gwo46
Tags: 2.9.7-1
Initial release. (Closes: #620060)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
static gint dmap_record_factory_init_count = 0;
24
24
 
25
25
static void
26
 
dmap_record_factory_init (DMAPRecordFactoryInterface *iface)
 
26
dmap_record_factory_init (DMAPRecordFactoryIface * iface)
27
27
{
28
28
        dmap_record_factory_init_count++;
29
29
}
30
30
 
31
31
static void
32
 
dmap_record_factory_finalize (DMAPRecordFactoryInterface *iface)
 
32
dmap_record_factory_finalize (DMAPRecordFactoryIface * iface)
33
33
{
34
34
        dmap_record_factory_init_count--;
35
35
}
39
39
dmap_record_factory_get_type (void)
40
40
{
41
41
        static GType object_type = 0;
 
42
 
42
43
        if (!object_type) {
43
44
                static const GTypeInfo object_info = {
44
 
                        sizeof(DMAPRecordFactoryInterface),
 
45
                        sizeof (DMAPRecordFactoryIface),
45
46
                        (GBaseInitFunc) dmap_record_factory_init,
46
47
                        (GBaseFinalizeFunc) dmap_record_factory_finalize
47
48
                };
48
49
                object_type =
49
 
                    g_type_register_static(G_TYPE_INTERFACE,
50
 
                                           "DMAPRecordFactory",
51
 
                                           &object_info, 0);
 
50
                        g_type_register_static (G_TYPE_INTERFACE,
 
51
                                                "DMAPRecordFactory",
 
52
                                                &object_info, 0);
52
53
        }
53
54
        return object_type;
54
55
}
55
56
 
56
57
DMAPRecord *
57
 
dmap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
 
58
dmap_record_factory_create (DMAPRecordFactory * factory, gpointer user_data)
58
59
{
59
 
        return DMAP_RECORD_FACTORY_GET_INTERFACE (factory)->create (factory, user_data);
 
60
        return DMAP_RECORD_FACTORY_GET_INTERFACE (factory)->create (factory,
 
61
                                                                    user_data);
60
62
}