/* Code generated by cmd/cgo; DO NOT EDIT. */ /* package git.openprivacy.ca/cwtch.im/libcwtch-go */ #line 1 "cgo-builtin-export-prolog" #include /* for ptrdiff_t below */ #ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H #ifndef GO_CGO_GOSTRING_TYPEDEF typedef struct { const char *p; ptrdiff_t n; } _GoString_; #endif #endif /* Start of preamble from import "C" comments. */ #line 5 "lib.go" //Needed to invoke C.free #include #line 1 "cgo-generated-wrapper" /* End of preamble from import "C" comments. */ /* Start of boilerplate cgo prologue. */ #line 1 "cgo-gcc-export-header-prolog" #ifndef GO_CGO_PROLOGUE_H #define GO_CGO_PROLOGUE_H typedef signed char GoInt8; typedef unsigned char GoUint8; typedef short GoInt16; typedef unsigned short GoUint16; typedef int GoInt32; typedef unsigned int GoUint32; typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt64 GoInt; typedef GoUint64 GoUint; typedef __SIZE_TYPE__ GoUintptr; typedef float GoFloat32; typedef double GoFloat64; typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; /* static assertion to make sure the file is being used on architecture at least with matching size of GoInt. */ typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1]; #ifndef GO_CGO_GOSTRING_TYPEDEF typedef _GoString_ GoString; #endif typedef void *GoMap; typedef void *GoChan; typedef struct { void *t; void *v; } GoInterface; typedef struct { void *data; GoInt len; GoInt cap; } GoSlice; #endif /* End of boilerplate cgo prologue. */ #ifdef __cplusplus extern "C" { #endif extern int c_StartCwtch(char* dir_c, int len, char* tor_c, int torLen); extern void c_ReconnectCwtchForeground(); // A generic method for Rebroadcasting App Events from a UI extern void c_SendAppEvent(char* json_ptr, int json_len); // A generic method for Rebroadcasting Profile Events from a UI extern void c_SendProfileEvent(char* onion_ptr, int onion_len, char* json_ptr, int json_len); // the pointer returned from this function **must** be freed using c_Free extern char* c_GetAppBusEvent(); extern void c_CreateProfile(char* nick_ptr, int nick_len, char* pass_ptr, int pass_len); extern void c_LoadProfiles(char* passwordPtr, int passwordLen); extern void c_AcceptConversation(char* profilePtr, int profileLen, int conversation_id); extern void c_BlockContact(char* profilePtr, int profileLen, int conversation_id); extern void c_UnblockContact(char* profilePtr, int profileLen, int conversation_id); // the pointer returned from this function **must** be Freed by c_Free extern char* c_GetMessage(char* profile_ptr, int profile_len, int conversation_id, int message_index); // the pointer returned from this function **must** be Freed by c_Free extern char* c_GetMessageByID(char* profile_ptr, int profile_len, int conversation_id, int message_index); // the pointer returned from this function **must** be freed by calling c_Free extern char* c_GetMessagesByContentHash(char* profile_ptr, int profile_len, int conversation_id, char* contenthash_ptr, int contenthash_len); // Dangerous function. Should only be used as documented in `MEMORY.md` extern void c_FreePointer(char* ptr); extern void c_SendMessage(char* profile_ptr, int profile_len, int conversation_id, char* msg_ptr, int msg_len); extern void c_SendInvitation(char* profile_ptr, int profile_len, int conversation_id, int target_id); extern void c_ShareFile(char* profile_ptr, int profile_len, int conversation_id, char* filepath_ptr, int filepath_len); extern void c_DownloadFile(char* profile_ptr, int profile_len, int conversation_id, char* filepath_ptr, int filepath_len, char* manifestpath_ptr, int manifestpath_len, char* filekey_ptr, int filekey_len); extern void c_CheckDownloadStatus(char* profilePtr, int profileLen, char* fileKeyPtr, int fileKeyLen); extern void c_VerifyOrResumeDownload(char* profile_ptr, int profile_len, int conversation_id, char* filekey_ptr, int filekey_len); extern void c_ResetTor(); extern void c_CreateGroup(char* profile_ptr, int profile_len, char* server_ptr, int server_len, char* name_ptr, int name_len); extern void c_DeleteProfile(char* profile_ptr, int profile_len, char* password_ptr, int password_len); extern void c_ArchiveConversation(char* profile_ptr, int profile_len, int conversation_id); extern void c_DeleteContact(char* profile_ptr, int profile_len, int conversation_id); extern void c_ImportBundle(char* profile_ptr, int profile_len, char* bundle_ptr, int bundle_len); extern void c_SetProfileAttribute(char* profile_ptr, int profile_len, char* key_ptr, int key_len, char* val_ptr, int val_len); extern void c_SetConversationAttribute(char* profile_ptr, int profile_len, int conversation_id, char* key_ptr, int key_len, char* val_ptr, int val_len); extern void c_SetMessageAttribute(char* profile_ptr, int profile_len, int conversation_id, int channel_id, int message_id, char* key_ptr, int key_len, char* val_ptr, int val_len); extern void c_ChangePassword(char* profile_ptr, int profile_len, char* oldpassword_ptr, int oldpassword_len, char* newpassword_ptr, int newpassword_len, char* newpassword_again_ptr, int newpassword_again_len); extern void c_ShutdownCwtch(); extern void c_LoadServers(char* passwordPtr, int passwordLen); extern void c_CreateServer(char* passwordPtr, int passwordLen, char* descPtr, int descLen, char autostart); extern void c_DeleteServer(char* onionPtr, int onionLen, char* currentPasswordPtr, int currentPasswordLen); extern void c_LaunchServers(); extern void c_LaunchServer(char* onionPtr, int onionLen); extern void c_StopServer(char* onionPtr, int onionLen); extern void c_StopServers(); extern void c_DestroyServers(); extern void c_SetServerAttribute(char* onionPtr, int onionLen, char* keyPtr, int keyLen, char* valPtr, int valLen); #ifdef __cplusplus } #endif