Refactoring in C, currently in development

This commit is contained in:
2023-06-04 12:35:42 +02:00
parent 9733003e9e
commit e3508eee23
7 changed files with 108 additions and 22 deletions

19
giteaAPI.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef GITEA_API_H_
#define GITEA_API_H_
#include <curl/curl.h>
typedef struct {
CURL* handle;
char* instance;
} SESSION;
SESSION teaui_gitea_session(const char *instance);
void teaui_gitea_cleanup(SESSION s);
void teaui_gitea_auth_basic(SESSION s, const char *user, const char *pass);
void teaui_gitea_auth_token(SESSION s, const char *token);
const char* teaui_gitea_auth_generateToken(SESSION s, const char *username);
#endif /* ifndef GITEA_API_H_ */