Re: [Vala] DBus services in shared modules implementing interfaces defined in a shared library



On Monday 16 March 2009 22:31:13 Feng Yu wrote:
You have to subclass GTypeModule, and manifestly call the annotated
method(declared in the plugin) within the plugin manager code.

Yes, that's clear and I'm doing that, and these types get registered, but 
obviously not some of their bases, which are contained in the shared library 
(not the plugin). How am I supposed to init these? If I add a [ModuleInit] to 
the shared library, then I get the following:

void register_types (GTypeModule* module) {
        g_return_if_fail (module != NULL);
        fso_framework_device_led_register_type (module);
        fso_framework_abstract_logger_register_type (module);
        fso_framework_file_logger_register_type (module);
        fso_framework_syslog_logger_register_type (module);
        fso_framework_base_plugin_register_type (module);
        fso_framework_smart_key_file_register_type (module);
        fso_framework_abstract_subsystem_register_type (module);
        fso_framework_base_subsystem_register_type (module);
        fso_framework_dbus_subsystem_register_type (module);
        g_debug ("zzz.vala:6: init all types ");
}

where "fso_framework_device_led_register_type" is exactly the dbus interface 
which doesn't work.

So -- although the shared library which contains these types is not loaded via 
dlopen (but rather linked to the main executable), I need to create a 
TypeModule for it?

Cheers,

-- 
:M:




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]