forked from enlightenment/efl
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 T7514 Reviewers: zmike, segfaultxavi, cedric Reviewed By: segfaultxavi, cedric Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7514 Differential Revision: https://phab.enlightenment.org/D7508
This commit is contained in:
parent
a5b338ded3
commit
a570d6b25c
|
@ -380,26 +380,6 @@ _efl_task_flags_get(const Eo *obj EINA_UNUSED, Efl_Task_Data *pd)
|
||||||
return pd->flags;
|
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
|
EOLIAN static void
|
||||||
_efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd)
|
_efl_task_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Task_Data *pd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ enum Efl.Task_Flags {
|
||||||
no_exit_code_error = 4,
|
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 {
|
methods {
|
||||||
|
@ -138,11 +138,11 @@ class Efl.Task (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer)
|
||||||
flags: Efl.Task_Flags; [[ ]]
|
flags: Efl.Task_Flags; [[ ]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
run {
|
run @pure_virtual {
|
||||||
[[ Actually run the task ]]
|
[[ Actually run the task ]]
|
||||||
return: future<void> @owned; [[ A future triggered when task exits and is passed int exit code ]]
|
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
|
[[ Request the task end (may send a signal or interrupt
|
||||||
signal resulting in a terminate event being tiggered in the
|
signal resulting in a terminate event being tiggered in the
|
||||||
target task loop) ]]
|
target task loop) ]]
|
||||||
|
@ -151,7 +151,6 @@ class Efl.Task (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer)
|
||||||
events {
|
events {
|
||||||
}
|
}
|
||||||
implements {
|
implements {
|
||||||
Efl.Object.constructor;
|
|
||||||
Efl.Object.destructor;
|
Efl.Object.destructor;
|
||||||
Efl.Object.parent { set; }
|
Efl.Object.parent { set; }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue