aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_fs_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_fs_service.h')
-rw-r--r--src/include/gnunet_fs_service.h59
1 files changed, 57 insertions, 2 deletions
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index ee10a0156..114128823 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -360,7 +360,7 @@ GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
360 * What is the size of the file that this URI 360 * What is the size of the file that this URI
361 * refers to? 361 * refers to?
362 * 362 *
363 * @param uri the CHK URI to inspect 363 * @param uri the CHK (or LOC) URI to inspect
364 * @return size of the file as specified in the CHK URI 364 * @return size of the file as specified in the CHK URI
365 */ 365 */
366uint64_t 366uint64_t
@@ -718,6 +718,11 @@ struct GNUNET_FS_ProgressInfo
718 * (if this is a file in a directory or a subdirectory). 718 * (if this is a file in a directory or a subdirectory).
719 */ 719 */
720 void *pctx; 720 void *pctx;
721
722 /**
723 * Name of the file being published; can be NULL.
724 */
725 const char *filename;
721 726
722 /** 727 /**
723 * How large is the file overall? For directories, 728 * How large is the file overall? For directories,
@@ -862,6 +867,11 @@ struct GNUNET_FS_ProgressInfo
862 * URI used for this download. 867 * URI used for this download.
863 */ 868 */
864 const struct GNUNET_FS_Uri *uri; 869 const struct GNUNET_FS_Uri *uri;
870
871 /**
872 * Name of the file that we are downloading.
873 */
874 const char *filename;
865 875
866 /** 876 /**
867 * How large is the download overall? This 877 * How large is the download overall? This
@@ -1394,6 +1404,46 @@ typedef void* (*GNUNET_FS_ProgressCallback)
1394 1404
1395 1405
1396/** 1406/**
1407 * General (global) option flags for file-sharing.
1408 */
1409enum GNUNET_FS_Flags
1410 {
1411 /**
1412 * No special flags set.
1413 */
1414 GNUNET_FS_FLAGS_NONE = 0,
1415
1416 /**
1417 * Is persistence of operations desired?
1418 * (will create SUSPEND/RESUME events).
1419 */
1420 GNUNET_FS_FLAGS_PERSISTENCE = 1
1421
1422 };
1423
1424/**
1425 * Options specified in the VARARGs
1426 * portion of GNUNET_FS_start.
1427 */
1428enum GNUNET_FS_OPTIONS
1429 {
1430
1431 /**
1432 * Last option in the VARARG list.
1433 */
1434 GNUNET_FS_OPTIONS_END = 0,
1435
1436 /**
1437 * Select the desired amount of parallelism (this option should be
1438 * followed by an "unsigned int" giving the desired maximum number
1439 * of parallel downloads).
1440 */
1441 GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM = 1
1442
1443 };
1444
1445
1446/**
1397 * Handle to the file-sharing service. 1447 * Handle to the file-sharing service.
1398 */ 1448 */
1399struct GNUNET_FS_Handle; 1449struct GNUNET_FS_Handle;
@@ -1407,13 +1457,18 @@ struct GNUNET_FS_Handle;
1407 * @param client_name unique identifier for this client 1457 * @param client_name unique identifier for this client
1408 * @param upcb function to call to notify about FS actions 1458 * @param upcb function to call to notify about FS actions
1409 * @param upcb_cls closure for upcb 1459 * @param upcb_cls closure for upcb
1460 * @param flags specific attributes for fs-operations
1461 * @param ... list of optional options, terminated with GNUNET_FS_OPTIONS_END
1462 * @return NULL on error
1410 */ 1463 */
1411struct GNUNET_FS_Handle * 1464struct GNUNET_FS_Handle *
1412GNUNET_FS_start (struct GNUNET_SCHEDULER_Handle *sched, 1465GNUNET_FS_start (struct GNUNET_SCHEDULER_Handle *sched,
1413 const struct GNUNET_CONFIGURATION_Handle *cfg, 1466 const struct GNUNET_CONFIGURATION_Handle *cfg,
1414 const char *client_name, 1467 const char *client_name,
1415 GNUNET_FS_ProgressCallback upcb, 1468 GNUNET_FS_ProgressCallback upcb,
1416 void *upcb_cls); 1469 void *upcb_cls,
1470 enum GNUNET_FS_Flags flags,
1471 ...);
1417 1472
1418 1473
1419/** 1474/**