GNUnet 0.21.1
messenger_api_queue_messages.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2023--2024 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_MESSENGER_API_QUEUE_MESSAGES_H
27#define GNUNET_MESSENGER_API_QUEUE_MESSAGES_H
28
29#include "gnunet_util_lib.h"
30
32{
35
37
40};
41
43{
46};
47
53void
55
61void
63
74void
76 const struct GNUNET_CRYPTO_PrivateKey *sender,
79 enum GNUNET_GenericReturnValue priority);
80
91 struct GNUNET_CRYPTO_PrivateKey *sender,
92 struct GNUNET_MESSENGER_Message **transcript);
93
94#endif //GNUNET_MESSENGER_API_QUEUE_MESSAGES_H
GNUNET_GenericReturnValue
Named constants for return values.
struct GNUNET_MESSENGER_Message * dequeue_from_messages(struct GNUNET_MESSENGER_QueueMessages *messages, struct GNUNET_CRYPTO_PrivateKey *sender, struct GNUNET_MESSENGER_Message **transcript)
Remove the message from the front of the queue and returns it.
void enqueue_to_messages(struct GNUNET_MESSENGER_QueueMessages *messages, const struct GNUNET_CRYPTO_PrivateKey *sender, struct GNUNET_MESSENGER_Message *message, struct GNUNET_MESSENGER_Message *transcript, enum GNUNET_GenericReturnValue priority)
Adds a specific message to the end or the beginning of the queue depending on its priority.
void init_queue_messages(struct GNUNET_MESSENGER_QueueMessages *messages)
Initializes queue of messages as empty queue.
void clear_queue_messages(struct GNUNET_MESSENGER_QueueMessages *messages)
Clears the queue of messages.
A private key for an identity as per LSD0001.
struct GNUNET_MESSENGER_Message * message
struct GNUNET_CRYPTO_PrivateKey sender
struct GNUNET_MESSENGER_Message * transcript
struct GNUNET_MESSENGER_QueueMessage * prev
struct GNUNET_MESSENGER_QueueMessage * next
struct GNUNET_MESSENGER_QueueMessage * tail
struct GNUNET_MESSENGER_QueueMessage * head