From e7926986c823043a6296a73a518f21ad0d39a4b4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 29 Jan 2012 21:20:23 +0000 Subject: -towards external meta scanner process --- src/include/gnunet_fs_service.h | 20 ++++---------------- src/include/gnunet_protocols.h | 42 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 19 deletions(-) diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index f8a20c75b..e723d6457 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h @@ -2608,9 +2608,10 @@ enum GNUNET_FS_DirScannerProgressUpdateReason GNUNET_FS_DIRSCANNER_FILE_START = 0, /** - * We've finished processing a subtree in the pre-pass. + * We're having trouble accessing a file (soft-error); it will + * be ignored. */ - GNUNET_FS_DIRSCANNER_SUBTREE_COUNTED, + GNUNET_FS_DIRSCANNER_FILE_IGNORED, /** * We've found all files (in the pre-pass). @@ -2628,12 +2629,6 @@ enum GNUNET_FS_DirScannerProgressUpdateReason */ GNUNET_FS_DIRSCANNER_FINISHED, - /** - * We're having trouble accessing a file (soft-error); it will - * be ignored. - */ - GNUNET_FS_DIRSCANNER_DOES_NOT_EXIST, - /** * There was an internal error. Application should abort the scan. */ @@ -2647,7 +2642,6 @@ enum GNUNET_FS_DirScannerProgressUpdateReason * progress on the job at hand. * * @param cls closure - * @param ds handle to the directory scanner (NEEDED!?) * @param filename which file we are making progress on * @param is_directory GNUNET_YES if this is a directory, * GNUNET_NO if this is a file @@ -2655,7 +2649,6 @@ enum GNUNET_FS_DirScannerProgressUpdateReason * @param reason kind of progress we are making */ typedef void (*GNUNET_FS_DirScannerProgressCallback) (void *cls, - struct GNUNET_FS_DirScanner *ds, const char *filename, int is_directory, enum GNUNET_FS_DirScannerProgressUpdateReason reason); @@ -2710,15 +2703,10 @@ struct GNUNET_FS_ShareTreeItem char *filename; /** - * Base name of the file/directory + * Base name of the file/directory; FIXME: needed? */ char *short_filename; - /** - * Size of the file (if it is a file), in bytes - */ - uint64_t file_size; - /** * GNUNET_YES if this is a directory */ diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index af4dd74b2..285e1b488 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -608,8 +608,6 @@ extern "C" */ #define GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_VPN 192 - - /** * Type of messages containing an DNS request for a DNS exit service. */ @@ -1214,11 +1212,49 @@ extern "C" */ #define GNUNET_MESSAGE_TYPE_STREAM_CLOSE_ACK 410 +/******************************************************************************* + * FS-PUBLISH-HELPER IPC Messages + ******************************************************************************/ + +/** + * Progress information from the helper: found a file + */ +#define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_FILE 420 + +/** + * Progress information from the helper: found a directory + */ +#define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY 421 + +/** + * Error signal from the helper. + */ +#define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR 422 /** - * Next available: 420 + * Signal that helper skipped a file. */ +#define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_SKIP_FILE 423 +/** + * Signal that helper is done scanning the directory tree. + */ +#define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE 424 + +/** + * Extracted meta data from the helper. + */ +#define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA 425 + +/** + * Signal that helper is done. + */ +#define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED 426 + + +/** + * Next available: 430 + */ /******************************************************************************* * TODO: we need a way to register message types centrally (via some webpage). -- cgit v1.2.3