-
Notifications
You must be signed in to change notification settings - Fork 7
/
VK.Components.pas
215 lines (198 loc) · 5.97 KB
/
VK.Components.pas
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
unit VK.Components;
interface
uses
System.SysUtils, System.Classes, VK.API, VK.Types, VK.GroupEvents,
VK.UserEvents;
type
[ComponentPlatformsAttribute(pidAllPlatforms)]
TVK = class(TCustomVK)
published
property APIVersion; // readonly
property AppID; // default empty
property AppKey; // default empty
property BaseURL; // default 'https://api.vk.com/method';
property EndPoint; // default 'https://oauth.vk.com/authorize';
property Lang default TVkLang.Auto;
property Logging default False;
property LogResponse default False;
property OnAuth;
property OnCaptcha;
property OnConfirm;
property OnError;
property OnLog;
property OnLogin;
property OnNeedGeoLocation;
property Permissions nodefault; // default 'groups,friends,wall,photos,video,docs,notes,market';
property Proxy;
property ServiceKey; // default empty
property TestMode default False;
property Token;
property UseServiceKeyOnly default False;
property RequestLimit default 3;
end;
[ComponentPlatformsAttribute(pidAllPlatforms)]
TVkUserEvents = class(TCustomUserEvents)
private
function GetActualVersion: string;
published
property ActualVersion: string read GetActualVersion;
/// <description>
/// События вызываются асинхронно (без синхронизации)
/// </description>
property Async default False;
property Logging default False;
property OnChangeConversationMajorId;
property OnChangeConversationMinorId;
property OnChangeDialogFlags;
property OnChangeMessageFlags;
property OnChatChanged;
property OnChatChangeInfo;
property OnCountChange;
property OnDeleteMessages;
property OnEditMessage;
property OnNewMessage;
property OnNotifyChange;
property OnReadMessages;
property OnRecoverMessages;
property OnUnhandledEvents;
property OnUserCall;
property OnUserOffline;
property OnUserOnline;
property OnUsersRecording;
property OnUsersTyping;
property OnUserTyping;
property Version;
property VK;
end;
[ComponentPlatformsAttribute(pidAllPlatforms)]
TVkGroupEvents = class(TCustomGroupEvents)
private
function GetActualVersion: string;
published
property ActualVersion: string read GetActualVersion;
property Async default False;
property GroupID default 0;
property Logging default False;
property OnAudioNew;
property OnBoardPostDelete;
property OnBoardPostEdit;
property OnBoardPostNew;
property OnBoardPostRestore;
property OnGroupAppPayload;
property OnGroupChangePhoto;
property OnGroupChangeSettings;
property OnGroupJoin;
property OnGroupLeave;
property OnGroupOfficersEdit;
property OnGroupPayTransaction;
property OnGroupPollVoteNew;
property OnGroupUnhandledEvents;
property OnMarketCommentDelete;
property OnMarketCommentEdit;
property OnMarketCommentNew;
property OnMarketCommentRestore;
property OnMessageAllow;
property OnMessageDeny;
property OnMessageEdit;
property OnMessageNew;
property OnMessageReply;
property OnMessageTypingState;
property OnPhotoCommentDelete;
property OnPhotoCommentEdit;
property OnPhotoCommentNew;
property OnPhotoCommentRestore;
property OnPhotoNew;
property OnUserBlock;
property OnUserUnBlock;
property OnVideoCommentDelete;
property OnVideoCommentEdit;
property OnVideoCommentNew;
property OnVideoCommentRestore;
property OnVideoNew;
property OnWallPostNew;
property OnWallReplyDelete;
property OnWallReplyEdit;
property OnWallReplyNew;
property OnWallReplyRestore;
property OnWallRepost;
property Version;
property VK;
end;
[ComponentPlatformsAttribute(pidAllPlatforms)]
TVkGroupEventsController = class(TCustomGroupEventControl)
private
function GetActualVersion: string;
published
property ActualVersion: string read GetActualVersion;
property Groups;
property Logging default False;
property OnAudioNew;
property OnBoardPostDelete;
property OnBoardPostEdit;
property OnBoardPostNew;
property OnBoardPostRestore;
property OnGroupAppPayload;
property OnGroupChangePhoto;
property OnGroupChangeSettings;
property OnGroupJoin;
property OnGroupLeave;
property OnGroupOfficersEdit;
property OnGroupPayTransaction;
property OnGroupPollVoteNew;
property OnGroupUnhandledEvents;
property OnMarketCommentDelete;
property OnMarketCommentEdit;
property OnMarketCommentNew;
property OnMarketCommentRestore;
property OnMessageAllow;
property OnMessageDeny;
property OnMessageEdit;
property OnMessageNew;
property OnMessageReply;
property OnMessageTypingState;
property OnPhotoCommentDelete;
property OnPhotoCommentEdit;
property OnPhotoCommentNew;
property OnPhotoCommentRestore;
property OnPhotoNew;
property OnUserBlock;
property OnUserUnBlock;
property OnVideoCommentDelete;
property OnVideoCommentEdit;
property OnVideoCommentNew;
property OnVideoCommentRestore;
property OnVideoNew;
property OnWallPostNew;
property OnWallReplyDelete;
property OnWallReplyEdit;
property OnWallReplyNew;
property OnWallReplyRestore;
property OnWallRepost;
property Version;
property VK;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('VK API HGM', [TVK]);
RegisterComponents('VK API HGM', [TVkUserEvents]);
RegisterComponents('VK API HGM', [TVkGroupEvents]);
RegisterComponents('VK API HGM', [TVkGroupEventsController]);
end;
{ TVkUserEvents }
function TVkUserEvents.GetActualVersion: string;
begin
Result := TVK.Version;
end;
{ TVkGroupEvents }
function TVkGroupEvents.GetActualVersion: string;
begin
Result := TVK.Version;
end;
{ TVkGroupEventsController }
function TVkGroupEventsController.GetActualVersion: string;
begin
Result := TVK.Version;
end;
end.