summaryrefslogtreecommitdiffstats
path: root/meta-efl/recipes-efl/e17/e-tasks
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2017-04-27 11:04:51 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-31 10:18:33 +0200
commitec9e5ed06256ad92c818474cdb490dc0d3a0d0a3 (patch)
treee16d2a838f4561d5538928a58f805e5f1373225a /meta-efl/recipes-efl/e17/e-tasks
parent6775acb048dabd624c5c8197b683aba45ed91569 (diff)
downloadmeta-openembedded-ec9e5ed06256ad92c818474cdb490dc0d3a0d0a3.tar.gz
recipes: remove blacklisted recipes
* as PNBLACKLIST message says, these recipes are blacklisted for long time and nobody showed any interest to fix them * remove all unused .patch and .inc files as well Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-efl/recipes-efl/e17/e-tasks')
-rw-r--r--meta-efl/recipes-efl/e17/e-tasks/0001-dbus-stuff-Convert-to-eldbus.patch204
1 files changed, 0 insertions, 204 deletions
diff --git a/meta-efl/recipes-efl/e17/e-tasks/0001-dbus-stuff-Convert-to-eldbus.patch b/meta-efl/recipes-efl/e17/e-tasks/0001-dbus-stuff-Convert-to-eldbus.patch
deleted file mode 100644
index f92a772fe..000000000
--- a/meta-efl/recipes-efl/e17/e-tasks/0001-dbus-stuff-Convert-to-eldbus.patch
+++ /dev/null
@@ -1,204 +0,0 @@
1From 37223289b3d85ea8876e7ba7c9ff97ec428073ba Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 22 Feb 2014 14:36:38 +0100
4Subject: [PATCH] dbus-stuff: Convert to eldbus
5
6Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
7---
8 configure.ac | 2 +-
9 src/Makefile.am | 2 +-
10 src/dbus-stuff.c | 95 ++++++++++++++++++++++++++++++++------------------------
11 src/dbus-stuff.h | 13 ++------
12 src/main.c | 2 +-
13 5 files changed, 61 insertions(+), 53 deletions(-)
14
15diff --git a/configure.ac b/configure.ac
16index b3e4d12..4ace32a 100644
17--- a/configure.ac
18+++ b/configure.ac
19@@ -15,7 +15,7 @@ AC_HEADER_STDC
20
21 AM_PROG_LIBTOOL
22
23-PKG_CHECK_MODULES(TASKS, [elementary eina dbus-1 edbus sqlite3])
24+PKG_CHECK_MODULES(TASKS, [elementary eina dbus-1 eldbus sqlite3])
25
26 AC_OUTPUT([
27 Makefile
28diff --git a/src/Makefile.am b/src/Makefile.am
29index 2143dc9..31d5253 100644
30--- a/src/Makefile.am
31+++ b/src/Makefile.am
32@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
33 $(TASKS_CFLAGS)
34
35 AM_CFLAGS =\
36- $(EDBUS_CFLAGS) \
37+ $(ELDBUS_CFLAGS) \
38 -Wall\
39 -g
40
41diff --git a/src/dbus-stuff.c b/src/dbus-stuff.c
42index 50809bc..9f02ef3 100644
43--- a/src/dbus-stuff.c
44+++ b/src/dbus-stuff.c
45@@ -1,8 +1,7 @@
46 /***************************************************************************
47 * dbus-stuff.c
48 *
49- * Copyright 2009 cchandel
50- * <cchandel@yahoo.com>
51+ * Copyright 2009 cchandel <cchandel@yahoo.com>
52 ****************************************************************************/
53
54 /*
55@@ -21,51 +20,67 @@
56 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
57 */
58 #include "dbus-stuff.h"
59-#include <string.h>
60-#include <E_DBus.h>
61-#include <Elementary.h>
62+#include "Eldbus.h"
63
64-void occupy_cpu(void)
65+void on_usage_cb(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
66+{
67+ const char *errname, *errmsg;
68+ if (eldbus_message_error_get(msg, &errname, &errmsg))
69+ fprintf(stderr, "Error: %s %s\n", errname, errmsg);
70+}
71+
72+int ousaged_resource(const char *resource, int used)
73 {
74- e_dbus_init();
75- conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
76-
77- DBusMessage *msg;
78- msg = dbus_message_new_method_call(
79- "org.freesmartphone.ousaged",
80- "/org/freesmartphone/Usage",
81- "org.freesmartphone.Usage",
82- "RequestResource"
83- );
84-
85- const char *resource = "CPU";
86- dbus_message_append_args (msg, DBUS_TYPE_STRING, &resource, DBUS_TYPE_INVALID);
87+ eldbus_init();
88+ const char *REQUEST = "RequestResource";
89+ const char *RELEASE = "ReleaseResource";
90+ const int PREQUEST = 1;
91
92- e_dbus_message_send(conn, msg, dbus_reply_cb, -1, NULL);
93- dbus_message_unref(msg);
94-}
95+ Eldbus_Connection *conn;
96+ Eldbus_Object *obj;
97+ Eldbus_Proxy *usage;
98+ Eldbus_Pending *pending;
99+ conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SYSTEM);
100+ if (!conn)
101+ {
102+ fprintf(stderr, "Error: could not get system bus\n");
103+ return EXIT_FAILURE;
104+ }
105
106-void release_cpu(void)
107-{
108- DBusMessage *msg;
109- msg = dbus_message_new_method_call(
110- "org.freesmartphone.ousaged",
111- "/org/freesmartphone/Usage",
112- "org.freesmartphone.Usage",
113- "ReleaseResource"
114- );
115-
116- const char *resource = "CPU";
117- dbus_message_append_args (msg, DBUS_TYPE_STRING, &resource, DBUS_TYPE_INVALID);
118+ obj = eldbus_object_get(conn, "org.freesmartphone.ousaged", "/org/freesmartphone/Usage");
119+ if (!obj)
120+ {
121+ fprintf(stderr, "Error: could not get object\n");
122+ return EXIT_FAILURE;
123+ }
124
125- e_dbus_message_send(conn, msg, dbus_reply_cb, -1, NULL);
126- dbus_message_unref(msg);
127+ usage = eldbus_proxy_get(obj, "org.freesmartphone.Usage");
128+ if (!usage)
129+ {
130+ fprintf(stderr, "Error: could not get proxy\n");
131+ return EXIT_FAILURE;
132+ }
133+
134+ pending = eldbus_proxy_call(usage, used == PREQUEST ? REQUEST : RELEASE, on_usage_cb, NULL, -1, "ss", resource);
135+ if (!pending)
136+ {
137+ fprintf(stderr, "Error: could not call\n");
138+ return EXIT_FAILURE;
139+ }
140+ eldbus_proxy_unref(usage);
141+ eldbus_object_unref(obj);
142+ eldbus_connection_unref(conn);
143+
144+ eldbus_shutdown();
145+ return EXIT_SUCCESS;
146 }
147
148-void dbus_reply_cb(void *data, DBusMessage *replymsg, DBusError *error)
149+int request_cpu(void)
150 {
151- if (dbus_error_is_set(error)) {
152- printf("Error: %s - %s\n", error->name, error->message);
153- }
154+ return ousaged_resource("CPU", 1);
155 }
156
157+int release_cpu(void)
158+{
159+ return ousaged_resource("CPU" , 0);
160+}
161diff --git a/src/dbus-stuff.h b/src/dbus-stuff.h
162index 83d4778..a3c72cb 100644
163--- a/src/dbus-stuff.h
164+++ b/src/dbus-stuff.h
165@@ -2,8 +2,7 @@
166 * dbus.h
167 *
168 * Fri Mar 6 12:32:57 2009
169- * Copyright 2009 nidhin
170- * <nidhin@nids-laptop.home>
171+ * Copyright 2009 nidhin <nidhin@nids-laptop.home>
172 ****************************************************************************/
173
174 /*
175@@ -22,11 +21,5 @@
176 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
177 */
178
179-#include <E_DBus.h>
180-#include <Elementary.h>
181-
182-void occupy_cpu(void);
183-void release_cpu(void);
184-void dbus_reply_cb(void *data, DBusMessage *replymsg, DBusError *error);
185-
186-E_DBus_Connection *conn;
187+int request_cpu(void);
188+int release_cpu(void);
189diff --git a/src/main.c b/src/main.c
190index 92d21de..4e4bbe2 100644
191--- a/src/main.c
192+++ b/src/main.c
193@@ -76,7 +76,7 @@ elm_main(int argc, char **argv)
194 //restore state
195 restore_state();
196
197- occupy_cpu();
198+ request_cpu();
199
200 elm_run();
201 //clean up stuff
202--
2031.8.5.3
204