/* Copyright 1997 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /***************************************************/ /* File : URLveneer.h */ /* */ /* Purpose: Veneer to the URL_Fetcher module SWIs. */ /* */ /* Author : A.D.Hodgkinson */ /* */ /* History: 17-Aug-97: Created from Fetch.h. */ /***************************************************/ /* URL module definitions */ #define URL_swibase 0x83e00 #define URL_Register (URL_swibase+0) #define URL_GetURL (URL_swibase+1) #define URL_Status (URL_swibase+2) #define URL_ReadData (URL_swibase+3) #define URL_SetProxy (URL_swibase+4) #define URL_Stop (URL_swibase+5) #define URL_Deregister (URL_swibase+6) #define URL_ParseURL (URL_swibase+7) #define URL_Method_http_GET 1 #define URL_Method_http_HEAD 2 #define URL_Method_http_POST 4 #define URL_Method_http_PUT 8 #define URL_GetURL_AgentGiven (1u<<0) #define URL_Status_Connected 1 #define URL_Status_SentReq 2 #define URL_Status_SentData 4 #define URL_Status_Responded 8 #define URL_Status_Transfer 16 #define URL_Status_Done 32 #define URL_Status_Aborted 64 #define URL_ParseURL_Reason_FindLengths 0 #define URL_ParseURL_Reason_FillBuffers 1 /* Function prototypes */ _kernel_oserror * url_register (unsigned int flags, unsigned int * handle); _kernel_oserror * url_deregister (unsigned int flags, unsigned int handle); _kernel_oserror * url_stop (unsigned int flags, unsigned int handle); _kernel_oserror * url_get_url (unsigned int flags, unsigned int handle, int method, char * url, char ** extradata, unsigned int * status, int mode); _kernel_oserror * url_read_data (unsigned int flags, unsigned int handle, void * buffer, int size, int * status, int * read, int * pending); _kernel_oserror * url_status (unsigned int flags, unsigned int handle, int * status, int * response, int * bytes); _kernel_oserror * url_set_proxy (int flags, unsigned int session, char * baseurl, char * protocol, int noproxy);