GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GFSDKBasic.h
1 
29 #pragma once
30 
31 #include <stdint.h>
32 
33 #include "GFSDKExport.h"
34 
35 extern "C" {
36 
37 using GFCommandExeucteCallback = void (*)(void* data, int errcode,
38  const char* out, const char* err);
39 
40 using GFCommandExecuteContext = struct {
41  const char* cmd;
42  int32_t argc;
43  const char** argv;
44  GFCommandExeucteCallback cb;
45  void* data;
46 };
47 
54 auto GPGFRONTEND_MODULE_SDK_EXPORT GFAllocateMemory(uint32_t size) -> void*;
55 
61 auto GPGFRONTEND_MODULE_SDK_EXPORT GFProjectVersion() -> const char*;
62 
68 auto GPGFRONTEND_MODULE_SDK_EXPORT GFQtEnvVersion() -> const char*;
69 
74 void GPGFRONTEND_MODULE_SDK_EXPORT GFFreeMemory(void*);
75 
85 void GPGFRONTEND_MODULE_SDK_EXPORT
86 GFExecuteCommandSync(const char* cmd, int32_t argc, const char** argv,
87  GFCommandExeucteCallback cb, void* data);
88 
95 void GPGFRONTEND_MODULE_SDK_EXPORT GFExecuteCommandBatchSync(
96  int32_t context_size, const GFCommandExecuteContext* context);
97 
103 auto GPGFRONTEND_MODULE_SDK_EXPORT GFModuleStrDup(const char*) -> char*;
104 }