The correct one :-)
Hoping that the attachment goes through...
--
daniele_athome
diff -ruN libframeworkd-glib.orig/src/Makefile.am libframeworkd-glib/src/Makefile.am
--- libframeworkd-glib.orig/src/Makefile.am 2010-03-13 15:27:34.000000000 +0100
+++ libframeworkd-glib/src/Makefile.am 2010-03-13 00:55:11.000000000 +0100
@@ -40,7 +40,8 @@
odeviced/frameworkd-glib-odeviced-audio.c odeviced/frameworkd-glib-odeviced-audio.h \
odeviced/frameworkd-glib-odeviced-realtimeclock.c odeviced/frameworkd-glib-odeviced-realtimeclock.h \
odeviced/frameworkd-glib-odeviced-display.c odeviced/frameworkd-glib-odeviced-display.h \
- odeviced/frameworkd-glib-odeviced-input.c odeviced/frameworkd-glib-odeviced-input.h \
+ odeviced/frameworkd-glib-odeviced-input.c odeviced/frameworkd-glib-odeviced-input.h \
+ odeviced/frameworkd-glib-odeviced-vibrator.c odeviced/frameworkd-glib-odeviced-vibrator.h \
opimd/frameworkd-glib-opimd-dbus.c opimd/frameworkd-glib-opimd-dbus.h \
opimd/frameworkd-glib-opimd-contacts.c opimd/frameworkd-glib-opimd-contacts.h \
opimd/frameworkd-glib-opimd-messages.c opimd/frameworkd-glib-opimd-messages.h \
diff -ruN libframeworkd-glib.orig/src/odeviced/dbus/vibrator.h libframeworkd-glib/src/odeviced/dbus/vibrator.h
--- libframeworkd-glib.orig/src/odeviced/dbus/vibrator.h 1970-01-01 01:00:00.000000000 +0100
+++ libframeworkd-glib/src/odeviced/dbus/vibrator.h 2010-03-13 00:56:24.000000000 +0100
@@ -0,0 +1,137 @@
+/* Generated by dbus-binding-tool; do not edit! */
+
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+
+G_BEGIN_DECLS
+
+#ifndef _DBUS_GLIB_ASYNC_DATA_FREE
+#define _DBUS_GLIB_ASYNC_DATA_FREE
+static
+#ifdef G_HAVE_INLINE
+inline
+#endif
+void
+_dbus_glib_async_data_free (gpointer stuff)
+{
+ g_slice_free (DBusGAsyncData, stuff);
+}
+#endif
+
+#ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_freesmartphone_Device_Vibrator
+#define DBUS_GLIB_CLIENT_WRAPPERS_org_freesmartphone_Device_Vibrator
+
+static
+#ifdef G_HAVE_INLINE
+inline
+#endif
+gboolean
+org_freesmartphone_Device_Vibrator_vibrate_pattern (DBusGProxy *proxy, const gint IN_pulses, const gint IN_on_duration, const gint IN_off_duration, const gint IN_strength, GError **error)
+
+{
+ return dbus_g_proxy_call (proxy, "VibratePattern", error, G_TYPE_INT, IN_pulses, G_TYPE_INT, IN_on_duration, G_TYPE_INT, IN_off_duration, G_TYPE_INT, IN_strength, G_TYPE_INVALID, G_TYPE_INVALID);
+}
+
+typedef void (*org_freesmartphone_Device_Vibrator_vibrate_pattern_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
+
+static void
+org_freesmartphone_Device_Vibrator_vibrate_pattern_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
+{
+ DBusGAsyncData *data = (DBusGAsyncData*) user_data;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
+ (*(org_freesmartphone_Device_Vibrator_vibrate_pattern_reply)data->cb) (proxy, error, data->userdata);
+ return;
+}
+
+static
+#ifdef G_HAVE_INLINE
+inline
+#endif
+DBusGProxyCall*
+org_freesmartphone_Device_Vibrator_vibrate_pattern_async (DBusGProxy *proxy, const gint IN_pulses, const gint IN_on_duration, const gint IN_off_duration, const gint IN_strength, org_freesmartphone_Device_Vibrator_vibrate_pattern_reply callback, gpointer userdata)
+
+{
+ DBusGAsyncData *stuff;
+ stuff = g_slice_new (DBusGAsyncData);
+ stuff->cb = G_CALLBACK (callback);
+ stuff->userdata = userdata;
+ return dbus_g_proxy_begin_call (proxy, "VibratePattern", org_freesmartphone_Device_Vibrator_vibrate_pattern_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT, IN_pulses, G_TYPE_INT, IN_on_duration, G_TYPE_INT, IN_off_duration, G_TYPE_INT, IN_strength, G_TYPE_INVALID);
+}
+static
+#ifdef G_HAVE_INLINE
+inline
+#endif
+gboolean
+org_freesmartphone_Device_Vibrator_vibrate (DBusGProxy *proxy, const gint IN_duration, const gint IN_strength, GError **error)
+
+{
+ return dbus_g_proxy_call (proxy, "Vibrate", error, G_TYPE_INT, IN_duration, G_TYPE_INT, IN_strength, G_TYPE_INVALID, G_TYPE_INVALID);
+}
+
+typedef void (*org_freesmartphone_Device_Vibrator_vibrate_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
+
+static void
+org_freesmartphone_Device_Vibrator_vibrate_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
+{
+ DBusGAsyncData *data = (DBusGAsyncData*) user_data;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
+ (*(org_freesmartphone_Device_Vibrator_vibrate_reply)data->cb) (proxy, error, data->userdata);
+ return;
+}
+
+static
+#ifdef G_HAVE_INLINE
+inline
+#endif
+DBusGProxyCall*
+org_freesmartphone_Device_Vibrator_vibrate_async (DBusGProxy *proxy, const gint IN_duration, const gint IN_strength, org_freesmartphone_Device_Vibrator_vibrate_reply callback, gpointer userdata)
+
+{
+ DBusGAsyncData *stuff;
+ stuff = g_slice_new (DBusGAsyncData);
+ stuff->cb = G_CALLBACK (callback);
+ stuff->userdata = userdata;
+ return dbus_g_proxy_begin_call (proxy, "Vibrate", org_freesmartphone_Device_Vibrator_vibrate_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT, IN_duration, G_TYPE_INT, IN_strength, G_TYPE_INVALID);
+}
+static
+#ifdef G_HAVE_INLINE
+inline
+#endif
+gboolean
+org_freesmartphone_Device_Vibrator_stop (DBusGProxy *proxy, GError **error)
+
+{
+ return dbus_g_proxy_call (proxy, "Stop", error, G_TYPE_INVALID, G_TYPE_INVALID);
+}
+
+typedef void (*org_freesmartphone_Device_Vibrator_stop_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
+
+static void
+org_freesmartphone_Device_Vibrator_stop_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
+{
+ DBusGAsyncData *data = (DBusGAsyncData*) user_data;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
+ (*(org_freesmartphone_Device_Vibrator_stop_reply)data->cb) (proxy, error, data->userdata);
+ return;
+}
+
+static
+#ifdef G_HAVE_INLINE
+inline
+#endif
+DBusGProxyCall*
+org_freesmartphone_Device_Vibrator_stop_async (DBusGProxy *proxy, org_freesmartphone_Device_Vibrator_stop_reply callback, gpointer userdata)
+
+{
+ DBusGAsyncData *stuff;
+ stuff = g_slice_new (DBusGAsyncData);
+ stuff->cb = G_CALLBACK (callback);
+ stuff->userdata = userdata;
+ return dbus_g_proxy_begin_call (proxy, "Stop", org_freesmartphone_Device_Vibrator_stop_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
+}
+#endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_freesmartphone_Device_Vibrator */
+
+G_END_DECLS
diff -ruN libframeworkd-glib.orig/src/odeviced/dbus/vibrator.xml libframeworkd-glib/src/odeviced/dbus/vibrator.xml
--- libframeworkd-glib.orig/src/odeviced/dbus/vibrator.xml 1970-01-01 01:00:00.000000000 +0100
+++ libframeworkd-glib/src/odeviced/dbus/vibrator.xml 2010-03-13 00:54:22.000000000 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/">
+ <interface name="org.freesmartphone.Device.Vibrator">
+ <method name="VibratePattern">
+ <arg direction="in" type="i" name="pulses"/>
+ <arg direction="in" type="i" name="on_duration"/>
+ <arg direction="in" type="i" name="off_duration"/>
+ <arg direction="in" type="i" name="strength"/>
+ </method>
+ <method name="Vibrate">
+ <arg direction="in" type="i" name="duration"/>
+ <arg direction="in" type="i" name="strength"/>
+ </method>
+ <method name="Stop"/>
+ </interface>
+</node>
diff -ruN libframeworkd-glib.orig/src/odeviced/frameworkd-glib-odeviced-dbus.c libframeworkd-glib/src/odeviced/frameworkd-glib-odeviced-dbus.c
--- libframeworkd-glib.orig/src/odeviced/frameworkd-glib-odeviced-dbus.c 2010-03-13 15:27:34.000000000 +0100
+++ libframeworkd-glib/src/odeviced/frameworkd-glib-odeviced-dbus.c 2010-03-13 01:07:27.000000000 +0100
@@ -29,6 +29,7 @@
#include "frameworkd-glib-odeviced-realtimeclock.h"
#include "frameworkd-glib-odeviced-display.h"
#include "frameworkd-glib-odeviced-input.h"
+#include "frameworkd-glib-odeviced-vibrator.h"
void
dbus_connect_to_odeviced_idle_notifier()
@@ -95,3 +96,13 @@
"Device Input");
}
+void dbus_connect_to_odeviced_vibrator()
+{
+ if (odevicedVibratorBus == NULL)
+ odevicedVibratorBus =
+ dbus_connect_to_interface(ODEVICED_BUS,
+ DEVICE_VIBRATOR_BUS_PATH,
+ DEVICE_VIBRATOR_INTERFACE,
+ "Device Vibrator");
+}
+
diff -ruN libframeworkd-glib.orig/src/odeviced/frameworkd-glib-odeviced-dbus.h libframeworkd-glib/src/odeviced/frameworkd-glib-odeviced-dbus.h
--- libframeworkd-glib.orig/src/odeviced/frameworkd-glib-odeviced-dbus.h 2010-03-13 15:27:34.000000000 +0100
+++ libframeworkd-glib/src/odeviced/frameworkd-glib-odeviced-dbus.h 2010-03-13 01:06:38.000000000 +0100
@@ -39,6 +39,8 @@
#define DEVICE_DISPLAY_INTERFACE "org.freesmartphone.Device.Display"
#define DEVICE_INPUT_BUS_PATH "/org/freesmartphone/Device/Input"
#define DEVICE_INPUT_INTERFACE "org.freesmartphone.Device.Input"
+#define DEVICE_VIBRATOR_BUS_PATH "/org/freesmartphone/Device/Vibrator/0"
+#define DEVICE_VIBRATOR_INTERFACE "org.freesmartphone.Device.Vibrator"
void dbus_connect_to_odeviced_idle_notifier();
@@ -53,6 +55,8 @@
void dbus_connect_to_odeviced_input();
+void dbus_connect_to_odeviced_vibrator();
+
G_END_DECLS
#endif
diff -ruN libframeworkd-glib.orig/src/odeviced/frameworkd-glib-odeviced-vibrator.c libframeworkd-glib/src/odeviced/frameworkd-glib-odeviced-vibrator.c
--- libframeworkd-glib.orig/src/odeviced/frameworkd-glib-odeviced-vibrator.c 1970-01-01 01:00:00.000000000 +0100
+++ libframeworkd-glib/src/odeviced/frameworkd-glib-odeviced-vibrator.c 2010-03-13 14:04:57.000000000 +0100
@@ -0,0 +1,386 @@
+/*
+ * Copyright (C) 2008
+ * Authors (alphabetical) :
+ * Marc-Olivier Barre <[email protected]>
+ * Julien Cassignol <[email protected]>
+ * quickdev
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Public License as published by
+ * the Free Software Foundation; version 2 of the license.
+ *
+ * This program 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 Public License for more details.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-bindings.h>
+#include "frameworkd-glib-odeviced-dbus.h"
+#include "dbus/vibrator.h"
+
+DBusGProxy *odevicedVibratorBus = NULL;
+
+typedef struct {
+ void (*callback) (GError *, gpointer);
+ gpointer userdata;
+} odeviced_vibrator_vibrate_pattern_data_t;
+
+static void
+odeviced_vibrator_vibrate_pattern_callback(DBusGProxy * bus, GError * dbus_error,
+ gpointer userdata)
+{
+ (void)bus;
+ odeviced_vibrator_vibrate_pattern_data_t *data = userdata;
+ GError *error = NULL;
+
+ if (data->callback != NULL) {
+ if (dbus_error != NULL)
+ error = dbus_handle_errors(dbus_error);
+
+ data->callback(error, data->userdata);
+ if (error != NULL)
+ g_error_free(error);
+ }
+
+ if (dbus_error != NULL)
+ g_error_free(dbus_error);
+ g_free(data);
+}
+
+void odeviced_vibrator_vibrate_pattern(int pulses, int on_duration, int off_duration, int strength,
+ void (*callback) (GError *, gpointer), gpointer userdata)
+{
+ odeviced_vibrator_vibrate_pattern_data_t *data =
+ g_malloc(sizeof(odeviced_vibrator_vibrate_pattern_data_t));
+ data->callback = callback;
+ data->userdata = userdata;
+
+ org_freesmartphone_Device_Vibrator_vibrate_pattern_async(odevicedVibratorBus,
+ pulses, on_duration, off_duration, strength,
+ odeviced_vibrator_vibrate_pattern_callback,
+ data);
+}
+
+typedef struct {
+ void (*callback) (GError *, gpointer);
+ gpointer userdata;
+} odeviced_vibrator_vibrate_data_t;
+
+static void
+odeviced_vibrator_vibrate_callback(DBusGProxy * bus, GError * dbus_error,
+ gpointer userdata)
+{
+ (void)bus;
+ odeviced_vibrator_vibrate_data_t *data = userdata;
+ GError *error = NULL;
+
+ if (data->callback != NULL) {
+ if (dbus_error != NULL)
+ error = dbus_handle_errors(dbus_error);
+
+ data->callback(error, data->userdata);
+ if (error != NULL)
+ g_error_free(error);
+ }
+
+ if (dbus_error != NULL)
+ g_error_free(dbus_error);
+ g_free(data);
+}
+
+void odeviced_vibrator_vibrate(int duration, int strength,
+ void (*callback) (GError *, gpointer), gpointer userdata)
+{
+ odeviced_vibrator_vibrate_data_t *data =
+ g_malloc(sizeof(odeviced_vibrator_vibrate_data_t));
+ data->callback = callback;
+ data->userdata = userdata;
+
+ org_freesmartphone_Device_Vibrator_vibrate_async(odevicedVibratorBus,
+ duration, strength,
+ odeviced_vibrator_vibrate_callback,
+ data);
+}
+
+typedef struct {
+ void (*callback) (GError *, gpointer);
+ gpointer userdata;
+} odeviced_vibrator_stop_data_t;
+
+static void
+odeviced_vibrator_stop_callback(DBusGProxy * bus, GError * dbus_error,
+ gpointer userdata)
+{
+ (void)bus;
+ odeviced_vibrator_stop_data_t *data = userdata;
+ GError *error = NULL;
+
+ if (data->callback != NULL) {
+ if (dbus_error != NULL)
+ error = dbus_handle_errors(dbus_error);
+
+ data->callback(error, data->userdata);
+ if (error != NULL)
+ g_error_free(error);
+ }
+
+ if (dbus_error != NULL)
+ g_error_free(dbus_error);
+ g_free(data);
+}
+
+void odeviced_vibrator_stop(void (*callback) (GError *, gpointer), gpointer userdata)
+{
+ odeviced_vibrator_stop_data_t *data =
+ g_malloc(sizeof(odeviced_vibrator_stop_data_t));
+ data->callback = callback;
+ data->userdata = userdata;
+
+ org_freesmartphone_Device_Vibrator_stop_async(odevicedVibratorBus,
+ odeviced_vibrator_stop_callback,
+ data);
+}
+
+#if 0
+void
+odeviced_audio_get_info_callback(DBusGProxy * bus, GHashTable * info,
+ GError * dbus_error, gpointer userdata)
+{
+ (void)bus;
+ odeviced_audio_get_info_data_t *data = userdata;
+ GError *error = NULL;
+
+ if (data->callback != NULL) {
+ if (dbus_error != NULL)
+ error = dbus_handle_errors(dbus_error);
+
+ data->callback(error, info, data->userdata);
+ if (error != NULL) {
+ g_error_free(error);
+ }
+ else {
+ g_free(info);
+ }
+ }
+
+ if (dbus_error != NULL)
+ g_error_free(dbus_error);
+ g_free(data);
+}
+
+void
+odeviced_audio_get_info(void (*callback) (GError *, GHashTable *, gpointer),
+ gpointer userdata)
+{
+ dbus_connect_to_odeviced_audio();
+
+ odeviced_audio_get_info_data_t *data =
+ g_malloc(sizeof(odeviced_audio_get_info_data_t));
+ data->callback = callback;
+ data->userdata = userdata;
+
+ org_freesmartphone_Device_Audio_get_info_async(odevicedAudioBus,
+ odeviced_audio_get_info_callback,
+ data);
+}
+
+typedef struct {
+ void (*callback) (GError *, gpointer);
+ gpointer userdata;
+} odeviced_audio_push_scenario_data_t;
+
+
+void
+odeviced_audio_push_scenario_callback(DBusGProxy * bus, GError * dbus_error,
+ gpointer userdata)
+{
+ (void)bus;
+ odeviced_audio_push_scenario_data_t *data = userdata;
+ GError *error = NULL;
+
+ if (data->callback != NULL) {
+ if (dbus_error != NULL)
+ error = dbus_handle_errors(dbus_error);
+
+ data->callback(error, data->userdata);
+ if (error != NULL)
+ g_error_free(error);
+ }
+
+ if (dbus_error != NULL)
+ g_error_free(dbus_error);
+ g_free(data);
+}
+
+void
+odeviced_audio_push_scenario(char *scenario,
+ void (*callback) (GError *, gpointer),
+ gpointer userdata)
+{
+ dbus_connect_to_odeviced_audio();
+
+ odeviced_audio_push_scenario_data_t *data =
+ g_malloc(sizeof(odeviced_audio_push_scenario_data_t));
+ data->callback = callback;
+ data->userdata = userdata;
+
+ org_freesmartphone_Device_Audio_push_scenario_async(odevicedAudioBus,
+ scenario,
+ odeviced_audio_push_scenario_callback,
+ data);
+}
+
+typedef struct {
+ void (*callback) (GError *, char *, gpointer);
+ gpointer userdata;
+} odeviced_audio_pull_scenario_data_t;
+
+
+void
+odeviced_audio_pull_scenario_callback(DBusGProxy * bus, char *scenario,
+ GError * dbus_error, gpointer userdata)
+{
+ (void)bus;
+ odeviced_audio_pull_scenario_data_t *data = userdata;
+ GError *error = NULL;
+
+ if (data->callback != NULL) {
+ if (dbus_error != NULL)
+ error = dbus_handle_errors(dbus_error);
+
+ data->callback(error, scenario, data->userdata);
+ if (error != NULL)
+ g_error_free(error);
+ else
+ free(scenario);
+ }
+
+ if (dbus_error != NULL)
+ g_error_free(dbus_error);
+ g_free(data);
+}
+
+void
+odeviced_audio_pull_scenario(void (*callback) (GError *, char *, gpointer),
+ gpointer userdata)
+{
+ dbus_connect_to_odeviced_audio();
+
+ odeviced_audio_pull_scenario_data_t *data =
+ g_malloc(sizeof(odeviced_audio_pull_scenario_data_t));
+ data->callback = callback;
+ data->userdata = userdata;
+
+ org_freesmartphone_Device_Audio_pull_scenario_async(odevicedAudioBus,
+ odeviced_audio_pull_scenario_callback,
+ data);
+}
+
+typedef struct {
+ void (*callback) (GError *, gpointer);
+ gpointer userdata;
+} odeviced_audio_set_scenario_data_t;
+
+
+void
+odeviced_audio_set_scenario_callback(DBusGProxy * bus, GError * dbus_error,
+ gpointer userdata)
+{
+ (void)bus;
+ odeviced_audio_set_scenario_data_t *data = userdata;
+ GError *error = NULL;
+
+ if (data->callback != NULL) {
+ if (dbus_error != NULL)
+ error = dbus_handle_errors(dbus_error);
+
+ data->callback(error, data->userdata);
+ if (error != NULL)
+ g_error_free(error);
+ }
+
+ if (dbus_error != NULL)
+ g_error_free(dbus_error);
+ g_free(data);
+}
+
+void
+odeviced_audio_set_scenario(char *scenario,
+ void (*callback) (GError *, gpointer),
+ gpointer userdata)
+{
+ dbus_connect_to_odeviced_audio();
+
+ odeviced_audio_set_scenario_data_t *data =
+ g_malloc(sizeof(odeviced_audio_set_scenario_data_t));
+ data->callback = callback;
+ data->userdata = userdata;
+
+ org_freesmartphone_Device_Audio_set_scenario_async(odevicedAudioBus,
+ scenario, odeviced_audio_set_scenario_callback, data);
+}
+
+typedef struct {
+ void (*callback) (GError *, gpointer);
+ gpointer userdata;
+} odeviced_audio_save_scenario_data_t;
+
+void
+odeviced_audio_save_scenario_callback(DBusGProxy * bus, GError * dbus_error,
+ gpointer userdata)
+{
+ (void)bus;
+ odeviced_audio_save_scenario_data_t *data = userdata;
+ GError *error = NULL;
+
+ if (data->callback != NULL) {
+ if (dbus_error != NULL)
+ error = dbus_handle_errors(dbus_error);
+
+ data->callback(error, data->userdata);
+ if (error != NULL)
+ g_error_free(error);
+ }
+
+ if (dbus_error != NULL)
+ g_error_free(dbus_error);
+ g_free(data);
+}
+
+void
+odeviced_audio_save_scenario(const char* scenario,
+ void (*callback)(GError *, gpointer),
+ gpointer userdata)
+{
+ dbus_connect_to_odeviced_audio();
+
+ odeviced_audio_save_scenario_data_t *data =
+ g_malloc(sizeof(odeviced_audio_save_scenario_data_t));
+ data->callback = callback;
+ data->userdata = userdata;
+
+ org_freesmartphone_Device_Audio_save_scenario_async(odevicedAudioBus,
+ scenario, odeviced_audio_save_scenario_callback, data);
+}
+
+void
+odeviced_audio_sound_status_handler(DBusGProxy * proxy, char *id,
+ char *status, GHashTable * properties,
+ gpointer user_data)
+{
+ (void)proxy;
+ void (*callback) (char *, char *, GHashTable *) = NULL;
+
+ callback = user_data;
+
+ if (callback != NULL)
+ (*callback) (id, status, properties);
+}
+#endif
\ Manca newline alla fine del file
diff -ruN libframeworkd-glib.orig/src/odeviced/frameworkd-glib-odeviced-vibrator.h libframeworkd-glib/src/odeviced/frameworkd-glib-odeviced-vibrator.h
--- libframeworkd-glib.orig/src/odeviced/frameworkd-glib-odeviced-vibrator.h 1970-01-01 01:00:00.000000000 +0100
+++ libframeworkd-glib/src/odeviced/frameworkd-glib-odeviced-vibrator.h 2010-03-13 00:58:35.000000000 +0100
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2008
+ * Authors (alphabetical) :
+ * quickdev
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Public License as published by
+ * the Free Software Foundation; version 2 of the license.
+ *
+ * This program 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 Public License for more details.
+ */
+
+#ifndef FRAMEWORKD_GLIB_ODEVICED_VIBRATOR_H
+#define FRAMEWORKD_GLIB_ODEVICED_VIBRATOR_H
+
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+
+G_BEGIN_DECLS
+
+void odeviced_vibrator_vibrate_pattern(int pulses, int on_duration, int off_duration, int strength,
+ void (*callback) (GError *, gpointer), gpointer userdata);
+
+void odeviced_vibrator_vibrate(int duration, int strength,
+ void (*callback) (GError *, gpointer), gpointer userdata);
+
+void odeviced_vibrator_stop(void (*callback) (GError *, gpointer), gpointer userdata);
+
+
+extern DBusGProxy *odevicedVibratorBus;
+
+G_END_DECLS
+#endif
diff -ruN libframeworkd-glib.orig/src/odeviced/Makefile.am libframeworkd-glib/src/odeviced/Makefile.am
--- libframeworkd-glib.orig/src/odeviced/Makefile.am 2010-03-13 15:27:34.000000000 +0100
+++ libframeworkd-glib/src/odeviced/Makefile.am 2010-03-13 00:54:43.000000000 +0100
@@ -2,9 +2,9 @@
frameworkd-glib-odeviced-dbus.h frameworkd-glib-odeviced-idlenotifier.h \
frameworkd-glib-odeviced-powersupply.h frameworkd-glib-odeviced-audio.h \
frameworkd-glib-odeviced-display.h frameworkd-glib-odeviced-realtimeclock.h \
- frameworkd-glib-odeviced-input.h \
+ frameworkd-glib-odeviced-input.h frameworkd-glib-odeviced-vibrator.h \
dbus/idlenotifier.h dbus/audio.h dbus/powersupply.h dbus/display.h \
- dbus/realtimeclock.h dbus/input.h
+ dbus/realtimeclock.h dbus/input.h dbus/vibrator.h
libframeworkd_glibdir = $(includedir)/frameworkd-glib/odeviced/
_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel