GNUnet  0.20.0
gnunet-service-fs_indexing.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2009, 2010, 2011 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 
26 #ifndef GNUNET_SERVICE_FS_INDEXING_H
27 #define GNUNET_SERVICE_FS_INDEXING_H
28 
29 #include "gnunet_block_lib.h"
30 #include "gnunet_core_service.h"
32 #include "gnunet_protocols.h"
33 #include "gnunet_signatures.h"
34 #include "gnunet_util_lib.h"
35 
36 
57 int
59  uint32_t size,
60  const void *data,
62  uint32_t priority,
63  uint32_t anonymity,
64  uint32_t replication,
66  uint64_t uid,
68  void *cont_cls);
69 
70 
76 void
78 
79 
86 int
88 
89 
96 void
97 GNUNET_FS_add_to_index (const char *filename,
98  const struct GNUNET_HashCode *file_id);
99 
100 
108 int
110  struct GNUNET_DATASTORE_Handle *d);
111 
112 
116 void
118 
119 
120 #endif
struct GNUNET_MQ_Handle * mq
Definition: 003.c:5
GNUNET_BLOCK_Type
WARNING: This header is generated! In order to add DHT block types, you must register them in GANA,...
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
static unsigned int replication
struct GNUNET_HashCode key
The key used in the DHT.
static unsigned int anonymity
static char * filename
uint32_t data
The data value.
int GNUNET_FS_indexing_do_unindex(const struct GNUNET_HashCode *fid)
Remove a file from the index.
void GNUNET_FS_add_to_index(const char *filename, const struct GNUNET_HashCode *file_id)
Add the given file to the list of indexed files.
int GNUNET_FS_indexing_init(const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_DATASTORE_Handle *d)
Initialize the indexing submodule.
void GNUNET_FS_indexing_done(void)
Shutdown the module.
void GNUNET_FS_indexing_send_list(struct GNUNET_MQ_Handle *mq)
Transmit information about indexed files to mq.
int GNUNET_FS_handle_on_demand_block(const struct GNUNET_HashCode *key, uint32_t size, const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, uint32_t anonymity, uint32_t replication, struct GNUNET_TIME_Absolute expiration, uint64_t uid, GNUNET_DATASTORE_DatumProcessor cont, void *cont_cls)
We've received an on-demand encoded block from the datastore.
Library for data block manipulation.
Core service; the main API for encrypted P2P communications.
Constants for network protocols.
void(* GNUNET_DATASTORE_DatumProcessor)(void *cls, const struct GNUNET_HashCode *key, size_t size, const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, uint32_t anonymity, uint32_t replication, struct GNUNET_TIME_Absolute expiration, uint64_t uid)
Process a datum that was stored in the datastore.
static unsigned int size
Size of the "table".
Definition: peer.c:68
Handle to the datastore service.
A 512-bit hashcode.
Handle to a message queue.
Definition: mq.c:87
Time for absolute times used by GNUnet, in microseconds.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model