From f58bdbf23ae90caf0baf1e0c0d8ea2eb9390cad3 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 3 May 2018 17:13:28 +0200 Subject: [PATCH] eolian: switch Eina.Future instances to future --- src/lib/ecore/efl_loop.eo | 6 ++--- src/lib/ecore/efl_task.eo | 2 +- .../ecore_con/efl_net_control_access_point.eo | 2 +- .../ecore_con/efl_net_control_technology.eo | 2 +- src/lib/ecore_con/efl_net_ip_address.eo | 2 +- src/lib/efl/interfaces/efl_model.eo | 5 +++-- src/lib/eio/efl_io_manager.eo | 18 +++++++-------- src/lib/elementary/efl_selection.eo | 2 +- src/lib/elementary/efl_selection_manager.eo | 2 +- src/lib/eo/eina_types.eot | 22 +++++++++++++++++-- src/lib/evas/canvas/efl_canvas_text.eo | 2 +- 11 files changed, 42 insertions(+), 23 deletions(-) diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index 6da5da49d9..e1d5c3f167 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -50,7 +50,7 @@ class Efl.Loop (Efl.Task) This has higher priority, for low priority use @.idle ]] - return: ptr(Eina.Future) @owned /* TODO: future */; [[The future handle.]] + return: future @owned; [[The future handle.]] } @property throttle { [[Slow down the loop execution by forcing sleep for a small @@ -75,7 +75,7 @@ class Efl.Loop (Efl.Task) This is a low priority version of @.job ]] - return: ptr(Eina.Future) @owned /* TODO: future */; [[The future handle.]] + return: future @owned; [[The future handle.]] } timeout { [[A future promise that will be resolved from a clean main @@ -83,7 +83,7 @@ class Efl.Loop (Efl.Task) params { @in time: double; [[The time from now in second that the main loop will wait before triggering it.]] } - return: ptr(Eina.Future) @owned /* future */; [[The future handle.]] + return: future @owned; [[The future handle.]] } register { [[Will register a manager of a specific class to be answered by eo.provider_find.]] diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index cc5d17de35..3d4e6e9b58 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -143,7 +143,7 @@ class Efl.Task (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer) } run { [[ Actually run the task ]] - return: ptr(Eina.Future) @owned; [[ A future triggered when task exits and is passed int exit code ]] + return: future @owned; [[ A future triggered when task exits and is passed int exit code ]] } end { [[ Request the task end (may send a signal or interrupt diff --git a/src/lib/ecore_con/efl_net_control_access_point.eo b/src/lib/ecore_con/efl_net_control_access_point.eo index dc262099bd..f97ba2ddd0 100644 --- a/src/lib/ecore_con/efl_net_control_access_point.eo +++ b/src/lib/ecore_con/efl_net_control_access_point.eo @@ -108,7 +108,7 @@ class Efl.Net.Control.Access_Point (Efl.Loop_Consumer) { EINPROGRESS (the connection was already ongoing) and EALREADY (the connection was already established). ]] - return: ptr(Eina.Future) @owned; [[Future for asynchronous connect]] /* NOTE: This should be future */ + return: future @owned; [[Future for asynchronous connect]] } disconnect { diff --git a/src/lib/ecore_con/efl_net_control_technology.eo b/src/lib/ecore_con/efl_net_control_technology.eo index 68c9446ab0..eecf21af0c 100644 --- a/src/lib/ecore_con/efl_net_control_technology.eo +++ b/src/lib/ecore_con/efl_net_control_technology.eo @@ -90,7 +90,7 @@ class Efl.Net.Control.Technology (Efl.Loop_Consumer) { state. Otherwise allow the system to perform passive scans in a timely manner. ]] - return: ptr(Eina.Future) @owned; [[Future return for finished background scan]] + return: future @owned; [[Future return for finished background scan]] } } diff --git a/src/lib/ecore_con/efl_net_ip_address.eo b/src/lib/ecore_con/efl_net_ip_address.eo index dfb99538b1..e715a0c7bb 100644 --- a/src/lib/ecore_con/efl_net_ip_address.eo +++ b/src/lib/ecore_con/efl_net_ip_address.eo @@ -112,7 +112,7 @@ class Efl.Net.Ip_Address (Efl.Object) { family: int @optional; [[Preferred family. AF_UNSPEC or 0 for both, otherwise one of AF_INET or AF_INET6]] flags: int @optional; [[Flags to use with getaddrinfo(). If 0, default flags are used (AI_V4MAPPED | AI_ADDRCONFIG, if these exist in your system).]] } - return: ptr(Eina.Future); [[The resolve results. It contains a list of Efl.Net.Ip_Address, they will be automatically deleted unless you keep a reference to it.]] + return: future; [[The resolve results. It contains a list of Efl.Net.Ip_Address, they will be automatically deleted unless you keep a reference to it.]] } @property string { diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo index 2fae595baa..cc46f5654b 100644 --- a/src/lib/efl/interfaces/efl_model.eo +++ b/src/lib/efl/interfaces/efl_model.eo @@ -46,7 +46,7 @@ interface Efl.Model () @since 1.14 ]] - return: ptr(Eina.Future); [[Return an error in case the property could not be set, the value that was set otherwise.]] + return: future; [[Return an error in case the property could not be set, the value that was set otherwise.]] } get { [[Retrieve the value of a given property name. @@ -98,7 +98,8 @@ interface Efl.Model () @in count: uint; [[Range size. If count is 0, start is ignored.]] } - return: ptr(Eina.Future); [[Array of childrens]] + /* XXX: is this right? */ + return: future>; [[Array of childrens]] } @property children_count { get { diff --git a/src/lib/eio/efl_io_manager.eo b/src/lib/eio/efl_io_manager.eo index 6267fa230c..75a20946ee 100644 --- a/src/lib/eio/efl_io_manager.eo +++ b/src/lib/eio/efl_io_manager.eo @@ -34,7 +34,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer) @in path: string; [[Path we want to list entries for]] paths: EflIoPath; [[Callback called for each packet of files found]] } - return: ptr(Eina.Future) @owned; [[Amount of files found during the listing of the directory]] + return: future @owned; [[Amount of files found during the listing of the directory]] } direct_ls @const { @@ -44,7 +44,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer) @in recursive: bool; [[If $true, list entries recursively, $false otherwise]] info: EflIoDirectInfo; [[Callback called for each packet of @Eina.File.Direct.Info]] } - return: ptr(Eina.Future) @owned; [[Amount of files found during the listing of the directory]] + return: future @owned; [[Amount of files found during the listing of the directory]] } stat_ls @const { @@ -54,7 +54,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer) @in recursive: bool; [[If $true, list entries recursively, $false otherwise]] info: EflIoDirectInfo; [[Callback called for each packet of @Eina.File.Direct.Info]] } - return: ptr(Eina.Future) @owned; [[Amount of files found during the listing of the directory]] + return: future @owned; [[Amount of files found during the listing of the directory]] } // Extended attributes @@ -64,7 +64,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer) @in path: string; [[Path we want to list entries for]] paths: EflIoPath; [[Callback called for each packet of extended attributes found.]] } - return: ptr(Eina.Future) @owned; [[Amount of extended attributes found]] + return: future @owned; [[Amount of extended attributes found]] } stat @const { @@ -72,7 +72,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer) params { @in path: string; [[Path we want to get stat information for]] } - return: ptr(Eina.Future); [[Stat information]] + return: future; [[Stat information]] } // FIXME: Add helper for Eina.Value to Xattr @@ -83,10 +83,10 @@ class Efl.Io.Manager (Efl.Loop_Consumer) data: ptr(Eina.Binbuf); [[Data to set as information]] flags: Eina.Xattr.Flags; [[Extended attributes flags]] } - return: ptr(Eina.Future) @owned; [[Future for asynchronous set operation]] + return: future @owned; [[Future for asynchronous set operation]] } get { - return: ptr(Eina.Future) @owned; [[Information]] + return: future @owned; [[Information]] } keys { path: string; [[File path]] @@ -103,7 +103,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer) @in path: string; [[Path to file]] @in shared: bool; [[$true if the file can be accessed by others, $false otherwise]] } - return: ptr(Eina.Future) @owned; [[Eina file handle]] + return: future @owned; [[Eina file handle]] } close @const { [[Closes an open Eina.File.]] @@ -111,7 +111,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer) @in file: ptr(Eina.File); [[Eina file handle]] // Here we're just interested whether the promise was fullfilled or not. No value needed. } - return: ptr(Eina.Future) @owned; [[Close return code]] + return: future @owned; [[Close return code]] } } } diff --git a/src/lib/elementary/efl_selection.eo b/src/lib/elementary/efl_selection.eo index 2f836567a1..bdb6d51d55 100644 --- a/src/lib/elementary/efl_selection.eo +++ b/src/lib/elementary/efl_selection.eo @@ -12,7 +12,7 @@ mixin Efl.Selection { @in data: Eina.Slice; @in seat: uint;[[Specified seat for multiple seats case.]] } - return: ptr(Eina.Future); [[Future for tracking when the selection is lost]] + return: future; [[Future for tracking when the selection is lost]] } selection_get { [[Get the data from the object that has selection]] diff --git a/src/lib/elementary/efl_selection_manager.eo b/src/lib/elementary/efl_selection_manager.eo index 33c25c9f0e..8556d063b1 100644 --- a/src/lib/elementary/efl_selection_manager.eo +++ b/src/lib/elementary/efl_selection_manager.eo @@ -11,7 +11,7 @@ class Efl.Selection_Manager (Efl.Object) { @in data: Eina.Slice; [[Selection data]] @in seat: uint @optional;[[Specified seat for multiple seats case.]] } - return: ptr(Eina.Future); [[Future for tracking when the selection is lost]] + return: future; [[Future for tracking when the selection is lost]] } selection_get @beta { [[Get selection]] diff --git a/src/lib/eo/eina_types.eot b/src/lib/eo/eina_types.eot index fc0fca09cc..3858b36eba 100644 --- a/src/lib/eo/eina_types.eot +++ b/src/lib/eo/eina_types.eot @@ -78,5 +78,23 @@ struct @extern Eina.Rw_Slice { } struct @extern Eina.Value.Type; [[Eina value type]] -struct @extern Eina.Future; [[Eina_Future handle]] -struct @extern Eina.Promise; [[Eina_Promise handle]] + +struct @extern Eina.Stat { + [[The structure to store some file statistics.]] + dev : ulong; [[The device where this file is located]] + ino : ulong; [[The inode]] + mode : uint; [[The mode]] + nlink : uint; [[The link number]] + uid : uint; [[The owner user id]] + gid : uint; [[The owner group id]] + rdev : ulong; [[The remote device]] + size : ulong; [[The file size in bytes]] + blksize : ulong; [[The block size in bytes]] + blocks : ulong; [[The number of blocks allocated]] + atime : ulong; [[The tilestamp when the file was last accessed]] + atimensec: ulong; [[The nano version of the timestmap when the file was last accessed]] + mtime : ulong; [[The tilestamp when the file was modified]] + mtimensec: ulong; [[The nano version of the timestmap when the file was modified]] + ctime : ulong; [[The tilestamp when the file was created]] + ctimensec: ulong; [[The nano version of the timestmap when the file was created]] +} \ No newline at end of file diff --git a/src/lib/evas/canvas/efl_canvas_text.eo b/src/lib/evas/canvas/efl_canvas_text.eo index 49c1357834..62fcf37a11 100644 --- a/src/lib/evas/canvas/efl_canvas_text.eo +++ b/src/lib/evas/canvas/efl_canvas_text.eo @@ -263,7 +263,7 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text, @since 1.21 ]] legacy: null; - return: ptr(Eina.Future) @owned; [[Future for layout result]] + return: future @owned; [[Future for layout result]] } } implements {