Spank, spank spank!!! CCCCCCCCeeeeeddddddrrrrrrriiiiiiiccccccc!!!!
Where's eio_map.c?
I temporarily removed eio_map.c from build.
Please add it.

Daniel Juyung Seo (SeoZ)

On Wed, Dec 21, 2011 at 2:35 AM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> eio: add API for eina_file_open and like.
>
>  tweet: now Eio can help you load your file assynchronously !
>
>
> Author:       cedric
> Date:         2011-12-20 09:35:41 -0800 (Tue, 20 Dec 2011)
> New Revision: 66397
> Trac:         http://trac.enlightenment.org/e/changeset/66397
>
> Modified:
>  trunk/eio/src/lib/Eio.h trunk/eio/src/lib/Makefile.am 
> trunk/eio/src/lib/eio_private.h
>
> Modified: trunk/eio/src/lib/Eio.h
> ===================================================================
> --- trunk/eio/src/lib/Eio.h     2011-12-20 17:25:54 UTC (rev 66396)
> +++ trunk/eio/src/lib/Eio.h     2011-12-20 17:35:41 UTC (rev 66397)
> @@ -123,6 +123,10 @@
>  typedef void (*Eio_Stat_Cb)(void *data, Eio_File *handler, const struct stat 
> *stat);
>  typedef void (*Eio_Progress_Cb)(void *data, Eio_File *handler, const 
> Eio_Progress *info);
>
> +typedef void (*Eio_Open_Cb)(void *data, Eio_File *handler, Eina_File *file);
> +typedef Eina_Bool (*Eio_Filter_Map_Cb)(void *data, Eio_File *handler, void 
> *map);
> +typedef void (*Eio_Map_Cb)(void *data, Eio_File *handler, void *map);
> +
>  typedef void (*Eio_Done_Data_Cb)(void *data, Eio_File *handler, const char 
> *xattr_data, unsigned int xattr_size);
>  typedef void (*Eio_Done_String_Cb)(void *data, Eio_File *handler, const char 
> *xattr_string);
>  typedef void (*Eio_Done_Double_Cb)(void *data, Eio_File *handler, double 
> xattr_double);
> @@ -678,7 +682,87 @@
>  /**
>  *
>  */
> +
>  /**
> + * @defgroup Eio_Map Manipulate an Eina_File assynchronously
> + *
> + * @brief This function help manipulating file assynchronously.
> + */
> +
> +/**
> + * @brief Assynchronously open a file.
> + * @param name The file to open.
> + * @param shared If it's an shm file.
> + * @param open_cb Callback called in the main loop when the file has been 
> successfully opened.
> + * @param error_cb Callback called in the main loop when the file couldn't 
> be opened.
> + * @param data Private data given to each callback.
> + * @return NULL in case of a failure.
> + */
> +EAPI Eio_File *eio_file_open(const char *name, Eina_Bool shared,
> +                             Eio_Open_Cb open_cb,
> +                             Eio_Error_Cb error_cb,
> +                             const void *data);
> +
> +/**
> + * @brief Assynchronously close a file.
> + * @param f The file to close.
> + * @param done_cb Callback called in the main loop when the file has been 
> successfully closed.
> + * @param error_cb Callback called in the main loop when the file couldn't 
> be closed.
> + * @param data Private data given to each callback.
> + * @return NULL in case of a failure.
> + */
> +EAPI Eio_File *eio_file_close(Eina_File *f,
> +                              Eio_Done_Cb done_cb,
> +                              Eio_Error_Cb error_cb,
> +                              const void *data);
> +
> +/**
> + * @brief Assynchronously map a file in memory.
> + * @param f The file to map.
> + * @param rule The rule to apply to the map.
> + * @param filter_cb Callback called in the thread to validate the content of 
> the map.
> + * @param map_cb Callback called in the main loop when the file has been 
> successfully mapped.
> + * @param error_cb Callback called in the main loop when the file can't be 
> mapped.
> + * @param data Private data given to each callback.
> + * @return NULL in case of a failure.
> + *
> + * The container of the Eio_File is the Eina_File.
> + */
> +EAPI Eio_File *eio_file_map_all(Eina_File *f,
> +                                Eina_File_Populate rule,
> +                                Eio_Filter_Map_Cb filter_cb,
> +                                Eio_Map_Cb map_cb,
> +                                Eio_Error_Cb error_cb,
> +                                const void *data);
> +
> +/**
> + * @brief Assynchronously map a part of a file in memory.
> + * @param f The file to map.
> + * @param rule The rule to apply to the map.
> + * @param offset The offset inside the file
> + * @param length The length of the memory to map
> + * @param filter_cb Callback called in the thread to validate the content of 
> the map.
> + * @param map_cb Callback called in the main loop when the file has been 
> successfully mapped.
> + * @param error_cb Callback called in the main loop when the file can't be 
> mapped.
> + * @param data Private data given to each callback.
> + * @return NULL in case of a failure.
> + *
> + * The container of the Eio_File is the Eina_File.
> + */
> +EAPI Eio_File *eio_file_map_new(Eina_File *f,
> +                                Eina_File_Populate rule,
> +                                unsigned long int offset,
> +                                unsigned long int length,
> +                                Eio_Filter_Map_Cb filter_cb,
> +                                Eio_Map_Cb map_cb,
> +                                Eio_Error_Cb error_cb,
> +                                const void *data);
> +
> +/**
> + * @}
> + */
> +
> +/**
>  * @defgroup Eio_Monitor Eio file and directory monitoring API
>  *
>  * @brief This function help monitoring change in a directory or on a file.
>
> Modified: trunk/eio/src/lib/Makefile.am
> ===================================================================
> --- trunk/eio/src/lib/Makefile.am       2011-12-20 17:25:54 UTC (rev 66396)
> +++ trunk/eio/src/lib/Makefile.am       2011-12-20 17:35:41 UTC (rev 66397)
> @@ -16,6 +16,7 @@
>  eio_dir.c \
>  eio_monitor.c \
>  eio_poll.c \
> +eio_map.c \
>  eio_xattr.c
>
>  if EIO_HAVE_INOTIFY
>
> Modified: trunk/eio/src/lib/eio_private.h
> ===================================================================
> --- trunk/eio/src/lib/eio_private.h     2011-12-20 17:25:54 UTC (rev 66396)
> +++ trunk/eio/src/lib/eio_private.h     2011-12-20 17:35:41 UTC (rev 66397)
> @@ -51,6 +51,8 @@
>
>  #define EIO_PACKED_TIME 0.003
>
> +typedef struct _Eio_File_Map Eio_File_Map;
> +typedef struct _Eio_File_Map_Rule Eio_File_Map_Rule;
>  typedef struct _Eio_File_Ls Eio_File_Ls;
>  typedef struct _Eio_File_Direct_Ls Eio_File_Direct_Ls;
>  typedef struct _Eio_File_Char_Ls Eio_File_Char_Ls;
> @@ -109,6 +111,30 @@
>    } worker, main;
>  };
>
> +struct _Eio_File_Map
> +{
> +   Eio_File common;
> +
> +   Eio_Open_Cb open_cb;
> +   const char *name;
> +   Eina_Bool shared;
> +
> +   Eina_File *result;
> +};
> +
> +struct _Eio_File_Map_Rule
> +{
> +   Eio_File common;
> +   Eio_Filter_Map_Cb filter_cb;
> +   Eio_Map_Cb map_cb;
> +   Eina_File_Populate rule;
> +
> +   unsigned long int offset;
> +   unsigned long int length;
> +
> +   void *result;
> +};
> +
>  struct _Eio_File_Ls
>  {
>    Eio_File common;
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to