Typedefs | |
typedef osso_af_context_t | osso_context_t |
Functions | |
osso_context_t * | osso_initialize (const gchar *application, const gchar *version, gboolean activation, GMainContext *context) |
osso_context_t * | osso_initialize_with_connections (const gchar *application, const gchar *version, DBusConnection *system_conn, DBusConnection *session_conn) |
void | osso_deinitialize (osso_context_t *osso) |
typedef struct osso_af_context_t osso_context_t |
void osso_deinitialize | ( | osso_context_t * | osso | ) |
This function closes the message bus connections and frees all memory allocated by the Libosso context. This function renders the context to unusable state. osso_initialize has to be called again to get a valid Libosso context.
osso | The library reference as returned by osso_initialize. |
osso_context_t* osso_initialize | ( | const gchar * | application, | |
const gchar * | version, | |||
gboolean | activation, | |||
GMainContext * | context | |||
) |
This function initializes the library, connects to both the D-BUS session and system busses, integrates with the GLib main loop, and initializes the library for use. osso_initialize should be called only once by the application.
application | The name of the application. This name forms the last part of the default (D-BUS) service name of the application. Note that the D-BUS service name will be 'com.nokia.application', where 'application' is the value you gave as the parameter. Note also that this argument must be identical to the X-Osso-Service value in the desktop file, or the D-BUS daemon will kill your application. If you do not want to use the default 'com.nokia' prefix, you must pass the whole D-Bus service name, e.g. 'org.maemo.my_app'. The only valid characters that the name may contain are letters a-z and the underscore '_'. | |
version | The version string of the application. It must be comparable with strcmp(). | |
activation | This parameter is obsolete and does not have any effect. | |
context | The GLib main loop context to connect to, or NULL for the default context. |
osso_context_t* osso_initialize_with_connections | ( | const gchar * | application, | |
const gchar * | version, | |||
DBusConnection * | system_conn, | |||
DBusConnection * | session_conn | |||
) |
This function initializes the library, using the D-Bus connections passed as arguments. Notice that dbus_connection_setup_with_g_main is not called for the D-Bus connections, allowing for the use of a custom main loop. Using a private (from dbus_bus_get_private) connection is also possible. osso_initialize_with_connections should be called only once by the application.
application | The name of the application. This name forms the last part of the default (D-Bus) service name of the application. Note that the D-Bus service name will be 'com.nokia.application', where 'application' is the value you gave as the parameter. Note also that this argument must be identical to the X-Osso-Service value in the desktop file, or the D-Bus daemon will kill your application. If you do not want to use the default 'com.nokia' prefix, you must pass the whole D-Bus service name, e.g. 'org.maemo.my_app'. The only valid characters that the name may contain are letters a-z and the underscore '_'. | |
version | The version string of the application. It must be comparable with strcmp(). | |
system_conn | D-Bus system bus connection. | |
session_conn | D-Bus session bus connection. |