Commit 8362088d authored by Richard Hughes's avatar Richard Hughes

trivial: rename some internal defines for the upower move

parent 8b219b24
...@@ -3,7 +3,7 @@ INCLUDES = \ ...@@ -3,7 +3,7 @@ INCLUDES = \
$(DBUS_GLIB_CFLAGS) \ $(DBUS_GLIB_CFLAGS) \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_srcdir)/devkit-power-gobject \ -I$(top_srcdir)/devkit-power-gobject \
-DDKP_COMPILATION \ -DUP_COMPILATION \
-DG_LOG_DOMAIN=\"devkit-power-gobject\" \ -DG_LOG_DOMAIN=\"devkit-power-gobject\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#ifndef __DEVICEKIT_POWER_H__ #ifndef __DEVICEKIT_POWER_H__
#define __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-version.h>
#include <devkit-power-gobject/dkp-client.h> #include <devkit-power-gobject/dkp-client.h>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include <devkit-power-gobject/dkp-wakeups.h> #include <devkit-power-gobject/dkp-wakeups.h>
#include <devkit-power-gobject/dkp-wakeups-obj.h> #include <devkit-power-gobject/dkp-wakeups-obj.h>
#undef __DEVICEKIT_POWER_H_INSIDE__ #undef __UPOWER_H_INSIDE__
#endif /* __DEVICEKIT_POWER_H__ */ #endif /* __DEVICEKIT_POWER_H__ */
...@@ -335,7 +335,7 @@ out: ...@@ -335,7 +335,7 @@ out:
g_hash_table_unref (props); g_hash_table_unref (props);
} }
#ifndef DKP_DISABLE_DEPRECATED #ifndef UP_DISABLE_DEPRECATED
/** /**
* dkp_client_get_daemon_version: * dkp_client_get_daemon_version:
* @client : a #DkpClient instance. * @client : a #DkpClient instance.
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
...@@ -79,7 +79,7 @@ gboolean dkp_client_suspend (DkpClient *client, ...@@ -79,7 +79,7 @@ gboolean dkp_client_suspend (DkpClient *client,
GError **error); GError **error);
gboolean dkp_client_hibernate (DkpClient *client, gboolean dkp_client_hibernate (DkpClient *client,
GError **error); GError **error);
#ifndef DKP_DISABLE_DEPRECATED #ifndef UP_DISABLE_DEPRECATED
const gchar *dkp_client_get_daemon_version (DkpClient *client); const gchar *dkp_client_get_daemon_version (DkpClient *client);
gboolean dkp_client_can_hibernate (DkpClient *client); gboolean dkp_client_can_hibernate (DkpClient *client);
gboolean dkp_client_lid_is_closed (DkpClient *client); gboolean dkp_client_lid_is_closed (DkpClient *client);
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
......
...@@ -18,7 +18,7 @@ ...@@ -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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
......
...@@ -18,7 +18,7 @@ ...@@ -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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
......
...@@ -18,7 +18,7 @@ ...@@ -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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
......
...@@ -18,7 +18,7 @@ ...@@ -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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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." #error "Only <devicekit-power.h> can be included directly."
#endif #endif
......
...@@ -13,12 +13,12 @@ INCLUDES = \ ...@@ -13,12 +13,12 @@ INCLUDES = \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \ -DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \ -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
-DG_UDEV_API_IS_SUBJECT_TO_CHANGE \ -DG_UDEV_API_IS_SUBJECT_TO_CHANGE \
-DDKP_COMPILATION \ -DUP_COMPILATION \
-DDKP_DISABLE_DEPRECATED \ -DUP_DISABLE_DEPRECATED \
-DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
-DEGG_VERBOSE="\"DKP_VERBOSE\"" \ -DEGG_VERBOSE="\"UP_VERBOSE\"" \
-DEGG_LOGGING="\"DKP_LOGGING\"" \ -DEGG_LOGGING="\"UP_LOGGING\"" \
-DEGG_CONSOLE="\"DKP_CONSOLE\"" \ -DEGG_CONSOLE="\"UP_CONSOLE\"" \
-I$(top_srcdir)/libupower-glib \ -I$(top_srcdir)/libupower-glib \
-I$(top_srcdir)/devkit-power-gobject \ -I$(top_srcdir)/devkit-power-gobject \
-I$(top_srcdir) \ -I$(top_srcdir) \
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
INCLUDES = \ INCLUDES = \
-I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_builddir)/src -I$(top_srcdir)/src \
-DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
-DEGG_VERBOSE="\"DKP_VERBOSE\"" \ -DEGG_VERBOSE="\"UP_VERBOSE\"" \
-DEGG_LOGGING="\"DKP_LOGGING\"" \ -DEGG_LOGGING="\"UP_LOGGING\"" \
-DEGG_CONSOLE="\"DKP_CONSOLE\"" \ -DEGG_CONSOLE="\"UP_CONSOLE\"" \
-DDKP_COMPILATION \ -DUP_COMPILATION \
-DEGG_TEST \ -DEGG_TEST \
-I$(top_srcdir)/devkit-power-gobject \ -I$(top_srcdir)/devkit-power-gobject \
$(DBUS_GLIB_CFLAGS) \ $(DBUS_GLIB_CFLAGS) \
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
INCLUDES = \ INCLUDES = \
-I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_builddir)/src -I$(top_srcdir)/src \
-DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
-DEGG_VERBOSE="\"DKP_VERBOSE\"" \ -DEGG_VERBOSE="\"UP_VERBOSE\"" \
-DEGG_LOGGING="\"DKP_LOGGING\"" \ -DEGG_LOGGING="\"UP_LOGGING\"" \
-DEGG_CONSOLE="\"DKP_CONSOLE\"" \ -DEGG_CONSOLE="\"UP_CONSOLE\"" \
-DDKP_COMPILATION \ -DUP_COMPILATION \
-I$(top_srcdir)/devkit-power-gobject \ -I$(top_srcdir)/devkit-power-gobject \
$(DBUS_GLIB_CFLAGS) \ $(DBUS_GLIB_CFLAGS) \
$(POLKIT_CFLAGS) \ $(POLKIT_CFLAGS) \
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
INCLUDES = \ INCLUDES = \
-I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_builddir)/src -I$(top_srcdir)/src \
-DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
-DEGG_VERBOSE="\"DKP_VERBOSE\"" \ -DEGG_VERBOSE="\"UP_VERBOSE\"" \
-DEGG_LOGGING="\"DKP_LOGGING\"" \ -DEGG_LOGGING="\"UP_LOGGING\"" \
-DEGG_CONSOLE="\"DKP_CONSOLE\"" \ -DEGG_CONSOLE="\"UP_CONSOLE\"" \
-DDKP_COMPILATION \ -DUP_COMPILATION \
-DG_UDEV_API_IS_SUBJECT_TO_CHANGE \ -DG_UDEV_API_IS_SUBJECT_TO_CHANGE \
-I$(top_srcdir)/devkit-power-gobject \ -I$(top_srcdir)/devkit-power-gobject \
$(GIO_CFLAGS) \ $(GIO_CFLAGS) \
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#define __UP_DEVICE_LIST_H #define __UP_DEVICE_LIST_H
#include <glib-object.h> #include <glib-object.h>
#include <dkp-enum.h>
#include "up-enum.h"
G_BEGIN_DECLS G_BEGIN_DECLS
......
...@@ -126,9 +126,9 @@ static guint signals[SIGNAL_LAST] = { 0 }; ...@@ -126,9 +126,9 @@ static guint signals[SIGNAL_LAST] = { 0 };
G_DEFINE_TYPE (UpDevice, up_device, G_TYPE_OBJECT) 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 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)) 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)) G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_INVALID))
/** /**
...@@ -635,8 +635,8 @@ up_device_get_statistics (UpDevice *device, const gchar *type, DBusGMethodInvoca ...@@ -635,8 +635,8 @@ up_device_get_statistics (UpDevice *device, const gchar *type, DBusGMethodInvoca
for (i=0; i<array->len; i++) { for (i=0; i<array->len; i++) {
obj = (const UpStatsObj *) g_ptr_array_index (array, i); obj = (const UpStatsObj *) g_ptr_array_index (array, i);
value = g_new0 (GValue, 1); value = g_new0 (GValue, 1);
g_value_init (value, DKP_DBUS_STRUCT_DOUBLE_DOUBLE); g_value_init (value, UP_DBUS_STRUCT_DOUBLE_DOUBLE);
g_value_take_boxed (value, dbus_g_type_specialized_construct (DKP_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); dbus_g_type_struct_set (value, 0, obj->value, 1, obj->accuracy, -1);
g_ptr_array_add (complex, g_value_get_boxed (value)); g_ptr_array_add (complex, g_value_get_boxed (value));
g_free (value); g_free (value);
...@@ -699,8 +699,8 @@ up_device_get_history (UpDevice *device, const gchar *type_string, guint timespa ...@@ -699,8 +699,8 @@ up_device_get_history (UpDevice *device, const gchar *type_string, guint timespa
for (i=0; i<array->len; i++) { for (i=0; i<array->len; i++) {
obj = (const UpHistoryObj *) g_ptr_array_index (array, i); obj = (const UpHistoryObj *) g_ptr_array_index (array, i);
value = g_new0 (GValue, 1); value = g_new0 (GValue, 1);
g_value_init (value, 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 (DKP_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); 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_ptr_array_add (complex, g_value_get_boxed (value));
g_free (value); g_free (value);
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#define __UP_HISTORY_H #define __UP_HISTORY_H
#include <glib-object.h> #include <glib-object.h>
#include <dkp-enum.h>
#include "up-enum.h"
G_BEGIN_DECLS G_BEGIN_DECLS
......
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
static GMainLoop *loop = NULL; static GMainLoop *loop = NULL;
/** /**
* dkp_main_acquire_name_on_proxy: * up_main_acquire_name_on_proxy:
**/ **/
static gboolean 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; GError *error = NULL;
guint result; guint result;
...@@ -90,10 +90,10 @@ out: ...@@ -90,10 +90,10 @@ out:
} }
/** /**
* dkp_main_sigint_handler: * up_main_sigint_handler:
**/ **/
static void static void
dkp_main_sigint_handler (gint sig) up_main_sigint_handler (gint sig)
{ {
egg_debug ("Handling SIGINT"); egg_debug ("Handling SIGINT");
...@@ -105,12 +105,12 @@ dkp_main_sigint_handler (gint sig) ...@@ -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. * Exits the main loop, which is helpful for valgrinding.
**/ **/
static gboolean static gboolean
dkp_main_timed_exit_cb (GMainLoop *loop) up_main_timed_exit_cb (GMainLoop *loop)
{ {
g_main_loop_quit (loop); g_main_loop_quit (loop);
return FALSE; return FALSE;
...@@ -169,14 +169,14 @@ main (gint argc, gchar **argv) ...@@ -169,14 +169,14 @@ main (gint argc, gchar **argv)
} }
/* aquire name */ /* 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) { if (!ret) {
egg_warning ("Could not acquire name; bailing out"); egg_warning ("Could not acquire name; bailing out");
goto out; goto out;
} }
/* do stuff on ctrl-c */ /* 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); egg_debug ("Starting devkit-power-daemon version %s", PACKAGE_VERSION);
...@@ -192,11 +192,11 @@ main (gint argc, gchar **argv) ...@@ -192,11 +192,11 @@ main (gint argc, gchar **argv)
/* only timeout and close the mainloop if we have specified it on the command line */ /* only timeout and close the mainloop if we have specified it on the command line */
if (timed_exit) 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 */ /* immediatly exit */
if (immediate_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 */ /* wait for input or timeout */
g_main_loop_run (loop); g_main_loop_run (loop);
......
...@@ -9,9 +9,9 @@ INCLUDES = \ ...@@ -9,9 +9,9 @@ INCLUDES = \
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \ -DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \ -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
-DDKP_COMPILATION \ -DUP_COMPILATION \
-DDKP_DISABLE_DEPRECATED \ -DUP_DISABLE_DEPRECATED \
-DEGG_LOG_FILE=\""$(DKP_LOG_DIR)/DeviceKit-power"\" \ -DEGG_LOG_FILE=\""$(UP_LOG_DIR)/DeviceKit-power"\" \
-DEGG_VERBOSE="\"DKP_VERBOSE\"" \ -DEGG_VERBOSE="\"DKP_VERBOSE\"" \
-DEGG_LOGGING="\"DKP_LOGGING\"" \ -DEGG_LOGGING="\"DKP_LOGGING\"" \
-DEGG_CONSOLE="\"DKP_CONSOLE\"" \ -DEGG_CONSOLE="\"DKP_CONSOLE\"" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment