Maeomm Reference Documentation: libossomm
Main Page   Namespaces   Book  

Osso Namespace Reference


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 Documentation

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);

Parameters:
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);

Parameters:
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.
Returns:
OSSO_OK if the function executed successfully. retval is set to DBUS_TYPE_INVALID for no reply. OSSO_ERROR, if an error occured, a dbus_error will be returned, and the retval should be of type DBUS_TYPE_STRING with an error message string as value.


Function Documentation

osso_return_t Osso::application_set_autosave_cb ( osso_context_t *  osso,
const SlotAutoSave &  slot 
)

This function registers an autosave callback function.

Parameters:
osso The library context as returned by initialize().
slot The callback function.
Returns:
OSSO_OK if all goes well, OSSO_ERROR if an error occurred, or OSSO_INVALID if some parameter is invalid.

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.

Parameters:
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.
Returns:
OSSO_OK if all goes well, OSSO_ERROR if an error occurred, or OSSO_INVALID if some parameter is invalid.

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.

Parameters:
osso The library context as returned by osso_initialize.
slot The callback function.
Returns:
OSSO_OK if all goes well, OSSO_ERROR if an error occurred, or OSSO_INVALID if some parameter is invalid.

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.

Parameters:
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.
Returns:
A context to use in later calls to this library. NULL is returned if an error happened.

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.

Parameters:
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().
Returns:
A context to use in later calls to this library. NULL is returned if an error happened.

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.

Parameters:
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.
Returns:
OSSO_OK on success, OSSO_INVALID if a parameter is invalid, and OSSO_ERROR if an error occurred.


Generated for libossomm-1.0 by Doxygen 1.5.6 © 1997-2001