Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
upower
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
75
Issues
75
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
upower
upower
Commits
8362088d
Commit
8362088d
authored
Jan 18, 2010
by
Richard Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: rename some internal defines for the upower move
parent
8b219b24
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
58 additions
and
56 deletions
+58
-56
devkit-power-gobject/Makefile.am
devkit-power-gobject/Makefile.am
+1
-1
devkit-power-gobject/devicekit-power.h
devkit-power-gobject/devicekit-power.h
+2
-2
devkit-power-gobject/dkp-client.c
devkit-power-gobject/dkp-client.c
+1
-1
devkit-power-gobject/dkp-client.h
devkit-power-gobject/dkp-client.h
+2
-2
devkit-power-gobject/dkp-device.h
devkit-power-gobject/dkp-device.h
+1
-1
devkit-power-gobject/dkp-enum.h
devkit-power-gobject/dkp-enum.h
+1
-1
devkit-power-gobject/dkp-history-obj.h
devkit-power-gobject/dkp-history-obj.h
+1
-1
devkit-power-gobject/dkp-qos-obj.h
devkit-power-gobject/dkp-qos-obj.h
+1
-1
devkit-power-gobject/dkp-stats-obj.h
devkit-power-gobject/dkp-stats-obj.h
+1
-1
devkit-power-gobject/dkp-version.h.in
devkit-power-gobject/dkp-version.h.in
+1
-1
devkit-power-gobject/dkp-wakeups-obj.h
devkit-power-gobject/dkp-wakeups-obj.h
+1
-1
devkit-power-gobject/dkp-wakeups.h
devkit-power-gobject/dkp-wakeups.h
+1
-1
src/Makefile.am
src/Makefile.am
+6
-6
src/dummy/Makefile.am
src/dummy/Makefile.am
+5
-5
src/freebsd/Makefile.am
src/freebsd/Makefile.am
+5
-5
src/linux/Makefile.am
src/linux/Makefile.am
+5
-5
src/up-device-list.h
src/up-device-list.h
+2
-1
src/up-device.c
src/up-device.c
+6
-6
src/up-history.h
src/up-history.h
+2
-1
src/up-main.c
src/up-main.c
+10
-10
tools/Makefile.am
tools/Makefile.am
+3
-3
No files found.
devkit-power-gobject/Makefile.am
View file @
8362088d
...
...
@@ -3,7 +3,7 @@ INCLUDES = \
$(DBUS_GLIB_CFLAGS)
\
-I
$(top_srcdir)
\
-I
$(top_srcdir)
/devkit-power-gobject
\
-D
DK
P_COMPILATION
\
-D
U
P_COMPILATION
\
-DG_LOG_DOMAIN
=
\"
devkit-power-gobject
\"
\
-DPACKAGE_DATA_DIR
=
\"
"
$(datadir)
"
\"
\
-DPACKAGE_LOCALE_DIR
=
\"
"
$(prefix)
/
$(DATADIRNAME)
/locale"
\"
...
...
devkit-power-gobject/devicekit-power.h
View file @
8362088d
...
...
@@ -26,7 +26,7 @@
#ifndef __DEVICEKIT_POWER_H__
#define __DEVICEKIT_POWER_H__
#define __
DEVICEKIT_
POWER_H_INSIDE__
#define __
U
POWER_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 __
U
POWER_H_INSIDE__
#endif
/* __DEVICEKIT_POWER_H__ */
devkit-power-gobject/dkp-client.c
View file @
8362088d
...
...
@@ -335,7 +335,7 @@ out:
g_hash_table_unref
(
props
);
}
#ifndef
DK
P_DISABLE_DEPRECATED
#ifndef
U
P_DISABLE_DEPRECATED
/**
* dkp_client_get_daemon_version:
* @client : a #DkpClient instance.
...
...
devkit-power-gobject/dkp-client.h
View file @
8362088d
...
...
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_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
DK
P_DISABLE_DEPRECATED
#ifndef
U
P_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
);
...
...
devkit-power-gobject/dkp-device.h
View file @
8362088d
...
...
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
...
...
devkit-power-gobject/dkp-enum.h
View file @
8362088d
...
...
@@ -19,7 +19,7 @@
*
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
...
...
devkit-power-gobject/dkp-history-obj.h
View file @
8362088d
...
...
@@ -18,7 +18,7 @@
*
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
...
...
devkit-power-gobject/dkp-qos-obj.h
View file @
8362088d
...
...
@@ -18,7 +18,7 @@
*
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
...
...
devkit-power-gobject/dkp-stats-obj.h
View file @
8362088d
...
...
@@ -18,7 +18,7 @@
*
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
...
...
devkit-power-gobject/dkp-version.h.in
View file @
8362088d
...
...
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
...
...
devkit-power-gobject/dkp-wakeups-obj.h
View file @
8362088d
...
...
@@ -18,7 +18,7 @@
*
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
...
...
devkit-power-gobject/dkp-wakeups.h
View file @
8362088d
...
...
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#if !defined (__
DEVICEKIT_POWER_H_INSIDE__) && !defined (DK
P_COMPILATION)
#if !defined (__
UPOWER_H_INSIDE__) && !defined (U
P_COMPILATION)
#error "Only <devicekit-power.h> can be included directly."
#endif
...
...
src/Makefile.am
View file @
8362088d
...
...
@@ -13,12 +13,12 @@ INCLUDES = \
-DPACKAGE_LIB_DIR
=
\"
"
$(libdir)
"
\"
\
-D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT
\
-DG_UDEV_API_IS_SUBJECT_TO_CHANGE
\
-D
DK
P_COMPILATION
\
-D
DK
P_DISABLE_DEPRECATED
\
-DEGG_LOG_FILE
=
\"
"
$(
DK
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
DK
P_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
DK
P_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
DK
P_CONSOLE
\"
"
\
-D
U
P_COMPILATION
\
-D
U
P_DISABLE_DEPRECATED
\
-DEGG_LOG_FILE
=
\"
"
$(
U
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
U
P_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
U
P_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
U
P_CONSOLE
\"
"
\
-I
$(top_srcdir)
/libupower-glib
\
-I
$(top_srcdir)
/devkit-power-gobject
\
-I
$(top_srcdir)
\
...
...
src/dummy/Makefile.am
View file @
8362088d
...
...
@@ -2,11 +2,11 @@
INCLUDES
=
\
-I
$(top_builddir)
/src
-I
$(top_srcdir)
/src
\
-DEGG_LOG_FILE
=
\"
"
$(
DK
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
DK
P_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
DK
P_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
DK
P_CONSOLE
\"
"
\
-D
DK
P_COMPILATION
\
-DEGG_LOG_FILE
=
\"
"
$(
U
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
U
P_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
U
P_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
U
P_CONSOLE
\"
"
\
-D
U
P_COMPILATION
\
-DEGG_TEST
\
-I
$(top_srcdir)
/devkit-power-gobject
\
$(DBUS_GLIB_CFLAGS)
\
...
...
src/freebsd/Makefile.am
View file @
8362088d
...
...
@@ -2,11 +2,11 @@
INCLUDES
=
\
-I
$(top_builddir)
/src
-I
$(top_srcdir)
/src
\
-DEGG_LOG_FILE
=
\"
"
$(
DK
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
DK
P_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
DK
P_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
DK
P_CONSOLE
\"
"
\
-D
DK
P_COMPILATION
\
-DEGG_LOG_FILE
=
\"
"
$(
U
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
U
P_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
U
P_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
U
P_CONSOLE
\"
"
\
-D
U
P_COMPILATION
\
-I
$(top_srcdir)
/devkit-power-gobject
\
$(DBUS_GLIB_CFLAGS)
\
$(POLKIT_CFLAGS)
\
...
...
src/linux/Makefile.am
View file @
8362088d
...
...
@@ -2,11 +2,11 @@
INCLUDES
=
\
-I
$(top_builddir)
/src
-I
$(top_srcdir)
/src
\
-DEGG_LOG_FILE
=
\"
"
$(
DK
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
DK
P_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
DK
P_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
DK
P_CONSOLE
\"
"
\
-D
DK
P_COMPILATION
\
-DEGG_LOG_FILE
=
\"
"
$(
U
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
U
P_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
U
P_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
U
P_CONSOLE
\"
"
\
-D
U
P_COMPILATION
\
-DG_UDEV_API_IS_SUBJECT_TO_CHANGE
\
-I
$(top_srcdir)
/devkit-power-gobject
\
$(GIO_CFLAGS)
\
...
...
src/up-device-list.h
View file @
8362088d
...
...
@@ -23,7 +23,8 @@
#define __UP_DEVICE_LIST_H
#include <glib-object.h>
#include <dkp-enum.h>
#include "up-enum.h"
G_BEGIN_DECLS
...
...
src/up-device.c
View file @
8362088d
...
...
@@ -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
DK
P_DBUS_STRUCT_UINT_DOUBLE_UINT (dbus_g_type_get_struct ("GValueArray", \
#define
U
P_DBUS_STRUCT_UINT_DOUBLE_UINT (dbus_g_type_get_struct ("GValueArray", \
G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_UINT, G_TYPE_INVALID))
#define
DK
P_DBUS_STRUCT_DOUBLE_DOUBLE (dbus_g_type_get_struct ("GValueArray", \
#define
U
P_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
,
DK
P_DBUS_STRUCT_DOUBLE_DOUBLE
);
g_value_take_boxed
(
value
,
dbus_g_type_specialized_construct
(
DK
P_DBUS_STRUCT_DOUBLE_DOUBLE
));
g_value_init
(
value
,
U
P_DBUS_STRUCT_DOUBLE_DOUBLE
);
g_value_take_boxed
(
value
,
dbus_g_type_specialized_construct
(
U
P_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
,
DK
P_DBUS_STRUCT_UINT_DOUBLE_UINT
);
g_value_take_boxed
(
value
,
dbus_g_type_specialized_construct
(
DK
P_DBUS_STRUCT_UINT_DOUBLE_UINT
));
g_value_init
(
value
,
U
P_DBUS_STRUCT_UINT_DOUBLE_UINT
);
g_value_take_boxed
(
value
,
dbus_g_type_specialized_construct
(
U
P_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
);
...
...
src/up-history.h
View file @
8362088d
...
...
@@ -23,7 +23,8 @@
#define __UP_HISTORY_H
#include <glib-object.h>
#include <dkp-enum.h>
#include "up-enum.h"
G_BEGIN_DECLS
...
...
src/up-main.c
View file @
8362088d
...
...
@@ -46,10 +46,10 @@
static
GMainLoop
*
loop
=
NULL
;
/**
*
dk
p_main_acquire_name_on_proxy:
*
u
p_main_acquire_name_on_proxy:
**/
static
gboolean
dk
p_main_acquire_name_on_proxy
(
DBusGProxy
*
bus_proxy
,
const
gchar
*
name
)
u
p_main_acquire_name_on_proxy
(
DBusGProxy
*
bus_proxy
,
const
gchar
*
name
)
{
GError
*
error
=
NULL
;
guint
result
;
...
...
@@ -90,10 +90,10 @@ out:
}
/**
*
dk
p_main_sigint_handler:
*
u
p_main_sigint_handler:
**/
static
void
dk
p_main_sigint_handler
(
gint
sig
)
u
p_main_sigint_handler
(
gint
sig
)
{
egg_debug
(
"Handling SIGINT"
);
...
...
@@ -105,12 +105,12 @@ dkp_main_sigint_handler (gint sig)
}
/**
*
dk
p_main_timed_exit_cb:
*
u
p_main_timed_exit_cb:
*
* Exits the main loop, which is helpful for valgrinding.
**/
static
gboolean
dk
p_main_timed_exit_cb
(
GMainLoop
*
loop
)
u
p_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
=
dk
p_main_acquire_name_on_proxy
(
bus_proxy
,
DEVKIT_POWER_SERVICE_NAME
);
ret
=
u
p_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
,
dk
p_main_sigint_handler
);
signal
(
SIGINT
,
u
p_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
)
dk
p_main_timed_exit_cb
,
loop
);
g_timeout_add_seconds
(
30
,
(
GSourceFunc
)
u
p_main_timed_exit_cb
,
loop
);
/* immediatly exit */
if
(
immediate_exit
)
g_timeout_add
(
50
,
(
GSourceFunc
)
dk
p_main_timed_exit_cb
,
loop
);
g_timeout_add
(
50
,
(
GSourceFunc
)
u
p_main_timed_exit_cb
,
loop
);
/* wait for input or timeout */
g_main_loop_run
(
loop
);
...
...
tools/Makefile.am
View file @
8362088d
...
...
@@ -9,9 +9,9 @@ INCLUDES = \
-DPACKAGE_LOCALE_DIR
=
\"
"
$(localedir)
"
\"
\
-DPACKAGE_LIB_DIR
=
\"
"
$(libdir)
"
\"
\
-D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT
\
-D
DK
P_COMPILATION
\
-D
DK
P_DISABLE_DEPRECATED
\
-DEGG_LOG_FILE
=
\"
"
$(
DK
P_LOG_DIR)
/DeviceKit-power"
\"
\
-D
U
P_COMPILATION
\
-D
U
P_DISABLE_DEPRECATED
\
-DEGG_LOG_FILE
=
\"
"
$(
U
P_LOG_DIR)
/DeviceKit-power"
\"
\
-DEGG_VERBOSE
=
"
\"
DKP_VERBOSE
\"
"
\
-DEGG_LOGGING
=
"
\"
DKP_LOGGING
\"
"
\
-DEGG_CONSOLE
=
"
\"
DKP_CONSOLE
\"
"
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment