aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-05-01 11:11:18 +0000
committerChristian Grothoff <christian@grothoff.org>2010-05-01 11:11:18 +0000
commita049ae12c49803acf2f1b5615527d604d6cc0e19 (patch)
treeb3e33f318cc14a51b864a93fc469413177042520 /src/fs/fs.h
parent102cff6c0acc2d097da32d35c5e50a7c1550561f (diff)
downloadgnunet-a049ae12c49803acf2f1b5615527d604d6cc0e19.tar.gz
gnunet-a049ae12c49803acf2f1b5615527d604d6cc0e19.zip
deserialization of unindex operations
Diffstat (limited to 'src/fs/fs.h')
-rw-r--r--src/fs/fs.h50
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 */
667void
668GNUNET_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 */
696void
697GNUNET_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 */
706void
707GNUNET_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
711GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc); 744GNUNET_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 */
755void
756GNUNET_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;