commit ae1dc1ed5474f3293c6278c9789f07816f8b76d7
parent e3161448ba510b3e25cfda6e9d89dba42536d805
Author: Jacki <jacki@thejackimonster.de>
Date: Thu, 26 Sep 2024 01:41:39 +0200
Adjust code to build with API changes
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat:
8 files changed, 65 insertions(+), 65 deletions(-)
diff --git a/src/chat.c b/src/chat.c
@@ -67,7 +67,7 @@ _chat_refresh(MESSENGER_Application *app)
static bool
_chat_event(MESSENGER_Application *app,
- int key)
+ int key)
{
if (key < 0)
goto refresh;
@@ -98,8 +98,8 @@ refresh:
static int
_chat_message(void *cls,
- struct GNUNET_CHAT_Context *context,
- const struct GNUNET_CHAT_Message *message)
+ struct GNUNET_CHAT_Context *context,
+ struct GNUNET_CHAT_Message *message)
{
MESSENGER_Application *app = cls;
@@ -137,8 +137,8 @@ _chat_idle(void *cls)
void
chat_start(MESSENGER_Chat *chat,
- struct MESSENGER_Application *app,
- const struct GNUNET_CONFIGURATION_Handle *cfg)
+ struct MESSENGER_Application *app,
+ const struct GNUNET_CONFIGURATION_Handle *cfg)
{
chat->handle = GNUNET_CHAT_start(
cfg,
@@ -331,7 +331,7 @@ skip_left_split:
void
chat_update_layout(MESSENGER_Chat *chat,
- struct MESSENGER_Application *app)
+ struct MESSENGER_Application *app)
{
const struct GNUNET_CHAT_Account *account = GNUNET_CHAT_get_connected(
chat->handle
@@ -349,8 +349,8 @@ chat_update_layout(MESSENGER_Chat *chat,
void
chat_process_message(UNUSED MESSENGER_Chat *chat,
- struct GNUNET_CHAT_Context *context,
- const struct GNUNET_CHAT_Message *message)
+ struct GNUNET_CHAT_Context *context,
+ struct GNUNET_CHAT_Message *message)
{
enum GNUNET_CHAT_MessageKind kind = GNUNET_CHAT_message_get_kind(message);
diff --git a/src/chat.h b/src/chat.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2022--2023 GNUnet e.V.
+ Copyright (C) 2022--2024 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -54,8 +54,8 @@ typedef struct MESSENGER_Chat
*/
void
chat_start(MESSENGER_Chat *chat,
- struct MESSENGER_Application *app,
- const struct GNUNET_CONFIGURATION_Handle *cfg);
+ struct MESSENGER_Application *app,
+ const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
* Stops the processing of the given applications
@@ -76,7 +76,7 @@ chat_stop(MESSENGER_Chat *chat);
*/
void
chat_update_layout(MESSENGER_Chat *chat,
- struct MESSENGER_Application *app);
+ struct MESSENGER_Application *app);
/**
* Processes a chat message to update the list of
@@ -89,7 +89,7 @@ chat_update_layout(MESSENGER_Chat *chat,
*/
void
chat_process_message(MESSENGER_Chat *chat,
- struct GNUNET_CHAT_Context *context,
- const struct GNUNET_CHAT_Message *message);
+ struct GNUNET_CHAT_Context *context,
+ struct GNUNET_CHAT_Message *message);
#endif /* CHAT_H_ */
diff --git a/src/ui/accounts.c b/src/ui/accounts.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2022 GNUnet e.V.
+ Copyright (C) 2022--2024 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -30,7 +30,7 @@
int
_accounts_iterate(void *cls,
- UNUSED const struct GNUNET_CHAT_Handle *handle,
+ UNUSED struct GNUNET_CHAT_Handle *handle,
struct GNUNET_CHAT_Account *account)
{
UI_ACCOUNTS_Handle *accounts = cls;
@@ -40,8 +40,8 @@ _accounts_iterate(void *cls,
void
accounts_event(UI_ACCOUNTS_Handle *accounts,
- MESSENGER_Application *app,
- int key)
+ MESSENGER_Application *app,
+ int key)
{
if (accounts->create_dialog.window)
{
@@ -81,8 +81,8 @@ accounts_event(UI_ACCOUNTS_Handle *accounts,
static int
_accounts_print_entry(UI_ACCOUNTS_Handle *accounts,
- char type,
- const char *text)
+ char type,
+ const char *text)
{
list_input_print_gnunet(accounts, 1);
@@ -100,7 +100,7 @@ _accounts_print_entry(UI_ACCOUNTS_Handle *accounts,
int
_accounts_iterate_print(void *cls,
- UNUSED const struct GNUNET_CHAT_Handle *handle,
+ UNUSED struct GNUNET_CHAT_Handle *handle,
struct GNUNET_CHAT_Account *account)
{
UI_ACCOUNTS_Handle *accounts = cls;
@@ -110,7 +110,7 @@ _accounts_iterate_print(void *cls,
void
accounts_print(UI_ACCOUNTS_Handle *accounts,
- MESSENGER_Application *app)
+ MESSENGER_Application *app)
{
if (accounts->create_dialog.window)
{
diff --git a/src/ui/accounts.h b/src/ui/accounts.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2022--2023 GNUnet e.V.
+ Copyright (C) 2022--2024 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -67,8 +67,8 @@ typedef struct UI_ACCOUNTS_Handle
*/
void
accounts_event(UI_ACCOUNTS_Handle *accounts,
- struct MESSENGER_Application *app,
- int key);
+ struct MESSENGER_Application *app,
+ int key);
/**
* Prints the content of the view to show
@@ -80,6 +80,6 @@ accounts_event(UI_ACCOUNTS_Handle *accounts,
*/
void
accounts_print(UI_ACCOUNTS_Handle *accounts,
- struct MESSENGER_Application *app);
+ struct MESSENGER_Application *app);
#endif /* UI_ACCOUNTS_H_ */
diff --git a/src/ui/chats.c b/src/ui/chats.c
@@ -32,8 +32,8 @@
static enum GNUNET_GenericReturnValue
_chats_iterate_group(void *cls,
- UNUSED struct GNUNET_CHAT_Handle *handle,
- struct GNUNET_CHAT_Group *group)
+ UNUSED struct GNUNET_CHAT_Handle *handle,
+ struct GNUNET_CHAT_Group *group)
{
UI_CHATS_Handle *chats = cls;
list_input_select(chats, 1, GNUNET_CHAT_group_get_context(group));
@@ -42,8 +42,8 @@ _chats_iterate_group(void *cls,
static enum GNUNET_GenericReturnValue
_chats_iterate_contact(void *cls,
- UNUSED struct GNUNET_CHAT_Handle *handle,
- struct GNUNET_CHAT_Contact *contact)
+ UNUSED struct GNUNET_CHAT_Handle *handle,
+ struct GNUNET_CHAT_Contact *contact)
{
UI_CHATS_Handle *chats = cls;
@@ -56,8 +56,8 @@ _chats_iterate_contact(void *cls,
static enum GNUNET_GenericReturnValue
_chats_iterate_messages(void *cls,
- struct GNUNET_CHAT_Context *context,
- const struct GNUNET_CHAT_Message *message)
+ struct GNUNET_CHAT_Context *context,
+ struct GNUNET_CHAT_Message *message)
{
MESSENGER_Chat *chat = cls;
chat_process_message(chat, context, message);
@@ -66,8 +66,8 @@ _chats_iterate_messages(void *cls,
void
chats_event(UI_CHATS_Handle *chats,
- MESSENGER_Application *app,
- int key)
+ MESSENGER_Application *app,
+ int key)
{
if (chats->open_dialog.window)
{
@@ -149,9 +149,9 @@ chats_event(UI_CHATS_Handle *chats,
static int
_chats_print_entry(UI_CHATS_Handle *chats,
- char type,
- char chat_type,
- const char *text)
+ char type,
+ char chat_type,
+ const char *text)
{
list_input_print_gnunet(chats, 1);
@@ -173,8 +173,8 @@ _chats_print_entry(UI_CHATS_Handle *chats,
enum GNUNET_GenericReturnValue
_chats_iterate_print_group(void *cls,
- UNUSED struct GNUNET_CHAT_Handle *handle,
- struct GNUNET_CHAT_Group *group)
+ UNUSED struct GNUNET_CHAT_Handle *handle,
+ struct GNUNET_CHAT_Group *group)
{
UI_CHATS_Handle *chats = cls;
const char *name = GNUNET_CHAT_group_get_name(group);
@@ -183,8 +183,8 @@ _chats_iterate_print_group(void *cls,
enum GNUNET_GenericReturnValue
_chats_iterate_print_contact(void *cls,
- UNUSED struct GNUNET_CHAT_Handle *handle,
- struct GNUNET_CHAT_Contact *contact)
+ UNUSED struct GNUNET_CHAT_Handle *handle,
+ struct GNUNET_CHAT_Contact *contact)
{
UI_CHATS_Handle *chats = cls;
@@ -197,7 +197,7 @@ _chats_iterate_print_contact(void *cls,
void
chats_print(UI_CHATS_Handle *chats,
- MESSENGER_Application *app)
+ MESSENGER_Application *app)
{
if (chats->open_dialog.window)
{
diff --git a/src/ui/chats.h b/src/ui/chats.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2022--2023 GNUnet e.V.
+ Copyright (C) 2022--2024 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -71,8 +71,8 @@ typedef struct UI_CHATS_Handle
*/
void
chats_event(UI_CHATS_Handle *chats,
- struct MESSENGER_Application *app,
- int key);
+ struct MESSENGER_Application *app,
+ int key);
/**
* Prints the content of the view to show
@@ -84,6 +84,6 @@ chats_event(UI_CHATS_Handle *chats,
*/
void
chats_print(UI_CHATS_Handle *chats,
- struct MESSENGER_Application *app);
+ struct MESSENGER_Application *app);
#endif /* UI_CHATS_H_ */
diff --git a/src/ui/messages.c b/src/ui/messages.c
@@ -33,7 +33,7 @@
struct tm*
_messages_new_day(time_t* current_time,
- const time_t* timestamp)
+ const time_t* timestamp)
{
struct tm* ts = localtime(timestamp);
@@ -118,12 +118,12 @@ messages_event(UI_MESSAGES_Handle *messages,
_messages_handle_message(messages);
else if (messages->text_len > 0)
{
- if (0 != strncmp(messages->text,
- UI_MESSAGES_FILE_PREFIX,
- UI_MESSAGES_FILE_PREFIX_LEN))
- goto write_text;
+ if (0 != strncmp(messages->text,
+ UI_MESSAGES_FILE_PREFIX,
+ UI_MESSAGES_FILE_PREFIX_LEN))
+ goto write_text;
- const char* filename = messages->text + 5;
+ const char* filename = messages->text + 5;
if (0 != access(filename, R_OK | F_OK))
break;
@@ -135,7 +135,7 @@ messages_event(UI_MESSAGES_Handle *messages,
NULL
);
- goto drop_text;
+ goto drop_text;
write_text:
GNUNET_CHAT_context_send_text(
@@ -167,7 +167,7 @@ messages_event(UI_MESSAGES_Handle *messages,
void
_messages_iterate_print(UI_MESSAGES_Handle *messages,
const time_t* timestamp,
- const struct GNUNET_CHAT_Message *message)
+ struct GNUNET_CHAT_Message *message)
{
static const char *you = "you";
@@ -377,7 +377,7 @@ _message_compare_timestamps(UNUSED void *cls,
void
messages_add(UI_MESSAGES_Handle *messages,
- const struct GNUNET_CHAT_Message *message)
+ struct GNUNET_CHAT_Message *message)
{
enum GNUNET_CHAT_MessageKind kind = GNUNET_CHAT_message_get_kind(message);
@@ -436,7 +436,7 @@ messages_add(UI_MESSAGES_Handle *messages,
void
messages_remove(UI_MESSAGES_Handle *messages,
- const struct GNUNET_CHAT_Message *message)
+ struct GNUNET_CHAT_Message *message)
{
UI_MESSAGES_List *element = messages->head;
while (element)
diff --git a/src/ui/messages.h b/src/ui/messages.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2022--2023 GNUnet e.V.
+ Copyright (C) 2022--2024 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -42,7 +42,7 @@ typedef struct UI_MESSAGES_List
{
time_t timestamp;
- const struct GNUNET_CHAT_Message *message;
+ struct GNUNET_CHAT_Message *message;
struct UI_MESSAGES_List *prev;
struct UI_MESSAGES_List *next;
@@ -68,7 +68,7 @@ typedef struct UI_MESSAGES_Handle
int line_selected;
time_t line_time;
- const struct GNUNET_CHAT_Message *selected;
+ struct GNUNET_CHAT_Message *selected;
char text [1024];
int text_len;
@@ -90,8 +90,8 @@ typedef struct UI_MESSAGES_Handle
*/
void
messages_event(UI_MESSAGES_Handle *messages,
- struct MESSENGER_Application *app,
- int key);
+ struct MESSENGER_Application *app,
+ int key);
/**
* Prints the content of the view to show
@@ -118,11 +118,11 @@ messages_clear(UI_MESSAGES_Handle *messages);
* screen.
*
* @param[in,out] messages Chat messages view
- * @param[in] message Chat message
+ * @param[in,out] message Chat message
*/
void
messages_add(UI_MESSAGES_Handle *messages,
- const struct GNUNET_CHAT_Message *message);
+ struct GNUNET_CHAT_Message *message);
/**
* Removes a chat message from the list of
@@ -130,10 +130,10 @@ messages_add(UI_MESSAGES_Handle *messages,
* screen.
*
* @param[in,out] messages Chat messages view
- * @param[in] message Chat message
+ * @param[in,out] message Chat message
*/
void
messages_remove(UI_MESSAGES_Handle *messages,
- const struct GNUNET_CHAT_Message *message);
+ struct GNUNET_CHAT_Message *message);
#endif /* UI_MESSAGES_H_ */