aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-publish.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r--src/fs/gnunet-publish.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index b8017886e..bcfc8967b 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -601,7 +601,6 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
601 ("add an additional keyword for the top-level file or directory" 601 ("add an additional keyword for the top-level file or directory"
602 " (this option can be specified multiple times)"), 602 " (this option can be specified multiple times)"),
603 1, &GNUNET_FS_getopt_set_keywords, &topKeywords}, 603 1, &GNUNET_FS_getopt_set_keywords, &topKeywords},
604 // *: option not yet used... (can handle in a pass over FI)
605 {'m', "meta", "TYPE:VALUE", 604 {'m', "meta", "TYPE:VALUE",
606 gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), 605 gettext_noop ("set the meta-data for the given TYPE to the given VALUE"),
607 1, &GNUNET_FS_getopt_set_metadata, &meta}, 606 1, &GNUNET_FS_getopt_set_metadata, &meta},
@@ -621,7 +620,6 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
621 gettext_noop 620 gettext_noop
622 ("publish the files under the pseudonym NAME (place file into namespace)"), 621 ("publish the files under the pseudonym NAME (place file into namespace)"),
623 1, &GNUNET_GETOPT_set_string, &pseudonym}, 622 1, &GNUNET_GETOPT_set_string, &pseudonym},
624 // *: option not yet used... (need FS API support!)
625 {'s', "simulate-only", NULL, 623 {'s', "simulate-only", NULL,
626 gettext_noop ("only simulate the process but do not do any " 624 gettext_noop ("only simulate the process but do not do any "
627 "actual publishing (useful to compute URIs)"), 625 "actual publishing (useful to compute URIs)"),
@@ -630,7 +628,6 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
630 gettext_noop ("set the ID of this version of the publication" 628 gettext_noop ("set the ID of this version of the publication"
631 " (for namespace insertions only)"), 629 " (for namespace insertions only)"),
632 1, &GNUNET_GETOPT_set_string, &this_id}, 630 1, &GNUNET_GETOPT_set_string, &this_id},
633 // *: option not yet used... (need FS API support!)
634 {'u', "uri", "URI", 631 {'u', "uri", "URI",
635 gettext_noop ("URI to be published (can be used instead of passing a " 632 gettext_noop ("URI to be published (can be used instead of passing a "
636 "file to add keywords to the file with the respective URI)"), 633 "file to add keywords to the file with the respective URI)"),
@@ -662,86 +659,3 @@ main (int argc, char *const *argv)
662} 659}
663 660
664/* end of gnunet-publish.c */ 661/* end of gnunet-publish.c */
665
666////////////////////////////////////////////////////////////////
667
668#if 0
669/**
670 * Print progess message.
671 */
672static void *
673printstatus (void *ctx, const GNUNET_FSUI_Event * event)
674{
675 unsigned long long delta;
676 char *fstring;
677
678 switch (event->type)
679 {
680 case GNUNET_FSUI_upload_progress:
681 if (*verboselevel)
682 {
683 char *ret;
684 GNUNET_CronTime now;
685
686 now = GNUNET_get_time ();
687 delta = event->data.UploadProgress.eta - now;
688 if (event->data.UploadProgress.eta < now)
689 delta = 0;
690 ret = GNUNET_get_time_interval_as_fancy_string (delta);
691 PRINTF (_("%16llu of %16llu bytes inserted "
692 "(estimating %6s to completion) - %s\n"),
693 event->data.UploadProgress.completed,
694 event->data.UploadProgress.total,
695 ret, event->data.UploadProgress.filename);
696 GNUNET_free (ret);
697 }
698 break;
699 case GNUNET_FSUI_upload_completed:
700 if (*verboselevel)
701 {
702 delta = GNUNET_get_time () - start_time;
703 PRINTF (_("Upload of `%s' complete, "
704 "%llu bytes took %llu seconds (%8.3f KiB/s).\n"),
705 event->data.UploadCompleted.filename,
706 event->data.UploadCompleted.total,
707 delta / GNUNET_CRON_SECONDS,
708 (delta == 0)
709 ? (double) (-1.0)
710 : (double) (event->data.UploadCompleted.total
711 / 1024.0 * GNUNET_CRON_SECONDS / delta));
712 }
713 fstring = GNUNET_ECRS_uri_to_string (event->data.UploadCompleted.uri);
714 printf (_("File `%s' has URI: %s\n"),
715 event->data.UploadCompleted.filename, fstring);
716 GNUNET_free (fstring);
717 if (ul == event->data.UploadCompleted.uc.pos)
718 {
719 postProcess (event->data.UploadCompleted.uri);
720 errorCode = 0;
721 GNUNET_shutdown_initiate ();
722 }
723 break;
724 case GNUNET_FSUI_upload_aborted:
725 printf (_("\nUpload aborted.\n"));
726 errorCode = 2;
727 GNUNET_shutdown_initiate ();
728 break;
729 case GNUNET_FSUI_upload_error:
730 printf (_("\nError uploading file: %s"),
731 event->data.UploadError.message);
732 errorCode = 3;
733 GNUNET_shutdown_initiate ();
734 break;
735 case GNUNET_FSUI_upload_started:
736 case GNUNET_FSUI_upload_stopped:
737 break;
738 default:
739 printf (_("\nUnexpected event: %d\n"), event->type);
740 GNUNET_GE_BREAK (ectx, 0);
741 break;
742 }
743 return NULL;
744}
745#endif
746
747/* end of gnunet-publish.c */