GNUnet  0.11.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 ( \
84  GNUNET_TIME_UNIT_MILLISECONDS, 250)
85 
89 struct GNUNET_FS_Uri;
90 
91 
100 typedef int
102  const char *keyword,
103  int is_mandatory);
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
488  void *scls,
489  const char *option,
490  const char *value);
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 
734 
735 
740 
741 
746 
747 
754 
755 
760 
761 
768 
769 
775 {
779  union
780  {
784  struct
785  {
790 
795 
800  void *cctx;
801 
806  void *pctx;
807 
811  const char *filename;
812 
819  uint64_t size;
820 
827 
833 
837  uint64_t completed;
838 
842  uint32_t anonymity;
843 
847  union
848  {
853  struct
854  {
858  const void *data;
859 
863  uint64_t offset;
864 
868  uint64_t data_len;
869 
874  unsigned int depth;
875  } progress;
876 
881  struct
882  {
886  uint64_t completed;
887 
891  uint64_t total;
892 
899  struct GNUNET_TIME_Relative eta;
901 
906  struct
907  {
911  const char *message;
912 
916  const struct GNUNET_FS_Uri *chk_uri;
917 
921  const struct GNUNET_FS_Uri *sks_uri;
922  } resume;
923 
928  struct
929  {
933  const struct GNUNET_FS_Uri *chk_uri;
934 
938  const struct GNUNET_FS_Uri *sks_uri;
939  } completed;
940 
945  struct
946  {
950  const char *message;
951  } error;
952  } specifics;
953  } publish;
954 
955 
959  struct
960  {
965 
971  void *cctx;
972 
977  void *pctx;
978 
985  void *sctx;
986 
990  const struct GNUNET_FS_Uri *uri;
991 
995  const char *filename;
996 
1002  uint64_t size;
1003 
1009  struct GNUNET_TIME_Relative eta;
1010 
1015 
1019  uint64_t completed;
1020 
1024  uint32_t anonymity;
1025 
1030 
1034  union
1035  {
1040  struct
1041  {
1048  const void *data;
1049 
1053  uint64_t offset;
1054 
1058  uint64_t data_len;
1059 
1065 
1070  unsigned int depth;
1071 
1079 
1087  } progress;
1088 
1093  struct
1094  {
1099  } start;
1100 
1105  struct
1106  {
1110  const struct GNUNET_CONTAINER_MetaData *meta;
1111 
1115  const char *message;
1116  } resume;
1117 
1122  struct
1123  {
1127  const char *message;
1128  } error;
1129  } specifics;
1130  } download;
1131 
1135  struct
1136  {
1144 
1152  void *cctx;
1153 
1161  void *pctx;
1162 
1167  const struct GNUNET_FS_Uri *query;
1168 
1175 
1179  uint32_t anonymity;
1180 
1184  union
1185  {
1190  struct
1191  {
1195  const struct GNUNET_CONTAINER_MetaData *meta;
1196 
1200  const struct GNUNET_FS_Uri *uri;
1201 
1206 
1212  } result;
1213 
1218  struct
1219  {
1223  const struct GNUNET_CONTAINER_MetaData *meta;
1224 
1228  const struct GNUNET_FS_Uri *uri;
1229 
1234 
1240 
1246 
1252  uint32_t applicability_rank;
1253  } resume_result;
1254 
1259  struct
1260  {
1265  void *cctx;
1266 
1270  const struct GNUNET_CONTAINER_MetaData *meta;
1271 
1275  const struct GNUNET_FS_Uri *uri;
1276 
1281  int32_t availability_rank;
1282 
1287  uint32_t availability_certainty;
1288 
1294  uint32_t applicability_rank;
1295 
1300  } update;
1301 
1311  struct
1312  {
1317  void *cctx;
1318 
1322  const struct GNUNET_CONTAINER_MetaData *meta;
1323 
1327  const struct GNUNET_FS_Uri *uri;
1328  } result_suspend;
1329 
1339  struct
1340  {
1345  void *cctx;
1346 
1350  const struct GNUNET_CONTAINER_MetaData *meta;
1351 
1355  const struct GNUNET_FS_Uri *uri;
1356  } result_stopped;
1357 
1362  struct
1363  {
1367  const char *message;
1368 
1373  } resume;
1374 
1379  struct
1380  {
1384  const char *message;
1385  } error;
1386 
1390  struct
1391  {
1395  const char *name;
1396 
1400  const char *root;
1401 
1405  const struct GNUNET_CONTAINER_MetaData *meta;
1406 
1411  } ns;
1412  } specifics;
1413  } search;
1414 
1418  struct
1419  {
1424 
1430  void *cctx;
1431 
1435  const char *filename;
1436 
1440  uint64_t size;
1441 
1447  struct GNUNET_TIME_Relative eta;
1448 
1454 
1458  uint64_t completed;
1459 
1463  union
1464  {
1469  struct
1470  {
1474  const void *data;
1475 
1479  uint64_t offset;
1480 
1484  uint64_t data_len;
1485 
1490  unsigned int depth;
1491  } progress;
1492 
1497  struct
1498  {
1502  const char *message;
1503  } resume;
1504 
1509  struct
1510  {
1514  const char *message;
1515  } error;
1516  } specifics;
1517  } unindex;
1518  } value;
1519 
1524 
1529 };
1530 
1531 
1547 typedef void *
1548 (*GNUNET_FS_ProgressCallback) (void *cls,
1549  const struct GNUNET_FS_ProgressInfo *info);
1550 
1551 
1556 {
1561 
1567 
1574 };
1575 
1576 
1581 {
1586 
1593 
1601 };
1602 
1603 
1609 {
1617  struct GNUNET_TIME_Absolute expiration_time;
1618 
1624 
1631 
1644 };
1645 
1646 
1650 struct GNUNET_FS_Handle;
1651 
1652 
1664 struct GNUNET_FS_Handle *
1666  const char *client_name,
1668  void *upcb_cls,
1669  enum GNUNET_FS_Flags flags,
1670  ...);
1671 
1672 
1682 void
1684 
1685 
1701 typedef int
1703  struct GNUNET_FS_FileInformation *fi,
1704  uint64_t length,
1706  struct GNUNET_FS_Uri **uri,
1707  struct GNUNET_FS_BlockOptions *bo,
1708  int *do_index,
1709  void **client_info);
1710 
1711 
1721 const char *
1723 
1724 
1731 const char *
1733 
1734 
1743 void
1745  const char *filename);
1746 
1747 
1764  void *client_info,
1765  const char *filename,
1766  const struct
1768  const struct
1770  int do_index,
1771  const struct
1773 
1774 
1793  void *client_info,
1794  uint64_t length,
1795  void *data,
1796  const struct
1798  const struct
1800  int do_index,
1801  const struct
1803 
1804 
1825 typedef size_t
1826 (*GNUNET_FS_DataReader) (void *cls,
1827  uint64_t offset,
1828  size_t max,
1829  void *buf,
1830  char **emsg);
1831 
1832 
1851  void *client_info,
1852  uint64_t length,
1854  void *reader_cls,
1855  const struct GNUNET_FS_Uri
1856  *keywords,
1857  const struct
1859  int do_index,
1860  const struct
1862 
1863 
1878  void *client_info,
1879  const struct GNUNET_FS_Uri
1880  *keywords,
1881  const struct
1883  *meta,
1884  const struct
1886  const char *filename);
1887 
1888 
1895 int
1897  *ent);
1898 
1899 
1911 int
1913  struct GNUNET_FS_FileInformation *ent);
1914 
1915 
1930 void
1933  void *proc_cls);
1934 
1935 
1946 void
1949  void *cleaner_cls);
1950 
1951 
1957 {
1962 
1968 };
1969 
1970 
1984 struct GNUNET_FS_PublishContext *
1986  struct GNUNET_FS_FileInformation *fi,
1987  const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
1988  const char *nid,
1989  const char *nuid,
1991 
1992 
2001 void
2003 
2004 
2013 typedef void
2015  const struct GNUNET_FS_Uri *uri,
2016  const char *emsg);
2017 
2018 
2023 
2024 
2040  const struct GNUNET_FS_Uri *ksk_uri,
2041  const struct GNUNET_CONTAINER_MetaData *meta,
2042  const struct GNUNET_FS_Uri *uri,
2043  const struct GNUNET_FS_BlockOptions *bo,
2046 
2047 
2053 void
2055 
2056 
2061 
2062 
2080  const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
2081  const char *identifier,
2082  const char *update,
2083  const struct GNUNET_CONTAINER_MetaData *meta,
2084  const struct GNUNET_FS_Uri *uri,
2085  const struct GNUNET_FS_BlockOptions *bo,
2088 
2089 
2095 void
2097 
2098 
2107 typedef int
2109  const char *filename,
2110  const struct GNUNET_HashCode *file_id);
2111 
2112 
2117 
2118 
2130  void *iterator_cls);
2131 
2132 
2138 void
2140 
2141 
2150 struct GNUNET_FS_UnindexContext *
2152  const char *filename,
2153  void *cctx);
2154 
2155 
2161 void
2163 
2164 
2174 typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls,
2175  const char *last_id,
2176  const struct
2177  GNUNET_FS_Uri *last_uri,
2178  const struct
2180  last_meta,
2181  const char *next_id);
2182 
2183 
2205 void
2207  const struct
2209  const char *next_id,
2211  void *ip_cls);
2212 
2213 
2219 {
2224 
2229 };
2230 
2231 
2243 struct GNUNET_FS_SearchContext *
2245  const struct GNUNET_FS_Uri *uri, uint32_t anonymity,
2246  enum GNUNET_FS_SearchOptions options, void *cctx);
2247 
2248 
2254 void
2256 
2257 
2263 void
2265 
2266 
2272 void
2274 
2275 
2286 struct GNUNET_FS_SearchResult *
2288  const struct GNUNET_FS_Uri *uri,
2289  const struct GNUNET_CONTAINER_MetaData *meta,
2290  void *client_info,
2291  uint32_t anonymity);
2292 
2293 
2301 void *
2303 
2304 
2310 {
2315 
2320 
2326 
2332 
2341 };
2342 
2343 
2376  const struct GNUNET_FS_Uri *uri,
2377  const struct GNUNET_CONTAINER_MetaData *meta,
2378  const char *filename, const char *tempname,
2379  uint64_t offset, uint64_t length, uint32_t anonymity,
2382 
2383 
2420  struct GNUNET_FS_SearchResult *sr,
2421  const char *filename,
2422  const char *tempname, uint64_t offset,
2423  uint64_t length, uint32_t anonymity,
2425  void *cctx);
2426 
2427 
2434 void
2435 GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete);
2436 
2437 
2443 void
2445 
2446 
2452 void
2454 
2455 
2456 /* ******************** Directory API *********************** */
2457 
2458 
2459 #define GNUNET_FS_DIRECTORY_MIME "application/gnunet-directory"
2460 #define GNUNET_FS_DIRECTORY_MAGIC "\211GND\r\n\032\n"
2461 #define GNUNET_FS_DIRECTORY_EXT ".gnd"
2462 
2470 int
2472  *md);
2473 
2474 
2481 void
2483 
2484 
2491 char *
2494 
2495 
2511 typedef void (*GNUNET_FS_DirectoryEntryProcessor) (void *cls,
2512  const char *filename,
2513  const struct GNUNET_FS_Uri *
2514  uri,
2515  const struct
2517  meta, size_t length,
2518  const void *data);
2519 
2520 
2540 int
2541 GNUNET_FS_directory_list_contents (size_t size, const void *data,
2542  uint64_t offset,
2544  void *dep_cls);
2545 
2546 
2551 
2552 
2560  *mdir);
2561 
2562 
2573 void
2575  const struct GNUNET_FS_Uri *uri,
2576  const struct GNUNET_CONTAINER_MetaData *md,
2577  const void *data);
2578 
2579 
2590 int
2592  size_t *rsize, void **rdata);
2593 
2594 
2595 /* ******************** DirScanner API *********************** */
2596 
2601 {
2606 
2612 
2617 
2622 
2628 
2633 };
2634 
2635 
2647 typedef void (*GNUNET_FS_DirScannerProgressCallback) (void *cls,
2648  const char *filename,
2649  int is_directory,
2650  enum
2652  reason);
2653 
2654 
2659 {
2664 
2669 
2675 
2681 
2687 
2692 
2697 
2701  char *filename;
2702 
2707 
2712 };
2713 
2714 
2718 struct GNUNET_FS_DirScanner;
2719 
2720 
2732 struct GNUNET_FS_DirScanner *
2733 GNUNET_FS_directory_scan_start (const char *filename,
2734  int disable_extractor,
2735  const char *ex,
2737  void *cb_cls);
2738 
2739 
2746 void
2748 
2749 
2758 struct GNUNET_FS_ShareTreeItem *
2760 
2761 
2768 void
2770 
2771 
2777 void
2779 
2780 
2781 #if 0 /* keep Emacsens' auto-indent happy */
2782 {
2783 #endif
2784 #ifdef __cplusplus
2785 }
2786 #endif
2787 
2788 #endif
2789  /* 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:822
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:533
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:321
char * nid
ID of the content in the namespace, NULL if we have no namespace.
Definition: fs_api.h:1203
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:1335
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
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:416
int GNUNET_FS_directory_builder_finish(struct GNUNET_FS_DirectoryBuilder *bld, size_t *rsize, void **rdata)
Finish building the directory.
Definition: fs_directory.c:577
static char * dir
Set to the directory where runtime files are stored.
Definition: gnunet-arm.c:89
GNUNET_FS_PublishContinuation cont
Function to call once we&#39;re done.
Definition: fs_namespace.c:365
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:1570
void GNUNET_FS_unindex_stop(struct GNUNET_FS_UnindexContext *uc)
Clean up after completion of an unindex operation.
Definition: fs_unindex.c:837
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.
Context for controlling a download.
Definition: fs_api.h:1742
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:839
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
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:1155
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:879
struct GNUNET_FS_ProgressInfo::@25::@27 download
Values for all "GNUNET_FS_STATUS_DOWNLOAD_*" events.
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:80
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:762
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:1442
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.
struct GNUNET_FS_ProgressInfo::@25::@28::@41::@44 update
These values are only valid for GNUNET_FS_STATUS_SEARCH_UPDATE events.
Context for the SKS publication.
Definition: fs_namespace.c:334
Notification that this download was suspended.
void * client_info
Pointer kept for the client.
Definition: fs_api.h:247
const struct GNUNET_CONTAINER_MetaData * meta
Known metadata for the download.
Event generated for each search result when the respective search is stopped.
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:644
char * emsg
Error message (non-NULL if this operation failed).
Definition: fs_api.h:296
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:1670
const char * description
Help text for the option (description)
Master context for most FS operations.
Definition: fs_api.h:1068
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:316
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.
union GNUNET_FS_ProgressInfo::@25::@26::@30 specifics
Additional values for specific events.
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:433
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_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:488
struct GNUNET_FS_DownloadContext * parent
Parent download (used when downloading files in directories).
Definition: fs_api.h:1763
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:340
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:155
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:1212
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:226
int GNUNET_FS_uri_test_sks(const struct GNUNET_FS_Uri *uri)
Is this a namespace URI?
Definition: fs_uri.c:1282
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:3216
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:672
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:1297
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:254
Handle for controlling an unindexing operation.
Definition: fs_api.h:1349
We&#39;ve found all files (in the pre-pass).
struct GNUNET_FS_ProgressInfo::@25::@29 unindex
Values for all "GNUNET_FS_STATUS_UNINDEX_*" events.
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:919
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:2145
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:998
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:99
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:3141
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:103
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:1395
char * GNUNET_FS_uri_to_string(const struct GNUNET_FS_Uri *uri)
Convert a URI to a UTF-8 String.
Definition: fs_uri.c:2028
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.
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:730
Notification that we have started to publish a file structure.
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:391
union GNUNET_FS_ProgressInfo::@25 value
Values that depend on the event type.
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:185
static struct GNUNET_FS_Uri * topKeywords
Keywords provided via command-line option.
A node of a directory tree (produced by dirscanner)
struct GNUNET_FS_ProgressInfo::@25::@26::@30::@35 error
These values are only valid for GNUNET_FS_STATUS_PUBLISH_ERROR events.
void * GNUNET_FS_probe_stop(struct GNUNET_FS_SearchResult *sr)
Stop probe activity.
Definition: fs_search.c:539
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.
struct GNUNET_FS_ProgressInfo::@25::@28 search
Values for all "GNUNET_FS_STATUS_SEARCH_*" events.
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:795
Information we store for each search result.
Definition: fs_api.h:497
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:1208
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:1619
void GNUNET_FS_publish_sks_cancel(struct GNUNET_FS_PublishSksContext *psc)
Abort the SKS publishing operation.
Definition: fs_namespace.c:496
const struct GNUNET_FS_Uri * uri
URI used for this download.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
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:2333
static int disable_extractor
Disable extractor option to use for publishing.
struct GNUNET_FS_ProgressInfo::@25::@26::@30::@32 progress_directory
These values are only valid for GNUNET_FS_STATUS_PUBLISH_PROGRESS_DIRECTORY events.
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:1078
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.
struct GNUNET_FS_ProgressInfo::@25::@28::@41::@45 result_suspend
These values are only valid for GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events.
struct GNUNET_FS_ProgressInfo::@25::@26::@30::@31 progress
These values are only valid for GNUNET_FS_STATUS_PUBLISH_PROGRESS events.
GNUNET_FS_OPTIONS
Options specified in the VARARGs portion of GNUNET_FS_start.
struct GNUNET_FS_ProgressInfo::@25::@28::@41::@46 result_stopped
These values are only valid for GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events.
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:678
There was an internal error.
Handle for controlling a publication process.
Definition: fs_api.h:1178
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.
struct GNUNET_FS_ProgressInfo::@25::@28::@41::@49 ns
Values for GNUNET_FS_STATUS_SEARCH_RESULT_NAMESPACE events.
int GNUNET_FS_uri_test_chk(const struct GNUNET_FS_Uri *uri)
Is this a file (or directory) URI?
Definition: fs_uri.c:1357
GNUNET_FS_DirScannerProgressUpdateReason
Progress reasons of the directory scanner.
const void * data
Data block we just published.
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.
GNUNET_FS_DownloadOptions
Options for downloading.
Select the desired amount of parallelism (this option should be followed by an "unsigned int" giving ...
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.
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:181
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:1060
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:1782
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).
struct GNUNET_FS_ProgressInfo::@25::@26::@30::@33 resume
These values are only valid for GNUNET_FS_STATUS_PUBLISH_RESUME events.
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:1083
Notification that we have suspended sharing a file structure.
static char * next_id
Command-line option for namespace publishing: identifier for updates to this publication.
struct GNUNET_FS_ProgressInfo::@25::@26 publish
Values for all "GNUNET_FS_STATUS_PUBLISH_*" events.
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:1371
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:436
const char * name
A Universal Resource Identifier (URI), opaque.
Definition: fs_api.h:165
Handle for controlling a search.
Definition: fs_api.h:1509
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:1088
struct GNUNET_FS_Uri * keywords
Keywords to use for KBlocks.
Definition: fs_api.h:257
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:853
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:712
Signals a problem with this search.
void * cont_cls
Closure for cont.
Definition: fs_namespace.c:370
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:2294
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:942
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:1639
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:1317
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:2216
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:790
Notification that we resumed unindexing of a file.
struct GNUNET_FS_ProgressInfo::@25::@27::@36::@38 start
These values are only valid for GNUNET_FS_STATUS_DOWNLOAD_START events.
void GNUNET_FS_download_resume(struct GNUNET_FS_DownloadContext *dc)
Resume a suspended download.
Definition: fs_download.c:2306
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_DirectoryBuilder * GNUNET_FS_directory_builder_create(const struct GNUNET_CONTAINER_MetaData *mdir)
Create a directory builder.
Definition: fs_directory.c:365
Notification that we encountered an error unindexing a file.
int is_paused
Is this search currently paused?
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.
struct GNUNET_FS_ProgressInfo::@25::@28::@41::@43 resume_result
These values are only valid for GNUNET_FS_STATUS_SEARCH_RESUME_RESULT events.
void GNUNET_FS_search_stop(struct GNUNET_FS_SearchContext *sc)
Stop search for content.
Definition: fs_search.c:1778
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)
enum GNUNET_FS_Flags flags
General flags.
Definition: fs_api.h:1161
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.