summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_vpath_file.eo
blob: 1568a3ea9c33ec38739a9200d0b17bb22ba03d8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
class Efl.Vpath.File (Efl.Object)
{
   [[ VPath File is an actual representation of a downloaded/mapped vpath file

      Keep this object around for as long as you need to use the file as it
      may have been downloaded and kept as a local temporary file and
      deletion may remove it.

      When you have a Vpath File object for the first time, call the do()
      method on it to actually begin/do the mapping. From here the
      fetched or failed event callbacks will be called, inside of which or
      afterwards you can fetch the resulting local file path by getting the
      result property.

      @since 1.18
   ]]
   eo_prefix: efl_vpath_file;
   methods {
      @property path {
         [[ The original source path provided to lookup/fetch from ]]
         set {}
         get {}
         values {
             path: string; [[ The input virtual path to a file ]]
         }
      }
      @property result {
         [[ The resulting real local file path to open/read ]]
         set {}
         get {}
         values {
             path: string; [[ The resulting destination file ]]
         }
      }
      @property keep {
         [[ If this object has to be kept for the usage of the result ]]
         set {}
         get {}
         values {
             keep: bool; [[ If the object neerds tobe kept around ]]
         }
      }
      do {
        [[ Actually begin the resolving here - emit event now or do later ]]
        return: bool; [[ Result callback already called ]]
      }
      wait {
        [[ If not fetched yet, wait until it is and call result cb ]]
      }
   }
   events {
      fetched; [[ File successfully mapped/fetched ]]
      failed; [[ File fetch or mapping failed ]]
   }
}