diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-29 21:20:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-29 21:20:23 +0000 |
commit | e7926986c823043a6296a73a518f21ad0d39a4b4 (patch) | |
tree | 43380c26d131b9d3b6c3f7bd01237cfdd52097aa | |
parent | ee4d754ebbcc11369dd7e78b50db733e3b921fc2 (diff) | |
download | gnunet-e7926986c823043a6296a73a518f21ad0d39a4b4.tar.gz gnunet-e7926986c823043a6296a73a518f21ad0d39a4b4.zip |
-towards external meta scanner process
-rw-r--r-- | src/include/gnunet_fs_service.h | 20 | ||||
-rw-r--r-- | 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 | |||
2608 | GNUNET_FS_DIRSCANNER_FILE_START = 0, | 2608 | GNUNET_FS_DIRSCANNER_FILE_START = 0, |
2609 | 2609 | ||
2610 | /** | 2610 | /** |
2611 | * We've finished processing a subtree in the pre-pass. | 2611 | * We're having trouble accessing a file (soft-error); it will |
2612 | * be ignored. | ||
2612 | */ | 2613 | */ |
2613 | GNUNET_FS_DIRSCANNER_SUBTREE_COUNTED, | 2614 | GNUNET_FS_DIRSCANNER_FILE_IGNORED, |
2614 | 2615 | ||
2615 | /** | 2616 | /** |
2616 | * We've found all files (in the pre-pass). | 2617 | * We've found all files (in the pre-pass). |
@@ -2629,12 +2630,6 @@ enum GNUNET_FS_DirScannerProgressUpdateReason | |||
2629 | GNUNET_FS_DIRSCANNER_FINISHED, | 2630 | GNUNET_FS_DIRSCANNER_FINISHED, |
2630 | 2631 | ||
2631 | /** | 2632 | /** |
2632 | * We're having trouble accessing a file (soft-error); it will | ||
2633 | * be ignored. | ||
2634 | */ | ||
2635 | GNUNET_FS_DIRSCANNER_DOES_NOT_EXIST, | ||
2636 | |||
2637 | /** | ||
2638 | * There was an internal error. Application should abort the scan. | 2633 | * There was an internal error. Application should abort the scan. |
2639 | */ | 2634 | */ |
2640 | GNUNET_FS_DIRSCANNER_INTERNAL_ERROR | 2635 | GNUNET_FS_DIRSCANNER_INTERNAL_ERROR |
@@ -2647,7 +2642,6 @@ enum GNUNET_FS_DirScannerProgressUpdateReason | |||
2647 | * progress on the job at hand. | 2642 | * progress on the job at hand. |
2648 | * | 2643 | * |
2649 | * @param cls closure | 2644 | * @param cls closure |
2650 | * @param ds handle to the directory scanner (NEEDED!?) | ||
2651 | * @param filename which file we are making progress on | 2645 | * @param filename which file we are making progress on |
2652 | * @param is_directory GNUNET_YES if this is a directory, | 2646 | * @param is_directory GNUNET_YES if this is a directory, |
2653 | * GNUNET_NO if this is a file | 2647 | * GNUNET_NO if this is a file |
@@ -2655,7 +2649,6 @@ enum GNUNET_FS_DirScannerProgressUpdateReason | |||
2655 | * @param reason kind of progress we are making | 2649 | * @param reason kind of progress we are making |
2656 | */ | 2650 | */ |
2657 | typedef void (*GNUNET_FS_DirScannerProgressCallback) (void *cls, | 2651 | typedef void (*GNUNET_FS_DirScannerProgressCallback) (void *cls, |
2658 | struct GNUNET_FS_DirScanner *ds, | ||
2659 | const char *filename, | 2652 | const char *filename, |
2660 | int is_directory, | 2653 | int is_directory, |
2661 | enum GNUNET_FS_DirScannerProgressUpdateReason reason); | 2654 | enum GNUNET_FS_DirScannerProgressUpdateReason reason); |
@@ -2710,16 +2703,11 @@ struct GNUNET_FS_ShareTreeItem | |||
2710 | char *filename; | 2703 | char *filename; |
2711 | 2704 | ||
2712 | /** | 2705 | /** |
2713 | * Base name of the file/directory | 2706 | * Base name of the file/directory; FIXME: needed? |
2714 | */ | 2707 | */ |
2715 | char *short_filename; | 2708 | char *short_filename; |
2716 | 2709 | ||
2717 | /** | 2710 | /** |
2718 | * Size of the file (if it is a file), in bytes | ||
2719 | */ | ||
2720 | uint64_t file_size; | ||
2721 | |||
2722 | /** | ||
2723 | * GNUNET_YES if this is a directory | 2711 | * GNUNET_YES if this is a directory |
2724 | */ | 2712 | */ |
2725 | int is_directory; | 2713 | int is_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" | |||
608 | */ | 608 | */ |
609 | #define GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_VPN 192 | 609 | #define GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_VPN 192 |
610 | 610 | ||
611 | |||
612 | |||
613 | /** | 611 | /** |
614 | * Type of messages containing an DNS request for a DNS exit service. | 612 | * Type of messages containing an DNS request for a DNS exit service. |
615 | */ | 613 | */ |
@@ -1214,11 +1212,49 @@ extern "C" | |||
1214 | */ | 1212 | */ |
1215 | #define GNUNET_MESSAGE_TYPE_STREAM_CLOSE_ACK 410 | 1213 | #define GNUNET_MESSAGE_TYPE_STREAM_CLOSE_ACK 410 |
1216 | 1214 | ||
1215 | /******************************************************************************* | ||
1216 | * FS-PUBLISH-HELPER IPC Messages | ||
1217 | ******************************************************************************/ | ||
1218 | |||
1219 | /** | ||
1220 | * Progress information from the helper: found a file | ||
1221 | */ | ||
1222 | #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_FILE 420 | ||
1223 | |||
1224 | /** | ||
1225 | * Progress information from the helper: found a directory | ||
1226 | */ | ||
1227 | #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY 421 | ||
1228 | |||
1229 | /** | ||
1230 | * Error signal from the helper. | ||
1231 | */ | ||
1232 | #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR 422 | ||
1217 | 1233 | ||
1218 | /** | 1234 | /** |
1219 | * Next available: 420 | 1235 | * Signal that helper skipped a file. |
1220 | */ | 1236 | */ |
1237 | #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_SKIP_FILE 423 | ||
1221 | 1238 | ||
1239 | /** | ||
1240 | * Signal that helper is done scanning the directory tree. | ||
1241 | */ | ||
1242 | #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE 424 | ||
1243 | |||
1244 | /** | ||
1245 | * Extracted meta data from the helper. | ||
1246 | */ | ||
1247 | #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA 425 | ||
1248 | |||
1249 | /** | ||
1250 | * Signal that helper is done. | ||
1251 | */ | ||
1252 | #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED 426 | ||
1253 | |||
1254 | |||
1255 | /** | ||
1256 | * Next available: 430 | ||
1257 | */ | ||
1222 | 1258 | ||
1223 | /******************************************************************************* | 1259 | /******************************************************************************* |
1224 | * TODO: we need a way to register message types centrally (via some webpage). | 1260 | * TODO: we need a way to register message types centrally (via some webpage). |