summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-01-18 14:04:24 +0000
committerRichard Hughes <richard@hughsie.com>2010-01-18 14:04:24 +0000
commit8362088d1202953e52ffcf45378c69383540fa69 (patch)
tree2adc5f2db1a39151ff7adb5ac922df03088c97da
parent8b219b243e1de178a96743f838865d2c0aac9512 (diff)
trivial: rename some internal defines for the upower move
-rw-r--r--devkit-power-gobject/Makefile.am2
-rw-r--r--devkit-power-gobject/devicekit-power.h4
-rw-r--r--devkit-power-gobject/dkp-client.c2
-rw-r--r--devkit-power-gobject/dkp-client.h4
-rw-r--r--devkit-power-gobject/dkp-device.h2
-rw-r--r--devkit-power-gobject/dkp-enum.h2
-rw-r--r--devkit-power-gobject/dkp-history-obj.h2
-rw-r--r--devkit-power-gobject/dkp-qos-obj.h2
-rw-r--r--devkit-power-gobject/dkp-stats-obj.h2
-rw-r--r--devkit-power-gobject/dkp-version.h.in2
-rw-r--r--devkit-power-gobject/dkp-wakeups-obj.h2
-rw-r--r--devkit-power-gobject/dkp-wakeups.h2
-rw-r--r--src/Makefile.am12
-rw-r--r--src/dummy/Makefile.am10
-rw-r--r--src/freebsd/Makefile.am10
-rw-r--r--src/linux/Makefile.am10
-rw-r--r--src/up-device-list.h3
-rw-r--r--src/up-device.c12
-rw-r--r--src/up-history.h3
-rw-r--r--src/up-main.c20
-rw-r--r--tools/Makefile.am6
21 files changed, 58 insertions, 56 deletions
diff --git a/devkit-power-gobject/Makefile.am b/devkit-power-gobject/Makefile.am
index ecb57d8..c21b9a4 100644
--- a/devkit-power-gobject/Makefile.am
+++ b/devkit-power-gobject/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = \
$(DBUS_GLIB_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/devkit-power-gobject \
- -DDKP_COMPILATION \
+ -DUP_COMPILATION \
-DG_LOG_DOMAIN=\"devkit-power-gobject\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
diff --git a/devkit-power-gobject/devicekit-power.h b/devkit-power-gobject/devicekit-power.h
index 6d173a9..7573a67 100644
--- a/devkit-power-gobject/devicekit-power.h
+++ b/devkit-power-gobject/devicekit-power.h
@@ -26,7 +26,7 @@
#ifndef __DEVICEKIT_POWER_H__
#define __DEVICEKIT_POWER_H__
-#define __DEVICEKIT_POWER_H_INSIDE__
+#define __UPOWER_H_INSIDE__
#include <devkit-power-gobject/dkp-version.h>
#include <devkit-power-gobject/dkp-client.h>
@@ -38,7 +38,7 @@
#include <devkit-power-gobject/dkp-wakeups.h>
#include <devkit-power-gobject/dkp-wakeups-obj.h>
-#undef __DEVICEKIT_POWER_H_INSIDE__
+#undef __UPOWER_H_INSIDE__
#endif /* __DEVICEKIT_POWER_H__ */
diff --git a/devkit-power-gobject/dkp-client.c b/devkit-power-gobject/dkp-client.c
index 7b1e783..34f7b58 100644
--- a/devkit-power-gobject/dkp-client.c
+++ b/devkit-power-gobject/dkp-client.c
@@ -335,7 +335,7 @@ out:
g_hash_table_unref (props);
}
-#ifndef DKP_DISABLE_DEPRECATED
+#ifndef UP_DISABLE_DEPRECATED
/**
* dkp_client_get_daemon_version:
* @client : a #DkpClient instance.
diff --git a/devkit-power-gobject/dkp-client.h b/devkit-power-gobject/dkp-client.h
index 1644387..b4a3248 100644
--- a/devkit-power-gobject/dkp-client.h
+++ b/devkit-power-gobject/dkp-client.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
@@ -79,7 +79,7 @@ gboolean dkp_client_suspend (DkpClient *client,
GError **error);
gboolean dkp_client_hibernate (DkpClient *client,
GError **error);
-#ifndef DKP_DISABLE_DEPRECATED
+#ifndef UP_DISABLE_DEPRECATED
const gchar *dkp_client_get_daemon_version (DkpClient *client);
gboolean dkp_client_can_hibernate (DkpClient *client);
gboolean dkp_client_lid_is_closed (DkpClient *client);
diff --git a/devkit-power-gobject/dkp-device.h b/devkit-power-gobject/dkp-device.h
index a7956b9..1b43086 100644
--- a/devkit-power-gobject/dkp-device.h
+++ b/devkit-power-gobject/dkp-device.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
diff --git a/devkit-power-gobject/dkp-enum.h b/devkit-power-gobject/dkp-enum.h
index da7de48..b224595 100644
--- a/devkit-power-gobject/dkp-enum.h
+++ b/devkit-power-gobject/dkp-enum.h
@@ -19,7 +19,7 @@
*
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
diff --git a/devkit-power-gobject/dkp-history-obj.h b/devkit-power-gobject/dkp-history-obj.h
index bcd0b19..ad7a90f 100644
--- a/devkit-power-gobject/dkp-history-obj.h
+++ b/devkit-power-gobject/dkp-history-obj.h
@@ -18,7 +18,7 @@
*
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
diff --git a/devkit-power-gobject/dkp-qos-obj.h b/devkit-power-gobject/dkp-qos-obj.h
index e9a496c..3ae6bcc 100644
--- a/devkit-power-gobject/dkp-qos-obj.h
+++ b/devkit-power-gobject/dkp-qos-obj.h
@@ -18,7 +18,7 @@
*
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
diff --git a/devkit-power-gobject/dkp-stats-obj.h b/devkit-power-gobject/dkp-stats-obj.h
index 3b31975..9555712 100644
--- a/devkit-power-gobject/dkp-stats-obj.h
+++ b/devkit-power-gobject/dkp-stats-obj.h
@@ -18,7 +18,7 @@
*
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
diff --git a/devkit-power-gobject/dkp-version.h.in b/devkit-power-gobject/dkp-version.h.in
index 528cda4..57daa58 100644
--- a/devkit-power-gobject/dkp-version.h.in
+++ b/devkit-power-gobject/dkp-version.h.in
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
diff --git a/devkit-power-gobject/dkp-wakeups-obj.h b/devkit-power-gobject/dkp-wakeups-obj.h
index 8383839..0119950 100644
--- a/devkit-power-gobject/dkp-wakeups-obj.h
+++ b/devkit-power-gobject/dkp-wakeups-obj.h
@@ -18,7 +18,7 @@
*
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
diff --git a/devkit-power-gobject/dkp-wakeups.h b/devkit-power-gobject/dkp-wakeups.h
index 7ff10e3..18e9df7 100644
--- a/devkit-power-gobject/dkp-wakeups.h
+++ b/devkit-power-gobject/dkp-wakeups.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#if !defined (__DEVICEKIT_POWER_H_INSIDE__) && !defined (DKP_COMPILATION)
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 13a431b..94d0afc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,12 +13,12 @@ INCLUDES = \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
-DG_UDEV_API_IS_SUBJECT_TO_CHANGE \
- -DDKP_COMPILATION \
- -DDKP_DISABLE_DEPRECATED \
- -DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \
- -DEGG_VERBOSE="\"DKP_VERBOSE\"" \
- -DEGG_LOGGING="\"DKP_LOGGING\"" \
- -DEGG_CONSOLE="\"DKP_CONSOLE\"" \
+ -DUP_COMPILATION \
+ -DUP_DISABLE_DEPRECATED \
+ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
+ -DEGG_VERBOSE="\"UP_VERBOSE\"" \
+ -DEGG_LOGGING="\"UP_LOGGING\"" \
+ -DEGG_CONSOLE="\"UP_CONSOLE\"" \
-I$(top_srcdir)/libupower-glib \
-I$(top_srcdir)/devkit-power-gobject \
-I$(top_srcdir) \
diff --git a/src/dummy/Makefile.am b/src/dummy/Makefile.am
index 23eed44..ef1742b 100644
--- a/src/dummy/Makefile.am
+++ b/src/dummy/Makefile.am
@@ -2,11 +2,11 @@
INCLUDES = \
-I$(top_builddir)/src -I$(top_srcdir)/src \
- -DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \
- -DEGG_VERBOSE="\"DKP_VERBOSE\"" \
- -DEGG_LOGGING="\"DKP_LOGGING\"" \
- -DEGG_CONSOLE="\"DKP_CONSOLE\"" \
- -DDKP_COMPILATION \
+ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
+ -DEGG_VERBOSE="\"UP_VERBOSE\"" \
+ -DEGG_LOGGING="\"UP_LOGGING\"" \
+ -DEGG_CONSOLE="\"UP_CONSOLE\"" \
+ -DUP_COMPILATION \
-DEGG_TEST \
-I$(top_srcdir)/devkit-power-gobject \
$(DBUS_GLIB_CFLAGS) \
diff --git a/src/freebsd/Makefile.am b/src/freebsd/Makefile.am
index 281137e..85f792f 100644
--- a/src/freebsd/Makefile.am
+++ b/src/freebsd/Makefile.am
@@ -2,11 +2,11 @@
INCLUDES = \
-I$(top_builddir)/src -I$(top_srcdir)/src \
- -DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \
- -DEGG_VERBOSE="\"DKP_VERBOSE\"" \
- -DEGG_LOGGING="\"DKP_LOGGING\"" \
- -DEGG_CONSOLE="\"DKP_CONSOLE\"" \
- -DDKP_COMPILATION \
+ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
+ -DEGG_VERBOSE="\"UP_VERBOSE\"" \
+ -DEGG_LOGGING="\"UP_LOGGING\"" \
+ -DEGG_CONSOLE="\"UP_CONSOLE\"" \
+ -DUP_COMPILATION \
-I$(top_srcdir)/devkit-power-gobject \
$(DBUS_GLIB_CFLAGS) \
$(POLKIT_CFLAGS) \
diff --git a/src/linux/Makefile.am b/src/linux/Makefile.am
index 4908f42..79b3187 100644
--- a/src/linux/Makefile.am
+++ b/src/linux/Makefile.am
@@ -2,11 +2,11 @@
INCLUDES = \
-I$(top_builddir)/src -I$(top_srcdir)/src \
- -DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \
- -DEGG_VERBOSE="\"DKP_VERBOSE\"" \
- -DEGG_LOGGING="\"DKP_LOGGING\"" \
- -DEGG_CONSOLE="\"DKP_CONSOLE\"" \
- -DDKP_COMPILATION \
+ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
+ -DEGG_VERBOSE="\"UP_VERBOSE\"" \
+ -DEGG_LOGGING="\"UP_LOGGING\"" \
+ -DEGG_CONSOLE="\"UP_CONSOLE\"" \
+ -DUP_COMPILATION \
-DG_UDEV_API_IS_SUBJECT_TO_CHANGE \
-I$(top_srcdir)/devkit-power-gobject \
$(GIO_CFLAGS) \
diff --git a/src/up-device-list.h b/src/up-device-list.h
index 86fcf19..842b95d 100644
--- a/src/up-device-list.h
+++ b/src/up-device-list.h
@@ -23,7 +23,8 @@
#define __UP_DEVICE_LIST_H
#include <glib-object.h>
-#include <dkp-enum.h>
+
+#include "up-enum.h"
G_BEGIN_DECLS
diff --git a/src/up-device.c b/src/up-device.c
index 2ea94df..9f810d1 100644
--- a/src/up-device.c
+++ b/src/up-device.c
@@ -126,9 +126,9 @@ static guint signals[SIGNAL_LAST] = { 0 };
G_DEFINE_TYPE (UpDevice, up_device, G_TYPE_OBJECT)
#define UP_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_DEVICE, UpDevicePrivate))
-#define DKP_DBUS_STRUCT_UINT_DOUBLE_UINT (dbus_g_type_get_struct ("GValueArray", \
+#define UP_DBUS_STRUCT_UINT_DOUBLE_UINT (dbus_g_type_get_struct ("GValueArray", \
G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_UINT, G_TYPE_INVALID))
-#define DKP_DBUS_STRUCT_DOUBLE_DOUBLE (dbus_g_type_get_struct ("GValueArray", \
+#define UP_DBUS_STRUCT_DOUBLE_DOUBLE (dbus_g_type_get_struct ("GValueArray", \
G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_INVALID))
/**
@@ -635,8 +635,8 @@ up_device_get_statistics (UpDevice *device, const gchar *type, DBusGMethodInvoca
for (i=0; i<array->len; i++) {
obj = (const UpStatsObj *) g_ptr_array_index (array, i);
value = g_new0 (GValue, 1);
- g_value_init (value, DKP_DBUS_STRUCT_DOUBLE_DOUBLE);
- g_value_take_boxed (value, dbus_g_type_specialized_construct (DKP_DBUS_STRUCT_DOUBLE_DOUBLE));
+ g_value_init (value, UP_DBUS_STRUCT_DOUBLE_DOUBLE);
+ g_value_take_boxed (value, dbus_g_type_specialized_construct (UP_DBUS_STRUCT_DOUBLE_DOUBLE));
dbus_g_type_struct_set (value, 0, obj->value, 1, obj->accuracy, -1);
g_ptr_array_add (complex, g_value_get_boxed (value));
g_free (value);
@@ -699,8 +699,8 @@ up_device_get_history (UpDevice *device, const gchar *type_string, guint timespa
for (i=0; i<array->len; i++) {
obj = (const UpHistoryObj *) g_ptr_array_index (array, i);
value = g_new0 (GValue, 1);
- g_value_init (value, DKP_DBUS_STRUCT_UINT_DOUBLE_UINT);
- g_value_take_boxed (value, dbus_g_type_specialized_construct (DKP_DBUS_STRUCT_UINT_DOUBLE_UINT));
+ g_value_init (value, UP_DBUS_STRUCT_UINT_DOUBLE_UINT);
+ g_value_take_boxed (value, dbus_g_type_specialized_construct (UP_DBUS_STRUCT_UINT_DOUBLE_UINT));
dbus_g_type_struct_set (value, 0, obj->time, 1, obj->value, 2, obj->state, -1);
g_ptr_array_add (complex, g_value_get_boxed (value));
g_free (value);
diff --git a/src/up-history.h b/src/up-history.h
index 111e105..5f29730 100644
--- a/src/up-history.h
+++ b/src/up-history.h
@@ -23,7 +23,8 @@
#define __UP_HISTORY_H
#include <glib-object.h>
-#include <dkp-enum.h>
+
+#include "up-enum.h"
G_BEGIN_DECLS
diff --git a/src/up-main.c b/src/up-main.c
index bd9d805..de44357 100644
--- a/src/up-main.c
+++ b/src/up-main.c
@@ -46,10 +46,10 @@
static GMainLoop *loop = NULL;
/**
- * dkp_main_acquire_name_on_proxy:
+ * up_main_acquire_name_on_proxy:
**/
static gboolean
-dkp_main_acquire_name_on_proxy (DBusGProxy *bus_proxy, const gchar *name)
+up_main_acquire_name_on_proxy (DBusGProxy *bus_proxy, const gchar *name)
{
GError *error = NULL;
guint result;
@@ -90,10 +90,10 @@ out:
}
/**
- * dkp_main_sigint_handler:
+ * up_main_sigint_handler:
**/
static void
-dkp_main_sigint_handler (gint sig)
+up_main_sigint_handler (gint sig)
{
egg_debug ("Handling SIGINT");
@@ -105,12 +105,12 @@ dkp_main_sigint_handler (gint sig)
}
/**
- * dkp_main_timed_exit_cb:
+ * up_main_timed_exit_cb:
*
* Exits the main loop, which is helpful for valgrinding.
**/
static gboolean
-dkp_main_timed_exit_cb (GMainLoop *loop)
+up_main_timed_exit_cb (GMainLoop *loop)
{
g_main_loop_quit (loop);
return FALSE;
@@ -169,14 +169,14 @@ main (gint argc, gchar **argv)
}
/* aquire name */
- ret = dkp_main_acquire_name_on_proxy (bus_proxy, DEVKIT_POWER_SERVICE_NAME);
+ ret = up_main_acquire_name_on_proxy (bus_proxy, DEVKIT_POWER_SERVICE_NAME);
if (!ret) {
egg_warning ("Could not acquire name; bailing out");
goto out;
}
/* do stuff on ctrl-c */
- signal (SIGINT, dkp_main_sigint_handler);
+ signal (SIGINT, up_main_sigint_handler);
egg_debug ("Starting devkit-power-daemon version %s", PACKAGE_VERSION);
@@ -192,11 +192,11 @@ main (gint argc, gchar **argv)
/* only timeout and close the mainloop if we have specified it on the command line */
if (timed_exit)
- g_timeout_add_seconds (30, (GSourceFunc) dkp_main_timed_exit_cb, loop);
+ g_timeout_add_seconds (30, (GSourceFunc) up_main_timed_exit_cb, loop);
/* immediatly exit */
if (immediate_exit)
- g_timeout_add (50, (GSourceFunc) dkp_main_timed_exit_cb, loop);
+ g_timeout_add (50, (GSourceFunc) up_main_timed_exit_cb, loop);
/* wait for input or timeout */
g_main_loop_run (loop);
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 38335e9..35d3781 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -9,9 +9,9 @@ INCLUDES = \
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
- -DDKP_COMPILATION \
- -DDKP_DISABLE_DEPRECATED \
- -DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \
+ -DUP_COMPILATION \
+ -DUP_DISABLE_DEPRECATED \
+ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
-DEGG_VERBOSE="\"DKP_VERBOSE\"" \
-DEGG_LOGGING="\"DKP_LOGGING\"" \
-DEGG_CONSOLE="\"DKP_CONSOLE\"" \