GNUnet  0.20.0
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_util_lib.h"
32 #include "gnunet_scheduler_lib.h"
33 #include "gnunet_time_lib.h"
34 
36 {
40 
42 };
43 
45 
47 {
49 
50  struct GNUNET_HashCode hash;
52 
55 };
56 
63 create_operation (const struct GNUNET_HashCode *hash);
64 
70 void
72 
89  const char *path);
90 
99 void
101  const char *path);
102 
115 int
119  struct GNUNET_TIME_Relative delay);
120 
127 int
129 
130 #endif //GNUNET_SERVICE_MESSENGER_OPERATION_H
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:144
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
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.
int stop_operation(struct GNUNET_MESSENGER_Operation *op)
Stops an active operation and resets its type to be GNUNET_MESSENGER_OP_UNKNOWN.
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...
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...
void destroy_operation(struct GNUNET_MESSENGER_Operation *op)
Destroys an operation and frees its memory fully.
struct GNUNET_MESSENGER_Operation * create_operation(const struct GNUNET_HashCode *hash)
Creates and allocates a new operation under a given hash.
Configuration API.
API to schedule computations using continuation passing style.
Functions related to time.
A 512-bit hashcode.
enum GNUNET_MESSENGER_OperationType type
struct GNUNET_MESSENGER_OperationStore * store
Entry in list of pending tasks.
Definition: scheduler.c:136
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model