GNUnet  0.11.x
gnunet-service-messenger_operation_store.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2021 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  */
26 #ifndef GNUNET_SERVICE_MESSENGER_OPERATION_STORE_H
27 #define GNUNET_SERVICE_MESSENGER_OPERATION_STORE_H
28 
29 #include "platform.h"
30 #include "gnunet_container_lib.h"
31 #include "gnunet_crypto_lib.h"
32 #include "gnunet_scheduler_lib.h"
33 #include "gnunet_time_lib.h"
34 
36 
38 {
40 
42 };
43 
50 void
52 
58 void
60 
67 void
69  const char *directory);
70 
77 void
79  const char *directory);
80 
92  const struct GNUNET_HashCode *hash);
93 
111 int
113  const struct GNUNET_HashCode *hash,
115  struct GNUNET_TIME_Relative delay);
116 
127 void
129  const struct GNUNET_HashCode *hash);
130 
131 #endif //GNUNET_SERVICE_MESSENGER_OPERATION_STORE_H
void load_operation_store(struct GNUNET_MESSENGER_OperationStore *store, const char *directory)
Loads operations from a directory into an operation store.
void init_operation_store(struct GNUNET_MESSENGER_OperationStore *store, struct GNUNET_MESSENGER_SrvRoom *room)
Initializes an operation store as fully empty with a given room.
struct GNUNET_CONTAINER_MultiHashMap * operations
Internal representation of the hash map.
enum GNUNET_MESSENGER_OperationType get_store_operation_type(const struct GNUNET_MESSENGER_OperationStore *store, const struct GNUNET_HashCode *hash)
Returns the type of the active operation under a given hash in a specific operation store...
cryptographic primitives for GNUnet
int use_store_operation(struct GNUNET_MESSENGER_OperationStore *store, const struct GNUNET_HashCode *hash, enum GNUNET_MESSENGER_OperationType type, struct GNUNET_TIME_Relative delay)
Tries to use an operation under a given hash in a specific operation store.
void clear_operation_store(struct GNUNET_MESSENGER_OperationStore *store)
Clears an operation store, stops all operations and deallocates its memory.
A 512-bit hashcode.
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
void save_operation_store(const struct GNUNET_MESSENGER_OperationStore *store, const char *directory)
Saves operations from an operation store into a directory.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
void cancel_store_operation(struct GNUNET_MESSENGER_OperationStore *store, const struct GNUNET_HashCode *hash)
Stops any active operation under a given hash in a specific operation store.
Time for relative time used by GNUnet, in microseconds.