aboutsummaryrefslogtreecommitdiff
blob: 3e74e4182dcbaa1e9ce10951b19ba7c335f2249d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
From 21b640b8182d9532d1a33d4a093395320085378f Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@mandriva.com>
Date: Mon, 25 Aug 2008 13:02:19 +0200
Subject: [PATCH 19/48] adapt new CK library version (>= v0.3.1) to HAL

Adapted new CK library version (>= v0.3.1) to HAL. Adopted
patch from Ben Gamari <bgamari@gmail.com> to work with old
and new ConsoleKit versions.
---
 hald/ck-tracker.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/hald/ck-tracker.c b/hald/ck-tracker.c
index 34aa640..eb76dbb 100644
--- a/hald/ck-tracker.c
+++ b/hald/ck-tracker.c
@@ -256,7 +256,11 @@ ck_session_get_info (CKTracker *tracker, CKSession *session)
 		goto error;
 	}
 	if (!dbus_message_get_args (reply, NULL,
+#ifdef HAVE_CK_0_3
+				    DBUS_TYPE_UINT32, &(session->user),
+#else
 				    DBUS_TYPE_INT32, &(session->user),
+#endif
 				    DBUS_TYPE_INVALID)) {
 		HAL_ERROR (("Invalid GetUnixUser reply from CK"));
 		goto error;
@@ -531,7 +535,11 @@ ck_tracker_process_system_bus_message (CKTracker *tracker, DBusMessage *message)
 		seat_objpath = dbus_message_get_path (message);
 
 		if (!dbus_message_get_args (message, NULL,
+#ifdef HAVE_CK_0_3
+					    DBUS_TYPE_OBJECT_PATH, &seat_objpath,
+#else
 					    DBUS_TYPE_STRING, &seat_objpath,
+#endif
 					    DBUS_TYPE_INVALID)) {
 			HAL_ERROR (("Invalid SeatAdded signal from CK"));
 			goto out;
@@ -558,7 +566,11 @@ ck_tracker_process_system_bus_message (CKTracker *tracker, DBusMessage *message)
 		seat_objpath = dbus_message_get_path (message);
 
 		if (!dbus_message_get_args (message, NULL,
+#ifdef HAVE_CK_0_3
+					    DBUS_TYPE_OBJECT_PATH, &seat_objpath,
+#else
 					    DBUS_TYPE_STRING, &seat_objpath,
+#endif
 					    DBUS_TYPE_INVALID)) {
 			HAL_ERROR (("Invalid SeatRemoved signal from CK"));
 			goto out;
@@ -588,7 +600,11 @@ ck_tracker_process_system_bus_message (CKTracker *tracker, DBusMessage *message)
 		seat_objpath = dbus_message_get_path (message);
 
 		if (!dbus_message_get_args (message, NULL,
+#ifdef HAVE_CK_0_3
+					    DBUS_TYPE_OBJECT_PATH, &session_objpath,
+#else
 					    DBUS_TYPE_STRING, &session_objpath,
+#endif
 					    DBUS_TYPE_INVALID)) {
 			HAL_ERROR (("Invalid SessionAdded signal from CK"));
 			goto out;
@@ -624,7 +640,11 @@ ck_tracker_process_system_bus_message (CKTracker *tracker, DBusMessage *message)
 		seat_objpath = dbus_message_get_path (message);
 
 		if (!dbus_message_get_args (message, NULL,
+#ifdef HAVE_CK_0_3
+					    DBUS_TYPE_OBJECT_PATH, &session_objpath,
+#else
 					    DBUS_TYPE_STRING, &session_objpath,
+#endif
 					    DBUS_TYPE_INVALID)) {
 			HAL_ERROR (("Invalid SessionRemoved signal from CK"));
 			goto out;
-- 
1.6.1.2