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 CORBA.Object.Helper;
with PolyORB.Any;
with PolyORB.Requests;
with PolyORB.Types;
with CosEventChannelAdmin.ProxyPushConsumer.Helper;
with PolyORB.CORBA_P.Interceptors_Hooks;
with PolyORB.CORBA_P.Exceptions;
with CosEventChannelAdmin.ProxyPullConsumer.Helper;

package body CosEventChannelAdmin.SupplierAdmin is

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

   -----------------------------------
   -- obtain_push_consumer_Result_Ü --
   -----------------------------------

   function obtain_push_consumer_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (obtain_push_consumer_Result_Ü);
   begin
      return (Name => obtain_push_consumer_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CosEventChannelAdmin.ProxyPushConsumer.Helper.TC_ProxyPushConsumer),
      Arg_Modes => 0);
   end obtain_push_consumer_Result_Ü;

   --------------------------
   -- obtain_push_consumer --
   --------------------------

   function obtain_push_consumer
     (Self : Ref)
     return CosEventChannelAdmin.ProxyPushConsumer.Ref
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CosEventChannelAdmin.ProxyPushConsumer.Ref;
      pragma Warnings (Off, Result_Ü);
      pragma Suppress (Validity_Check, Result_Ü);
      Arg_CC_Result_Ü_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (Result_Ü)'Unrestricted_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        obtain_push_consumer_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_Ü);
      --  Setting the result value
      PolyORB.Any.Set_Value
        (PolyORB.Any.Get_Container
           (Result_Nv_Ü.Argument).all,
         Arg_CC_Result_Ü_Ü'Unrestricted_Access);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "obtain_push_consumer",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü);
      --  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_Ü);
      --  Return value
      return Result_Ü;
   end obtain_push_consumer;

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

   -----------------------------------
   -- obtain_pull_consumer_Result_Ü --
   -----------------------------------

   function obtain_pull_consumer_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (obtain_pull_consumer_Result_Ü);
   begin
      return (Name => obtain_pull_consumer_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CosEventChannelAdmin.ProxyPullConsumer.Helper.TC_ProxyPullConsumer),
      Arg_Modes => 0);
   end obtain_pull_consumer_Result_Ü;

   --------------------------
   -- obtain_pull_consumer --
   --------------------------

   function obtain_pull_consumer
     (Self : Ref)
     return CosEventChannelAdmin.ProxyPullConsumer.Ref
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CosEventChannelAdmin.ProxyPullConsumer.Ref;
      pragma Warnings (Off, Result_Ü);
      pragma Suppress (Validity_Check, Result_Ü);
      Arg_CC_Result_Ü_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (Result_Ü)'Unrestricted_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        obtain_pull_consumer_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_Ü);
      --  Setting the result value
      PolyORB.Any.Set_Value
        (PolyORB.Any.Get_Container
           (Result_Nv_Ü.Argument).all,
         Arg_CC_Result_Ü_Ü'Unrestricted_Access);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "obtain_pull_consumer",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü);
      --  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_Ü);
      --  Return value
      return Result_Ü;
   end obtain_pull_consumer;

   ----------
   -- 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.SupplierAdmin.Repository_Id)
         or else CORBA.Is_Equivalent
           (Logical_Type_Id,
            "IDL:omg.org/CORBA/Object:1.0"))
         or else False);
   end Is_A;

end CosEventChannelAdmin.SupplierAdmin;
