diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-25 22:28:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-25 22:28:16 +0000 |
commit | 6cbf14f9b87bfc6608caf12f4f8105ef717477c8 (patch) | |
tree | 8de5cc3eaac9476310fcb12557223c890599d381 /src/include/gnunet_disk_lib.h | |
parent | 3308b6e4c666bd9a78e3312e21a5595ddb16fe41 (diff) | |
download | gnunet-6cbf14f9b87bfc6608caf12f4f8105ef717477c8.tar.gz gnunet-6cbf14f9b87bfc6608caf12f4f8105ef717477c8.zip |
remove dead/ugly code
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r-- | src/include/gnunet_disk_lib.h | 68 |
1 files changed, 7 insertions, 61 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index a8f7ec600..02c4b3674 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -669,65 +669,6 @@ GNUNET_DISK_directory_scan (const char *dir_name, | |||
669 | 669 | ||
670 | 670 | ||
671 | /** | 671 | /** |
672 | * Opaque handle used for iterating over a directory. | ||
673 | */ | ||
674 | struct GNUNET_DISK_DirectoryIterator; | ||
675 | |||
676 | |||
677 | /** | ||
678 | * Function called to iterate over a directory. | ||
679 | * | ||
680 | * @param cls closure | ||
681 | * @param di argument to pass to #GNUNET_DISK_directory_iterator_next to | ||
682 | * get called on the next entry (or finish cleanly); | ||
683 | * NULL on error (will be the last call in that case) | ||
684 | * @param filename complete filename (absolute path) | ||
685 | * @param dirname directory name (absolute path) | ||
686 | */ | ||
687 | typedef void | ||
688 | (*GNUNET_DISK_DirectoryIteratorCallback) (void *cls, | ||
689 | struct GNUNET_DISK_DirectoryIterator *di, | ||
690 | const char *filename, | ||
691 | const char *dirname); | ||
692 | |||
693 | |||
694 | /** | ||
695 | * This function must be called during the DiskIteratorCallback | ||
696 | * (exactly once) to schedule the task to process the next | ||
697 | * filename in the directory (if there is one). | ||
698 | * | ||
699 | * @param iter opaque handle for the iterator | ||
700 | * @param can set to #GNUNET_YES to terminate the iteration early | ||
701 | * @return #GNUNET_YES if iteration will continue, | ||
702 | * #GNUNET_NO if this was the last entry (and iteration is complete), | ||
703 | * #GNUNET_SYSERR if @a can was #GNUNET_YES | ||
704 | */ | ||
705 | int | ||
706 | GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator *iter, | ||
707 | int can); | ||
708 | |||
709 | |||
710 | /** | ||
711 | * Scan a directory for files using the scheduler to run a task for | ||
712 | * each entry. The name of the directory must be expanded first (!). | ||
713 | * If a scheduler does not need to be used, GNUNET_DISK_directory_scan | ||
714 | * may provide a simpler API. | ||
715 | * | ||
716 | * @param prio priority to use | ||
717 | * @param dir_name the name of the directory | ||
718 | * @param callback the method to call for each file | ||
719 | * @param callback_cls closure for @a callback | ||
720 | * @return #GNUNET_YES if directory is not empty and @a callback | ||
721 | * will be called later, #GNUNET_NO otherwise, #GNUNET_SYSERR on error. | ||
722 | */ | ||
723 | int | ||
724 | GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio, | ||
725 | const char *dir_name, | ||
726 | GNUNET_DISK_DirectoryIteratorCallback | ||
727 | callback, void *callback_cls); | ||
728 | |||
729 | |||
730 | /** | ||
731 | * Create the directory structure for storing | 672 | * Create the directory structure for storing |
732 | * a file. | 673 | * a file. |
733 | * | 674 | * |
@@ -820,7 +761,8 @@ GNUNET_DISK_filename_canonicalize (char *fn); | |||
820 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure | 761 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
821 | */ | 762 | */ |
822 | int | 763 | int |
823 | GNUNET_DISK_file_change_owner (const char *filename, const char *user); | 764 | GNUNET_DISK_file_change_owner (const char *filename, |
765 | const char *user); | ||
824 | 766 | ||
825 | 767 | ||
826 | /** | 768 | /** |
@@ -839,7 +781,9 @@ struct GNUNET_DISK_MapHandle; | |||
839 | void * | 781 | void * |
840 | GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h, | 782 | GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h, |
841 | struct GNUNET_DISK_MapHandle **m, | 783 | struct GNUNET_DISK_MapHandle **m, |
842 | enum GNUNET_DISK_MapType access, size_t len); | 784 | enum GNUNET_DISK_MapType access, |
785 | size_t len); | ||
786 | |||
843 | 787 | ||
844 | /** | 788 | /** |
845 | * Unmap a file | 789 | * Unmap a file |
@@ -850,8 +794,10 @@ GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h, | |||
850 | int | 794 | int |
851 | GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h); | 795 | GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h); |
852 | 796 | ||
797 | |||
853 | /** | 798 | /** |
854 | * Write file changes to disk | 799 | * Write file changes to disk |
800 | * | ||
855 | * @param h handle to an open file | 801 | * @param h handle to an open file |
856 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 802 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
857 | */ | 803 | */ |