------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2009-2010 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.     --
------------------------------------------------------------------------------
private with Ada.Finalization;

with Qt4.Date_Times;
with Qt4.Dirs;
with Qt4.Strings;
private with Qt_Ada.Internals.Value_Class_Sizes;

package Qt4.File_Infos is

   type Q_File_Info is tagged private;

   function Create
    (File : Qt4.Strings.Q_String'Class)
       return Q_File_Info;

   function Create
    (Dir : Qt4.Dirs.Q_Dir'Class;
     File : Qt4.Strings.Q_String'Class)
       return Q_File_Info;

   function Absolute_Dir
    (Self : Q_File_Info'Class)
       return Qt4.Dirs.Q_Dir;

   function Absolute_File_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Absolute_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Base_Name
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Bundle_Name
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Caching
    (Self : Q_File_Info'Class)
       return Boolean;

   function Canonical_File_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Canonical_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Complete_Base_Name
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Complete_Suffix
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Created
    (Self : Q_File_Info'Class)
       return Qt4.Date_Times.Q_Date_Time;

   function Dir
    (Self : Q_File_Info'Class)
       return Qt4.Dirs.Q_Dir;

   function Exists
    (Self : Q_File_Info'Class)
       return Boolean;

   function File_Name
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function File_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Group
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Group_Id
    (Self : Q_File_Info'Class)
       return Qt4.Q_Unsigned_Integer;

   function Is_Absolute
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Bundle
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Dir
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Executable
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_File
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Hidden
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Readable
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Relative
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Root
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Sym_Link
    (Self : Q_File_Info'Class)
       return Boolean;

   function Is_Writable
    (Self : Q_File_Info'Class)
       return Boolean;

   function Last_Modified
    (Self : Q_File_Info'Class)
       return Qt4.Date_Times.Q_Date_Time;

   function Last_Read
    (Self : Q_File_Info'Class)
       return Qt4.Date_Times.Q_Date_Time;

   function Make_Absolute
    (Self : not null access Q_File_Info'Class)
       return Boolean;

   function Owner
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Owner_Id
    (Self : Q_File_Info'Class)
       return Qt4.Q_Unsigned_Integer;

   function Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   procedure Refresh
    (Self : in out Q_File_Info'Class);

   procedure Set_Caching
    (Self : in out Q_File_Info'Class;
     Enable : Boolean);

   procedure Set_File
    (Self : in out Q_File_Info'Class;
     File : Qt4.Strings.Q_String'Class);

   procedure Set_File
    (Self : in out Q_File_Info'Class;
     Dir : Qt4.Dirs.Q_Dir'Class;
     File : Qt4.Strings.Q_String'Class);

   function Size
    (Self : Q_File_Info'Class)
       return Qt4.Q_Integer_64;

   function Suffix
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   function Sym_Link_Target
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String;

   overriding function "="
    (Self : Q_File_Info;
     Fileinfo : Q_File_Info)
       return Boolean;

   package Internals is

      type QFileInfo is private;

      type QFileInfo_Access is access all QFileInfo;
      pragma Convention (C, QFileInfo_Access);

      function QFileInfo_View
       (Item : Q_File_Info'Class)
          return QFileInfo_Access;
      pragma Inline (QFileInfo_View);

      function To_Pointer
       (Address : System.Address)
          return QFileInfo_Access;
      pragma Inline (To_Pointer);

      function To_Address
       (Pointer : QFileInfo_Access)
          return System.Address;
      pragma Inline (To_Address);

      function Create_Wrapper
       (Item : Internals.QFileInfo_Access)
          return Q_File_Info;

   private

      type QFileInfo is record
         Placeholder : Interfaces.C.char_array (1 .. Qt_Ada.Internals.Value_Class_Sizes.QFileInfo_C_Size_Of);
      end record;
      pragma Convention (C, QFileInfo);

   end Internals;

private

   type Q_File_Info is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QFileInfo;
      Object  : Internals.QFileInfo_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_File_Info);

   overriding
   procedure Finalize (Self : in out Q_File_Info);

   overriding
   procedure Initialize (Self : in out Q_File_Info);

end Qt4.File_Infos;
