provide enums for progress return.

SVN revision: 56350
This commit is contained in:
Carsten Haitzler 2011-01-29 02:48:03 +00:00
parent 107d6e227c
commit 6819161c96
2 changed files with 12 additions and 1 deletions

View 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
}

View File

@ -88,6 +88,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.