ATBTariffCalculator/CalculatorCInterface/calculator_c_interface_lib.h

43 lines
2.3 KiB
C
Raw Normal View History

2024-03-04 16:31:14 +01:00
#ifndef CALCULATOR_C_INTERFACE_LIB_H_INCLUDED
#define CALCULATOR_C_INTERFACE_LIB_H_INCLUDED
#include "calculator_c_interface_lib_global.h"
2024-03-11 12:14:28 +01:00
#include "tariff_calculator.h"
typedef TariffCalculator *TariffCalculatorHandle;
2024-03-04 16:31:14 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2024-03-21 16:57:53 +01:00
void DeleteMem(char *p) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-03-27 08:40:16 +01:00
void SetReposRootDirectoryInternal(char const *p) CALCULATOR_C_INTERFACE_LIB_EXPORT;
char const *GetReposRootDirectoryInternal() CALCULATOR_C_INTERFACE_LIB_EXPORT;
char const *GetLocalRepositoryPathInternal(char const *localRepo) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-03-21 16:57:53 +01:00
// interface for menu of webpage
2024-03-25 16:13:26 +01:00
char const *GetFileMenuInternal(char const *localRepo) CALCULATOR_C_INTERFACE_LIB_EXPORT;
int32_t GetFileMenuSizeInternal(char const *localRepo) CALCULATOR_C_INTERFACE_LIB_EXPORT;
char const *GetFileNameInternal(char const *localRepo, char const *fileId) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-03-21 16:57:53 +01:00
int32_t GetFileSize(char const *localRepo, char const *fileId) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-03-25 16:13:26 +01:00
char const *GetFileInternal(char const *localRepo, char const *fileId) CALCULATOR_C_INTERFACE_LIB_EXPORT;
bool SetFileInternal(char const *localRepo, char const *fileId, char const *json, int size) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-03-21 16:57:53 +01:00
2024-03-11 14:27:33 +01:00
TariffCalculatorHandle NewTariffCalculator(void) CALCULATOR_C_INTERFACE_LIB_EXPORT;
void DeleteTariffCalculator(TariffCalculatorHandle handle) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-03-13 13:17:02 +01:00
// libgit2
2024-03-28 16:45:46 +01:00
int InitGitLibraryInternal(void) CALCULATOR_C_INTERFACE_LIB_EXPORT;
int ShutdownGitLibraryInternal(void) CALCULATOR_C_INTERFACE_LIB_EXPORT;
int CloneRepositoryInternal(char const *url, char const *local_path) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-04-03 16:29:58 +02:00
int CheckoutRepositoryInternal(char const *url, char const *localRepoName, char const *branchName) CALCULATOR_C_INTERFACE_LIB_EXPORT;
int CommitFileInternal(char const *local_path, char const *branch_name, char const *file_name, char const *commit_message) CALCULATOR_C_INTERFACE_LIB_EXPORT;
int PushRepositoryInternal(char const *local_path, char const *branch_name, char const *user, char const *password) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-04-15 16:58:00 +02:00
int PullRepositoryInternal(char const *localRepoName, char const *remoteRepoName) CALCULATOR_C_INTERFACE_LIB_EXPORT;
2024-03-04 16:31:14 +01:00
#ifdef __cplusplus
}
#endif
2024-03-11 12:14:28 +01:00
2024-03-04 16:31:14 +01:00
#endif // CALCULATOR_C_INTERFACE_LIB_H_INCLUDED