GNUnet 0.22.0
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
34#include "gnunet_fs_service.h"
36
37
47void
48GNUNET_FS_ublock_decrypt_ (const void *input,
49 size_t input_len,
50 const struct GNUNET_CRYPTO_EcdsaPublicKey *ns,
51 const char *label,
52 void *output);
53
54
59
60
68typedef void (*GNUNET_FS_UBlockContinuation) (void *cls,
69 const char *emsg);
70
71
91 const char *label,
92 const char *ulabel,
94 const struct GNUNET_FS_MetaData *meta,
95 const struct GNUNET_FS_Uri *uri,
96 const struct GNUNET_FS_BlockOptions *bo,
99
100
106void
108
109#endif
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
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 GNUNET_FS_publish_ublock_cancel_(struct GNUNET_FS_PublishUblockContext *uc)
Abort UBlock publishing operation.
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_FS_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.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:98
static struct GNUNET_NAMECACHE_Handle * ns
Handle to the namecache.
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
static struct GNUNET_FS_MetaData * meta
Meta-data provided via command-line option.
static struct GNUNET_FS_BlockOptions bo
Options we set for published blocks.
static struct GNUNET_DATASTORE_Handle * dsh
Datastore handle.
static struct GNUNET_FS_UnindexContext * uc
API for file sharing via GNUnet.
Identity service; implements identity management for GNUnet.
GNUNET_FS_PublishOptions
Options for publishing.
Private ECC key encoded for transmission.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
Handle to the datastore service.
Settings for publishing a block (which may of course also apply to an entire directory or file).
Master context for most FS operations.
Definition: fs_api.h:1070
Meta data to associate with a file, directory or namespace.
Definition: meta_data.c:92
Context for 'ublock_put_cont'.
void * cont_cls
Closure of 'cont'.
GNUNET_FS_UBlockContinuation cont
Function to call when done.
A Universal Resource Identifier (URI), opaque.
Definition: fs_api.h:167