/usr/share/ada/adainclude/aws/soap-parameters.ads is in libaws3.3.2-dev 3.3.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | ------------------------------------------------------------------------------
-- Ada Web Server --
-- --
-- Copyright (C) 2000-2014, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
-- Free Software Foundation; either version 3, or (at your option) any --
-- later version. This library 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are --
-- granted additional permissions described in the GCC Runtime Library --
-- Exception, version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit 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 Public License. --
------------------------------------------------------------------------------
pragma Ada_2012;
with Ada.Calendar;
with Ada.Strings.Unbounded;
with SOAP.Types;
package SOAP.Parameters is
use Ada.Strings.Unbounded;
Data_Error : exception renames Types.Data_Error;
Max_Parameters : constant := 50;
-- This is the maximum number of parameters supported by this
-- implementation.
type List is private;
function Argument_Count (P : List) return Natural with
Post => Argument_Count'Result <= Max_Parameters;
-- Returns the number of parameters in P
function Argument (P : List; Name : String) return Types.Object'Class;
-- Returns parameters named Name in P. Raises Types.Data_Error if not
-- found.
function Argument (P : List; N : Positive) return Types.Object'Class;
-- Returns Nth parameters in P. Raises Types.Data_Error if not found
function Exist (P : List; Name : String) return Boolean;
-- Returns True if parameter named Name exist in P and False otherwise
function Get (P : List; Name : String) return Types.Long with Inline;
-- Returns parameter named Name in P as a Long value. Raises
-- Types.Data_Error if this parameter does not exist or is not a Long.
function Get (P : List; Name : String) return Integer with Inline;
-- Returns parameter named Name in P as an Integer value. Raises
-- Types.Data_Error if this parameter does not exist or is not an Integer.
function Get (P : List; Name : String) return Types.Short with Inline;
-- Returns parameter named Name in P as a Short value. Raises
-- Types.Data_Error if this parameter does not exist or is not an Short.
function Get (P : List; Name : String) return Types.Byte with Inline;
-- Returns parameter named Name in P as a Byte value. Raises
-- Types.Data_Error if this parameter does not exist or is not a Byte.
function Get (P : List; Name : String) return Float with Inline;
-- Returns parameter named Name in P as a Float value. Raises
-- Types.Data_Error if this parameter does not exist or is not a Float.
function Get (P : List; Name : String) return Long_Float with Inline;
-- Returns parameter named Name in P as a Float value. Raises
-- Types.Data_Error if this parameter does not exist or is not a Double.
function Get (P : List; Name : String) return String with Inline;
-- Returns parameter named Name in P as a String value. Raises
-- Types.Data_Error if this parameter does not exist or is not a String.
function Get (P : List; Name : String) return Unbounded_String with Inline;
-- Idem as above, but return an Unbounded_String
function Get (P : List; Name : String) return Boolean with Inline;
-- Returns parameter named Name in P as a Boolean value. Raises
-- Types.Data_Error if this parameter does not exist or is not a Boolean.
function Get (P : List; Name : String) return Ada.Calendar.Time with Inline;
-- Returns parameter named Name in P as a Time value. Raises
-- Types.Data_Error if this parameter does not exist or is not a time.
function Get (P : List; Name : String) return Types.Unsigned_Long
with Inline;
-- Returns parameter named Name in P as a Unsigned_Long value. Raises
-- Types.Data_Error if this parameter does not exist or is not an
-- Unsigned_Long.
function Get (P : List; Name : String) return Types.Unsigned_Int
with Inline;
-- Returns parameter named Name in P as a Unsigned_Int value. Raises
-- Types.Data_Error if this parameter does not exist or is not an
-- Unsigned_Int.
function Get (P : List; Name : String) return Types.Unsigned_Short
with Inline;
-- Returns parameter named Name in P as a Unsigned_Short value. Raises
-- Types.Data_Error if this parameter does not exist or is not an
-- Unsigned_Short.
function Get (P : List; Name : String) return Types.Unsigned_Byte
with Inline;
-- Returns parameter named Name in P as a Unsigned_Byte value. Raises
-- Types.Data_Error if this parameter does not exist or is not an
-- Unsigned_Byte.
function Get (P : List; Name : String) return Types.SOAP_Base64 with Inline;
-- Returns parameter named Name in P as a SOAP Base64 value. Raises
-- Types.Data_Error if this parameter does not exist or is not a SOAP
-- Base64.
function Get (P : List; Name : String) return Types.SOAP_Record with Inline;
-- Returns parameter named Name in P as a SOAP Struct value. Raises
-- Types.Data_Error if this parameter does not exist or is not a SOAP
-- Struct.
function Get (P : List; Name : String) return Types.SOAP_Array with Inline;
-- Returns parameter named Name in P as a SOAP Array value. Raises
-- Types.Data_Error if this parameter does not exist or is not a SOAP
-- Array.
------------------
-- Constructors --
------------------
function "&" (P : List; O : Types.Object'Class) return List with
Post => Argument_Count ("&"'Result) = Argument_Count (P) + 1;
function "+" (O : Types.Object'Class) return List with
Post => Argument_Count ("+"'Result) = 1;
----------------
-- Validation --
----------------
procedure Check (P : List; N : Natural);
-- Checks that there is exactly N parameters or raise Types.Data_Error
procedure Check_Integer (P : List; Name : String);
-- Checks that parameter named Name exist and is an Integer value
procedure Check_Float (P : List; Name : String);
-- Checks that parameter named Name exist and is a Float value
procedure Check_Boolean (P : List; Name : String);
-- Checks that parameter named Name exist and is a Boolean value
procedure Check_Time_Instant (P : List; Name : String);
-- Checks that parameter named Name exist and is a Time_Instant value
procedure Check_Base64 (P : List; Name : String);
-- Checks that parameter named Name exist and is a Base64 value
procedure Check_Null (P : List; Name : String);
-- Checks that parameter named Name exist and is a Null value
procedure Check_Record (P : List; Name : String);
-- Checks that parameter named Name exist and is a Record value
procedure Check_Array (P : List; Name : String);
-- Checks that parameter named Name exist and is an Array value
private
type List is record
V : Types.Object_Set (1 .. Max_Parameters);
N : Natural := 0;
end record;
end SOAP.Parameters;
|