2010-09-01 01:23:15 -07:00
|
|
|
#ifndef EIO_PRIVATE_H_
|
|
|
|
#define EIO_PRIVATE_H_
|
|
|
|
|
|
|
|
#include <Ecore.h>
|
|
|
|
|
2010-09-06 08:27:10 -07:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2010-09-01 01:23:15 -07:00
|
|
|
#include "Eio.h"
|
|
|
|
|
|
|
|
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;
|
|
|
|
typedef struct _Eio_File_Mkdir Eio_File_Mkdir;
|
2010-09-02 06:39:59 -07:00
|
|
|
typedef struct _Eio_File_Unlink Eio_File_Unlink;
|
2010-09-06 08:27:10 -07:00
|
|
|
typedef struct _Eio_File_Stat Eio_File_Stat;
|
2010-09-01 01:23:15 -07:00
|
|
|
|
|
|
|
struct _Eio_File
|
|
|
|
{
|
|
|
|
Ecore_Thread *thread;
|
|
|
|
const void *data;
|
|
|
|
|
2010-09-07 07:43:51 -07:00
|
|
|
int error;
|
|
|
|
|
|
|
|
Eio_Error_Cb error_cb;
|
2010-09-01 01:23:15 -07:00
|
|
|
Eio_Done_Cb done_cb;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Eio_File_Ls
|
|
|
|
{
|
|
|
|
Eio_File common;
|
|
|
|
const char *directory;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Eio_File_Direct_Ls
|
|
|
|
{
|
|
|
|
Eio_File_Ls ls;
|
|
|
|
|
|
|
|
Eio_Filter_Direct_Cb filter_cb;
|
|
|
|
Eio_Main_Direct_Cb main_cb;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Eio_File_Char_Ls
|
|
|
|
{
|
|
|
|
Eio_File_Ls ls;
|
|
|
|
|
|
|
|
Eio_Filter_Cb filter_cb;
|
|
|
|
Eio_Main_Cb main_cb;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Eio_File_Mkdir
|
|
|
|
{
|
|
|
|
Eio_File common;
|
|
|
|
|
|
|
|
const char *path;
|
|
|
|
mode_t mode;
|
|
|
|
};
|
|
|
|
|
2010-09-02 06:39:59 -07:00
|
|
|
struct _Eio_File_Unlink
|
|
|
|
{
|
|
|
|
Eio_File common;
|
|
|
|
|
|
|
|
const char *path;
|
|
|
|
};
|
|
|
|
|
2010-09-06 08:27:10 -07:00
|
|
|
struct _Eio_File_Stat
|
|
|
|
{
|
|
|
|
Eio_File common;
|
|
|
|
|
|
|
|
Eio_Stat_Cb done_cb;
|
|
|
|
|
|
|
|
struct stat buffer;
|
|
|
|
const char *path;
|
|
|
|
};
|
|
|
|
|
2010-09-07 07:43:51 -07:00
|
|
|
/* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. */
|
2010-09-06 09:37:43 -07:00
|
|
|
Eina_Bool eio_file_set(Eio_File *common,
|
|
|
|
Eio_Done_Cb done_cb,
|
2010-09-07 07:43:51 -07:00
|
|
|
Eio_Error_Cb error_cb,
|
2010-09-06 09:37:43 -07:00
|
|
|
const void *data,
|
|
|
|
Ecore_Cb job_cb,
|
|
|
|
Ecore_Cb end_cb,
|
|
|
|
Ecore_Cb cancel_cb);
|
|
|
|
|
2010-09-07 07:43:51 -07:00
|
|
|
/* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. */
|
2010-09-06 09:37:43 -07:00
|
|
|
Eina_Bool eio_long_file_set(Eio_File *common,
|
|
|
|
Eio_Done_Cb done_cb,
|
2010-09-07 07:43:51 -07:00
|
|
|
Eio_Error_Cb error_cb,
|
2010-09-06 09:37:43 -07:00
|
|
|
const void *data,
|
|
|
|
Ecore_Thread_Heavy_Cb heavy_cb,
|
|
|
|
Ecore_Thread_Notify_Cb notify_cb,
|
|
|
|
Ecore_Cb end_cb,
|
|
|
|
Ecore_Cb cancel_cb);
|
|
|
|
|
2010-09-06 08:27:10 -07:00
|
|
|
void eio_file_error(Eio_File *common);
|
|
|
|
void eio_file_thread_error(Eio_File *common);
|
|
|
|
|
2010-09-01 01:23:15 -07:00
|
|
|
#endif
|