src/libalarm-async.h File Reference

DBus helpers for making asynchronous alarmd method calls. More...

Go to the source code of this file.

Functions

Helpers for ALARMD_EVENT_UPDATE
DBusMessage * alarmd_event_update_encode_req (const alarm_event_t *event)
 construct update method call message
cookie_t alarmd_event_update_decode_rsp (DBusMessage *rsp)
 parse update method reply message
Helpers for ALARMD_EVENT_ADD
DBusMessage * alarmd_event_add_valist_encode_req (const alarm_event_t *event, int type, va_list va)
 construct add method call message
cookie_t alarmd_event_add_valist_decode_rsp (DBusMessage *rsp)
 parse update method reply message
DBusMessage * alarmd_event_add_with_dbus_params_encode_req (const alarm_event_t *event, int type,...)
 construct add method call message
cookie_t alarmd_event_add_with_dbus_params_decode_rsp (DBusMessage *rsp)
 parse update method reply message
DBusMessage * alarmd_event_add_encode_req (const alarm_event_t *event)
 construct add method call message
cookie_t alarmd_event_add_decode_rsp (DBusMessage *rsp)
 parse update method reply message
Helpers for ALARMD_EVENT_GET
DBusMessage * alarmd_event_get_encode_req (cookie_t cookie)
 construct get method call message
alarm_event_talarmd_event_get_decode_rsp (DBusMessage *rsp)
 parse update method reply message
Helpers for ALARMD_EVENT_DEL
DBusMessage * alarmd_event_del_encode_req (cookie_t cookie)
 construct del method call message
int alarmd_event_del_decode_rsp (DBusMessage *rsp)
 parse update method reply message
Helpers for ALARMD_EVENT_QUERY
DBusMessage * alarmd_event_query_encode_req (const time_t first, const time_t last, int32_t flag_mask, int32_t flags, const char *appid)
 construct query method call message
cookie_talarmd_event_query_decode_rsp (DBusMessage *rsp)
 parse update method reply message
Helpers for ALARMD_SNOOZE_GET
DBusMessage * alarmd_get_default_snooze_encode_req (void)
 construct get default snooze method call message
int alarmd_get_default_snooze_decode_rsp (DBusMessage *rsp)
 parse update method reply message
Helpers for ALARMD_SNOOZE_SET
DBusMessage * alarmd_set_default_snooze_encode_req (unsigned int snooze)
 construct set default snooze method call message
int alarmd_set_default_snooze_decode_rsp (DBusMessage *rsp)
 parse update method reply message
Helpers for ALARMD_DIALOG_RSP
DBusMessage * alarmd_ack_dialog_encode_req (cookie_t cookie, int button)
 construct ack dialog message
int alarmd_ack_dialog_decode_rsp (DBusMessage *rsp)
 parse update method call message
Helpers for ALARMD_DIALOG_ACK
DBusMessage * alarmd_ack_queue_encode_req (cookie_t *cookies, int count)
 construct ack queue message
int alarmd_ack_queue_decode_rsp (DBusMessage *rsp)
 parse update method reply message
Helpers for debug
DBusMessage * alarmd_set_debug_encode_req (unsigned mask_set, unsigned mask_clr, unsigned flag_set, unsigned flag_clr)
 construct set debug message
int alarmd_set_debug_decode_rsp (DBusMessage *rsp)
 parse update method reply message


Detailed Description

DBus helpers for making asynchronous alarmd method calls.

Author:
Simo Piiroinen <simo.piiroinen@nokia.com>
If client application must not be blocked by alarmd method calls, it must use dbus_connection_send_with_reply() instead of normal libalarm functions.

These helper functions can be used for constructing method call messages for use with pending dbus calls and parsing the replies sent by alarmd or dbus daemon.

See alarmd source package testing/asynctest.c for examples of use.

Note: DBus system bus should be used for communication with alarmd even though currently alarmd will handle method calls via session bus too.

This file is part of Alarmd

Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).

Contact: Simo Piiroinen <simo.piiroinen@nokia.com>

Alarmd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.

Alarmd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Alarmd; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


Function Documentation

DBusMessage* alarmd_event_update_encode_req ( const alarm_event_t event  ) 

construct update method call message

Since:
1.1.8
See alarmd_event_update() for details.

cookie_t alarmd_event_update_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_event_update() for details.

DBusMessage* alarmd_event_add_valist_encode_req ( const alarm_event_t event,
int  type,
va_list  va 
)

construct add method call message

Since:
1.1.8
See alarmd_event_add_valist() for details.

cookie_t alarmd_event_add_valist_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_event_add_valist() for details.

DBusMessage* alarmd_event_add_with_dbus_params_encode_req ( const alarm_event_t event,
int  type,
  ... 
)

construct add method call message

Since:
1.1.8
See alarmd_event_add_with_dbus_params() for details.

cookie_t alarmd_event_add_with_dbus_params_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_event_add_with_dbus_params() for details.

DBusMessage* alarmd_event_add_encode_req ( const alarm_event_t event  ) 

construct add method call message

Since:
1.1.8
See alarmd_event_add() for details.

cookie_t alarmd_event_add_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_event_add() for details.

DBusMessage* alarmd_event_get_encode_req ( cookie_t  cookie  ) 

construct get method call message

Since:
1.1.8
See alarmd_event_get() for details.

alarm_event_t* alarmd_event_get_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_event_get() for details.

DBusMessage* alarmd_event_del_encode_req ( cookie_t  cookie  ) 

construct del method call message

Since:
1.1.8
See alarmd_event_del() for details.

int alarmd_event_del_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_event_del() for details.

DBusMessage* alarmd_event_query_encode_req ( const time_t  first,
const time_t  last,
int32_t  flag_mask,
int32_t  flags,
const char *  appid 
)

construct query method call message

Since:
1.1.8
See alarmd_event_query() for details.

cookie_t* alarmd_event_query_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_event_query() for details.

DBusMessage* alarmd_get_default_snooze_encode_req ( void   ) 

construct get default snooze method call message

Since:
1.1.8
See alarmd_get_default_snooze() for details.

int alarmd_get_default_snooze_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_get_default_snooze() for details.

DBusMessage* alarmd_set_default_snooze_encode_req ( unsigned int  snooze  ) 

construct set default snooze method call message

Since:
1.1.8
See alarmd_set_default_snooze() for details.

int alarmd_set_default_snooze_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_set_default_snooze() for details.

DBusMessage* alarmd_ack_dialog_encode_req ( cookie_t  cookie,
int  button 
)

construct ack dialog message

Since:
1.1.8
See alarmd_ack_dialog() for details.

int alarmd_ack_dialog_decode_rsp ( DBusMessage *  rsp  ) 

parse update method call message

Since:
1.1.8
See alarmd_ack_dialog() for details.

DBusMessage* alarmd_ack_queue_encode_req ( cookie_t cookies,
int  count 
)

construct ack queue message

Since:
1.1.8
See alarmd_ack_queue() for details.

int alarmd_ack_queue_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_ack_queue() for details.

DBusMessage* alarmd_set_debug_encode_req ( unsigned  mask_set,
unsigned  mask_clr,
unsigned  flag_set,
unsigned  flag_clr 
)

construct set debug message

Since:
1.1.8
See alarmd_set_debug() for details.

int alarmd_set_debug_decode_rsp ( DBusMessage *  rsp  ) 

parse update method reply message

Since:
1.1.8
See alarmd_set_debug() for details.


Generated on Mon Feb 22 09:43:04 2010 for libalarm by  doxygen 1.5.6