Maeomm Reference Documentation: libossomm |
Typedefs | |
typedef sigc::slot< void > | SlotAutoSave |
For instance,. | |
typedef sigc::slot< void, osso_hw_state_t * > | SlotHW |
For instance,. | |
typedef sigc::slot< int, const std::string &, const std::string &, GArray *, osso_rpc_t & > | SlotRPC |
This callback is called every time a method is requested on the registered interface. | |
Functions | |
osso_return_t | application_set_autosave_cb (osso_context_t *osso, const SlotAutoSave &slot) |
This function registers an autosave callback function. | |
osso_return_t | hw_set_event_cb (osso_context_t *osso, osso_hw_state_t *state, const SlotHW &slot) |
This function registers a callback function that is called whenever the state of the device changes. | |
osso_return_t | hw_set_event_cb (osso_context_t *osso, const SlotHW &slot) |
This function registers a callback function that is called whenever the state of the device changes. | |
osso_context_t * | initialize (const Glib::ustring &application, const Glib::ustring &version, const Glib::RefPtr< Glib::MainContext > &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_context_t * | initialize (const Glib::ustring &application, const Glib::ustring &version) |
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_return_t | rpc_set_cb (osso_context_t *osso, const std::string &service, const std::string &object_path, const std::string &interface, const SlotRPC &slot) |
This function registers a callback function for handling RPC calls to a given object of a service. |
typedef sigc::slot<void> Osso::SlotAutoSave |
For instance,.
void on_autosave();
typedef sigc::slot<void, osso_hw_state_t*> Osso::SlotHW |
For instance,.
void on_hw(osso_hw_state_t *state);
state | The current state of the device. |
typedef sigc::slot<int, const std::string&, const std::string&, GArray*, osso_rpc_t&> Osso::SlotRPC |
This callback is called every time a method is requested on the registered interface.
For instance,
int on_rpc(const std::string& interface, const const std::string& method, GArray* arguments, osso_rpc_t& retval);
interface | The interface that the method is called on. | |
method | The method that is called. | |
arguments | A GArray of osso_rpc_t structures. This array and the osso_rpc_t values in it are only valid until the callback returns. | |
retval | The return value of the method. This should be set to DBUS_TYPE_INVALID for no reply. See osso_rpc_set_cb_f and osso_rpc_free_val for how the memory associated with retval is managed. | |
data | An application specific pointer. |
osso_return_t Osso::application_set_autosave_cb | ( | osso_context_t * | osso, | |
const SlotAutoSave & | slot | |||
) |
This function registers an autosave callback function.
osso | The library context as returned by initialize(). | |
slot | The callback function. |
osso_return_t Osso::hw_set_event_cb | ( | osso_context_t * | osso, | |
osso_hw_state_t * | state, | |||
const SlotHW & | slot | |||
) |
This function registers a callback function that is called whenever the state of the device changes.
The first call to this function will also check the current state of the device, and if the state is available, the corresponding callback function will be called immediately.
osso | The library context as returned by osso_initialize. | |
state | The states the application is interested in. NULL can be passed here to indicate that all signals are of interest. | |
slot | The callback function. |
osso_return_t Osso::hw_set_event_cb | ( | osso_context_t * | osso, | |
const SlotHW & | slot | |||
) |
This function registers a callback function that is called whenever the state of the device changes.
To specify that you are interested only in specific states, use the method overload that takes a state parameter.
The first call to this function will also check the current state of the device, and if the state is available, the corresponding callback function will be called immediately.
osso | The library context as returned by osso_initialize. | |
slot | The callback function. |
osso_context_t* Osso::initialize | ( | const Glib::ustring & | application, | |
const Glib::ustring & | version, | |||
const Glib::RefPtr< Glib::MainContext > & | 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.
It 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. 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(). | |
context | The GLib main loop context to connect to. |
osso_context_t* Osso::initialize | ( | const Glib::ustring & | application, | |
const Glib::ustring & | version | |||
) |
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.
It 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. 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(). |
osso_return_t Osso::rpc_set_cb | ( | osso_context_t * | osso, | |
const std::string & | service, | |||
const std::string & | object_path, | |||
const std::string & | interface, | |||
const SlotRPC & | slot | |||
) |
This function registers a callback function for handling RPC calls to a given object of a service.
osso | The library context as returned by osso_initialize. | |
service | The service name to set up, e.g. com.nokia.application. | |
object_path | The object path that this object has. | |
interface | The interface that this object implements. | |
slot | The function to register. |