diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-01 11:11:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-01 11:11:18 +0000 |
commit | a049ae12c49803acf2f1b5615527d604d6cc0e19 (patch) | |
tree | b3e33f318cc14a51b864a93fc469413177042520 /src/fs/fs.h | |
parent | 102cff6c0acc2d097da32d35c5e50a7c1550561f (diff) | |
download | gnunet-a049ae12c49803acf2f1b5615527d604d6cc0e19.tar.gz gnunet-a049ae12c49803acf2f1b5615527d604d6cc0e19.zip |
deserialization of unindex operations
Diffstat (limited to 'src/fs/fs.h')
-rw-r--r-- | src/fs/fs.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/fs/fs.h b/src/fs/fs.h index 7100b1657..9441b76e0 100644 --- a/src/fs/fs.h +++ b/src/fs/fs.h | |||
@@ -658,6 +658,18 @@ GNUNET_FS_publish_main_ (void *cls, | |||
658 | 658 | ||
659 | 659 | ||
660 | /** | 660 | /** |
661 | * Function called once the hash of the file | ||
662 | * that is being unindexed has been computed. | ||
663 | * | ||
664 | * @param cls closure, unindex context | ||
665 | * @param file_id computed hash, NULL on error | ||
666 | */ | ||
667 | void | ||
668 | GNUNET_FS_unindex_process_hash_ (void *cls, | ||
669 | const GNUNET_HashCode *file_id); | ||
670 | |||
671 | |||
672 | /** | ||
661 | * Fill in all of the generic fields for a publish event and call the | 673 | * Fill in all of the generic fields for a publish event and call the |
662 | * callback. | 674 | * callback. |
663 | * | 675 | * |
@@ -673,6 +685,27 @@ GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | |||
673 | const struct GNUNET_FS_FileInformation *p, | 685 | const struct GNUNET_FS_FileInformation *p, |
674 | uint64_t offset); | 686 | uint64_t offset); |
675 | 687 | ||
688 | /** | ||
689 | * Fill in all of the generic fields for | ||
690 | * an unindex event and call the callback. | ||
691 | * | ||
692 | * @param pi structure to fill in | ||
693 | * @param uc overall unindex context | ||
694 | * @param offset where we are in the file (for progress) | ||
695 | */ | ||
696 | void | ||
697 | GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | ||
698 | struct GNUNET_FS_UnindexContext *uc, | ||
699 | uint64_t offset); | ||
700 | |||
701 | /** | ||
702 | * Connect to the datastore and remove the blocks. | ||
703 | * | ||
704 | * @param uc context for the unindex operation. | ||
705 | */ | ||
706 | void | ||
707 | GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc); | ||
708 | |||
676 | 709 | ||
677 | /** | 710 | /** |
678 | * Remove serialization/deserialization file from disk. | 711 | * Remove serialization/deserialization file from disk. |
@@ -711,6 +744,18 @@ void | |||
711 | GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc); | 744 | GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc); |
712 | 745 | ||
713 | 746 | ||
747 | /** | ||
748 | * Synchronize this unindex struct with its mirror | ||
749 | * on disk. Note that all internal FS-operations that change | ||
750 | * publishing structs should already call "sync" internally, | ||
751 | * so this function is likely not useful for clients. | ||
752 | * | ||
753 | * @param uc the struct to sync | ||
754 | */ | ||
755 | void | ||
756 | GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc); | ||
757 | |||
758 | |||
714 | 759 | ||
715 | /** | 760 | /** |
716 | * Master context for most FS operations. | 761 | * Master context for most FS operations. |
@@ -983,6 +1028,11 @@ struct GNUNET_FS_UnindexContext | |||
983 | struct GNUNET_DISK_FileHandle *fh; | 1028 | struct GNUNET_DISK_FileHandle *fh; |
984 | 1029 | ||
985 | /** | 1030 | /** |
1031 | * Error message, NULL on success. | ||
1032 | */ | ||
1033 | char *emsg; | ||
1034 | |||
1035 | /** | ||
986 | * Overall size of the file. | 1036 | * Overall size of the file. |
987 | */ | 1037 | */ |
988 | uint64_t file_size; | 1038 | uint64_t file_size; |