mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 05:30:03 +01:00
trivial: rename some internal defines for the upower move
This commit is contained in:
parent
8b219b243e
commit
8362088d12
21 changed files with 58 additions and 56 deletions
|
|
@ -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"\"
|
||||
|
|
|
|||
|
|
@ -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__ */
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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) \
|
||||
|
|
|
|||
|
|
@ -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) \
|
||||
|
|
|
|||
|
|
@ -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) \
|
||||
|
|
|
|||
|
|
@ -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) \
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#define __UP_DEVICE_LIST_H
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <dkp-enum.h>
|
||||
|
||||
#include "up-enum.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#define __UP_HISTORY_H
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <dkp-enum.h>
|
||||
|
||||
#include "up-enum.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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\"" \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue