POK
apex-queuing_ports.ads
1 -- ---------------------------------------------------------------------------
2 -- --
3 -- QUEUING PORT constant and type definitions and management services --
4 -- --
5 -- ---------------------------------------------------------------------------
6 with APEX.Processes;
7 package APEX.Queuing_Ports is
8  Max_Number_Of_Queuing_Ports : constant :=
9  System_Limit_Number_Of_Queuing_Ports;
10  subtype Queuing_Port_Name_Type is Name_Type;
11  type Queuing_Port_Id_Type is private;
12  Null_Queuing_Port_Id : constant Queuing_Port_Id_Type;
13  type Queuing_Port_Status_Type is record
14  Nb_Message : Message_Range_Type;
15  Max_Nb_Message : Message_Range_Type;
16  Max_Message_Size : Message_Size_Type;
17  Port_Direction : Port_Direction_Type;
18  Waiting_Processes : APEX.Processes.Waiting_Range_Type;
19  end record;
20  procedure Create_Queuing_Port
21  (Queuing_Port_Name : in Queuing_Port_Name_Type;
22  Max_Message_Size : in Message_Size_Type;
23  Max_Nb_Message : in Message_Range_Type;
24  Port_Direction : in Port_Direction_Type;
25  Queuing_Discipline : in Queuing_Discipline_Type;
26  Queuing_Port_Id : out Queuing_Port_Id_Type;
27  Return_Code : out Return_Code_Type);
28  procedure Send_Queuing_Message
29  (Queuing_Port_Id : in Queuing_Port_Id_Type;
30  Message_Addr : in Message_Addr_Type;
31  Length : in Message_Size_Type;
32  Time_Out : in System_Time_Type;
33  Return_Code : out Return_Code_Type);
34  procedure Receive_Queuing_Message
35  (Queuing_Port_Id : in Queuing_Port_Id_Type;
36  Time_Out : in System_Time_Type;
37  Message_Addr : in Message_Addr_Type;
38  -- The message address is passed IN, although the respective message is
39  -- passed OUT
40  Length : out Message_Size_Type;
41  Return_Code : out Return_Code_Type);
42  procedure Get_Queuing_Port_Id
43  (Queuing_Port_Name : in Queuing_Port_Name_Type;
44  Queuing_Port_Id : out Queuing_Port_Id_Type;
45  Return_Code : out Return_Code_Type);
46  procedure Get_Queuing_Port_Status
47  (Queuing_Port_Id : in Queuing_Port_Id_Type;
48  Queuing_Port_Status : out Queuing_Port_Status_Type;
49  Return_Code : out Return_Code_Type);
50 private
51  type Queuing_Port_Id_Type is new APEX_Integer;
52  Null_Queuing_Port_Id : constant Queuing_Port_Id_Type := 0;
53  pragma Convention (C, Queuing_Port_Status_Type);
54 
55  -- POK BINDINGS
56  pragma Import (C, Create_Queuing_Port, "CREATE_QUEUING_PORT");
57  pragma Import (C, Send_Queuing_Message, "SEND_QUEUING_PORT_MESSAGE");
58  pragma Import (C, Receive_Queuing_Message, "RECEIVE_QUEUING_MESSAGE");
59  pragma Import (C, Get_Queuing_Port_Id, "GET_QUEUING_PORT_ID");
60  pragma Import (C, Get_Queuing_Port_Status, "GET_QUEUING_PORT_STATUS");
61  -- END OF POK BINDINGS
62 end APEX.Queuing_Ports;