gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r458 - in GNUnet: . src/applications/fs/ecrs src/include


From: grothoff
Subject: [GNUnet-SVN] r458 - in GNUnet: . src/applications/fs/ecrs src/include
Date: Sun, 20 Mar 2005 14:50:17 -0800 (PST)

Author: grothoff
Date: 2005-03-20 14:50:16 -0800 (Sun, 20 Mar 2005)
New Revision: 458

Added:
   GNUnet/src/applications/fs/ecrs/indexinfo.c
Modified:
   GNUnet/src/applications/fs/ecrs/Makefile.am
   GNUnet/src/include/gnunet_ecrs_lib.h
   GNUnet/todo
Log:
towards fixing 841

Modified: GNUnet/src/applications/fs/ecrs/Makefile.am
===================================================================
--- GNUnet/src/applications/fs/ecrs/Makefile.am 2005-03-20 22:32:41 UTC (rev 
457)
+++ GNUnet/src/applications/fs/ecrs/Makefile.am 2005-03-20 22:50:16 UTC (rev 
458)
@@ -7,6 +7,7 @@
   directory.c \
   download.c \
   ecrs.c ecrs.h \
+  indexinfo.c \
   keyspace.c \
   meta.c \
   namespace.c \

Added: GNUnet/src/applications/fs/ecrs/indexinfo.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/indexinfo.c 2005-03-20 22:32:41 UTC (rev 
457)
+++ GNUnet/src/applications/fs/ecrs/indexinfo.c 2005-03-20 22:50:16 UTC (rev 
458)
@@ -0,0 +1,63 @@
+/*
+     This file is part of GNUnet.
+     (C) 2005 Christian Grothoff (and other contributing authors)
+
+     GNUnet is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published
+     by the Free Software Foundation; either version 2, or (at your
+     option) any later version.
+
+     GNUnet is distributed in the hope that it will be useful, but
+     WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file applications/fs/ecrs/indexinfo.c 
+ * @brief information about indexed files
+ * @author Christian Grothoff
+ */
+
+/**
+ * Test if a file is indexed.
+ *
+ * This function will ONLY work if gnunetd runs on the
+ * same machine as the current process and if the indexed
+ * files could be symlinked.  If indexed files had to be 
+ * uploaded to a remote machine or copied, the original
+ * names will have been lost.
+ *
+ * @return YES if the file is indexed, NO if not, SYSERR on errors
+ *  (i.e. filename could not be accessed and thus we have problems
+ *  checking; also possible that the file was modified after indexing;
+ *  in either case, if SYSERR is returned the user should probably
+ *  be notified that 'something is wrong')
+ */
+int ECRS_isFileIndexed(const char * filename) {
+  return SYSERR;
+}
+
+/**
+ * Iterate over all indexed files.  
+ *
+ * This function will ONLY work if gnunetd runs on the
+ * same machine as the current process and if the indexed
+ * files could be symlinked.  If indexed files had to be 
+ * uploaded to a remote machine or copied, the original
+ * names will have been lost.  In that case, the iterator
+ * will NOT iterate over these files.
+ *
+ * @return number of files indexed, SYSERR if iterator aborted
+ */
+int ECRS_iterateIndexedFiles(ECRS_FileIterator iterator,
+                            void * closure) {
+  return SYSERR;
+}
+
+/* end of indexinfo.c */

Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h        2005-03-20 22:32:41 UTC (rev 
457)
+++ GNUnet/src/include/gnunet_ecrs_lib.h        2005-03-20 22:50:16 UTC (rev 
458)
@@ -351,6 +351,44 @@
                    struct ECRS_URI ** uri); /* upload.c */
 
 /**
+ * Test if a file is indexed.
+ *
+ * This function will ONLY work if gnunetd runs on the
+ * same machine as the current process and if the indexed
+ * files could be symlinked.  If indexed files had to be 
+ * uploaded to a remote machine or copied, the original
+ * names will have been lost.
+ *
+ * @return YES if the file is indexed, NO if not, SYSERR on errors
+ *  (i.e. filename could not be accessed and thus we have problems
+ *  checking; also possible that the file was modified after indexing;
+ *  in either case, if SYSERR is returned the user should probably
+ *  be notified that 'something is wrong')
+ */
+int ECRS_isFileIndexed(const char * filename);
+
+/**
+ * @return OK to continue iteration, SYSERR to abort
+ */
+typedef int (*ECRS_FileIterator)(const char * filename,
+                                void * cls);
+
+/**
+ * Iterate over all indexed files.  
+ *
+ * This function will ONLY work if gnunetd runs on the
+ * same machine as the current process and if the indexed
+ * files could be symlinked.  If indexed files had to be 
+ * uploaded to a remote machine or copied, the original
+ * names will have been lost.  In that case, the iterator
+ * will NOT iterate over these files.
+ *
+ * @return number of files indexed, SYSERR if iterator aborted
+ */
+int ECRS_iterateIndexedFiles(ECRS_FileIterator iterator,
+                            void * closure);
+
+/**
  * Unindex a file.
  *
  * @return SYSERR if the unindexing failed (i.e. not indexed)

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2005-03-20 22:32:41 UTC (rev 457)
+++ GNUnet/todo 2005-03-20 22:50:16 UTC (rev 458)
@@ -1,5 +1,4 @@
 0.6.7 [3?'05] (aka "features"):
-- 835??  [ unknown crash ]
 - 770?   [ use freedback (LOG) in gnunet-gtk via show-messages ]
 - 704?   [ auto-reindex downloaded files ]
 - 678?   [ directory browser ]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]