aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-10 12:51:18 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-01-10 13:01:26 +0100
commita570d6b25ce22cd12f62c44831e3b8024c977679 (patch)
treee970bb7fcced24170588f49c9640b75d611a06c5
parentcxx: Add class get name attribute. (diff)
downloadefl-a570d6b25ce22cd12f62c44831e3b8024c977679.tar.gz
efl_task: remove NOP / unimplement funtions
Summary: this makes efl_task abstract which ensures that it cannot be instanciated. Further more, functions that needs to be implement are now pure_virtual. ref https://phab.enlightenment.org/T7514 Reviewers: zmike, segfaultxavi, cedric Reviewed By: segfaultxavi, cedric Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: https://phab.enlightenment.org/T7514 Differential Revision: https://phab.enlightenment.org/D7508
-rw-r--r--src/lib/ecore/efl_task.c20
-rw-r--r--src/lib/ecore/efl_task.eo7
2 files changed, 3 insertions, 24 deletions
diff --git a/src/lib/ecore/efl_task.c b/src/lib/ecore/efl_task.c
index 35f1547cb6..6442669efd 100644
--- a/src/lib/ecore/efl_task.c
+++ b/src/lib/ecore/efl_task.c
@@ -380,26 +380,6 @@ _efl_task_flags_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd)
return pd->flags;
}
-EOLIAN static Eina_Future *
-_efl_task_run(Eo *obj EINA_UNUSED, Efl_Task_Data *pd EINA_UNUSED)
-{
- // NOP
- return NULL;
-}
-
-EOLIAN static void
-_efl_task_end(Eo *obj EINA_UNUSED, Efl_Task_Data *pd EINA_UNUSED)
-{
- // NOP
-}
-
-EOLIAN static Efl_Object *
-_efl_task_efl_object_constructor(Eo *obj, Efl_Task_Data *pd EINA_UNUSED)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- return obj;
-}
-
EOLIAN static void
_efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd)
{
diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo
index 7fdb895f49..8670299de4 100644
--- a/src/lib/ecore/efl_task.eo
+++ b/src/lib/ecore/efl_task.eo
@@ -15,7 +15,7 @@ enum Efl.Task_Flags {
no_exit_code_error = 4,
}
-class Efl.Task (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer)
+abstract Efl.Task (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer)
{
[[ ]]
methods {
@@ -138,11 +138,11 @@ class Efl.Task (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer)
flags: Efl.Task_Flags; [[ ]]
}
}
- run {
+ run @pure_virtual {
[[ Actually run the task ]]
return: future<void> @owned; [[ A future triggered when task exits and is passed int exit code ]]
}
- end {
+ end @pure_virtual {
[[ Request the task end (may send a signal or interrupt
signal resulting in a terminate event being tiggered in the
target task loop) ]]
@@ -151,7 +151,6 @@ class Efl.Task (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer)
events {
}
implements {
- Efl.Object.constructor;
Efl.Object.destructor;
Efl.Object.parent { set; }
}