------------------------------------------------------------------------------
--                                                                          --
--                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 Qt4.IO_Devices;
with Qt4.Strings;
with Qt_Ada.Generic_Object_Pointers;

package Qt4.Files is

   type Q_File is limited interface
     and Qt4.IO_Devices.Q_IO_Device;

   type Q_File_Access is
     access all Q_File'Class;
   for Q_File_Access'Storage_Size use 0;

   type Q_File_Pointer is tagged;

   function Copy
    (Self : not null access Q_File'Class;
     New_Name : Qt4.Strings.Q_String)
       return Standard.Boolean;

   function Exists
    (Self : not null access constant Q_File'Class)
       return Standard.Boolean;

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

   function Flush
    (Self : not null access Q_File'Class)
       return Standard.Boolean;

   function Handle
    (Self : not null access constant Q_File'Class)
       return Qt4.Q_Integer;

   function Link
    (Self : not null access Q_File'Class;
     Link_Name : Qt4.Strings.Q_String)
       return Standard.Boolean;

   function Remove
    (Self : not null access Q_File'Class)
       return Standard.Boolean;

   function Rename
    (Self : not null access Q_File'Class;
     New_Name : Qt4.Strings.Q_String)
       return Standard.Boolean;

   procedure Set_File_Name
    (Self : not null access Q_File'Class;
     Name : Qt4.Strings.Q_String);

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

   procedure Unset_Error
    (Self : not null access Q_File'Class);

   --  Enumeration File Error

   type File_Error is
    (No_Error,
     Read_Error,
     Write_Error,
     Fatal_Error,
     Resource_Error,
     Open_Error,
     Abort_Error,
     Time_Out_Error,
     Unspecified_Error,
     Remove_Error,
     Rename_Error,
     Position_Error,
     Resize_Error,
     Permissions_Error,
     Copy_Error);
   pragma Convention (C, File_Error);
   for File_Error'Size use Interfaces.C.int'Size;
   for File_Error use
    (No_Error          => 0,
     Read_Error        => 1,
     Write_Error       => 2,
     Fatal_Error       => 3,
     Resource_Error    => 4,
     Open_Error        => 5,
     Abort_Error       => 6,
     Time_Out_Error    => 7,
     Unspecified_Error => 8,
     Remove_Error      => 9,
     Rename_Error      => 10,
     Position_Error    => 11,
     Resize_Error      => 12,
     Permissions_Error => 13,
     Copy_Error        => 14);

   --  Permissions

   type Permission is
    (Exe_Other,
     Write_Other,
     Read_Other,
     Exe_Group,
     Write_Group,
     Read_Group,
     Exe_User,
     Write_User,
     Read_User,
     Exe_Owner,
     Write_Owner,
     Read_Owner);
   pragma Convention (C, Permission);
   for Permission'Size use Interfaces.C.int'Size;
   for Permission use
    (Exe_Other   => 16#00000001#,
     Write_Other => 16#00000002#,
     Read_Other  => 16#00000004#,
     Exe_Group   => 16#00000010#,
     Write_Group => 16#00000020#,
     Read_Group  => 16#00000040#,
     Exe_User    => 16#00000100#,
     Write_User  => 16#00000200#,
     Read_User   => 16#00000400#,
     Exe_Owner   => 16#00001000#,
     Write_Owner => 16#00002000#,
     Read_Owner  => 16#00004000#);

   package Permission_Flags is new Qt4_Generic_Flags (Permission);

   type Permissions is new Permission_Flags.Flags;

   package Q_File_Pointers is
     new Qt_Ada.Generic_Object_Pointers (Q_File, Q_File_Access);

   type Q_File_Pointer is
     new Q_File_Pointers.Q_Pointer with null record;

end Qt4.Files;
