GNUnet  0.10.x
fs_publish_ublock.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2009, 2010, 2012, 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  */
20 
28 #ifndef FS_PUBLISH_UBLOCK_H
29 #define FS_PUBLISH_UBLOCK_H
30 
31 #include "gnunet_util_lib.h"
33 #include "gnunet_fs_service.h"
35 
36 
46 void
47 GNUNET_FS_ublock_decrypt_(const void *input,
48  size_t input_len,
49  const struct GNUNET_CRYPTO_EcdsaPublicKey *ns,
50  const char *label,
51  void *output);
52 
53 
58 
59 
67 typedef void (*GNUNET_FS_UBlockContinuation) (void *cls,
68  const char *emsg);
69 
70 
90  const char *label,
91  const char *ulabel,
92  const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
93  const struct GNUNET_CONTAINER_MetaData *meta,
94  const struct GNUNET_FS_Uri *uri,
95  const struct GNUNET_FS_BlockOptions *bo,
98 
99 
105 void
107 
108 #endif
GNUNET_FS_UBlockContinuation cont
Function to call when done.
struct GNUNET_FS_PublishUblockContext * GNUNET_FS_publish_ublock_(struct GNUNET_FS_Handle *h, struct GNUNET_DATASTORE_Handle *dsh, const char *label, const char *ulabel, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, 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_UBlockContinuation cont, void *cont_cls)
Publish a UBlock.
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
Master context for most FS operations.
Definition: fs_api.h:1056
static struct GNUNET_FS_UnindexContext * uc
Private ECC key encoded for transmission.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
void GNUNET_FS_publish_ublock_cancel_(struct GNUNET_FS_PublishUblockContext *uc)
Abort UBlock publishing operation.
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
Meta data to associate with a file, directory or namespace.
GNUNET_FS_PublishOptions
Options for publishing.
Settings for publishing a block (which may of course also apply to an entire directory or file)...
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Context for &#39;ublock_put_cont&#39;.
A Universal Resource Identifier (URI), opaque.
Definition: fs_api.h:162
Handle to the datastore service.
static struct GNUNET_CONTAINER_MetaData * meta
Meta-data provided via command-line option.
static struct GNUNET_DATASTORE_Handle * dsh
Datastore handle.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
void GNUNET_FS_ublock_decrypt_(const void *input, size_t input_len, const struct GNUNET_CRYPTO_EcdsaPublicKey *ns, const char *label, void *output)
Decrypt the given UBlock, storing the result in output.
void(* GNUNET_FS_UBlockContinuation)(void *cls, const char *emsg)
Signature of a function called as the continuation of a UBlock publication.
void * cont_cls
Closure of &#39;cont&#39;.
static struct GNUNET_FS_BlockOptions bo
Options we set for published blocks.