ATBTariffWebInterface/tariffcalculator.pas

45 lines
1.8 KiB
ObjectPascal
Raw Normal View History

2024-03-12 09:43:57 +01:00
unit TariffCalculator;
2024-03-13 16:08:30 +01:00
{$mode ObjFPC}{$H+}
2024-03-12 09:43:57 +01:00
interface
uses
SysUtils, CTypes;
type
// Can't use the class directly, so it is treated as an opaque handle.
// THandle is guaranteed to have the right size, even on other platforms.
TariffCalculatorHandle = THandle;
function NewTariffCalculator: TariffCalculatorHandle; stdcall;
procedure DeleteTariffCalculator(handle: TariffCalculatorHandle); stdcall;
function InitGitLibrary: cint32; stdcall;
function ShutdownGitLibrary: cint32; stdcall;
function CloneRepository(var url; var local_path) : cint32; stdcall;
2024-03-13 16:08:30 +01:00
function CheckoutLocalBranch(var local_path; var branch_name) : cint32; stdcall;
function CommitFile(var local_path; var branch_name;
var file_name; var comment) : cint32; stdcall;
2024-03-14 15:05:01 +01:00
function PushLocalRepository(var local_path; var branch_name;
var user_name; var password) : cint32; stdcall;
2024-03-12 09:43:57 +01:00
implementation
const
DLLName = 'CalculatorCInterface.dll';
function NewTariffCalculator: TariffCalculatorHandle; stdcall; external DLLName;
procedure DeleteTariffCalculator(handle: TariffCalculatorHandle); stdcall; external DLLName;
function InitGitLibrary: cint32; stdcall; external DLLName;
function ShutdownGitLibrary: cint32; stdcall; external DLLName;
function CloneRepository(var url; var local_path) : cint32; stdcall; external DLLName;
2024-03-13 16:08:30 +01:00
function CheckoutLocalBranch(var local_path; var branch_name) : cint32; stdcall; external DLLName;
function CommitFile(var local_path; var branch_name;
var file_name; var comment) : cint32; stdcall; external DLLName;
2024-03-14 15:05:01 +01:00
function PushLocalRepository(var local_path; var branch_name;
var user_name; var password) : cint32; stdcall; external DLLName;
2024-03-12 09:43:57 +01:00
end.