45 lines
1.8 KiB
ObjectPascal
45 lines
1.8 KiB
ObjectPascal
unit TariffCalculator;
|
|
|
|
{$mode ObjFPC}{$H+}
|
|
|
|
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;
|
|
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;
|
|
function PushLocalRepository(var local_path; var branch_name;
|
|
var user_name; var password) : cint32; stdcall;
|
|
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;
|
|
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;
|
|
function PushLocalRepository(var local_path; var branch_name;
|
|
var user_name; var password) : cint32; stdcall; external DLLName;
|
|
|
|
end.
|
|
|