------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008 Vadim Godunko <vgodunko@gmail.com>                      --
--                                                                          --
-- QtAda is free software;  you can  redistribute it and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion. QtAda is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- 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 QtAda;  see file COPYING.  If not, write --
-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
-- Boston, MA 02110-1301, USA.                                              --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.  This exception does not --
-- however invalidate  any other reasons why  the executable file  might be --
-- covered by the  GNU Public License.                                      --
--                                                                          --
------------------------------------------------------------------------------
--    This file has been generated automatically. Please don't edit it.     --
------------------------------------------------------------------------------
with Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.File_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.File_Proxies);
--  Elaboration of the proxy tagged type package register proxy object
--  constructor. Bindings must be able to create proxy object of the
--  corresponding tagged type for works properly.

package body Qt4.Files is

   function copy_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     New_Name : not null access constant Qt4.Strings.Internals.QString)
       return Qt4.bool;
   pragma Import (C, copy_0_wrapper,
                     "__Qt4Ada_QFile_copy_0_wrapper");

   function exists_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, exists_0_wrapper,
                     "__Qt4Ada_QFile_exists_0_wrapper");

   procedure fileName_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, fileName_0_wrapper,
                     "__Qt4Ada_QFile_fileName_0_wrapper");

   function flush_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, flush_0_wrapper,
                     "__Qt4Ada_QFile_flush_0_wrapper");

   function handle_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer;
   pragma Import (C, handle_0_wrapper,
                     "__Qt4Ada_QFile_handle_0_wrapper");

   function link_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Link_Name : not null access constant Qt4.Strings.Internals.QString)
       return Qt4.bool;
   pragma Import (C, link_0_wrapper,
                     "__Qt4Ada_QFile_link_0_wrapper");

   function remove_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, remove_0_wrapper,
                     "__Qt4Ada_QFile_remove_0_wrapper");

   function rename_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     New_Name : not null access constant Qt4.Strings.Internals.QString)
       return Qt4.bool;
   pragma Import (C, rename_0_wrapper,
                     "__Qt4Ada_QFile_rename_0_wrapper");

   procedure setFileName_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Name : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setFileName_0_wrapper,
                     "__Qt4Ada_QFile_setFileName_0_wrapper");

   procedure symLinkTarget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, symLinkTarget_0_wrapper,
                     "__Qt4Ada_QFile_symLinkTarget_0_wrapper");

   procedure unsetError_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, unsetError_0_wrapper,
                     "__Qt4Ada_QFile_unsetError_0_wrapper");

   pragma Style_Checks ("N");

   ----------
   -- Copy --
   ----------

   function Copy
    (Self : not null access Q_File'Class;
     New_Name : Qt4.Strings.Q_String)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (copy_0_wrapper
           (Self.QObject_View,
            Qt4.Strings.Internals.QString_View (New_Name)));
   end Copy;

   ------------
   -- Exists --
   ------------

   function Exists
    (Self : not null access constant Q_File'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (exists_0_wrapper
           (Self.QObject_View));
   end Exists;

   ---------------
   -- File_Name --
   ---------------

   function File_Name
    (Self : not null access constant Q_File'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      fileName_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end File_Name;

   -----------
   -- Flush --
   -----------

   function Flush
    (Self : not null access Q_File'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (flush_0_wrapper
           (Self.QObject_View));
   end Flush;

   ------------
   -- Handle --
   ------------

   function Handle
    (Self : not null access constant Q_File'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        handle_0_wrapper
         (Self.QObject_View);
   end Handle;

   ----------
   -- Link --
   ----------

   function Link
    (Self : not null access Q_File'Class;
     Link_Name : Qt4.Strings.Q_String)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (link_0_wrapper
           (Self.QObject_View,
            Qt4.Strings.Internals.QString_View (Link_Name)));
   end Link;

   ------------
   -- Remove --
   ------------

   function Remove
    (Self : not null access Q_File'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (remove_0_wrapper
           (Self.QObject_View));
   end Remove;

   ------------
   -- Rename --
   ------------

   function Rename
    (Self : not null access Q_File'Class;
     New_Name : Qt4.Strings.Q_String)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (rename_0_wrapper
           (Self.QObject_View,
            Qt4.Strings.Internals.QString_View (New_Name)));
   end Rename;

   -------------------
   -- Set_File_Name --
   -------------------

   procedure Set_File_Name
    (Self : not null access Q_File'Class;
     Name : Qt4.Strings.Q_String)
   is
   begin
      setFileName_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Name));
   end Set_File_Name;

   ---------------------
   -- Sym_Link_Target --
   ---------------------

   function Sym_Link_Target
    (Self : not null access constant Q_File'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      symLinkTarget_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Sym_Link_Target;

   -----------------
   -- Unset_Error --
   -----------------

   procedure Unset_Error
    (Self : not null access Q_File'Class)
   is
   begin
      unsetError_0_wrapper
       (Self.QObject_View);
   end Unset_Error;

end Qt4.Files;
