GNUnet 0.22.1
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, 2023 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 "gnunet_util_lib.h"
30#include "gnunet_time_lib.h"
31
33
35{
37
39};
40
47void
49 struct GNUNET_MESSENGER_SrvRoom *room);
50
56void
58
65void
67 const char *directory);
68
75void
77 const char *directory);
78
90 const struct GNUNET_HashCode *hash);
91
111 const struct GNUNET_HashCode *hash,
113 struct GNUNET_TIME_Relative delay);
114
125void
127 const struct GNUNET_HashCode *hash);
128
129#endif //GNUNET_SERVICE_MESSENGER_OPERATION_STORE_H
static uint32_t type
Type string converted to DNS type value.
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.
enum GNUNET_GenericReturnValue 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.
GNUNET_GenericReturnValue
Named constants for return values.
Internal representation of the hash map.
A 512-bit hashcode.
struct GNUNET_CONTAINER_MultiHashMap * operations
Time for relative time used by GNUnet, in microseconds.