eio: improve efl.io.manager API by being const when not touching the object.

This commit is contained in:
Cedric BAIL 2018-04-18 11:22:48 -07:00
parent 202f433476
commit bba8fbe449
2 changed files with 16 additions and 16 deletions

View File

@ -108,7 +108,7 @@ _future_file_info_cb(void *data EINA_UNUSED, Eio_File *handler, Eina_Array *gath
/* Method implementations */
static Eina_Future *
_efl_io_manager_direct_ls(Eo *obj,
_efl_io_manager_direct_ls(const Eo *obj,
Efl_Io_Manager_Data *pd EINA_UNUSED,
const char *path,
Eina_Bool recursive,
@ -151,7 +151,7 @@ _efl_io_manager_direct_ls(Eo *obj,
}
static Eina_Future *
_efl_io_manager_stat_ls(Eo *obj,
_efl_io_manager_stat_ls(const Eo *obj,
Efl_Io_Manager_Data *pd EINA_UNUSED,
const char *path,
Eina_Bool recursive,
@ -194,7 +194,7 @@ _efl_io_manager_stat_ls(Eo *obj,
}
static Eina_Future *
_efl_io_manager_ls(Eo *obj,
_efl_io_manager_ls(const Eo *obj,
Efl_Io_Manager_Data *pd EINA_UNUSED,
const char *path,
void *paths_data, EflIoPath paths, Eina_Free_Cb paths_free_cb)
@ -247,7 +247,7 @@ _file_stat_done_cb(void *data, Eio_File *handle EINA_UNUSED, const Eina_Stat *st
}
static Eina_Future *
_efl_io_manager_stat(Eo *obj,
_efl_io_manager_stat(const Eo *obj,
Efl_Io_Manager_Data *pd EINA_UNUSED,
const char *path)
{
@ -275,7 +275,7 @@ _efl_io_manager_stat(Eo *obj,
/* eXtended attribute manipulation */
static Eina_Future *
_efl_io_manager_xattr_ls(Eo *obj,
_efl_io_manager_xattr_ls(const Eo *obj,
Efl_Io_Manager_Data *pd EINA_UNUSED,
const char *path,
void *paths_data, EflIoPath paths, Eina_Free_Cb paths_free_cb)
@ -395,7 +395,7 @@ _future_file_open_cb(void *data, Eio_File *handler EINA_UNUSED, Eina_File *file)
}
static Eina_Future *
_efl_io_manager_open(Eo *obj,
_efl_io_manager_open(const Eo *obj,
Efl_Io_Manager_Data *pd EINA_UNUSED,
const char *path,
Eina_Bool shared)
@ -422,7 +422,7 @@ _efl_io_manager_open(Eo *obj,
}
static Eina_Future *
_efl_io_manager_close(Eo *obj,
_efl_io_manager_close(const Eo *obj,
Efl_Io_Manager_Data *pd EINA_UNUSED,
Eina_File *file)
{

View File

@ -26,18 +26,18 @@ class Efl.Io.Manager (Efl.Loop_Consumer)
[[Class representing an asynchronous file operation.]]
methods {
ls {
ls @const {
[[Lists entries in a given path.
See \@ref eina_file_ls().
]]
params {
@in path: string; [[Path we want to list entries for]]
paths: EflIoPath; [[Callback called for each packet of files found]]
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]]
}
direct_ls {
direct_ls @const {
[[Lists entries in a given path with more information.]]
params {
@in path: string;[[Path we want to list entries for]]
@ -47,7 +47,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer)
return: ptr(Eina.Future) @owned; [[Amount of files found during the listing of the directory]]
}
stat_ls {
stat_ls @const {
[[Lists entries in a given path with stat information.]]
params {
@in path: string;[[Path we want to list entries for]]
@ -58,16 +58,16 @@ class Efl.Io.Manager (Efl.Loop_Consumer)
}
// Extended attributes
xattr_ls {
xattr_ls @const {
[[Lists all extended attributes asynchronously.]]
params {
@in path: string; [[Path we want to list entries for]]
paths: EflIoPath; [[Callback called for each packet of extended attributes found.]]
paths: EflIoPath; [[Callback called for each packet of extended attributes found.]]
}
return: ptr(Eina.Future) @owned; [[Amount of extended attributes found]]
}
stat {
stat @const {
[[Get stat info on a given file/directory.]]
params {
@in path: string; [[Path we want to get stat information for]]
@ -95,7 +95,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer)
}
// helper api
open {
open @const {
[[Opens a file.
The fulfilled value in the promise will be the Eina.File*.]]
@ -105,7 +105,7 @@ class Efl.Io.Manager (Efl.Loop_Consumer)
}
return: ptr(Eina.Future) @owned; [[Eina file handle]]
}
close {
close @const {
[[Closes an open Eina.File.]]
params {
@in file: ptr(Eina.File); [[Eina file handle]]