refactor: cleanup

This commit is contained in:
2025-09-16 23:53:50 +02:00
parent 235c032062
commit c9af1429f9
13 changed files with 896 additions and 880 deletions

View File

@@ -1,25 +1,24 @@
#ifndef TGBOT_MAIN_H
#define TGBOT_MAIN_H
#include "common.h"
#include "methods.h"
#include "types.h"
/**
* @brief Initializes the Bot object.
*
* @param[out] bot The Bot object.
* @param[in] token The Bot token (obtained from @BotFather).
*
* @return TGBOT_OK on success.
*/
tgbot_rc tgbot_init(tgbot *bot, char *token);
/**
* @brief Cleans the memory.
*
* @param[out] bot The Bot object.
*/
void tgbot_destroy(tgbot *bot);
#endif // TGBOT_H
#ifndef TGBOT_MAIN_H
#define TGBOT_MAIN_H
#include "common.h"
#include "methods.h"
#include "types.h"
/**
* @brief Create a new Bot object.
*
* @param[in] token The Bot token (obtained from @BotFather).
*
* @return Bot pointer.
*/
tgbot_s *tgbot_new(char *token);
/**
* @brief Cleans the memory.
*
* @param[out] bot The Bot object.
*/
void tgbot_free(tgbot_s *bot);
#endif // TGBOT_H