File: server.adb

package info (click to toggle)
gnat-glade 3.14p-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,588 kB
  • ctags: 1,976
  • sloc: ada: 70,532; ansic: 5,258; sh: 2,321; makefile: 538
file content (45 lines) | stat: -rw-r--r-- 1,059 bytes parent folder | download | duplicates (5)
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
with Bank; use Bank;

package body Server is

   function Balance
     (Customer : in Customer_Type;
      Password : in Password_Type)
      return Integer is
   begin
      return Bank.Balance (Customer, Password);
   end Balance;

   procedure Deposit
     (Customer : in Customer_Type;
      Amount   : in Positive) is
   begin
      Bank.Deposit (Customer, Amount);
   end Deposit;

   procedure Register
     (Terminal : in Terminal_Access;
      Customer : in Customer_Type;
      Password : in Password_Type) is
   begin
      Bank.Register (Terminal, Customer, Password);
   end Register;

   procedure Transfer
     (Donator  : in Customer_Type;
      Password : in Password_Type;
      Amount   : in Positive;
      Customer : in Customer_Type) is
   begin
      Bank.Transfer (Donator, Password, Amount, Customer);
   end Transfer;

   procedure Withdraw
     (Customer : in Customer_Type;
      Password : in Password_Type;
      Amount   : in Positive) is
   begin
      Bank.Withdraw (Customer, Password, Amount);
   end Withdraw;

end Server;