134 "KBlock PUT operation failed: %s\n",
msg);
154 "KSK PUT operation complete\n");
209 if (NULL == pkc->
dsh)
213 _ (
"Could not connect to datastore."));
243 if (NULL != pkc->
dsh)
struct GNUNET_GETOPT_CommandLineOption options[]
struct GNUNET_MessageHeader * msg
shared definitions for the FS library
static void kb_put_cont(void *cls, const char *msg)
Function called by the datastore API with the result from the PUT request.
static void publish_ksk_cont(void *cls)
Continuation of GNUNET_FS_publish_ksk() that performs the actual publishing operation (iterating over...
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.
publish a UBLOCK in GNUnet
Merkle-tree-ish-CHK file encoding for GNUnet.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
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.
API for file sharing via GNUnet.
const struct GNUNET_CRYPTO_EcdsaPrivateKey * GNUNET_CRYPTO_ecdsa_key_get_anonymous(void)
Get the shared private key we use for anonymous users.
void GNUNET_DATASTORE_disconnect(struct GNUNET_DATASTORE_Handle *h, int drop)
Disconnect from the datastore service (and free associated resources).
struct GNUNET_DATASTORE_Handle * GNUNET_DATASTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the datastore service.
struct GNUNET_FS_Uri * GNUNET_FS_uri_dup(const struct GNUNET_FS_Uri *uri)
Duplicate URI.
void GNUNET_FS_publish_ksk_cancel(struct GNUNET_FS_PublishKskContext *pkc)
Abort the KSK publishing operation.
struct GNUNET_FS_PublishKskContext * GNUNET_FS_publish_ksk(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *ksk_uri, 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_PublishContinuation cont, void *cont_cls)
Publish a CHK under various keywords on GNUnet.
GNUNET_FS_PublishOptions
Options for publishing.
void GNUNET_FS_uri_destroy(struct GNUNET_FS_Uri *uri)
Free URI.
void(* GNUNET_FS_PublishContinuation)(void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
Signature of a function called as the continuation of a KBlock or SBlock publication.
@ GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY
Simulate publishing.
#define GNUNET_log(kind,...)
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
const struct GNUNET_CONFIGURATION_Handle * cfg
The configuration that we are using.
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.
Context for the KSK publication.
struct GNUNET_FS_Uri * uri
URI to publish.
struct GNUNET_FS_Uri * ksk_uri
Keywords to use.
struct GNUNET_DATASTORE_Handle * dsh
Handle to the datastore, NULL if we are just simulating.
struct GNUNET_FS_PublishUblockContext * uc
UBlock publishing operation that is active.
enum GNUNET_FS_PublishOptions options
Options to use.
struct GNUNET_SCHEDULER_Task * ksk_task
Current task.
struct GNUNET_FS_BlockOptions bo
When should the KBlocks expire?
struct GNUNET_FS_MetaData * meta
Metadata to use.
void * cont_cls
Closure for cont.
unsigned int i
Keyword that we are currently processing.
struct GNUNET_FS_Handle * h
Global FS context.
GNUNET_FS_PublishContinuation cont
Function to call once we're done.
Context for 'ublock_put_cont'.
A Universal Resource Identifier (URI), opaque.
char ** keywords
Keywords start with a '+' if they are mandatory (in which case the '+' is NOT part of the keyword) an...
union GNUNET_FS_Uri::@49 data
struct GNUNET_FS_Uri::@49::@50 ksk
unsigned int keywordCount
Size of the keywords array.
Entry in list of pending tasks.