-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCEF_LCL_PostDataElement.inc
87 lines (76 loc) · 2.33 KB
/
CEF_LCL_PostDataElement.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//----------------------------------------
// Copyright © yanghy. All Rights Reserved.
//
// Licensed under Lazarus.modifiedLGPL
//----------------------------------------
procedure PostDataElementRef_Create(var Result: ICefPostDataElement); extdecl;
begin
handleExceptionBegin
Result := TCefPostDataElementRef.New;
handleExceptionEnd
end;
procedure PostDataElementRef_UnWrap(const data: ICefPostDataElement; var Result: ICefPostDataElement); extdecl;
begin
handleExceptionBegin
Result := TCefPostDataElementRef.UnWrap(data.Wrap);
handleExceptionEnd
end;
function PostDataElement_IsReadOnly(const TObj: ICefPostDataElement): LongBool; extdecl;
begin
handleExceptionBegin
Result := TObj.IsReadOnly();
handleExceptionEnd
end;
procedure PostDataElement_SetToEmpty(const TObj: ICefPostDataElement); extdecl;
begin
handleExceptionBegin
TObj.SetToEmpty();
handleExceptionEnd
end;
procedure PostDataElement_SetToFile(const TObj: ICefPostDataElement; const PFileName: PChar); extdecl;
begin
handleExceptionBegin
TObj.SetToFile(PCharToUStr(PFileName));
handleExceptionEnd
end;
procedure PostDataElement_SetToBytes(const TObj: ICefPostDataElement; size: NativeUInt; const bytes: Pointer); extdecl;
begin
handleExceptionBegin
TObj.SetToBytes(size, bytes);
handleExceptionEnd
end;
function PostDataElement_GetType(const TObj: ICefPostDataElement): Integer; extdecl;
begin
handleExceptionBegin
Result := Integer(TObj.GetType);
handleExceptionEnd
end;
function PostDataElement_GetFile(const TObj: ICefPostDataElement): PChar; extdecl;
begin
handleExceptionBegin
Result := PChar(string(TObj.GetFile()));
handleExceptionEnd
end;
function PostDataElement_GetBytesCount(const TObj: ICefPostDataElement): NativeUInt; extdecl;
begin
handleExceptionBegin
Result := TObj.GetBytesCount();
handleExceptionEnd
end;
function PostDataElement_GetBytes(const TObj: ICefPostDataElement; size: NativeUInt; var bytes: Pointer): NativeUInt; extdecl;
begin
handleExceptionBegin
Result := TObj.GetBytes(size, bytes);
handleExceptionEnd
end;
exports
PostDataElementRef_Create,
PostDataElementRef_UnWrap,
PostDataElement_IsReadOnly,
PostDataElement_SetToEmpty,
PostDataElement_SetToFile,
PostDataElement_SetToBytes,
PostDataElement_GetType,
PostDataElement_GetFile,
PostDataElement_GetBytesCount,
PostDataElement_GetBytes;