[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29096 - gnunet-gtk/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29096 - gnunet-gtk/src/fs |
Date: |
Sat, 7 Sep 2013 20:47:14 +0200 |
Author: grothoff
Date: 2013-09-07 20:47:14 +0200 (Sat, 07 Sep 2013)
New Revision: 29096
Removed:
gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.h
Modified:
gnunet-gtk/src/fs/Makefile.am
Log:
-remove dead code
Modified: gnunet-gtk/src/fs/Makefile.am
===================================================================
--- gnunet-gtk/src/fs/Makefile.am 2013-09-07 18:45:18 UTC (rev 29095)
+++ gnunet-gtk/src/fs/Makefile.am 2013-09-07 18:47:14 UTC (rev 29096)
@@ -13,8 +13,6 @@
gnunet_fs_gtk_SOURCES = \
gnunet-fs-gtk.c gnunet-fs-gtk.h \
gnunet-fs-gtk_about.c \
- gnunet-fs-gtk_advertise-pseudonym.c \
- gnunet-fs-gtk_advertise-pseudonym.h \
gnunet-fs-gtk_anonymity-widgets.c gnunet-fs-gtk_anonymity-widgets.h \
gnunet-fs-gtk_common.c gnunet-fs-gtk_common.h \
gnunet-fs-gtk_download-save-as.c gnunet-fs-gtk_download-save-as.h \
Deleted: gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c 2013-09-07
18:45:18 UTC (rev 29095)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c 2013-09-07
18:47:14 UTC (rev 29096)
@@ -1,175 +0,0 @@
-/*
- This file is part of GNUnet
- (C) 2005-2013 Christian Grothoff (and other contributing authors)
-
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
-
- GNUnet is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-/**
- * @file src/fs/gnunet-fs-gtk_advertise-pseudonym.c
- * @author Christian Grothoff
- * @brief allow the user to select a pseudonym to advertise and
- * then run the advertising dialog (using the edit-publish
- * dialog functions) and finally do the advertising
- */
-#include "gnunet-fs-gtk_common.h"
-#include "gnunet-fs-gtk.h"
-#include "gnunet-fs-gtk_publish-edit-dialog.h"
-#include "gnunet-fs-gtk_advertise-pseudonym.h"
-
-
-/**
- * Columns in the select pseudonym model.
- */
-enum FS_SelectPseudonymModelColumns
- {
- /**
- * A gchararray
- */
- FS_SELECT_PSEUDONYM_NAMESPACE_MC_NAME = 0,
-
- /**
- * A gpointer
- */
- FS_SELECT_PSEUDONYM_NAMESPACE_MC_HANDLE = 1,
- };
-
-
-/* *************************** handlers run on closing of the dialog
********************** */
-
-
-/**
- * Closure for 'advertise_namespace' and the callback from the editing dialog.
- */
-struct NamespaceAdvertisementContext
-{
- /**
- * Handle to the namespace to advertise.
- */
- struct GNUNET_CRYPTO_EccPrivateKey ns;
-
- /**
- * Root of the namespace is stored here temporarily.
- */
- const char *root;
-
- /**
- * File information structure (fake) which we use to run the 'edit' dialog.
- */
- struct GNUNET_FS_FileInformation *fip;
-};
-
-
-/**
- * Actually perform the advertising with the information collected.
- *
- * @param cls closure, a 'struct NamespaceAdvertisementContext *'
- * @param fi the entry in the publish-structure
- * @param length length of the file or directory
- * @param meta metadata for the file or directory (can be modified)
- * @param uri pointer to the keywords that will be used for this entry (can be
modified)
- * @param bo block options (can be modified)
- * @param do_index should we index (can be modified)
- * @param client_info pointer to client context set upon creation (can be
modified)
- * @return GNUNET_OK to continue, GNUNET_NO to remove
- * this entry from the directory, GNUNET_SYSERR
- * to abort the iteration
- */
-static int
-advertise_namespace (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)
-{
- struct NamespaceAdvertisementContext *nds = cls;
- struct GNUNET_FS_Uri *sks_uri;
- struct GNUNET_CRYPTO_EccPublicKey pub;
-
- GNUNET_CRYPTO_ecc_key_get_public (&nds->ns, &pub);
- sks_uri = GNUNET_FS_uri_sks_create (&pub, nds->root);
- GNUNET_FS_publish_ksk (GNUNET_FS_GTK_get_fs_handle (),
- *uri, meta, sks_uri,
- bo, GNUNET_FS_PUBLISH_OPTION_NONE,
- NULL, NULL);
- GNUNET_FS_uri_destroy (sks_uri);
- return GNUNET_SYSERR;
-}
-
-
-/**
- * Callback invoked from the editing dialog upon completion of the
- * meta data editing for the advertisement.
- *
- * @param cls the 'struct NamespaceAdvertisementContext'
- * @param ret return value from the dialog
- * @param root namespace root to use
- */
-static void
-adv_pseudonym_edit_publish_dialog_cb (gpointer cls,
- gint ret,
- const char *root)
-{
- struct NamespaceAdvertisementContext *nds = cls;
-
- if (ret == GTK_RESPONSE_OK)
- {
- nds->root = root;
- GNUNET_FS_file_information_inspect (nds->fip, &advertise_namespace, nds);
- nds->root = NULL;
- }
- GNUNET_FS_file_information_destroy (nds->fip, NULL, NULL);
- GNUNET_free (nds);
-}
-
-
-/**
- * Call the publication editor dialog in namespace advertising mode,
- * and publish the namespace when it's OK'ed.
- *
- * @param ns namespace to advertise
- * @param transient_for parent window for the dialog
- */
-void
-GNUNET_FS_GTK_advertise_namespace (const struct GNUNET_CRYPTO_EccPrivateKey
*ns,
- GtkWindow *transient_for)
-{
- struct NamespaceAdvertisementContext *nds;
- struct GNUNET_FS_BlockOptions bo;
- struct GNUNET_CONTAINER_MetaData *meta;
-
- nds = GNUNET_new (struct NamespaceAdvertisementContext);
- nds->ns = *ns;
- memset (&bo, 0, sizeof (struct GNUNET_FS_BlockOptions));
- bo.expiration_time = GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () +
2);
- bo.anonymity_level = 1;
- bo.content_priority = 1000;
- /* create fake file information to run the 'edit' dialog with */
- meta = GNUNET_CONTAINER_meta_data_create ();
- nds->fip =
- GNUNET_FS_file_information_create_empty_directory (NULL, NULL, NULL,
meta,
- &bo, NULL);
- GNUNET_CONTAINER_meta_data_destroy (meta);
- GNUNET_FS_GTK_edit_publish_dialog (transient_for,
- nds->fip,
- GNUNET_YES,
- &adv_pseudonym_edit_publish_dialog_cb,
- nds);
-}
-
-
-/* end of gnunet-fs-gtk_advertise-pseudonym.c */
Deleted: gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.h 2013-09-07
18:45:18 UTC (rev 29095)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.h 2013-09-07
18:47:14 UTC (rev 29096)
@@ -1,45 +0,0 @@
-/*
- This file is part of GNUnet
- (C) 2005-2013 Christian Grothoff (and other contributing authors)
-
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
-
- GNUnet is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-/**
- * @file src/fs/gnunet-fs-gtk_advertise-pseudonym.h
- * @author Christian Grothoff
- * @brief run the advertising dialog (using the edit-publish
- * dialog functions) and finally do the advertising
- */
-#ifndef GNUNET_FS_GTK_ADVERTISE_PSEUDONYM_H
-#define GNUNET_FS_GTK_ADVERTISE_PSEUDONYM_H
-
-#include "gnunet-fs-gtk_common.h"
-
-/**
- * Call the publication editor dialog in namespace advertising mode,
- * and publish the namespace when it's OK'ed.
- *
- * @param ns namespace to advertise
- * @param transient_for parent window for the dialog
- */
-void
-GNUNET_FS_GTK_advertise_namespace (const struct GNUNET_CRYPTO_EccPrivateKey
*ns,
- GtkWindow *transient_for);
-
-#endif
-
-/* end of gnunet-fs-gtk_advertise-pseudonym.h */
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29096 - gnunet-gtk/src/fs,
gnunet <=