Main Page | Data Structures | File List | Data Fields | Globals

rpc-ic.c File Reference

#include <string.h>
#include <osso-ic-dbus.h>
#include <osso-log.h>
#include "rpc-dbus.h"
#include "rpc-ic.h"
#include "debug.h"

Include dependency graph for rpc-ic.c:

Go to the source code of this file.

Defines

#define ICD_CONNECTED_SIGNAL   "type='signal',interface='" ICD_DBUS_INTERFACE "',path='" ICD_DBUS_PATH "',member='" ICD_STATUS_CHANGED_SIG "',arg2='CONNECTED'"
 This file is part of alarmd.

Typedefs

typedef _ICNotify ICNotify

Functions

static DBusHandlerResult _ic_connected (DBusConnection *connection, DBusMessage *message, void *user_data)
static gboolean _ic_get_connected_bus (DBusConnection *bus)
gboolean ic_get_connected (void)
 ic_get_connected:
void ic_wait_connection (ICConnectedNotifyCb cb, gpointer user_data)
 ic_wait_connection: : Callback to call when a connection is established.
void ic_unwait_connection (ICConnectedNotifyCb cb, gpointer user_data)
 ic_unwait_connection: : Callback that should be removed.

Variables

static GSList * connection_notifies = NULL
static DBusConnection * system_bus = NULL
static GStaticMutex notify_mutex = G_STATIC_MUTEX_INIT


Define Documentation

#define ICD_CONNECTED_SIGNAL   "type='signal',interface='" ICD_DBUS_INTERFACE "',path='" ICD_DBUS_PATH "',member='" ICD_STATUS_CHANGED_SIG "',arg2='CONNECTED'"
 

This file is part of alarmd.

Contact Person: David Weinehall <david.weinehall@nokia.com>

Copyright (C) 2006 Nokia Corporation alarmd and libalarm are free software; you can redistribute them and/or modify them under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.

alarmd and libalarm are distributed in the hope that they 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 this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Definition at line 29 of file rpc-ic.c.

Referenced by _ic_connected(), ic_unwait_connection(), and ic_wait_connection().


Typedef Documentation

typedef struct _ICNotify ICNotify
 


Function Documentation

static DBusHandlerResult _ic_connected DBusConnection *  connection,
DBusMessage *  message,
void *  user_data
[static]
 

Definition at line 154 of file rpc-ic.c.

References _ICNotify::cb, connection_notifies, DEBUG, ENTER_FUNC, ICD_CONNECTED_SIGNAL, LEAVE_FUNC, notify_mutex, system_bus, and _ICNotify::user_data.

Referenced by ic_unwait_connection(), and ic_wait_connection().

static gboolean _ic_get_connected_bus DBusConnection *  bus  )  [static]
 

Definition at line 42 of file rpc-ic.c.

References dbus_do_call(), ENTER_FUNC, and LEAVE_FUNC.

Referenced by ic_get_connected(), and ic_wait_connection().

gboolean ic_get_connected void   ) 
 

ic_get_connected:

Gets the connection status from ic. Returns: TRUE if there is an active connection.

Definition at line 66 of file rpc-ic.c.

References _ic_get_connected_bus(), conn, DEBUG, ENTER_FUNC, get_dbus_connection(), and LEAVE_FUNC.

Referenced by _alarmd_action_dialog_run().

void ic_unwait_connection ICConnectedNotifyCb  cb,
gpointer  user_data
 

ic_unwait_connection: : Callback that should be removed.

: user daata for callback that should be removed.

Stopds waiting for internet connection for given callback and data.

Definition at line 127 of file rpc-ic.c.

References _ic_connected(), _ICNotify::cb, connection_notifies, ENTER_FUNC, ICD_CONNECTED_SIGNAL, LEAVE_FUNC, notify_mutex, system_bus, and _ICNotify::user_data.

Referenced by _alarmd_action_dialog_finalize().

void ic_wait_connection ICConnectedNotifyCb  cb,
gpointer  user_data
 

ic_wait_connection: : Callback to call when a connection is established.

: User data to pass to the .

Waits for internet connection and calls cb when one comes.

Definition at line 87 of file rpc-ic.c.

References _ic_connected(), _ic_get_connected_bus(), _ICNotify::cb, connection_notifies, DEBUG, ENTER_FUNC, get_dbus_connection(), ICD_CONNECTED_SIGNAL, LEAVE_FUNC, notify_mutex, system_bus, and _ICNotify::user_data.

Referenced by _alarmd_action_dialog_run().


Variable Documentation

GSList* connection_notifies = NULL [static]
 

Definition at line 38 of file rpc-ic.c.

Referenced by _ic_connected(), ic_unwait_connection(), and ic_wait_connection().

GStaticMutex notify_mutex = G_STATIC_MUTEX_INIT [static]
 

Definition at line 40 of file rpc-ic.c.

DBusConnection* system_bus = NULL [static]
 

Definition at line 39 of file rpc-ic.c.


Generated on Thu Dec 21 18:23:31 2006 for Alarmd by  doxygen 1.4.2