/* 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 : URLstat.h */ /* */ /* Purpose: Small source file to cope with the */ /* fetch status structures, 'urlstat'. */ /* Historically created when Fetch.c was */ /* split up on 17-Aug-97, and more than */ /* one source file suddenly needed to be */ /* able to deal with the structures. */ /* */ /* Author : A.D.Hodgkinson */ /* */ /* History: 17-Aug-97: Created. */ /***************************************************/ /* Structures */ typedef struct urlstat { int session; /* the fetch session handle */ int fetched; /* flag indicates we have got at least one byte so far */ void * context; /* parser context pointer */ HStream * stream; /* pointer to the token stream */ HStream * lasttoken; /* pointer to the last token returned */ unsigned int fetching :1; /* flag indicates we are still fetching */ unsigned int identified:1; /* the stream has been identified */ unsigned int authorised:2; /* authorise: 0=not done, 1=doing, 2=done */ unsigned int allowparse:1; /* whether to allow HTMLLib to parse this URL */ int method; /* the method used to fetch */ char * extradata; /* the extra data associated with this url */ int type; /* type from HtmlIdentify */ struct urlstat * next; } urlstat; /* Function prototypes */ _kernel_oserror * urlstat_add_entry (int report_num, urlstat ** new_urlstat); int urlstat_remove_entry (urlstat * remove); urlstat * urlstat_find_entry (int session);