3
3
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
4
4
* obtain one at http://mozilla.org/MPL/2.0/
5
5
*
6
- * Copyright (C) 2005-2013 , Peter Johnson (www.delphidabbler.com).
6
+ * Copyright (C) 2005-2014 , Peter Johnson (www.delphidabbler.com).
7
7
*
8
8
* $Rev$
9
9
* $Date$
@@ -166,7 +166,7 @@ implementation
166
166
167
167
168
168
{
169
- Web service notes: codesnip-updt.php v5
169
+ Web service notes: codesnip-updt.php v6
170
170
=======================================
171
171
172
172
This web service enables CodeSnip to check if updated files are available in
@@ -176,13 +176,13 @@ implementation
176
176
cmd=<command> [<params>]
177
177
where <params> is a list of parameters in form param-name=param-value.
178
178
179
- All responses from the v5 service have two parts:
179
+ All responses from the v6 service have two parts:
180
180
+ Successful responses have '0' on first line followed by optional lines of
181
181
data resulting from command.
182
182
+ Error responses have +ve error code on first line and error message on 2nd
183
183
line.
184
184
185
- The web service expects a user agent of "DelphiDabbler-CodeSnip-Updater-v5 "
185
+ The web service expects a user agent of "DelphiDabbler-CodeSnip-Updater-v6 "
186
186
and will return a 403 "Forbidden" error if this is not provided.
187
187
188
188
Table of Commands
@@ -191,42 +191,44 @@ implementation
191
191
+-----------+-------|----------------------+---------------------------------|
192
192
|logon |cmd |"logon" |OK: Stream of news items which |
193
193
| |progid |unique id of program |is ignored |
194
- | |version|program version number|ERROR: CSUPDT_ERR_STDPARAMS if |
195
- | |os |operating system info |required params not provided |
194
+ | |version|program version number|ERROR: CSUPDT_ERR_STDPARAMS (8) |
195
+ | |os |operating system info |if required params not provided |
196
196
| |browser|version of IE browser | |
197
197
| |caller |application defined | |
198
198
| | |string | |
199
199
+-----------+-------+----------------------+---------------------------------+
200
200
|filecount |cmd |"filecount" |OK: Integer indication number of |
201
201
| |progid |unique id of program |files in remote database |
202
- | |version|program version number|ERROR: CSUPDT_ERR_STDPARAMS if |
203
- | | | |required params not provided |
204
- | | | |ERROR: CSUPDT_ERR_LIST if can't |
205
- | | | |list files in database |
202
+ | |version|program version number|ERROR: CSUPDT_ERR_STDPARAMS (8) |
203
+ | | | |if required params not provided |
204
+ | | | |ERROR: CSUPDT_ERR_LIST (2) if |
205
+ | | | |can't list files in database |
206
206
+-----------+-------+----------------------+---------------------------------+
207
207
|lastupdate |cmd |"lastupdate" |OK: Unix time stamp representing |
208
208
| |progid |unique id of program |date on which online database was|
209
209
| |version|program version number|last updated |
210
- | | | |ERROR: CSUPDT_ERR_STDPARAMS if |
211
- | | | |required params not provided |
212
- | | | |ERROR: CSUPDT_ERR_LIST if can't |
213
- | | | |list files in database |
214
- | | | |ERROR: CSUPDT_ERR_NOTFOUND if |
215
- | | | |can't access a file in database |
210
+ | | | |ERROR: CSUPDT_ERR_STDPARAMS (8) |
211
+ | | | |if required params not provided |
212
+ | | | |ERROR: CSUPDT_ERR_LIST (2) if |
213
+ | | | |can't list files in database |
214
+ | | | |ERROR: CSUPDT_ERR_NOTFOUND (7) |
215
+ | | | |if can't access a file in |
216
+ | | | |database |
216
217
+-----------+-------+----------------------+---------------------------------+
217
218
|getdatabase|cmd |"getdatabase" |OK: All files from on-line |
218
219
| |progid |unique id of program |database combined in single |
219
220
| |version|program version number|stream of data. |
220
- | | | |ERROR: CSUPDT_ERR_STDPARAMS if |
221
- | | | |required params not provided |
222
- | | | |ERROR: CSUPDT_ERR_LIST if can't |
223
- | | | |list files in database |
224
- | | | |ERROR: CSUPDT_ERR_NOTFOUND if |
225
- | | | |can't access a file in database |
221
+ | | | |ERROR: CSUPDT_ERR_STDPARAMS (8) |
222
+ | | | |if required params not provided |
223
+ | | | |ERROR: CSUPDT_ERR_LIST (2) if |
224
+ | | | |can't list files in database |
225
+ | | | |ERROR: CSUPDT_ERR_NOTFOUND (7) |
226
+ | | | |if can't access a file in |
227
+ | | | |database |
226
228
+-----------+-------+----------------------+---------------------------------+
227
229
|logoff |cmd |"logoff" |OK: No data |
228
- | |progid |unique id of program |ERRORS: CSUPDT_ERR_STDPARAMS if | |
229
- | |version|program version number|required params not provided |
230
+ | |progid |unique id of program |ERRORS: CSUPDT_ERR_STDPARAMS (8) | |
231
+ | |version|program version number|if required params not provided |
230
232
+-----------+-------+----------------------+---------------------------------+
231
233
If any other command (or no command) is specified then error code
232
234
CSUPDT_ERR_CMD (1) is returned.
@@ -236,7 +238,7 @@ implementation
236
238
const
237
239
// Web service info
238
240
cScriptURLTplt = ' http://%s/websvc/codesnip-updt' ;
239
- cUserAgent = ' DelphiDabbler-CodeSnip-Updater-v5 ' ;
241
+ cUserAgent = ' DelphiDabbler-CodeSnip-Updater-v6 ' ;
240
242
241
243
242
244
resourcestring
0 commit comments