pragma Style_Checks ("NM32766");

---------------------------------------------------
--  This file has been generated automatically from
--  /wrkdirs/usr/ports/net/polyorb/work/polyorb-2.9.0/idls/cos/event/CosEventChannelAdmin.idl
--  by IAC (IDL to Ada Compiler) 2.9.0 (rev. unknown).
---------------------------------------------------
--  NOTE: If you modify this file by hand, your
--  changes will be lost when you re-run the
--  IDL to Ada compiler.
---------------------------------------------------

with PolyORB.Any.NVList;
with PolyORB.Types;
with CORBA.Object.Helper;
with CORBA.Object;
with PolyORB.Any;
with CosEventComm.PullSupplier.Helper;
with PolyORB.Requests;
with CORBA.ExceptionList;
with CosEventChannelAdmin.Helper;
with PolyORB.CORBA_P.Interceptors_Hooks;
with PolyORB.CORBA_P.Exceptions;

package body CosEventChannelAdmin.ProxyPullConsumer is

   connect_pull_supplier_Arg_Name_pull_supplier_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("pull_supplier");

   connect_pull_supplier_Result_Name_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("Result");

   ------------------------------------
   -- connect_pull_supplier_Result_Ü --
   ------------------------------------

   function connect_pull_supplier_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (connect_pull_supplier_Result_Ü);
   begin
      return (Name => connect_pull_supplier_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.TC_Void),
      Arg_Modes => 0);
   end connect_pull_supplier_Result_Ü;

   ---------------------------
   -- connect_pull_supplier --
   ---------------------------

   procedure connect_pull_supplier
     (Self : Ref;
      pull_supplier : CosEventComm.PullSupplier.Ref)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Arg_CC_pull_supplier_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (pull_supplier)'Unrestricted_Access);
      Arg_Any_pull_supplier_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosEventComm.PullSupplier.Helper.TC_PullSupplier,
            Arg_CC_pull_supplier_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        connect_pull_supplier_Result_Ü;
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      --  Create the Argument list
      PolyORB.Any.NVList.Create
        (Argument_List_Ü);
      --  Fill the Argument list
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         connect_pull_supplier_Arg_Name_pull_supplier_Ü,
         PolyORB.Any.Any
           (Arg_Any_pull_supplier_Ü),
         PolyORB.Any.ARG_IN);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosEventChannelAdmin.Helper.TC_AlreadyConnected);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosEventChannelAdmin.Helper.TC_TypeError);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "connect_pull_supplier",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü,
         Exc_List => CORBA.ExceptionList.Internals.To_PolyORB_Ref
           (Exception_List_Ü));
      --  Invoking the request (synchronously or asynchronously)
      PolyORB.CORBA_P.Interceptors_Hooks.Client_Invoke
        (Request_Ü'Access,
         PolyORB.Requests.Flags
           (0));
      --  Raise exception, if needed
      PolyORB.CORBA_P.Exceptions.Request_Raise_Occurrence
        (Request_Ü);
   end connect_pull_supplier;

   ----------
   -- Is_A --
   ----------

   function Is_A
     (Self : Ref;
      Logical_Type_Id : PolyORB.Std.String)
     return CORBA.Boolean
   is
   begin
      return (False
         or else (Is_A
           (Logical_Type_Id)
            or else CORBA.Object.Is_A
              (CORBA.Object.Ref
                 (Self),
               Logical_Type_Id)));
   end Is_A;

   ----------
   -- Is_A --
   ----------

   function Is_A
     (Logical_Type_Id : PolyORB.Std.String)
     return CORBA.Boolean
   is
   begin
      return (((CORBA.Is_Equivalent
        (Logical_Type_Id,
         CosEventChannelAdmin.ProxyPullConsumer.Repository_Id)
         or else CORBA.Is_Equivalent
           (Logical_Type_Id,
            "IDL:omg.org/CORBA/Object:1.0"))
         or else CORBA.Is_Equivalent
           (Logical_Type_Id,
            CosEventComm.PullConsumer.Repository_Id))
         or else False);
   end Is_A;

end CosEventChannelAdmin.ProxyPullConsumer;
