----------------------------------------------------------------------------- -- -- libwww-ada95 : A World Wide Web client library for Ada95 -- -- W W W . F I E L D _ N A M E S -- -- S p e c -- -- Copyright (C) 1997-1998 Regents of the University of California -- -- libwww-ada95 is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the Free -- Software Foundation, with or without the single exception listed below; -- either version 2, or (at your option) any later version. libwww-ada95 is -- distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; -- without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -- PARTICULAR PURPOSE. See the GNU General Public License for more details. -- You should have received a copy of the GNU General Public License -- distributed with libwww-ada95; see the file COPYING. If not, write to the -- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -- -- As a special exception, if other files instantiate generics from this -- library, or you link this library with other files to produce an -- executable, this library does not by itself cause the resulting -- executable to be covered by the GNU General Public License. This -- exception does not however invalidate any other reasons why the -- executable file might be covered by the GNU General Public License. -- -- Created in 1997 by Kari Nies ----------------------------------------------------------------------------- with Ada.Strings.Unbounded; package WWW.Field_Names is package UB_Strings renames Ada.Strings.Unbounded; subtype UB_String is UB_Strings.Unbounded_String; -- hypens replace with underscores -- Ada95 reserved prepended with X type Field_Name is ( -- General Fields Cache_Control, Connection, Date, XPragma, Transfer_Encoding, Upgrade, Via, -- Request Fields XAccept, Accept_Charset, Accept_Encoding, Accept_Language, Authorization, From, Host, If_Modified_Since, If_Match, If_None_Match, If_Range, If_Unmodified_Since, Max_Forwards, Proxy_Authorization, XRange, Referer, User_Agent, -- Response Fields Age, Location, Proxy_Authenticate, Public, Retry_After, Server, Vary, Warning, WWW_Authenticate, -- Entity Fields Allow, Content_Base, Content_Encoding, Content_Language, Content_Length, Content_Location, Content_MD5, Content_Range, Content_Type, ETag, Expires, Last_Modified, -- unknown Unknown ); subtype General_Fields is Field_Name range Cache_Control .. Via; subtype Request_Fields is Field_Name range XAccept .. User_Agent; subtype Response_Fields is Field_Name range Age .. WWW_Authenticate; subtype Entity_Fields is Field_Name range Allow .. Last_Modified; function Parse_Field_Name (FN_Str : UB_String) return Field_Name; function Field_Name_2_Id (FN : Field_Name) return NATURAL; end WWW.Field_Names;