src/give_bluetooth.c File Reference

#include "give_bluetooth.h"
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include <conbtdialogs-dbus.h>

Include dependency graph for give_bluetooth.c:

Go to the source code of this file.

Classes

struct  _give_bluetooth_private
 Struct of private members of give_bluetooth. More...

Defines

#define GIVE_BLUETOOTH_GET_PRIVATE(obj)

Typedefs

typedef struct
_give_bluetooth_private 
give_bluetooth_private

Functions

Private functions
GType give_bluetooth_get_type (void)
 Registers the give_bluetooth type statically.
static void give_bluetooth_class_init (give_bluetoothClass *klass)
 Overrites the class finalize function and adds the private structure.
static void give_bluetooth_init (give_bluetooth *self)
 Connects to the DBus system bus.
static void give_bluetooth_finalize (GObject *self)
 Unreferences the private _give_bluetooth_private::dbus_proxy.
Public functions
give_bluetoothgive_bluetooth_new (void)
 Creates a new instance of give_bluetooth.
void give_bluetooth_send_file (give_bluetooth *self, gchar **files)
 Invokes the send file procedure of CONBTDIALOGS.


Detailed Description

The Bluetooth object is responsible for the data transfer. It uses a convenient D-Bus call, which invokes the Hildon Connectivity's Bluetooth rutines. They pops up a dialog to select a visible Bluetooth device as the destination of the sending, doing the data transfer and handling the success or failure cases.

Definition in file give_bluetooth.c.


Define Documentation

#define GIVE_BLUETOOTH_GET_PRIVATE ( obj   ) 

Value:

(G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
                        GIVE_BLUETOOTH_TYPE, \
                        give_bluetooth_private));

Definition at line 36 of file give_bluetooth.c.

Referenced by give_bluetooth_finalize(), give_bluetooth_init(), and give_bluetooth_send_file().


Typedef Documentation

typedef struct _give_bluetooth_private give_bluetooth_private

Definition at line 34 of file give_bluetooth.c.


Function Documentation

static void give_bluetooth_class_init ( give_bluetoothClass klass  )  [static]

Overrites the class finalize function and adds the private structure.

Sets give_bluetooth_finalize as the class' finalize function.
Registers the give_bluetooth_private structure as private member.

Parameters:
klass a give_bluetoothClass class.

Definition at line 116 of file give_bluetooth.c.

References give_bluetooth_finalize().

Referenced by give_bluetooth_get_type().

Here is the call graph for this function:

Here is the caller graph for this function:

static void give_bluetooth_finalize ( GObject *  self  )  [static]

Unreferences the private _give_bluetooth_private::dbus_proxy.

Parameters:
self a GObject.

Definition at line 177 of file give_bluetooth.c.

References _give_bluetooth_private::dbus_proxy, GIVE_BLUETOOTH_GET_PRIVATE, and GIVE_BLUETOOTH_IS_OBJECT.

Referenced by give_bluetooth_class_init().

Here is the caller graph for this function:

GType give_bluetooth_get_type ( void   ) 

Registers the give_bluetooth type statically.

Sets class init, and instance init functions.
The class finalize function has been set in the class init function.

Returns:
The new registered GType, with the name of "give_bluetooth".

Definition at line 80 of file give_bluetooth.c.

References give_bluetooth_class_init(), and give_bluetooth_init().

Here is the call graph for this function:

static void give_bluetooth_init ( give_bluetooth self  )  [static]

Connects to the DBus system bus.

Definition at line 136 of file give_bluetooth.c.

References _give_bluetooth_private::dbus_proxy, GIVE_BLUETOOTH_GET_PRIVATE, and GIVE_BLUETOOTH_IS_OBJECT.

Referenced by give_bluetooth_get_type().

Here is the caller graph for this function:

give_bluetooth * give_bluetooth_new ( void   ) 

Creates a new instance of give_bluetooth.

Returns:
A new give_bluetooth object.

Definition at line 198 of file give_bluetooth.c.

References GIVE_BLUETOOTH_TYPE.

Referenced by give_drag_and_drop_init().

Here is the caller graph for this function:

void give_bluetooth_send_file ( give_bluetooth self,
gchar **  files 
)

Invokes the send file procedure of CONBTDIALOGS.

The job is handled completely by the CONBTDIALOGS_SEND_FILE_REQ method, which pops up the device discovery dialog, send the given files and handles the result.

Parameters:
self A give_bluetooth object.
files A stringlist of filepaths, ended with NULL. The list need to be freed.

Definition at line 220 of file give_bluetooth.c.

References _give_bluetooth_private::dbus_proxy, GIVE_BLUETOOTH_GET_PRIVATE, and GIVE_BLUETOOTH_IS_OBJECT.

Referenced by give_drag_and_drop_send().

Here is the caller graph for this function:


Generated on Sat May 17 16:27:32 2008 for Give by  doxygen 1.5.3