From: raster Date: Sat, 29 Jan 2011 02:48:03 +0000 (+0000) Subject: provide enums for progress return. X-Git-Tag: 2.0_alpha~194^2~246 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22d0a0d6423bcd9e25709e4b03bcd27edebeb0a9;p=framework%2Fuifw%2Fecore.git provide enums for progress return. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@56350 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/examples/ecore_file_download_example.c b/examples/ecore_file_download_example.c index 71aec92..089595e 100644 --- a/examples/ecore_file_download_example.c +++ b/examples/ecore_file_download_example.c @@ -28,7 +28,7 @@ progress_cb(void *data, const char *file, long int ultotal, long int ulnow) { printf("Progress: %ld/%ld\n", dlnow, dltotal); - return 0; // 0 to continue the download, or 1 to abort + return ECORE_FILE_PROGRESS_CONTINUE; // continue the download } diff --git a/src/lib/ecore_file/Ecore_File.h b/src/lib/ecore_file/Ecore_File.h index 35d38fe..ac4270c 100644 --- a/src/lib/ecore_file/Ecore_File.h +++ b/src/lib/ecore_file/Ecore_File.h @@ -89,6 +89,17 @@ typedef void (*Ecore_File_Monitor_Cb)(void *data, Ecore_File_Monitor *em, Ecore_ typedef void (*Ecore_File_Download_Completion_Cb)(void *data, const char *file, int status); /** + * @typedef Ecore_File_Progress_Return + * What to do with the download as a return from the + * Ecore_File_Download_Progress_Cb function, if provided. + */ +typedef enum _Ecore_File_Progress_Return +{ + ECORE_FILE_PROGRESS_CONTINUE = 0, /**< Continue the download. */ + ECORE_FILE_PROGRESS_ABORT = 1 /**< Abort the download. */ +} Ecore_File_Progress_Return; + +/** * @typedef Ecore_File_Download_Progress_Cb * Callback type used while a download is in progress. */