GNUnet  0.11.x
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_peer_lib.h"
33 #include "gnunet_protocols.h"
34 #include "gnunet_signatures.h"
35 #include "gnunet_util_lib.h"
36 
37 
58 int
60  uint32_t size,
61  const void *data,
63  uint32_t priority,
64  uint32_t anonymity,
65  uint32_t replication,
67  uint64_t uid,
69  void *cont_cls);
70 
71 
77 void
79 
80 
87 int
89 
90 
97 void
98 GNUNET_FS_add_to_index (const char *filename,
99  const struct GNUNET_HashCode *file_id);
100 
101 
109 int
111  struct GNUNET_DATASTORE_Handle *d);
112 
113 
117 void
119 
120 
121 #endif
struct GNUNET_HashCode file_id
Hash of the contents of the file.
GNUNET_BLOCK_Type
Blocks in the datastore and the datacache must have a unique type.
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.
static unsigned int replication
int GNUNET_FS_indexing_init(const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_DATASTORE_Handle *d)
Initialize the indexing submodule.
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 char * filename
A 512-bit hashcode.
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
struct GNUNET_HashCode key
The key used in the DHT.
static unsigned int size
Size of the "table".
Definition: peer.c:67
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&#39;ve received an on-demand encoded block from the datastore.
Handle to a message queue.
Definition: mq.c:85
configuration data
Definition: configuration.c:85
Handle to the datastore service.
struct GNUNET_MQ_Handle * mq
Definition: 003.c:5
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Time for absolute times used by GNUnet, in microseconds.
static unsigned int anonymity
int GNUNET_FS_indexing_do_unindex(const struct GNUNET_HashCode *fid)
Remove a file from the index.
uint32_t data
The data value.
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.