You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.2 KiB

package body Basic_Example.Parameters is
use GNAT;
use Ada.Strings;
--------------
-- Set_Host --
--------------
procedure Set_Host
(Name : in Unbounded_String;
Value : in Unbounded_String;
Result : in out User_Parameters)
is
begin
Result.Host := Sockets.Inet_Addr (Unbounded.To_String (Value));
end Set_Host;
--------------
-- Set_Port --
--------------
procedure Set_Port
(Name : in Unbounded_String;
Value : in Unbounded_String;
Result : in out User_Parameters)
is
begin
Result.Port := Sockets.Port_Type'Value (Unbounded.To_String (Value));
end Set_Port;
------------------
-- Set_Username --
------------------
procedure Set_Username
(Name : in Unbounded_String;
Value : in Unbounded_String;
Result : in out User_Parameters)
is
begin
Result.Username := Value;
end Set_Username;
------------------
-- Set_Password --
------------------
procedure Set_Password
(Name : in Unbounded_String;
Value : in Unbounded_String;
Result : in out User_Parameters)
is
begin
Result.Password := Value;
end Set_Password;
end Basic_Example.Parameters;