38 lines
1.8 KiB
C
38 lines
1.8 KiB
C
#ifndef CALCULATOR_C_INTERFACE_LIB_H_INCLUDED
|
|
#define CALCULATOR_C_INTERFACE_LIB_H_INCLUDED
|
|
#include "calculator_c_interface_lib_global.h"
|
|
#include "tariff_calculator.h"
|
|
|
|
typedef TariffCalculator *TariffCalculatorHandle;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void DeleteMem(char *p) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
|
|
// interface for menu of webpage
|
|
char const *GetFileMenu(char const *localRepo) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
int32_t GetFileMenuSize(char const *localRepo) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
char const *GetFileName(char const *localRepo, char const *fileId) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
int32_t GetFileSize(char const *localRepo, char const *fileId) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
char const *GetFile(char const *localRepo, char const *fileId) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
bool SetFile(char const *localRepo, char const *fileId, char const *json) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
|
|
TariffCalculatorHandle NewTariffCalculator(void) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
void DeleteTariffCalculator(TariffCalculatorHandle handle) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
|
|
// libgit2
|
|
int InitGitLibrary(void) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
int ShutdownGitLibrary(void) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
int CloneRepository(char const *url, char const *local_path) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
int CheckoutLocalBranch(char const *local_path, char const *branch) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
int CommitFile(char const *local_path, char const *branch_name, char const *file_name, char const *commit_message) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
int PushLocalRepository(char const *local_path, char const *branch_name, char const *user, char const *password) CALCULATOR_C_INTERFACE_LIB_EXPORT;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // CALCULATOR_C_INTERFACE_LIB_H_INCLUDED
|