GNUnet  0.10.x
gnunet_fs_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2004--2013 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19 */
33 #ifndef GNUNET_FS_LIB_H
34 #define GNUNET_FS_LIB_H
35 
36 #include "gnunet_util_lib.h"
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #if 0 /* keep Emacsens' auto-indent happy */
42 }
43 #endif
44 #endif
45 
67 #define GNUNET_FS_VERSION 0x00090300
68 
69 
70 /* ******************** URI API *********************** */
71 
72 #define GNUNET_FS_URI_PREFIX "gnunet://fs/"
73 #define GNUNET_FS_URI_KSK_INFIX "ksk/"
74 #define GNUNET_FS_URI_SKS_INFIX "sks/"
75 #define GNUNET_FS_URI_CHK_INFIX "chk/"
76 #define GNUNET_FS_URI_LOC_INFIX "loc/"
77 
78 
83 #define GNUNET_FS_PROBE_UPDATE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 250)
84 
88 struct GNUNET_FS_Uri;
89 
90 
99 typedef int
101  const char *keyword,
102  int is_mandatory);
103 
104 
105 
114 int
115 GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
116  struct GNUNET_HashCode *key);
117 
118 
125 char *
127 
128 
136 char *
138 
139 
148 void
150  const char *keyword,
151  int is_mandatory);
152 
153 
161 void
163  const char *keyword);
164 
165 
173 struct GNUNET_FS_Uri *
174 GNUNET_FS_uri_parse (const char *uri,
175  char **emsg);
176 
177 
183 void
185 
186 
193 unsigned int
195 
196 
206 int
209  void *iterator_cls);
210 
211 
219 int
221  struct GNUNET_PeerIdentity *peer);
222 
223 
230 struct GNUNET_FS_Uri *
232 
233 
242 
243 
256 struct GNUNET_FS_Uri *
257 GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *base_uri,
258  const struct GNUNET_CRYPTO_EddsaPrivateKey *sign_key,
259  struct GNUNET_TIME_Absolute expiration_time);
260 
261 
269 struct GNUNET_FS_Uri *
270 GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1,
271  const struct GNUNET_FS_Uri *u2);
272 
273 
280 struct GNUNET_FS_Uri *
281 GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
282 
283 
301 struct GNUNET_FS_Uri *
303  char **emsg);
304 
305 
323 struct GNUNET_FS_Uri *
324 GNUNET_FS_uri_ksk_create_from_args (unsigned int argc,
325  const char **argv);
326 
327 
335 int
336 GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
337  const struct GNUNET_FS_Uri *u2);
338 
339 
346 int
348 
349 
357 struct GNUNET_FS_Uri *
359  const char *id);
360 
361 
370 int
373 
374 
381 char *
383 
384 
391 int
393 
394 
401 int
403 
404 
412 uint64_t
414 
415 
422 int
424 
425 
434 struct GNUNET_FS_Uri *
436  *md);
437 
438 
439 /* ******************** command-line option parsing API *********************** */
440 
452  const char *name,
453  const char *argumentHelp,
454  const char *description,
455  struct GNUNET_FS_Uri **topKeywords);
456 
468  const char *name,
469  const char *argumentHelp,
470  const char *description,
472 
485 int
487  void *scls,
488  const char *option,
489  const char *value);
490 
491 
492 
493 /* ************************* sharing API ***************** */
494 
495 
508 {
513 
518 
523 
528 
535 
542 
549 
554 
559 
564 
569 
574 
581 
587 
593 
599 
607 
614 
621 
627 
634 
639 
644 
650 
655 
660 
665 
671 
677 
684 
689 
694 
699 
704 
710 
716 
722 
727 
728 };
729 
730 
735 
736 
741 
742 
747 
748 
755 
756 
761 
762 
769 
770 
776 {
777 
781  union
782  {
783 
787  struct
788  {
789 
794 
799 
804  void *cctx;
805 
810  void *pctx;
811 
815  const char *filename;
816 
823  uint64_t size;
824 
831 
837 
841  uint64_t completed;
842 
846  uint32_t anonymity;
847 
851  union
852  {
853 
858  struct
859  {
860 
864  const void *data;
865 
869  uint64_t offset;
870 
874  uint64_t data_len;
875 
880  unsigned int depth;
881 
882  } progress;
883 
888  struct
889  {
890 
894  uint64_t completed;
895 
899  uint64_t total;
900 
907  struct GNUNET_TIME_Relative eta;
908 
910 
915  struct
916  {
917 
921  const char *message;
922 
926  const struct GNUNET_FS_Uri *chk_uri;
927 
931  const struct GNUNET_FS_Uri *sks_uri;
932 
933  } resume;
934 
939  struct
940  {
941 
945  const struct GNUNET_FS_Uri *chk_uri;
946 
950  const struct GNUNET_FS_Uri *sks_uri;
951 
952  } completed;
953 
958  struct
959  {
960 
964  const char *message;
965 
966  } error;
967 
968  } specifics;
969 
970  } publish;
971 
972 
976  struct
977  {
978 
983 
989  void *cctx;
990 
995  void *pctx;
996 
1003  void *sctx;
1004 
1008  const struct GNUNET_FS_Uri *uri;
1009 
1013  const char *filename;
1014 
1020  uint64_t size;
1021 
1027  struct GNUNET_TIME_Relative eta;
1028 
1033 
1037  uint64_t completed;
1038 
1042  uint32_t anonymity;
1043 
1048 
1052  union
1053  {
1054 
1059  struct
1060  {
1061 
1068  const void *data;
1069 
1073  uint64_t offset;
1074 
1078  uint64_t data_len;
1079 
1085 
1090  unsigned int depth;
1091 
1099 
1107 
1108  } progress;
1109 
1114  struct
1115  {
1116 
1121 
1122  } start;
1123 
1128  struct
1129  {
1130 
1134  const struct GNUNET_CONTAINER_MetaData *meta;
1135 
1139  const char *message;
1140 
1141  } resume;
1142 
1147  struct
1148  {
1149 
1153  const char *message;
1154 
1155  } error;
1156 
1157  } specifics;
1158 
1159  } download;
1160 
1164  struct
1165  {
1166 
1174 
1182  void *cctx;
1183 
1191  void *pctx;
1192 
1197  const struct GNUNET_FS_Uri *query;
1198 
1205 
1209  uint32_t anonymity;
1210 
1214  union
1215  {
1216 
1221  struct
1222  {
1223 
1227  const struct GNUNET_CONTAINER_MetaData *meta;
1228 
1232  const struct GNUNET_FS_Uri *uri;
1233 
1238 
1244 
1245  } result;
1246 
1251  struct
1252  {
1253 
1257  const struct GNUNET_CONTAINER_MetaData *meta;
1258 
1262  const struct GNUNET_FS_Uri *uri;
1263 
1268 
1274 
1280 
1286  uint32_t applicability_rank;
1287 
1288  } resume_result;
1289 
1294  struct
1295  {
1296 
1301  void *cctx;
1302 
1306  const struct GNUNET_CONTAINER_MetaData *meta;
1307 
1311  const struct GNUNET_FS_Uri *uri;
1312 
1317  int32_t availability_rank;
1318 
1323  uint32_t availability_certainty;
1324 
1330  uint32_t applicability_rank;
1331 
1336 
1337  } update;
1338 
1348  struct
1349  {
1350 
1355  void *cctx;
1356 
1360  const struct GNUNET_CONTAINER_MetaData *meta;
1361 
1365  const struct GNUNET_FS_Uri *uri;
1366 
1367  } result_suspend;
1368 
1378  struct
1379  {
1380 
1385  void *cctx;
1386 
1390  const struct GNUNET_CONTAINER_MetaData *meta;
1391 
1395  const struct GNUNET_FS_Uri *uri;
1396 
1397  } result_stopped;
1398 
1403  struct
1404  {
1405 
1409  const char *message;
1410 
1415 
1416  } resume;
1417 
1422  struct
1423  {
1424 
1428  const char *message;
1429 
1430  } error;
1431 
1435  struct
1436  {
1437 
1441  const char *name;
1442 
1446  const char *root;
1447 
1451  const struct GNUNET_CONTAINER_MetaData *meta;
1452 
1457 
1458  } ns;
1459 
1460  } specifics;
1461 
1462  } search;
1463 
1467  struct
1468  {
1469 
1474 
1480  void *cctx;
1481 
1485  const char *filename;
1486 
1490  uint64_t size;
1491 
1497  struct GNUNET_TIME_Relative eta;
1498 
1504 
1508  uint64_t completed;
1509 
1513  union
1514  {
1515 
1520  struct
1521  {
1522 
1526  const void *data;
1527 
1531  uint64_t offset;
1532 
1536  uint64_t data_len;
1537 
1542  unsigned int depth;
1543 
1544  } progress;
1545 
1550  struct
1551  {
1552 
1556  const char *message;
1557 
1558  } resume;
1559 
1564  struct
1565  {
1566 
1570  const char *message;
1571 
1572  } error;
1573 
1574  } specifics;
1575 
1576  } unindex;
1577 
1578  } value;
1579 
1584 
1589 };
1590 
1591 
1607 typedef void *
1608 (*GNUNET_FS_ProgressCallback) (void *cls,
1609  const struct GNUNET_FS_ProgressInfo *info);
1610 
1611 
1616 {
1621 
1627 
1634 };
1635 
1636 
1641 {
1642 
1647 
1654 
1662 };
1663 
1664 
1670 {
1671 
1679  struct GNUNET_TIME_Absolute expiration_time;
1680 
1686 
1693 
1706 
1707 };
1708 
1709 
1713 struct GNUNET_FS_Handle;
1714 
1715 
1727 struct GNUNET_FS_Handle *
1729  const char *client_name,
1731  void *upcb_cls,
1732  enum GNUNET_FS_Flags flags,
1733  ...);
1734 
1735 
1745 void
1747 
1748 
1764 typedef int
1766  struct GNUNET_FS_FileInformation *fi,
1767  uint64_t length,
1769  struct GNUNET_FS_Uri ** uri,
1770  struct GNUNET_FS_BlockOptions *bo,
1771  int *do_index,
1772  void **client_info);
1773 
1774 
1784 const char *
1786 
1787 
1794 const char *
1796 
1797 
1806 void
1808  const char *filename);
1809 
1810 
1827  void *client_info,
1828  const char *filename,
1829  const struct GNUNET_FS_Uri *keywords,
1830  const struct GNUNET_CONTAINER_MetaData *meta,
1831  int do_index,
1832  const struct GNUNET_FS_BlockOptions *bo);
1833 
1834 
1853  void *client_info,
1854  uint64_t length,
1855  void *data,
1856  const struct GNUNET_FS_Uri *keywords,
1857  const struct GNUNET_CONTAINER_MetaData *meta,
1858  int do_index,
1859  const struct GNUNET_FS_BlockOptions *bo);
1860 
1861 
1882 typedef size_t
1883 (*GNUNET_FS_DataReader) (void *cls,
1884  uint64_t offset,
1885  size_t max,
1886  void *buf,
1887  char **emsg);
1888 
1889 
1908  void *client_info,
1909  uint64_t length,
1911  void *reader_cls,
1912  const struct GNUNET_FS_Uri
1913  *keywords,
1914  const struct
1916  int do_index,
1917  const struct
1919 
1920 
1935  void *client_info,
1936  const struct GNUNET_FS_Uri
1937  *keywords,
1938  const struct
1940  *meta,
1941  const struct
1943  const char *filename);
1944 
1945 
1952 int
1954  *ent);
1955 
1956 
1968 int
1970  struct GNUNET_FS_FileInformation *ent);
1971 
1972 
1987 void
1990  void *proc_cls);
1991 
1992 
2003 void
2006  void *cleaner_cls);
2007 
2008 
2014 {
2019 
2025 };
2026 
2027 
2041 struct GNUNET_FS_PublishContext *
2043  struct GNUNET_FS_FileInformation *fi,
2044  const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
2045  const char *nid,
2046  const char *nuid,
2048 
2049 
2058 void
2060 
2061 
2070 typedef void
2072  const struct GNUNET_FS_Uri *uri,
2073  const char *emsg);
2074 
2075 
2080 
2081 
2097  const struct GNUNET_FS_Uri *ksk_uri,
2098  const struct GNUNET_CONTAINER_MetaData *meta,
2099  const struct GNUNET_FS_Uri *uri,
2100  const struct GNUNET_FS_BlockOptions *bo,
2103 
2104 
2110 void
2112 
2113 
2118 
2119 
2137  const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
2138  const char *identifier,
2139  const char *update,
2140  const struct GNUNET_CONTAINER_MetaData *meta,
2141  const struct GNUNET_FS_Uri *uri,
2142  const struct GNUNET_FS_BlockOptions *bo,
2145 
2146 
2152 void
2154 
2155 
2164 typedef int
2166  const char *filename,
2167  const struct GNUNET_HashCode *file_id);
2168 
2169 
2174 
2175 
2187  void *iterator_cls);
2188 
2189 
2195 void
2197 
2198 
2207 struct GNUNET_FS_UnindexContext *
2209  const char *filename,
2210  void *cctx);
2211 
2212 
2218 void
2220 
2221 
2231 typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls,
2232  const char *last_id,
2233  const struct GNUNET_FS_Uri *last_uri,
2234  const struct GNUNET_CONTAINER_MetaData *last_meta,
2235  const char *next_id);
2236 
2237 
2259 void
2261  const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
2262  const char *next_id,
2264  void *ip_cls);
2265 
2266 
2272 {
2277 
2282 };
2283 
2284 
2296 struct GNUNET_FS_SearchContext *
2298  const struct GNUNET_FS_Uri *uri, uint32_t anonymity,
2299  enum GNUNET_FS_SearchOptions options, void *cctx);
2300 
2301 
2307 void
2309 
2310 
2316 void
2318 
2319 
2325 void
2327 
2328 
2339 struct GNUNET_FS_SearchResult *
2341  const struct GNUNET_FS_Uri *uri,
2342  const struct GNUNET_CONTAINER_MetaData *meta,
2343  void *client_info,
2344  uint32_t anonymity);
2345 
2346 
2354 void *
2356 
2357 
2363 {
2368 
2373 
2379 
2385 
2394 };
2395 
2396 
2397 
2430  const struct GNUNET_FS_Uri *uri,
2431  const struct GNUNET_CONTAINER_MetaData *meta,
2432  const char *filename, const char *tempname,
2433  uint64_t offset, uint64_t length, uint32_t anonymity,
2436 
2437 
2474  struct GNUNET_FS_SearchResult *sr,
2475  const char *filename,
2476  const char *tempname, uint64_t offset,
2477  uint64_t length, uint32_t anonymity,
2479  void *cctx);
2480 
2481 
2488 void
2489 GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete);
2490 
2491 
2497 void
2499 
2500 
2506 void
2508 
2509 
2510 
2511 /* ******************** Directory API *********************** */
2512 
2513 
2514 #define GNUNET_FS_DIRECTORY_MIME "application/gnunet-directory"
2515 #define GNUNET_FS_DIRECTORY_MAGIC "\211GND\r\n\032\n"
2516 #define GNUNET_FS_DIRECTORY_EXT ".gnd"
2517 
2525 int
2527  *md);
2528 
2529 
2536 void
2538 
2539 
2546 char *
2548 
2549 
2565 typedef void (*GNUNET_FS_DirectoryEntryProcessor) (void *cls,
2566  const char *filename,
2567  const struct GNUNET_FS_Uri *
2568  uri,
2569  const struct
2571  meta, size_t length,
2572  const void *data);
2573 
2574 
2594 int
2595 GNUNET_FS_directory_list_contents (size_t size, const void *data,
2596  uint64_t offset,
2598  void *dep_cls);
2599 
2600 
2605 
2606 
2614  *mdir);
2615 
2616 
2627 void
2629  const struct GNUNET_FS_Uri *uri,
2630  const struct GNUNET_CONTAINER_MetaData *md,
2631  const void *data);
2632 
2633 
2644 int
2646  size_t * rsize, void **rdata);
2647 
2648 
2649 /* ******************** DirScanner API *********************** */
2650 
2655 {
2656 
2661 
2667 
2672 
2677 
2683 
2688 
2689 };
2690 
2691 
2703 typedef void (*GNUNET_FS_DirScannerProgressCallback) (void *cls,
2704  const char *filename,
2705  int is_directory,
2707 
2708 
2713 {
2718 
2723 
2729 
2735 
2741 
2746 
2751 
2755  char *filename;
2756 
2761 
2766 
2767 };
2768 
2769 
2773 struct GNUNET_FS_DirScanner;
2774 
2775 
2787 struct GNUNET_FS_DirScanner *
2788 GNUNET_FS_directory_scan_start (const char *filename,
2789  int disable_extractor,
2790  const char *ex,
2792  void *cb_cls);
2793 
2794 
2801 void
2803 
2804 
2813 struct GNUNET_FS_ShareTreeItem *
2815 
2816 
2823 void
2825 
2826 
2832 void
2834 
2835 
2836 #if 0 /* keep Emacsens' auto-indent happy */
2837 {
2838 #endif
2839 #ifdef __cplusplus
2840 }
2841 #endif
2842 
2843 #endif
2844  /* end of group */
int GNUNET_FS_uri_loc_get_peer_identity(const struct GNUNET_FS_Uri *uri, struct GNUNET_PeerIdentity *peer)
Obtain the identity of the peer offering the data.
Definition: fs_uri.c:810
static int iterator(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Iterator over hash map entries.
void * client_info
Client info for this search result.
Definition: fs_api.h:548
unsigned int depth
Depth of the given block in the tree; 0 would be the lowest level (DBLOCKs).
General context for command line processors.
void * reader_cls
Closure for reader.
Definition: fs_api.h:329
struct GNUNET_FS_ProgressInfo::@28::@31::@44::@47 update
These values are only valid for GNUNET_FS_STATUS_SEARCH_UPDATE events.
char * nid
ID of the content in the namespace, NULL if we have no namespace.
Definition: fs_api.h:1223
Notification that we have started this download.
int GNUNET_FS_uri_test_ksk(const struct GNUNET_FS_Uri *uri)
Is this a keyword URI?
Definition: fs_uri.c:1323
char * GNUNET_FS_meta_data_suggest_filename(const struct GNUNET_CONTAINER_MetaData *md)
Suggest a filename based on given metadata.
Definition: fs_misc.c:38
struct GNUNET_FS_ProgressInfo::@28::@29::@33::@35 progress_directory
These values are only valid for GNUNET_FS_STATUS_PUBLISH_PROGRESS_DIRECTORY events.
const char * name
Short, human-readable name of the namespace.
void GNUNET_FS_share_tree_trim(struct GNUNET_FS_ShareTreeItem *toplevel)
Process a share item tree, moving frequent keywords up and copying frequent metadata up...
Definition: fs_sharetree.c:412
int GNUNET_FS_directory_builder_finish(struct GNUNET_FS_DirectoryBuilder *bld, size_t *rsize, void **rdata)
Finish building the directory.
Definition: fs_directory.c:574
static char * dir
Set to the directory where runtime files are stored.
Definition: gnunet-arm.c:84
GNUNET_FS_PublishContinuation cont
Function to call once we&#39;re done.
Definition: fs_namespace.c:368
No options (use defaults for everything).
int32_t availability_rank
Current availability rank (negative: unavailable, positive: available)
struct GNUNET_FS_FileInformation * GNUNET_FS_file_information_create_empty_directory(struct GNUNET_FS_Handle *h, void *client_info, const struct GNUNET_FS_Uri *keywords, const struct GNUNET_CONTAINER_MetaData *meta, const struct GNUNET_FS_BlockOptions *bo, const char *filename)
Create an entry for an empty directory in a publish-structure.
void GNUNET_FS_publish_stop(struct GNUNET_FS_PublishContext *pc)
Stop a publication.
Definition: fs_publish.c:1558
void GNUNET_FS_unindex_stop(struct GNUNET_FS_UnindexContext *uc)
Clean up after completion of an unindex operation.
Definition: fs_unindex.c:833
int(* GNUNET_FS_FileInformationProcessor)(void *cls, struct GNUNET_FS_FileInformation *fi, uint64_t length, struct GNUNET_CONTAINER_MetaData *meta, struct GNUNET_FS_Uri **uri, struct GNUNET_FS_BlockOptions *bo, int *do_index, void **client_info)
Function called on entries in a struct GNUNET_FS_FileInformation iteration.
struct GNUNET_FS_ProgressInfo::@28::@31 search
Values for all "GNUNET_FS_STATUS_SEARCH_*" events.
Context for controlling a download.
Definition: fs_api.h:1768
void * iterator_cls
Closure for iterator.
struct GNUNET_FS_UnindexContext * uc
Context for controlling the unindexing.
const char * argumentHelp
Name of the argument for the user in help text.
struct GNUNET_TIME_Absolute GNUNET_FS_uri_loc_get_expiration(const struct GNUNET_FS_Uri *uri)
Obtain the expiration of the LOC URI.
Definition: fs_uri.c:827
void(* GNUNET_FS_DirScannerProgressCallback)(void *cls, const char *filename, int is_directory, enum GNUNET_FS_DirScannerProgressUpdateReason reason)
Function called over time as the directory scanner makes progress on the job at hand.
GNUNET_FS_Flags
General (global) option flags for file-sharing.
This search has yielded a result.
Notification that we started to unindex a file.
Last message from a search; this signals that there will be no further events associated with this se...
uint64_t total
How big do we estimate the entire directory to be?
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_create_from_args(unsigned int argc, const char **argv)
Create an FS URI from a user-supplied command line of keywords.
Definition: fs_uri.c:1146
struct GNUNET_FS_Uri * GNUNET_FS_uri_loc_create(const struct GNUNET_FS_Uri *base_uri, const struct GNUNET_CRYPTO_EddsaPrivateKey *sign_key, struct GNUNET_TIME_Absolute expiration_time)
Construct a location URI (this peer will be used for the location).
Definition: fs_uri.c:867
void GNUNET_FS_meta_data_make_directory(struct GNUNET_CONTAINER_MetaData *md)
Set the MIMETYPE information for the given metadata to "application/gnunet-directory".
Definition: fs_directory.c:77
Notification that we are making progress sharing a file structure.
void GNUNET_FS_uri_ksk_add_keyword(struct GNUNET_FS_Uri *uri, const char *keyword, int is_mandatory)
Add the given keyword to the set of keywords represented by the URI.
Definition: fs_uri.c:751
struct GNUNET_FS_PublishContext * GNUNET_FS_publish_start(struct GNUNET_FS_Handle *h, struct GNUNET_FS_FileInformation *fi, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, const char *nid, const char *nuid, enum GNUNET_FS_PublishOptions options)
Publish a file or directory.
Definition: fs_publish.c:1431
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
struct GNUNET_FS_DirScanner * GNUNET_FS_directory_scan_start(const char *filename, int disable_extractor, const char *ex, GNUNET_FS_DirScannerProgressCallback cb, void *cb_cls)
Start a directory scanner.
Context for the SKS publication.
Definition: fs_namespace.c:336
Notification that this download was suspended.
void * client_info
Pointer kept for the client.
Definition: fs_api.h:253
const struct GNUNET_CONTAINER_MetaData * meta
Known metadata for the download.
Event generated for each search result when the respective search is stopped.
union GNUNET_FS_ProgressInfo::@28::@29::@33 specifics
Additional values for specific events.
struct GNUNET_FS_Uri * GNUNET_FS_uri_parse(const char *uri, char **emsg)
Convert a UTF-8 String to a URI.
Definition: fs_uri.c:635
char * emsg
Error message (non-NULL if this operation failed).
Definition: fs_api.h:302
Notification that we made progress unindexing a file.
void GNUNET_FS_search_continue(struct GNUNET_FS_SearchContext *sc)
Continue paused search.
Definition: fs_search.c:1649
const char * description
Help text for the option (description)
Master context for most FS operations.
Definition: fs_api.h:1087
struct GNUNET_FS_ShareTreeItem * prev
This is a doubly-linked list.
GNUNET_FS_DataReader reader
Function that can be used to read the data for the file.
Definition: fs_api.h:324
int GNUNET_FS_file_information_add(struct GNUNET_FS_FileInformation *dir, struct GNUNET_FS_FileInformation *ent)
Add an entry to a directory in a publish-structure.
void GNUNET_FS_get_indexed_files_cancel(struct GNUNET_FS_GetIndexedContext *gic)
Cancel iteration over all indexed files.
void GNUNET_FS_publish_ksk_cancel(struct GNUNET_FS_PublishKskContext *pkc)
Abort the KSK publishing operation.
void * pctx
Client context pointer for the parent operation (if this is a file in a directory or a subdirectory)...
struct GNUNET_TIME_Relative duration
How long has this upload been actively running (excludes times where the upload was suspended)...
int(* GNUNET_FS_KeywordIterator)(void *cls, const char *keyword, int is_mandatory)
Iterator over keywords.
struct GNUNET_FS_SearchResult * result
Handle to the result (for starting downloads).
struct GNUNET_FS_ShareTreeItem * parent
This is a doubly-linked tree NULL for top-level entries.
struct GNUNET_FS_PublishSksContext * GNUNET_FS_publish_sks(struct GNUNET_FS_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, const char *identifier, const char *update, const struct GNUNET_CONTAINER_MetaData *meta, const struct GNUNET_FS_Uri *uri, const struct GNUNET_FS_BlockOptions *bo, enum GNUNET_FS_PublishOptions options, GNUNET_FS_PublishContinuation cont, void *cont_cls)
Publish an SBlock on GNUnet.
Definition: fs_namespace.c:440
struct GNUNET_FS_FileInformation * GNUNET_FS_file_information_create_from_data(struct GNUNET_FS_Handle *h, void *client_info, uint64_t length, void *data, const struct GNUNET_FS_Uri *keywords, const struct GNUNET_CONTAINER_MetaData *meta, int do_index, const struct GNUNET_FS_BlockOptions *bo)
Create an entry for a file in a publish-structure.
struct GNUNET_FS_ShareTreeItem * children_tail
This is a doubly-linked tree NULL for files and empty directories.
struct GNUNET_FS_ProgressInfo::@28::@30 download
Values for all "GNUNET_FS_STATUS_DOWNLOAD_*" events.
struct GNUNET_FS_SearchResult * GNUNET_FS_probe(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri, const struct GNUNET_CONTAINER_MetaData *meta, void *client_info, uint32_t anonymity)
Start download probes for the given search result.
Definition: fs_search.c:483
struct GNUNET_FS_DownloadContext * parent
Parent download (used when downloading files in directories).
Definition: fs_api.h:1790
GNUNET_FS_SearchOptions
Options for searching.
Last option in the VARARG list.
struct GNUNET_FS_FileInformation * GNUNET_FS_file_information_create_from_file(struct GNUNET_FS_Handle *h, void *client_info, const char *filename, const struct GNUNET_FS_Uri *keywords, const struct GNUNET_CONTAINER_MetaData *meta, int do_index, const struct GNUNET_FS_BlockOptions *bo)
Create an entry for a file in a publish-structure.
const char * message
Error message, NULL if no error was encountered so far.
struct GNUNET_FS_Uri * ksk_uri
Keywords for this file or directory (derived from metadata).
struct GNUNET_TIME_Relative block_download_duration
How much time passed between us asking for this block and actually getting it? GNUNET_TIME_UNIT_FOREV...
struct GNUNET_TIME_Relative eta
At what time do we expect to finish the upload? (will be a value in the past for completed uploads)...
First event generated when a client requests a search to begin or when a namespace result automatical...
Internal state of a directory builder.
Definition: fs_directory.c:337
uint32_t availability_certainty
On how many total queries is the given availability_rank based?
An opaque structure a pointer to which is returned to the caller to be used to control the scanner...
int is_active
Is the download currently active.
char * GNUNET_FS_uri_ksk_to_string_fancy(const struct GNUNET_FS_Uri *uri)
Convert keyword URI to a human readable format (i.e.
Definition: fs_uri.c:152
int GNUNET_FS_uri_test_equal(const struct GNUNET_FS_Uri *u1, const struct GNUNET_FS_Uri *u2)
Test if two URIs are equal.
Definition: fs_uri.c:1204
Definition of a command line option.
Private ECC key encoded for transmission.
uint64_t offset
At what offset in the file is "data"?
Information for a file or directory that is about to be published.
Definition: fs_api.h:231
int GNUNET_FS_uri_test_sks(const struct GNUNET_FS_Uri *uri)
Is this a namespace URI?
Definition: fs_uri.c:1270
Notification that we suspended unindexing a file.
We have discovered a new namespace.
void GNUNET_FS_stop(struct GNUNET_FS_Handle *h)
Close our connection with the file-sharing service.
Definition: fs_api.c:3163
void GNUNET_FS_namespace_list_updateable(struct GNUNET_FS_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, const char *next_id, GNUNET_FS_IdentifierProcessor ip, void *ip_cls)
List all of the identifiers in the namespace for which we could produce an update.
Definition: fs_namespace.c:685
int GNUNET_FS_uri_sks_get_namespace(const struct GNUNET_FS_Uri *uri, struct GNUNET_CRYPTO_EcdsaPublicKey *pseudonym)
Get the public key of a namespace from the given namespace URI.
Definition: fs_uri.c:1285
const char shortName
Short name of the option.
struct GNUNET_GETOPT_CommandLineOption GNUNET_FS_GETOPT_METADATA(char shortName, const char *name, const char *argumentHelp, const char *description, struct GNUNET_CONTAINER_MetaData **meta)
Allow user to specify metadata.
Definition: fs_getopt.c:251
Handle for controlling an unindexing operation.
Definition: fs_api.h:1369
We&#39;ve found all files (in the pre-pass).
struct GNUNET_FS_Uri * GNUNET_FS_uri_sks_create(const struct GNUNET_CRYPTO_EcdsaPublicKey *ns, const char *id)
Create an SKS URI from a namespace ID and an identifier.
Definition: fs_uri.c:908
struct GNUNET_FS_DownloadContext * GNUNET_FS_download_start(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri, const struct GNUNET_CONTAINER_MetaData *meta, const char *filename, const char *tempname, uint64_t offset, uint64_t length, uint32_t anonymity, enum GNUNET_FS_DownloadOptions options, void *cctx, struct GNUNET_FS_DownloadContext *parent)
Download parts of a file.
Definition: fs_download.c:2126
const struct GNUNET_FS_FileInformation * fi
Information about the file that is being publishd.
struct GNUNET_FS_Uri * GNUNET_FS_uri_dup(const struct GNUNET_FS_Uri *uri)
Duplicate URI.
Definition: fs_uri.c:988
GNUNET_FS_PublishContinuation cont
Function to call once we&#39;re done.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
static struct GNUNET_DNSSTUB_Context * ctx
Context for DNS resolution.
struct GNUNET_FS_Handle * GNUNET_FS_start(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *client_name, GNUNET_FS_ProgressCallback upcb, void *upcb_cls, enum GNUNET_FS_Flags flags,...)
Setup a connection to the file-sharing service.
Definition: fs_api.c:3097
No special flags set.
int GNUNET_FS_uri_to_key(const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode *key)
Get a unique key from a URI.
Definition: fs_uri.c:104
Notification that we have stopped the process of uploading a file structure; no futher events will be...
int GNUNET_FS_uri_test_loc(const struct GNUNET_FS_Uri *uri)
Is this a location URI?
Definition: fs_uri.c:1381
char * GNUNET_FS_uri_to_string(const struct GNUNET_FS_Uri *uri)
Convert a URI to a UTF-8 String.
Definition: fs_uri.c:1988
struct GNUNET_TIME_Relative current_probe_time
How long has the current probe been active?
uint32_t anonymity
What anonymity level is used for this upload?
struct GNUNET_FS_SearchContext * sc
Context for controlling the search, NULL for searches that were not explicitly triggered by the clien...
Do not append temporary data to the target file (for the IBlocks).
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
uint32_t anonymity_level
At which anonymity level should the block be shared? (0: no anonymity, 1: normal GAP, >1: with cover traffic).
struct GNUNET_FS_PublishKskContext * GNUNET_FS_publish_ksk(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *ksk_uri, const struct GNUNET_CONTAINER_MetaData *meta, const struct GNUNET_FS_Uri *uri, const struct GNUNET_FS_BlockOptions *bo, enum GNUNET_FS_PublishOptions options, GNUNET_FS_PublishContinuation cont, void *cont_cls)
Publish a KBlock on GNUnet.
void GNUNET_FS_file_information_set_filename(struct GNUNET_FS_FileInformation *s, const char *filename)
Set the filename in the file information structure.
struct GNUNET_FS_ProgressInfo::@28::@29::@33::@36 resume
These values are only valid for GNUNET_FS_STATUS_PUBLISH_RESUME events.
const char * root
Root identifier for the namespace, can be NULL.
struct GNUNET_FS_ShareTreeItem * next
This is a doubly-linked list.
int GNUNET_FS_uri_ksk_get_keywords(const struct GNUNET_FS_Uri *uri, GNUNET_FS_KeywordIterator iterator, void *iterator_cls)
Iterate over all keywords in this keyword URI.
Definition: fs_uri.c:719
Notification that we have started to publish a file structure.
struct GNUNET_FS_ProgressInfo::@28::@30::@39::@41 start
These values are only valid for GNUNET_FS_STATUS_DOWNLOAD_START events.
Meta data to associate with a file, directory or namespace.
Notification that this download completed.
void GNUNET_FS_directory_builder_add(struct GNUNET_FS_DirectoryBuilder *bld, const struct GNUNET_FS_Uri *uri, const struct GNUNET_CONTAINER_MetaData *md, const void *data)
Add an entry to a directory.
Definition: fs_directory.c:388
int(* GNUNET_FS_IndexedFileProcessor)(void *cls, const char *filename, const struct GNUNET_HashCode *file_id)
Type of a function called by GNUNET_FS_get_indexed_files.
char ** keywords
Keywords start with a &#39;+&#39; if they are mandatory (in which case the &#39;+&#39; is NOT part of the keyword) an...
Definition: fs_api.h:188
union GNUNET_FS_ProgressInfo::@28 value
Values that depend on the event type.
static struct GNUNET_FS_Uri * topKeywords
Keywords provided via command-line option.
A node of a directory tree (produced by dirscanner)
void * GNUNET_FS_probe_stop(struct GNUNET_FS_SearchResult *sr)
Stop probe activity.
Definition: fs_search.c:533
Notification that we are making progress sharing a directory.
static char * value
Value of the record to add/remove.
struct GNUNET_FS_ShareTreeItem * children_head
This is a doubly-linked tree NULL for files and empty directories.
uint64_t size
How large is the file overall? For directories, this is only the size of the directory itself...
struct GNUNET_FS_UnindexContext * GNUNET_FS_unindex_start(struct GNUNET_FS_Handle *h, const char *filename, void *cctx)
Unindex a file.
Definition: fs_unindex.c:791
Information we store for each search result.
Definition: fs_api.h:511
Should we automatically trigger probes for search results to determine availability? (will create GNUNET_FS_STATUS_SEARCH_UPDATE events).
Only download from the local host, do not access remote systems (no P2P)
void *(* GNUNET_FS_ProgressCallback)(void *cls, const struct GNUNET_FS_ProgressInfo *info)
Notification of FS to a client about the progress of an operation.
struct GNUNET_FS_GetIndexedContext * GNUNET_FS_get_indexed_files(struct GNUNET_FS_Handle *h, GNUNET_FS_IndexedFileProcessor iterator, void *iterator_cls)
Iterate over all indexed files.
char * nuid
ID for future updates, NULL if we have no namespace or no updates.
Definition: fs_api.h:1228
enum GNUNET_FS_Status status
Specific status code (determines the event type).
Internal option used to flag this download as a &#39;probe&#39; for a search result.
void(* GNUNET_FS_IdentifierProcessor)(void *cls, const char *last_id, const struct GNUNET_FS_Uri *last_uri, const struct GNUNET_CONTAINER_MetaData *last_meta, const char *next_id)
Function called on updateable identifiers.
struct GNUNET_FS_SearchContext * GNUNET_FS_search_start(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri, uint32_t anonymity, enum GNUNET_FS_SearchOptions options, void *cctx)
Start search for content.
Definition: fs_search.c:1598
void GNUNET_FS_publish_sks_cancel(struct GNUNET_FS_PublishSksContext *psc)
Abort the SKS publishing operation.
Definition: fs_namespace.c:503
const struct GNUNET_FS_Uri * uri
URI used for this download.
void(* GNUNET_FS_PublishContinuation)(void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
Signature of a function called as the continuation of a KBlock or SBlock publication.
Last event when a search is being resumed; note that "GNUNET_FS_SEARCH_START" will not be generated i...
void GNUNET_FS_download_stop(struct GNUNET_FS_DownloadContext *dc, int do_delete)
Stop a download (aborts if download is incomplete).
Definition: fs_download.c:2313
struct GNUNET_FS_ProgressInfo::@28::@29 publish
Values for all "GNUNET_FS_STATUS_PUBLISH_*" events.
static int disable_extractor
Disable extractor option to use for publishing.
static char * option
Name of the option.
Definition: gnunet-config.c:38
static char buf[2048]
No options (use defaults for everything).
char * client_name
Name of our client.
Definition: fs_api.h:1097
uint32_t applicability_rank
Applicability rank (the larger, the better the result fits the search criteria).
GNUNET_FS_PublishOptions
Options for publishing.
Context for the KSK publication.
GNUNET_FS_OPTIONS
Options specified in the VARARGs portion of GNUNET_FS_start.
void(* GNUNET_FS_DirectoryEntryProcessor)(void *cls, const char *filename, const struct GNUNET_FS_Uri *uri, const struct GNUNET_CONTAINER_MetaData *meta, size_t length, const void *data)
Function used to process entries in a directory.
void GNUNET_FS_directory_scan_abort(struct GNUNET_FS_DirScanner *ds)
Abort the scan.
void GNUNET_FS_uri_destroy(struct GNUNET_FS_Uri *uri)
Free URI.
Definition: fs_uri.c:670
There was an internal error.
Handle for controlling a publication process.
Definition: fs_api.h:1198
Signals that this search was continued (unpaused).
A 512-bit hashcode.
const char * GNUNET_FS_file_information_get_filename(struct GNUNET_FS_FileInformation *s)
Obtain the filename from the file information structure.
int GNUNET_FS_uri_test_chk(const struct GNUNET_FS_Uri *uri)
Is this a file (or directory) URI?
Definition: fs_uri.c:1345
GNUNET_FS_DirScannerProgressUpdateReason
Progress reasons of the directory scanner.
const void * data
Data block we just published.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
uint64_t completed
How many bytes have we completed?
Notification that this download is no longer actively being pursued (back in the queue).
char * short_filename
Base name of the file/directory.
struct GNUNET_GETOPT_CommandLineOption GNUNET_FS_GETOPT_KEYWORDS(char shortName, const char *name, const char *argumentHelp, const char *description, struct GNUNET_FS_Uri **topKeywords)
Allow user to specify keywords.
Definition: fs_getopt.c:129
Last event when a search is being suspended; note that "GNUNET_FS_SEARCH_STOPPED" will not be generat...
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
struct GNUNET_HashCode key
The key used in the DHT.
Notification that the unindexing of this file was stopped (final event for this action).
Notification about progress with this download.
struct GNUNET_FS_ProgressInfo::@28::@29::@33::@38 error
These values are only valid for GNUNET_FS_STATUS_PUBLISH_ERROR events.
struct GNUNET_FS_ProgressInfo::@28::@31::@44::@52 ns
Values for GNUNET_FS_STATUS_SEARCH_RESULT_NAMESPACE events.
GNUNET_FS_DownloadOptions
Options for downloading.
Select the desired amount of parallelism (this option should be followed by an "unsigned int" giving ...
const char * name
Notification that this download is now actively being pursued (as opposed to waiting in the queue)...
Last call to the progress function: we have finished scanning the directory.
uint32_t respect_offered
How much respect did we offer for downloading this block? (estimate, because we might have the same r...
Settings for publishing a block (which may of course also apply to an entire directory or file)...
Notification that the unindexing of this file was completed.
Notification that we completed sharing a file structure.
int is_directory
GNUNET_YES if this is a directory
char * filename
Name of the file/directory.
Maximum number of requests that should be pending at a given point in time (invidivual downloads may ...
Notification that this download is being resumed.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
int GNUNET_FS_meta_data_test_for_directory(const struct GNUNET_CONTAINER_MetaData *md)
Does the meta-data claim that this is a directory? Checks if the mime-type is that of a GNUnet direct...
Definition: fs_directory.c:54
int GNUNET_FS_directory_list_contents(size_t size, const void *data, uint64_t offset, GNUNET_FS_DirectoryEntryProcessor dep, void *dep_cls)
Iterate over all entries in a directory.
Definition: fs_directory.c:179
struct GNUNET_CONTAINER_MetaData * meta
Metadata for this file or directory.
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_create(const char *keywords, char **emsg)
Create an FS URI from a single user-supplied string of keywords.
Definition: fs_uri.c:1048
int GNUNET_FS_file_information_is_directory(const struct GNUNET_FS_FileInformation *ent)
Test if a given entry represents a directory.
struct GNUNET_FS_Handle * fsh
File-sharing handle that generated the event.
We&#39;ve started processing a file or directory.
void * sctx
Client context pointer for the associated search operation (specifically, context pointer for the spe...
Notification that this download is no longer part of a recursive download or search but now a &#39;stand-...
uint32_t replication_level
How often should we try to migrate the block to other peers? Only used if "CONTENT_PUSHING" is set to...
Event generated for each search result when the respective search is resumed.
Notification that we have resumed sharing a file structure.
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_create_from_meta_data(const struct GNUNET_CONTAINER_MetaData *md)
Construct a keyword-URI from meta-data (take all entries in the meta-data and construct one large key...
Definition: fs_uri.c:1758
Private ECC key encoded for transmission.
size_t(* GNUNET_FS_DataReader)(void *cls, uint64_t offset, size_t max, void *buf, char **emsg)
Function that provides data.
The identity of the host (wraps the signing key of the peer).
Event generated for each search result when the respective search is suspended.
Notification that an error was encountered sharing a file structure.
GNUNET_FS_ProgressCallback upcb
Function to call with updates on our progress.
Definition: fs_api.h:1102
Notification that we have suspended sharing a file structure.
struct GNUNET_FS_ProgressInfo::@28::@29::@33::@34 progress
These values are only valid for GNUNET_FS_STATUS_PUBLISH_PROGRESS events.
static char * next_id
Command-line option for namespace publishing: identifier for updates to this publication.
Do a recursive download (that is, automatically trigger the download of files in directories).
const struct GNUNET_FS_Uri * query
What query is used for this search (list of keywords or SKS identifier).
uint64_t GNUNET_FS_uri_chk_get_file_size(const struct GNUNET_FS_Uri *uri)
What is the size of the file that this URI refers to?
Definition: fs_uri.c:1359
configuration data
Definition: configuration.c:85
void GNUNET_FS_file_information_inspect(struct GNUNET_FS_FileInformation *dir, GNUNET_FS_FileInformationProcessor proc, void *proc_cls)
Inspect a file or directory in a publish-structure.
void GNUNET_FS_share_tree_free(struct GNUNET_FS_ShareTreeItem *toplevel)
Release memory of a share item tree.
Definition: fs_sharetree.c:432
A Universal Resource Identifier (URI), opaque.
Definition: fs_api.h:168
Handle for controlling a search.
Definition: fs_api.h:1533
static struct GNUNET_CONTAINER_MetaData * meta
Meta-data provided via command-line option.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
void * upcb_cls
Closure for upcb.
Definition: fs_api.h:1107
struct GNUNET_FS_Uri * keywords
Keywords to use for KBlocks.
Definition: fs_api.h:263
We&#39;ve finished extracting meta data from a file.
void GNUNET_FS_file_information_destroy(struct GNUNET_FS_FileInformation *fi, GNUNET_FS_FileInformationProcessor cleaner, void *cleaner_cls)
Destroy publish-structure.
int GNUNET_FS_getopt_set_metadata(struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, void *scls, const char *option, const char *value)
Command-line option parser function that allows the user to specify one or more &#39;-m&#39; options with met...
struct GNUNET_FS_Uri * GNUNET_FS_uri_loc_get_uri(const struct GNUNET_FS_Uri *uri)
Obtain the URI of the content itself.
Definition: fs_uri.c:841
uint32_t content_priority
How important is it for us to store the block? If we run out of space, the highest-priority, non-expired blocks will be kept.
Only search the local host, do not search remote systems (no P2P)
unsigned int GNUNET_FS_uri_ksk_get_keyword_count(const struct GNUNET_FS_Uri *uri)
How many keywords are ANDed in this keyword URI?
Definition: fs_uri.c:701
Signals a problem with this search.
void * cont_cls
Closure for cont.
Definition: fs_namespace.c:373
struct GNUNET_FS_ProgressInfo::@28::@31::@44::@46 resume_result
These values are only valid for GNUNET_FS_STATUS_SEARCH_RESUME_RESULT events.
Context for GNUNET_FS_get_indexed_files().
struct GNUNET_FS_FileInformation * GNUNET_FS_file_information_create_from_reader(struct GNUNET_FS_Handle *h, void *client_info, uint64_t length, GNUNET_FS_DataReader reader, void *reader_cls, const struct GNUNET_FS_Uri *keywords, const struct GNUNET_CONTAINER_MetaData *meta, int do_index, const struct GNUNET_FS_BlockOptions *bo)
Create an entry for a file in a publish-structure.
void GNUNET_FS_download_suspend(struct GNUNET_FS_DownloadContext *dc)
Suspend a download.
Definition: fs_download.c:2274
GNUNET_FS_Status
Possible status codes used in the callback for the various file-sharing operations.
We have additional data about the quality or availability of a search result.
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_merge(const struct GNUNET_FS_Uri *u1, const struct GNUNET_FS_Uri *u2)
Merge the sets of keywords from two KSK URIs.
Definition: fs_uri.c:931
struct GNUNET_FS_ShareTreeItem * GNUNET_FS_directory_scan_get_result(struct GNUNET_FS_DirScanner *ds)
Obtain the result of the scan after the scan has signalled completion.
void GNUNET_FS_search_pause(struct GNUNET_FS_SearchContext *sc)
Pause search.
Definition: fs_search.c:1618
Time for absolute times used by GNUnet, in microseconds.
struct GNUNET_CRYPTO_EcdsaPublicKey pseudonym
Public key of the namespace.
static struct GNUNET_FS_DirScanner * ds
Handle to the directory scanner (for recursive insertions).
char * GNUNET_FS_uri_sks_get_content_id(const struct GNUNET_FS_Uri *uri)
Get the content identifier of an SKS URI.
Definition: fs_uri.c:1305
struct GNUNET_FS_DownloadContext * GNUNET_FS_download_start_from_search(struct GNUNET_FS_Handle *h, struct GNUNET_FS_SearchResult *sr, const char *filename, const char *tempname, uint64_t offset, uint64_t length, uint32_t anonymity, enum GNUNET_FS_DownloadOptions options, void *cctx)
Download parts of a file based on a search result.
Definition: fs_download.c:2197
const char * filename
Name of the file being published; can be NULL.
struct GNUNET_FS_PublishContext * pc
Context for controlling the upload.
void GNUNET_FS_uri_ksk_remove_keyword(struct GNUNET_FS_Uri *uri, const char *keyword)
Remove the given keyword from the set of keywords represented by the URI.
Definition: fs_uri.c:779
Notification that we resumed unindexing of a file.
void GNUNET_FS_download_resume(struct GNUNET_FS_DownloadContext *dc)
Resume a suspended download.
Definition: fs_download.c:2286
uint64_t data_len
Length of the data block.
No options (use defaults for everything).
Notification that this download was stopped (final event with respect to this action).
Signals that this search was paused.
struct GNUNET_FS_ProgressInfo::@28::@32 unindex
Values for all "GNUNET_FS_STATUS_UNINDEX_*" events.
struct GNUNET_FS_DirectoryBuilder * GNUNET_FS_directory_builder_create(const struct GNUNET_CONTAINER_MetaData *mdir)
Create a directory builder.
Definition: fs_directory.c:362
Notification that we encountered an error unindexing a file.
int is_paused
Is this search currently paused?
struct GNUNET_FS_ProgressInfo::@28::@31::@44::@49 result_stopped
These values are only valid for GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events.
uint32_t num_transmissions
How often did we transmit the request? (estimate, because we might have the same request pending for ...
struct GNUNET_FS_Uri * ksk_uri
Keywords to use.
void GNUNET_FS_search_stop(struct GNUNET_FS_SearchContext *sc)
Stop search for content.
Definition: fs_search.c:1757
Notification that this download encountered an error.
const char * GNUNET_FS_file_information_get_id(struct GNUNET_FS_FileInformation *s)
Obtain the name under which this file information structure is stored on disk.
static struct GNUNET_FS_BlockOptions bo
Options we set for published blocks.
static char * pseudonym
Command-line option identifying the pseudonym to use for the publication.
Argument given to the progress callback with information about what is going on.
Time for relative time used by GNUnet, in microseconds.
Is persistence of operations desired? (will create SUSPEND/RESUME events).
void * cctx
Client context pointer (set the last time by the client for this operation; initially NULL on START/R...
We&#39;re having trouble accessing a file (soft-error); it will be ignored.
const struct GNUNET_FS_Uri * chk_uri
URI of the file (if the download had been completed)
struct GNUNET_FS_ProgressInfo::@28::@31::@44::@48 result_suspend
These values are only valid for GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events.
enum GNUNET_FS_Flags flags
General flags.
Definition: fs_api.h:1180
const struct GNUNET_FS_Uri * sks_uri
SKS URI of the file (if the download had been completed)
struct GNUNET_FS_DownloadContext * dc
Context for controlling the download.
void * cont_cls
Closure for cont.