GNUnet  0.11.x
gnunet-service-messenger_operation.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_H
27 #define GNUNET_SERVICE_MESSENGER_OPERATION_H
28 
29 #include "platform.h"
31 #include "gnunet_crypto_lib.h"
32 #include "gnunet_scheduler_lib.h"
33 #include "gnunet_strings_lib.h"
34 #include "gnunet_time_lib.h"
35 
37 {
41 
43 };
44 
46 
48 {
50 
53 
56 };
57 
64 create_operation (const struct GNUNET_HashCode *hash);
65 
71 void
73 
89 load_operation (struct GNUNET_MESSENGER_OperationStore *store, const char *path);
90 
99 void
100 save_operation (const struct GNUNET_MESSENGER_Operation *op, const char *path);
101 
114 int
118  struct GNUNET_TIME_Relative delay);
119 
126 int
128 
129 #endif //GNUNET_SERVICE_MESSENGER_OPERATION_H
enum GNUNET_MESSENGER_OperationType type
int start_operation(struct GNUNET_MESSENGER_Operation *op, enum GNUNET_MESSENGER_OperationType type, struct GNUNET_MESSENGER_OperationStore *store, struct GNUNET_TIME_Relative delay)
Starts an inactive operation with a given delay in a specific operation store.
struct GNUNET_MESSENGER_Operation * load_operation(struct GNUNET_MESSENGER_OperationStore *store, const char *path)
Loads data from a configuration file at a selected path into a new allocated and created operation fo...
cryptographic primitives for GNUnet
struct GNUNET_MESSENGER_OperationStore * store
A 512-bit hashcode.
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
struct GNUNET_MESSENGER_Operation * create_operation(const struct GNUNET_HashCode *hash)
Creates and allocates a new operation under a given hash.
Entry in list of pending tasks.
Definition: scheduler.c:134
void destroy_operation(struct GNUNET_MESSENGER_Operation *op)
Destroys an operation and frees its memory fully.
int stop_operation(struct GNUNET_MESSENGER_Operation *op)
Stops an active operation and resets its type to be GNUNET_MESSENGER_OP_UNKNOWN.
Time for absolute times used by GNUnet, in microseconds.
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:144
void save_operation(const struct GNUNET_MESSENGER_Operation *op, const char *path)
Saves data from an operation into a configuration file at a selected path which can be load to restor...
Time for relative time used by GNUnet, in microseconds.