From fc56c6148f22d363a27c7a39d8d97a2d4d908a92 Mon Sep 17 00:00:00 2001 From: TheJackiMonster Date: Tue, 19 Apr 2022 00:31:14 +0200 Subject: Added doxygen comments to some headers Signed-off-by: TheJackiMonster --- src/application.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'src/application.h') diff --git a/src/application.h b/src/application.h index 2c0972b..ab082a0 100644 --- a/src/application.h +++ b/src/application.h @@ -134,15 +134,38 @@ typedef struct MESSENGER_Application } settings; } MESSENGER_Application; +/** + * Initializes the messenger application with + * startup arguments. + * + * @param app Messenger application + * @param argc Amount of arguments + * @param argv Arguments + */ void application_init(MESSENGER_Application *app, int argc, char **argv); +/** + * Returns the path from resources of the + * messenger application relative to its storage. + * + * @param app Messenger application + * @param path Path + * @return Resource path + */ const gchar* application_get_resource_path(MESSENGER_Application *app, const char *path); +/** + * Runs the messenger application starting the + * second thread and waiting for the application + * to finish. + * + * @param app Messenger application + */ void application_run(MESSENGER_Application *app); @@ -156,20 +179,49 @@ typedef void (*MESSENGER_ApplicationMessageEvent) ( const struct GNUNET_CHAT_Message *msg ); +/** + * Calls a given event with the messenger application + * asyncronously but explicitly synchronized via mutex. + * + * @param app Messenger application + * @param event Event + */ void application_call_event(MESSENGER_Application *app, MESSENGER_ApplicationEvent event); +/** + * Calls a given message event with the messenger + * application asyncronously but explicitly synchronized + * via mutex. + * + * @param app Messenger application + * @param event Message event + * @param context Chat context + * @param message Message + */ void application_call_message_event(MESSENGER_Application *app, MESSENGER_ApplicationMessageEvent event, struct GNUNET_CHAT_Context *context, const struct GNUNET_CHAT_Message *message); +/** + * Signals the second thread to exit the application. + * + * @param app Messenger application + * @param signal Exit signal + */ void application_exit(MESSENGER_Application *app, MESSENGER_ApplicationSignal signal); +/** + * Returns the exit status of the messenger application. + * + * @param app Messenger application + * @return Exit status + */ int application_status(MESSENGER_Application *app); -- cgit v1.2.3