GNUnet  0.20.0
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_util_lib.h"
31 #include "gnunet_time_lib.h"
32 
34 
36 {
38 
40 };
41 
48 void
50  struct GNUNET_MESSENGER_SrvRoom *room);
51 
57 void
59 
66 void
68  const char *directory);
69 
76 void
78  const char *directory);
79 
91  const struct GNUNET_HashCode *hash);
92 
110 int
112  const struct GNUNET_HashCode *hash,
114  struct GNUNET_TIME_Relative delay);
115 
126 void
128  const struct GNUNET_HashCode *hash);
129 
130 #endif //GNUNET_SERVICE_MESSENGER_OPERATION_STORE_H
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
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.
void save_operation_store(const struct GNUNET_MESSENGER_OperationStore *store, const char *directory)
Saves operations from an operation store into a directory.
void clear_operation_store(struct GNUNET_MESSENGER_OperationStore *store)
Clears an operation store, stops all operations and deallocates its memory.
void load_operation_store(struct GNUNET_MESSENGER_OperationStore *store, const char *directory)
Loads operations from a directory into an operation store.
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.
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.
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.
Functions related to time.
Internal representation of the hash map.
A 512-bit hashcode.
struct GNUNET_CONTAINER_MultiHashMap * operations
Time for relative time used by GNUnet, in microseconds.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model