jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cc36889d736ede1702114d855fe0bc7aefae1939

commit cc36889d736ede1702114d855fe0bc7aefae1939
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Tue Mar 31 12:09:48 2015 +0900

    Efl.File: Add async property and async_wait() method
    
    Summary:
    Some other patches in elm will implement support for images.
    async means fopen() will happen asynchronously in a thread.
    
    Reviewers: cedric, raster, tasn
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2261
---
 src/lib/efl/interfaces/efl_file.eo | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/src/lib/efl/interfaces/efl_file.eo 
b/src/lib/efl/interfaces/efl_file.eo
index 887d96f..f2736b5 100644
--- a/src/lib/efl/interfaces/efl_file.eo
+++ b/src/lib/efl/interfaces/efl_file.eo
@@ -78,6 +78,26 @@ interface Efl.File {
             NULL, otherwise. */
          }
       }
+      async {
+         set {
+            /*@
+            If true, file open will happen asynchronously allowing for better
+            performance in some situations. The file will be opened from a
+            different thread. Classes implementing async open might then block
+            and wait when querying information from the file (eg. image size).
+
+            Only a few objects implement this feature, and this flag may
+            be ignored by EFL. In that case, get() will always return false. */
+         }
+         get {
+            /*@
+            Retrieves the asynchronous open flag, which will be true only if
+            enabled and supported by the object. */
+         }
+         values {
+            bool async; /*@ Flag for asynchronous open. */
+         }
+      }
    }
    methods {
       save @const {
@@ -110,5 +130,18 @@ interface Efl.File {
              Get rid of and clean the pointed resource.
              */
       }
+      async_wait @const {
+         /*@
+         Block and wait until all asynchronous operations are completed. Unless
+         the async flag was set on this object, this method has no effect.
+
+         Returns false if an error occured. */
+
+         return: bool;
+      }
+   }
+   events {
+      async,opened; /*@ The file was successfully opened asynchronously */
+      async,error; /*@ Error occured in asynchronous file operation */
    }
 }

-- 


Reply via email to