------------------------------------------------------------------------------
--                                                                          --
--                           POLYORB COMPONENTS                             --
--                                                                          --
--                  P O R T A B L E I N T E R C E P T O R                   --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
--         Copyright (C) 2004-2006, Free Software Foundation, Inc.          --
--                                                                          --
-- This specification is derived from the CORBA Specification, and adapted  --
-- for use with PolyORB. The copyright notice above, and the license        --
-- provisions that follow apply solely to the contents neither explicitely  --
-- nor implicitely specified by the CORBA Specification defined by the OMG. --
--                                                                          --
-- PolyORB 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 2,  or (at your option)  any  later --
-- version. PolyORB is distributed  in the hope that it will be  useful,    --
-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
-- TABILITY 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 PolyORB; see file COPYING. If    --
-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
-- Floor, Boston, MA 02111-1301, USA.                                       --
--                                                                          --
--
--
--
--
--
--
--
--                  PolyORB is maintained by AdaCore                        --
--                     (email: sales@adacore.com)                           --
--                                                                          --
------------------------------------------------------------------------------

with Ada.Exceptions;

with CORBA.IDL_SEQUENCES;
with CORBA.Object;

package PortableInterceptor is

   --  ForwardRequest exception

   ForwardRequest : exception;

   type ForwardRequest_Members is new CORBA.IDL_Exception_Members with record
      Forward : CORBA.Object.Ref;
   end record;

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To   :    out ForwardRequest_Members);

   --  ReplyStatus type and constants

   type ReplyStatus is new CORBA.Short;

   Successful       : constant ReplyStatus := 0;
   System_Exception : constant ReplyStatus := 1;
   User_Exception   : constant ReplyStatus := 2;
   Location_Forward : constant ReplyStatus := 3;
   Transport_Retry  : constant ReplyStatus := 4;
   Unknown          : constant ReplyStatus := 5;

   --  SlotId type

   type SlotId is new CORBA.Unsigned_Long;

   --  InvalidSlot exception

   InvalidSlot : exception;

   type InvalidSlot_Members is
      new CORBA.IDL_Exception_Members with null record;

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To   :    out InvalidSlot_Members);

   --  ServerId type

   type ServerId is new CORBA.String;

   --  ORBId type

   type ORBId is new CORBA.String;

   --  AdapterName type

   type AdapterName is new CORBA.IDL_SEQUENCES.StringSeq;

   --  ObjectId type

   type ObjectId is new CORBA.IDL_SEQUENCES.OctetSeq;

   --  AdapterId type (PolyORB extension)

   type AdapterId is new CORBA.IDL_SEQUENCES.OctetSeq;

   --  XXX TODO ObjectReferenceTemplateSeq type
   --  typedef sequence<ObjectReferenceTemplate> ObjectReferenceTemplateSeq;

   --  AdapterManagerId type

   type AdapterManagerId is new CORBA.String;

   --  AdapterState type

   type AdapterState is new CORBA.Short;

   Holding      : constant AdapterState := 0;
   Active       : constant AdapterState := 1;
   Discarding   : constant AdapterState := 2;
   Inactive     : constant AdapterState := 3;
   Non_Existent : constant AdapterState := 4;

   --  Repository_Ids

   Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor:1.0";

   ForwardRequest_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/ForwardRequest:1.0";

   ReplyStatus_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/ReplyStatus:1.0";

   SlotId_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/SlotId:1.0";

   InvalidSlot_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/InvalidSlot:1.0";

   ServerId_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/ServerId:1.0";

   ORBId_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/ORBId:1.0";

   AdapterName_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/AdapterName:1.0";

   ObjectId_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/ObjectId:1.0";

   ObjectReferenceTemplateSeq_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/ObjectReferenceTemplateSeq:1.0";

   AdapterManagerId_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/AdapterManagerId:1.0";

   AdapterState_Repository_Id : constant Standard.String
     := "IDL:omg.org/PortableInterceptor/AdapterState:1.0";

end PortableInterceptor;
