/* Code generated by cmd/cgo; DO NOT EDIT. */

/* package command-line-arguments */


#line 1 "cgo-builtin-export-prolog"

#include <stddef.h>

#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_;
extern size_t _GoStringLen(_GoString_ s);
extern const char *_GoStringPtr(_GoString_ s);
#endif

#endif

/* Start of preamble from import "C" comments.  */





#line 3 "im.go"

#include <stdint.h>

#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_t GoUintptr;
typedef float GoFloat32;
typedef double GoFloat64;
#ifdef _MSC_VER
#if !defined(__cplusplus) || _MSVC_LANG <= 201402L
#include <complex.h>
typedef _Fcomplex GoComplex64;
typedef _Dcomplex GoComplex128;
#else
#include <complex>
typedef std::complex<float> GoComplex64;
typedef std::complex<double> GoComplex128;
#endif
#else
typedef float _Complex GoComplex64;
typedef double _Complex GoComplex128;
#endif

/*
  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


// 向SDK设置自定义的CoinType 和 前缀
//
extern void SetCoinTypeCustom(long long coinType, char* addrPre);

// 初始化设置生成配置文件，addpre等等
//
extern char* InitV2(char* conf, char* addrpre, char* pwd, char* impwd);
extern char* InitV3(char* conf, char* addrpre, char* prk);

// 检查是否升级CoinType
//
extern char* CheckUpgradePreAndCoinType(char* conf, char* addrpre);

// 升级CoinType
//
extern char* UpgradePreAndCoinType(char* conf, char* newaddrpre, long long newcoinType, char* pwd, char* imprik);

// 设置im日志等级 0-7, 3 error 4 waring 6 info 7 debug
//
extern void SetLogLevel(long level);

// 检查钱包密码是否正确
//
extern char* CheckPassword(char* password);

// 导出助记词
//
extern char* ExportMnemonic(char* pwd);

// 导入助记词
//
extern char* ImportMnemonicV2(char* pwd, char* impwd, char* minerpwd, char* word);

// 创建新的钱包地址
//
extern char* CreateNewAddrV1(char* password, long walletIndex);

// 获取所有钱包地址
//
extern char* GetAllAddr(long walletIndex);

// 关闭本次area链接（IM使用）
//
extern void Close(void);

// 获取本节点信息
//
extern char* GetNodeId(void);
extern char* GetHash(char* str);

// 检查当前area是否在线
//
extern char* CheckOnline(void);

// 重连P2P
//
extern char* ReConnect(void);

// 获取当前版本（这个地方是写死的，没啥用）
//
extern char* Version(void);
extern char* GetPukBase58StrByAddr(char* addr, char* pwd, long walletIndex);
extern char* GetPukBase58StrByPrikIndex(char* pwd, long prikIndex);
extern char* ResetWalletPassword(char* oldPwd, char* newPwd);
extern char* BuildNetAddrByMnemonic(char* word);
extern char* GetUserAuth(void);

// 生成DH密钥对
//
extern char* GenerateDHPair(void);

// 获取HTTP加密DH客户端公钥
//
extern char* GetHTTPDHKeyPublicKey(void);

// HTTP加密
//
extern void EncryptHTTPData(long long port, char* data);

// HTTP解密
//
extern void DecryptHTTPData(long long port, char* data);
extern void StartWsClient(char* serverServer, char* cloudServer);
extern char* SendMsgOfWs(char* data);
extern void ReceiveMsgOfWs(void);
extern void InitCallBack(GoInt64 port);
extern char* StartWalletConn(char* walletServer);
extern char* StartExchangeConn(char* exchangeServer);
extern char* CloseWalletConn(void);
extern char* CloseCloudConn(void);
extern char* CloseExchangeConn(void);
extern char* CheckWsConnState(void);
extern char* CreateOfflineContractTx(char* keyStorePath, long walletIndex, char* srcaddress, char* address, char* pwd, char* comment, char* amount, char* gas, char* frozenHeight, char* gasPrice, char* nonce, char* currentHeight, char* domain, char* domainType, char* abi, char* source);
extern char* CreateOfflineContractTxWithGasPay(char* keyStorePath, long walletIndex, char* srcaddress, char* address, char* pwd, char* comment, char* amount, char* gas, char* frozenHeight, char* gasPrice, char* nonce, char* currentHeight, char* domain, char* domainType, char* abi, char* source, char* gasPayAddress);

// 针对移动端的构建交易（包含普通交易和合约交易）
//
extern char* BuildOfflineTx(char* keyStorePath, long walletIndex, char* pwd, char* nonce, char* currentHeight, char* frozenHeight, char* domainType, char* domain, char* tag, char* jsonData);
extern char* BuildOfflineTxByPirkIndex(char* keyStorePath, long prikIndex, char* pwd, char* nonce, char* currentHeight, char* frozenHeight, char* domainType, char* domain, char* tag, char* jsonData);

// 检查钱包地址是否合法
//
extern char* CheckWalletIsLegality(char* addr);

// 授权 取消授权
//
extern char* CreateOfflineTxBuildAddressBind(char* keyStorePath, long walletIndex, char* srcaddress, char* bindaddress, char* bindType, char* gas, char* frozenHeight, char* nonceInt, char* currentHeight, char* pwd, char* domain, char* domainType, char* comment);

// 添加地址
//
extern char* AddWalletCoinAddress(long port, long walletIndex, long addressIndex, char* pwd, char* nickName);

// 导入私钥
//
extern char* ImportPrivateKey(long port, char* passwd, char* prk, char* chain, char* segwitType, char* nickName);
extern char* DeletePrivateKey(long port, char* passwd, long index);

// 添加钱包 不生成地址
//
extern char* AddWallet(long port, char* pwd, char* nickName);
extern char* DeleteWallet(long port, char* pwd, long walletIndex);

// 导入助记词 不生成地址
//
extern char* AddWalletImportMnemonic(long port, char* pwd, char* nickName, char* word);
extern char* ExportPrivateKey(long port, char* passwd, char* chain, char* segwitType, long walletIndex, long addressIndex);
extern char* CreateAddrFromPri(char* prk, char* chain, char* segwitType);
extern char* GetPrivIndex(void);
extern char* SignTx(long port, char* unSignTx, char* to, char* amount, char* coinType, char* fee, long walletIndex, long addressIndex, char* passwd, char* chain, char* segwitType, char* maxPriority, char* maxFee, long gasLimit, long frozenTime, char* contractAddress, long decimals);
extern char* OfflineSign(long port, char* unSignTx, long walletIndex, long addressIndex, char* passwd, char* chain);

// 使用USDT购买云储存空间之前的授权
//
extern char* ApproveUsdtForBuySpace(long port, char* chain, char* passwd, char* amount, char* gas, long walletIndex, long addressIndex);

// 使用USDT兑换USR之前的授权
//
extern char* ApproveUsdtForSwapUsr(long port, char* chain, char* passwd, char* amount, char* gas, long walletIndex, long addressIndex);
extern char* Deposit(long port, char* chain, char* passwd, char* amount, char* addr, char* gas, long walletIndex, long addressIndex);
extern char* BuySpace(long port, char* chain, char* passwd, char* amount, char* gas, char* netId, char* orderId, char* packageId, long walletIndex, long addressIndex);
extern char* FreezeTrx(long port, char* fromAddr, char* passwd, char* resource, char* amount, long walletIndex, long addressIndex);
extern char* UnfreezeTrx(long port, char* fromAddr, char* passwd, char* resource, char* amount, long walletIndex, long addressIndex);
extern char* WithdrawExpireUnfreezeTrx(long port, char* fromAddr, char* passwd, long walletIndex, long addressIndex);
extern char* ExportWalletMnemonic(long port, long walletIndex, char* pwd);
extern char* InitWallet(char* jsonStr);
extern char* SwitchNetwork(long network);
extern void UsdtWithdraw(long port, long walletIndex, long addressIndex, char* passwd, char* chain, char* amount, char* toAddr, char* orderId, char* walletAddr, char* gas);
extern void WithdrawApprove(long port, long walletIndex, long addressIndex, char* passwd, char* amount, char* walletAddr, char* gas);

/*
//export RunServer
func RunServer() *C.char {
	engine.Log.Error("RunServer")
	return C.CString(im.RunServer())
}
*/
extern char* SetP2pPort(char* port);
extern void RunP2p(long long port, char* remoteaddr, char* nodeAddr, char* devName, char* runEnv, char* ProxyNodeInfo);
extern char* RunP2pByPrk(char* conf, char* remoteaddr, char* prk);
extern char* GroupId(void);
extern char* GetMegHash(long msgid, char* tonodeid, char* msgstr);
extern char* GetTime(void);
extern char* UpdateIsAllRead(long needRead);
extern char* GetMachineId(char* content);
extern char* GetServerTime(char* content);
extern char* GetGroupPasswd(char* content);
extern char* SetAreaName(char* content);
extern void UpdateGroupMemberCallback(char* gid);

/*
//export AddWhiteList
func AddWhiteList(content *C.char) {
	engine.Log.Error("AddWhiteList")
	im.AddWhiteList(C.GoString(content))
}
*/
extern char* CheckImPassword(char* password);
extern char* UpdateImPwd(char* oldpwd, char* newpwd);
extern char* ExportImPrivateKey(char* pwd);
extern char* SetServerPort(char* port);
extern char* SetAllProxy(char* content, char* id, char* ip, long port, char* ProxyNodeInfo);
extern void SetWSMessagePort(long port);
extern void StartWSMessageServer(void);
extern void StartGetMessage(void);
extern char* LoadInitData(char* content);

/*
//export MessageDataRecv
func MessageDataRecv(content *C.char) *C.char {
	engine.Log.Error("MessageDataRecv")
	return C.CString(im.MessageDataRecv(C.GoString(content)))
}
*/
extern void InitDartApi(void* api);
extern void SetMsgSendPort(GoInt64 port);
extern void CleanMessageStructMemory(GoInt64 ptrAddr);
extern void CleanMessageStructMemoryByPort(GoInt64 ptrAddr);
extern char* StatMessageStructMemory(void);
extern char* CgoHandleStat(void);
extern char* GetMsgByCgoHandle(GoUintptr handleVal);
extern void CleanCgoHandleByPort(long long port);
extern char* ClearLoginInfo(void);
extern char* SetAreaConnType(char* connType);

/*
//export SetReadMsgDelVersion
func SetReadMsgDelVersion(connType *C.char) *C.char {
	engine.Log.Error("SetReadMsgDelVersion")
	return C.CString(im.SetReadMsgDelVersion(C.GoString(connType)))
}

//export SetBlockStranger
func SetBlockStranger(connType *C.char) *C.char {
	engine.Log.Error("SetBlockStranger")
	return C.CString(im.SetBlockStranger(C.GoString(connType)))
}

//export GetAllOnlineMachine
func GetAllOnlineMachine(msgid C.long, content *C.char) *C.char {
	engine.Log.Error("GetAllOnlineMachine")
	return C.CString(im.GetAllOnlineMachine(int64(msgid), C.GoString(content)))
}

//export CloseOnlineMachine
func CloseOnlineMachine(msgid C.long, addr *C.char, machine *C.char) *C.char {
	engine.Log.Error("CloseOnlineMachine")
	return C.CString(im.CloseOnlineMachine(int64(msgid), C.GoString(addr), C.GoString(machine)))
}

//export CloseOnlineMachineV2
func CloseOnlineMachineV2(msgid C.long, machine *C.char, cType C.long, version C.long, isDel *C.char) *C.char {
	engine.Log.Error("CloseOnlineMachineV2")
	return C.CString(im.CloseOnlineMachineV2(int64(msgid), C.GoString(machine), int64(cType), int64(version), C.GoString(isDel)))
}

//export OnlineMachineRcv
func OnlineMachineRcv(cmd C.long, hash *C.char) *C.char {
	engine.Log.Error("OnlineMachineRcv")
	return C.CString(im.OnlineMachineRcv(int64(cmd), C.GoString(hash)))
}

//export OnlineMachineRcvV2
func OnlineMachineRcvV2(cmd C.long, hash *C.char, isDel *C.char) *C.char {
	engine.Log.Error("OnlineMachineRcvV2")
	return C.CString(im.OnlineMachineRcvV2(int64(cmd), C.GoString(hash), C.GoString(isDel)))
}
*/
extern char* AddressCoinToEvmAddress(char* addr);
extern char* EvmAddressToAddressCoin(char* addr);

////export AuthLogin
//func AuthLogin(toAddr *C.char, toCurPuk *C.char, P2pProxyId *C.char, P2pMachineId *C.char, devName *C.char, body *C.char, method C.long, closeMachineId *C.char) *C.char {
//	return C.CString(im.AuthLogin(C.GoString(toAddr), C.GoString(toCurPuk), C.GoString(P2pProxyId), C.GoString(P2pMachineId), C.GoString(devName), C.GoString(body), int32(method), C.GoString(closeMachineId)))
//}
/*
//export AuthLogin
func AuthLogin(proxy *C.char, toCurPuk *C.char) *C.char {
	engine.Log.Error("AuthLogin")
	return C.CString(im.AuthLogin(C.GoString(proxy), C.GoString(toCurPuk)))
}

//export SetMainDevice
func SetMainDevice(proxy *C.char) *C.char {
	engine.Log.Error("SetMainDevice")
	return C.CString(im.SetMainDevice(C.GoString(proxy)))
}
*/
extern char* SignatureStr(char* str);
extern char* SignVerificationStr(char* edpuk, char* msg, char* sigMsg);

/*
//export SaveDeviceData
func SaveDeviceData(port C.longlong, proxy *C.char) {
	engine.Log.Error("SaveDeviceData")
	callback := func(port int64, msg string) {
		engine.Log.Error("SaveDeviceData SendToPort port: %d, msg: %v", port, msg)
		SendToPort(port, msg)
	}
	go func() {
		result := im.SaveDeviceData(C.GoString(proxy))
		callback(int64(port), result)
	}()
}

//export BindTempDev
func BindTempDev(proxy *C.char) *C.char {
	engine.Log.Error("BindTempDev")
	return C.CString(im.BindTempDev(C.GoString(proxy)))
}

//export SendP2pMsgToNode
func SendP2pMsgToNode(port C.longlong, recvId *C.char, machineId *C.char, data *C.char) {
	engine.Log.Error("SendP2pMsgToNode")
	go func() {
		result := im.SendP2pMsgToNode(C.GoString(recvId), C.GoString(machineId), C.GoString(data))
		SendToPort(int64(port), result)
	}()
	//return C.CString(im.SendP2pMsgToNode(C.GoString(recvId), C.GoString(machineId), C.GoString(data)))
}

//export SendMediaMsgToNode
func SendMediaMsgToNode(port C.longlong, data *C.char) {
	engine.Log.Error("SendP2pMsgToNode")
	go func() {
		result := im.SendMediaMsgToNode(C.GoString(data))
		SendToPort(int64(port), result)
	}()
	//return C.CString(im.SendMediaMsgToNode(C.GoString(data)))
}
*/
extern char* GetCurProxy(void);
extern char* CreateQR(char* gid);
extern char* EncryptQR(char* str, char* gid, long gidVer);
extern char* DeleteAppGs(char* gid);
extern char* SetEncryptData(char* key, char* pwd, char* value);
extern char* GetEncryptData(char* key, char* pwd);
extern char* DelEncryptData(char* key);

/*
//export GetCommonDatabase
func GetCommonDatabase(content *C.char) *C.char {
	engine.Log.Error("GetCommonDatabase")
	return C.CString(im.GetCommonDatabaseFunc(C.GoString(content)))
}

//export SetCommonDatabase
func SetCommonDatabase(content *C.char) *C.char {
	engine.Log.Error("SetCommonDatabase")
	return C.CString(im.SetCommonDatabaseFunc(C.GoString(content)))
}
*/
extern char* GetActivityNum(char* req, char* addr);
extern char* GetActivityRank(char* req, char* addr);
extern char* GetDatabaseToken(char* req, char* addr);
extern char* CommonDatabaseRequest(long msgID, char* req, char* addr);
extern char* AddTransfer(char* req, char* addr);
extern char* GetTransfer(char* req, char* addr);
extern char* GetTransferEveryDayNum(char* req, char* addr);
extern char* GetProducts(char* addr, char* req);
extern char* CheckinToken(char* req, char* addr);
extern void InitLedisDb(char* dir);

/*
//export AddErrLog
func AddErrLog(addTime C.longlong, ver C.longlong, project *C.char, file *C.char, funcName *C.char, user *C.char, errLog *C.char, other *C.char) *C.char {
	engine.Log.Error("AddErrLog")
	ok := im.AddErrLog(int64(addTime), int64(ver), C.GoString(project), C.GoString(file), C.GoString(funcName), C.GoString(user), C.GoString(errLog), C.GoString(other))
	if ok {
		return C.CString(utils.Out(config.OutStatusOK, "ok"))
	}
	return C.CString(utils.Out(config.OutStatusFail, "fail"))
}
*/
/*
//export GetErrLog
func GetErrLog() *C.char {
	engine.Log.Error("GetErrLog")
	data, err := im.GetErrLog()
	if err != nil {
		return C.CString(utils.Out(config.OutStatusFail, "fail"))
	}
	bs, _ := json.Marshal(data)
	return C.CString(utils.Out(config.OutStatusOK, string(bs)))
}
*/
extern char* DelErrLog(long long min, long long max);
extern char* UnzipErrLog(char* str);
extern void Ping(long long port, char* str, char* ProxyNodeStr);
extern char* SavePriInfo(char* str);
extern char* GetPriInfo(char* str);
extern char* DelPriInfo(void);

/*
//export GetGroupMemberList
func GetGroupMemberList(str *C.char) *C.char {
	engine.Log.Error("GetGroupMemberList")
	return C.CString(im.GetGroupMemberList(C.GoString(str)))
}

//export RecoveryMsgByFileContent
func RecoveryMsgByFileContent(str *C.char) *C.char {
	engine.Log.Error("RecoveryMsgByFileContent")
	return C.CString(im.RecoveryMsgByFileContent(C.GoString(str)))
}
*/
extern char* EncryptContent(char* key, char* content);
extern char* DecryptContent(char* key, char* content);

/*
//export AddImCommonData
func AddImCommonData(key, value, dataType *C.char, version C.long) *C.char {
	engine.Log.Error("AddImCommonData")
	return C.CString(im.AddCommonData(C.GoString(key), C.GoString(value), C.GoString(dataType), int64(version)))
}

//export DelImCommonData
func DelImCommonData(key *C.char, version C.long) *C.char {
	engine.Log.Error("DelImCommonData")
	return C.CString(im.DelCommonData(C.GoString(key), int64(version)))
}

//export GetImCommonData
func GetImCommonData(key *C.char) *C.char {
	engine.Log.Error("GetCommonData")
	return C.CString(im.GetCommonData(C.GoString(key)))
}

//export NoticeConfig
func NoticeConfig(port C.longlong, data *C.char) {
	engine.Log.Error("NoticeConfig")
	callback := func(port int64, msg string) {
		engine.Log.Error("NoticeConfig SendToPort port: %d, msg: %v", port, msg)
		SendToPort(port, msg)
	}
	go func() {
		result := im.NoticeConfig(C.GoString(data))
		callback(int64(port), result)
	}()
	//return C.CString(im.NoticeConfig(C.GoString(data)))
}
*/
extern char* GetConnStatus(void);
extern void OssIsExit(long long port, char* param);
extern void ExitAccount(void);
extern void SetTestFlag(void);
extern void MessageResp(char* key);
extern void UpdateUserInfoV2(long long port, uint8_t* content, long len);
extern void QueryUser(long long port, uint8_t* content, long len);
extern void SingleChat(long long port, uint8_t* content, long len);
extern void SingleDelByid(long long port, uint8_t* content, long len);
extern void SingleDelAll(long long port, uint8_t* content, long len);
extern void GroupChat(long long port, uint8_t* content, long len);
extern void GroupDelByid(long long port, uint8_t* content, long len);
extern void GroupDelAll(long long port, uint8_t* content, long len);
extern void SingleDelSection(long long port, uint8_t* content, long len);
extern void SingleSend(long long port, uint8_t* content, long len);
extern void SingleRead(long long port, uint8_t* content, long len);
extern void SingleWithdraw(long long port, uint8_t* content, long len);
extern void GetSingleChatMsg(long long port, uint8_t* content, long len);
extern void AddContact(long long port, uint8_t* content, long len);
extern void BlockContact(long long port, uint8_t* content, long len);
extern void RemoveBlockContact(long long port, uint8_t* content, long len);
extern void DeleteContact(long long port, uint8_t* content, long len);
extern void RemarkContact(long long port, uint8_t* content, long len);
extern void DisturbContact(long long port, uint8_t* content, long len);
extern void RequestAddContact(long long port, uint8_t* content, long len);
extern void QueryContactInfo(long long port, uint8_t* content, long len);
extern void ReplyRequestAddContact(long long port, uint8_t* content, long len);
extern void HandleRequestAddContact(long long port, uint8_t* content, long len);
extern void UpdatePinneMesList(long long port, uint8_t* content, long len);
extern void UpdateContactConf(long long port, uint8_t* content, long len);
extern void AddDevice(long long port, uint8_t* content, long len);
extern void UpdateDevice(long long port, uint8_t* content, long len);
extern void DeleteDevice(long long port, uint8_t* content, long len);
extern void DeviceInfo(long long port, uint8_t* content, long len);
extern void OutLineOtherDev(long long port, uint8_t* content, long len);
extern void UpdateNoticeVoiceConfig(long long port, uint8_t* content, long len);
extern char* GetCountryCode(char* ip);
extern void CreateGroup(long long port, uint8_t* content, long len);
extern void UpdateGroupName(long long port, uint8_t* content, long len);
extern void UpdateGroupHeadUrl(long long port, uint8_t* content, long len);
extern void UpdateGroupIntroduction(long long port, uint8_t* content, long len);
extern void AddGroupMember(long long port, uint8_t* content, long len);
extern void RemoveGroupMember(long long port, uint8_t* content, long len);
extern void UpdateGroupMemberName(long long port, uint8_t* content, long len);
extern void DissolveGroup(long long port, uint8_t* content, long len);
extern void QueryGroup(long long port, uint8_t* content, long len);
extern void ApplyGroup(long long port, uint8_t* content, long len);
extern void UpdateGroupMemberRole(long long port, uint8_t* content, long len);
extern void UpdateGroupConf(long long port, uint8_t* content, long len);
extern void GroupTransfer(long long port, uint8_t* content, long len);
extern void ExitGroup(long long port, uint8_t* content, long len);
extern void UpdateGroupPinneMesList(long long port, uint8_t* content, long len);
extern void GroupDelSection(long long port, uint8_t* content, long len);
extern void GroupWithdraw(long long port, uint8_t* content, long len);
extern void GetGroupChatMsg(long long port, uint8_t* content, long len);
extern void P2pMsgData(long long port, uint8_t* content, long len);
extern char* GetSingleOfflineMsgBody(uint8_t* content, long len);
extern char* GetGroupOfflineMsgBody(uint8_t* content, long len);
extern void AddFavoriteContent(long long port, uint8_t* content, long len);
extern void UpdateFavoriteContent(long long port, uint8_t* content, long len);
extern void DelFavoriteContent(long long port, uint8_t* content, long len);
extern void AddFavoriteFolder(long long port, uint8_t* content, long len);
extern void DelFavoriteFolder(long long port, uint8_t* content, long len);
extern void UpdateFavoriteFolder(long long port, uint8_t* content, long len);
extern void GetFavoriteFolders(long long port, uint8_t* content, long len);
extern void GetFavoriteAllFolders(long long port, uint8_t* content, long len);
extern void CreateSecretRooms(long long port, uint8_t* content, long len);
extern void UpdateSecretRoomPwd(long long port, uint8_t* content, long len);
extern void UpdateSecretRoomName(long long port, uint8_t* content, long len);
extern void DelSecretRoom(long long port, uint8_t* content, long len);
extern void SetValidityPeriod(long long port, uint8_t* content, long len);
extern void AddContactToSecRoom(long long port, uint8_t* content, long len);
extern void DelContactOutSecRoom(long long port, uint8_t* content, long len);
extern void UpdateSecRoomHide(long long port, uint8_t* content, long len);

/* Return type for GetByteByCgoHandle */
struct GetByteByCgoHandle_return {
	uint8_t* r0; /* content */
	long r1; /* len */
};
extern struct GetByteByCgoHandle_return GetByteByCgoHandle(GoUintptr handleVal);
extern void EchoCgoByteFunc(long long port, uint8_t* content, long lenth, long typed, long min, long max);
extern char* RunCloudStoreP2p(char* ip, char* netId, char* confStr, long long port);
extern char* CheckCloudP2p(void);
extern char* GetStorageConf(void);
extern char* SetCloudProxy(char* ip);
extern void UploadFileTaskByPlatform(char* path, char* extend, char* thumb, char* pwd, char* taskID, char* platform);
extern void UploadFileTaskByPlatformV2(char* path, char* extend, char* thumb, char* pwd, char* taskID, char* folderID, char* videoResolution, int platform);
extern char* DownloadFile(char* hash, char* rePath, char* taskID, char* absPath, char* pwd, long long port);
extern char* GetFileInfo(char* hash, long long port);
extern char* SetKeyValue(char* key, char* value, long long port);
extern char* AsyncSetKeyValue(char* content);
extern char* GetKeyValue(char* key, long long port);
extern char* AsyncGetKeyValue(char* content);
extern char* SetKeyValueByCategory(char* category, char* key, char* value);
extern char* GetKeyValueByCategory(char* category, char* key, long long port);
extern void GetAllDownloadProcessTask(char* taskID);
extern char* MoveFile(char* oldCategory, char* newCategory, char* key);
extern char* DelFile(char* category, char* hash);
extern char* RenameFile(char* category, char* name, char* hash, long long port);
extern char* StopDownloadFile(char* taskID);
extern char* DelProcess(char* hash);
extern char* ReUpload(char* hash);
extern char* StopUpload(char* hash);
extern char* SetDownloadFileNum(int num);
extern char* CreateThumbImage(char* path);
extern char* DeleteDownloadFile(char* hash);
extern char* DepositSpaceOfflineSign(char* param);
extern char* GetUserSpaceV2(long long port);
extern char* GetUserSign(char* fileHash);
extern char* TransferCoin(long long index, long long gas, long long gaslimit, char* amount, char* to, char* contractAddress);
extern char* CheckFilePwd(char* hash, char* pwd, long long port);
extern char* CheckFileOwner(char* hash);
extern char* FileCollectionV1(char* hash, char* filePwd, char* userPwd, short platform, char* describe, long long port);
extern char* GetUploadFileInfo(short platform, long long port);
extern char* DelUploadFileV1(char* hash, char* unique, short platform, long long port);
extern char* GetDelFileSign(char* hash, char* unique, short platform);
extern char* AddDownloadProcessHash(char* hash);
extern char* DelDownloadProcessHash(char* hash);
extern char* AddUploadProcessHash(char* hash);
extern char* DelUploadProcessHash(char* hash);
extern char* SetUploadLimit(char* eventData);
extern char* ResetFilePassword(char* hash, char* pwd, long long port);
extern char* GenSharingLink(char* content, long long port);
extern char* GetSharedInfo(char* link, long long port);
extern char* HashSharing(char* content, long long port);
extern void SetKeyValueByCloudChannel(char* key, char* value, char* taskId);
extern void GetKeyValueByCloudChannel(char* key, char* taskId);
extern void DeleteKeyValueByCloudChannel(char* key, char* taskId);
extern void FileCollectionV1ByCloudChannel(char* hash, char* filePwd, char* userPwd, short platform, char* describe, char* taskId);
extern void UploadSinFileByCloudChannel(char* path, char* thumb, short isEncrypt, short isOrigin, short quality, char* taskId);
extern void GetThumbnailByCloudChannel(char* hash, char* password, char* absPath, char* taskId);
extern void GenSharingLinkByCloudChannel(char* content, char* taskId);
extern void GetSharedInfoByCloudChannel(char* link, char* taskId);
extern void DecodeDownloadFile(long long port, char* domain, char* fileHash, char* fPath, char* outDir, char* uPwd);
extern void InitHttpUploadWithCallBack(long long port, char* domain, char* thumbPath, char* fPath, char* outDir, short isEncrypt, short platform, char* callBackUrl);
extern void UploadFileTaskByPlatformV3(char* path, char* extend, char* thumb, char* pwd, char* taskID, short platform, char* callback);
extern void InitHttpUploadWithCallBackV1(long long port, char* domain, char* thumbPath, char* fPath, char* outDir, char* pwd, short platform, char* callBackUrl, char* extend);
extern void InitHttpSocialfiUpload(long long port, char* domain, char* thumbPath, char* fPath, char* outDir, char* pwd, short platform, char* callBackUrl, char* extend, short isTranscode, char* transcodeCallback);

/*
//export Offer
func Offer(content *C.char) *C.char {
	return C.CString(multi_media.OfferV2(C.GoString(content)))
}

//export Answer
func Answer(content *C.char) *C.char {
	return C.CString(multi_media.AnswerV2(C.GoString(content)))
}

//export Candidate
func Candidate(content *C.char) *C.char {
	return C.CString(multi_media.CandidateV2(C.GoString(content)))
}

//export CloseCall
func CloseCall(content *C.char) *C.char {
	defer func() {
		if x := recover(); x != nil {
			utils.Log.Info("CloseCall(content *C.char)33333333333")
		}
	}()
	utils.Log.Info("CloseCall(content *C.char)1111111111")
	s := C.GoString(content)
	utils.Log.Info("CloseCall(content *C.char)22222222222")
	return C.CString(multi_media.CloseCallV2(s))
}

//export GetCallTime
func GetCallTime() *C.char {
	return C.CString(multi_media.GetCallTime())
}

//export TurnInfo
func TurnInfo(content *C.char) *C.char {
	return C.CString(multi_media.TurnInfo(C.GoString(content)))
}

//export GetRealIpByTurn
func GetRealIpByTurn() *C.char {
	return C.CString(multi_media.GetRealIpByTurn())
}
*/
extern void LkGenerateToken(long long port, char* param);
extern void UpdateUserState(char* param);
extern void LkDeleteRoom(char* param);
extern void SetLkUrl(char* url);
extern void InitiateCall(long long port, char* param);
extern void InviteToJoin(char* param);
extern void CancelDialing(void);
extern void LkRoomInfo(long long port, char* param);
extern void LkRoomParticipants(long long port, char* param);
extern void LkLeaveRoom(char* param);
extern char* UploadOssFileV2(long long port, char* localFilePath, char* dir, long isForever, char* encryptFileName);
extern void UploadPreSign(long long port, char* localFilePath, char* dir, long isForever, char* encryptFileName);
extern void DownloadOssFile(long long port, char* localFile, char* targetFile);

/*
//export ReportData
func ReportData(port C.longlong, messageId C.long, data *C.char) *C.char {
	callback := func(port int64, msg string) {
		engine.Log.Error("ReportData SendToPort port: %d, msg: %v", port, msg)
		//SendToPort(port, msg)
		SendToPortByHandle(port, msg)
	}
	return C.CString(im.ReportData(int(port), int(messageId), C.GoString(data), callback))
}
*/
extern void DeCryptFile(long long port, char* filePath, char* targetPath);

#ifdef __cplusplus
}
#endif
