provide enums for progress return.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 29 Jan 2011 02:48:03 +0000 (02:48 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 29 Jan 2011 02:48:03 +0000 (02:48 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@56350 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

examples/ecore_file_download_example.c
src/lib/ecore_file/Ecore_File.h

index 71aec92..089595e 100644 (file)
@@ -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
 }
 
 
index 35d38fe..ac4270c 100644 (file)
@@ -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.
  */