------------------------------------------------------------------------------
--                                                                          --
--                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.     --
------------------------------------------------------------------------------
with System.Address_To_Access_Conversions;

package body Qt4.Urls is

   function initialize_QUrl
    (Storage : System.Address)
      return Internals.QUrl_Access;
   pragma Import (C, initialize_QUrl, "__QtAda_inititialize_QUrl");

   function initialize_QUrl_QStringCR
    (Storage : System.Address;
     Url : Qt4.Strings.Internals.QString_Access)
      return Internals.QUrl_Access;
   pragma Import (C, initialize_QUrl_QStringCR, "__QtAda_inititialize_QUrl_QStringCR");

   function initialize_QUrl_QStringCR_ParsingMode
    (Storage : System.Address;
     Url : Qt4.Strings.Internals.QString_Access;
     Mode : Parsing_Mode)
      return Internals.QUrl_Access;
   pragma Import (C, initialize_QUrl_QStringCR_ParsingMode, "__QtAda_inititialize_QUrl_QStringCR_ParsingMode");

   function adjust_QUrl
    (Storage : System.Address;
     From    : Internals.QUrl_Access)
       return Internals.QUrl_Access;
   pragma Import (C, adjust_QUrl, "__QtAda_adjust_QUrl");

   procedure finalize_QUrl (Object : Internals.QUrl_Access);
   pragma Import (C, finalize_QUrl, "__QtAda_finalize_QUrl");

   procedure QUrl_addEncodedQueryItem_QByteArrayCR_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Key : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Value : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_addEncodedQueryItem_QByteArrayCR_QByteArrayCR, "__QtAda_QUrl_addEncodedQueryItem_QByteArrayCR_QByteArrayCR");

   procedure QUrl_addQueryItem_QStringCR_QStringCR
    (Self : Internals.QUrl_Access;
     Key : Qt4.Strings.Internals.QString_Access;
     Value : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_addQueryItem_QStringCR_QStringCR, "__QtAda_QUrl_addQueryItem_QStringCR_QStringCR");

   procedure QUrl_allQueryItemValues_QStringCR
    (Returns : Qt4.String_Lists.Internals.QStringList_Access;
     Self : Internals.QUrl_Access;
     Key : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_allQueryItemValues_QStringCR, "__QtAda_QUrl_allQueryItemValues_QStringCR_Q");

   procedure QUrl_authority
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_authority, "__QtAda_QUrl_authority_Q");

   procedure QUrl_clear
    (Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_clear, "__QtAda_QUrl_clear");

   procedure QUrl_encodedFragment
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_encodedFragment, "__QtAda_QUrl_encodedFragment_Q");

   procedure QUrl_encodedHost
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_encodedHost, "__QtAda_QUrl_encodedHost_Q");

   procedure QUrl_encodedPassword
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_encodedPassword, "__QtAda_QUrl_encodedPassword_Q");

   procedure QUrl_encodedPath
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_encodedPath, "__QtAda_QUrl_encodedPath_Q");

   procedure QUrl_encodedQuery
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_encodedQuery, "__QtAda_QUrl_encodedQuery_Q");

   procedure QUrl_encodedQueryItemValue_QByteArrayCR
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Self : Internals.QUrl_Access;
     Key : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_encodedQueryItemValue_QByteArrayCR, "__QtAda_QUrl_encodedQueryItemValue_QByteArrayCR_Q");

   procedure QUrl_encodedUserName
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_encodedUserName, "__QtAda_QUrl_encodedUserName_Q");

   procedure QUrl_errorString
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_errorString, "__QtAda_QUrl_errorString_Q");

   procedure QUrl_fragment
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_fragment, "__QtAda_QUrl_fragment_Q");

   function QUrl_hasEncodedQueryItem_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Key : Qt4.Byte_Arrays.Internals.QByteArray_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QUrl_hasEncodedQueryItem_QByteArrayCR, "__QtAda_QUrl_hasEncodedQueryItem_QByteArrayCR_Q");

   function QUrl_hasFragment
    (Self : Internals.QUrl_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QUrl_hasFragment, "__QtAda_QUrl_hasFragment_Q");

   function QUrl_hasQuery
    (Self : Internals.QUrl_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QUrl_hasQuery, "__QtAda_QUrl_hasQuery_Q");

   function QUrl_hasQueryItem_QStringCR
    (Self : Internals.QUrl_Access;
     Key : Qt4.Strings.Internals.QString_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QUrl_hasQueryItem_QStringCR, "__QtAda_QUrl_hasQueryItem_QStringCR_Q");

   procedure QUrl_host
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_host, "__QtAda_QUrl_host_Q");

   function QUrl_isEmpty
    (Self : Internals.QUrl_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QUrl_isEmpty, "__QtAda_QUrl_isEmpty_Q");

   function QUrl_isParentOf_QUrlCR
    (Self : Internals.QUrl_Access;
     Child_Url : Internals.QUrl_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QUrl_isParentOf_QUrlCR, "__QtAda_QUrl_isParentOf_QUrlCR_Q");

   function QUrl_isRelative
    (Self : Internals.QUrl_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QUrl_isRelative, "__QtAda_QUrl_isRelative_Q");

   function QUrl_isValid
    (Self : Internals.QUrl_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QUrl_isValid, "__QtAda_QUrl_isValid_Q");

   procedure QUrl_password
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_password, "__QtAda_QUrl_password_Q");

   procedure QUrl_path
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_path, "__QtAda_QUrl_path_Q");

   function QUrl_port
    (Self : Internals.QUrl_Access)
       return Qt4.Q_Integer;
   pragma Import (C, QUrl_port, "__QtAda_QUrl_port_Q");

   function QUrl_port_int
    (Self : Internals.QUrl_Access;
     Default_Port : Qt4.Q_Integer)
       return Qt4.Q_Integer;
   pragma Import (C, QUrl_port_int, "__QtAda_QUrl_port_int_Q");

   procedure QUrl_queryItemValue_QStringCR
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access;
     Key : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_queryItemValue_QStringCR, "__QtAda_QUrl_queryItemValue_QStringCR_Q");

   procedure QUrl_removeAllEncodedQueryItems_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Key : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_removeAllEncodedQueryItems_QByteArrayCR, "__QtAda_QUrl_removeAllEncodedQueryItems_QByteArrayCR");

   procedure QUrl_removeAllQueryItems_QStringCR
    (Self : Internals.QUrl_Access;
     Key : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_removeAllQueryItems_QStringCR, "__QtAda_QUrl_removeAllQueryItems_QStringCR");

   procedure QUrl_removeEncodedQueryItem_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Key : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_removeEncodedQueryItem_QByteArrayCR, "__QtAda_QUrl_removeEncodedQueryItem_QByteArrayCR");

   procedure QUrl_removeQueryItem_QStringCR
    (Self : Internals.QUrl_Access;
     Key : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_removeQueryItem_QStringCR, "__QtAda_QUrl_removeQueryItem_QStringCR");

   procedure QUrl_resolved_QUrlCR
    (Returns : Internals.QUrl_Access;
     Self : Internals.QUrl_Access;
     Relative : Internals.QUrl_Access);
   pragma Import (C, QUrl_resolved_QUrlCR, "__QtAda_QUrl_resolved_QUrlCR_Q");

   procedure QUrl_scheme
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_scheme, "__QtAda_QUrl_scheme_Q");

   procedure QUrl_setAuthority_QStringCR
    (Self : Internals.QUrl_Access;
     Authority : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setAuthority_QStringCR, "__QtAda_QUrl_setAuthority_QStringCR");

   procedure QUrl_setEncodedFragment_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Fragment : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_setEncodedFragment_QByteArrayCR, "__QtAda_QUrl_setEncodedFragment_QByteArrayCR");

   procedure QUrl_setEncodedHost_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Host : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_setEncodedHost_QByteArrayCR, "__QtAda_QUrl_setEncodedHost_QByteArrayCR");

   procedure QUrl_setEncodedPassword_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Password : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_setEncodedPassword_QByteArrayCR, "__QtAda_QUrl_setEncodedPassword_QByteArrayCR");

   procedure QUrl_setEncodedPath_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Path : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_setEncodedPath_QByteArrayCR, "__QtAda_QUrl_setEncodedPath_QByteArrayCR");

   procedure QUrl_setEncodedQuery_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Query : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_setEncodedQuery_QByteArrayCR, "__QtAda_QUrl_setEncodedQuery_QByteArrayCR");

   procedure QUrl_setEncodedUrl_QByteArrayCR
    (Self : Internals.QUrl_Access;
     Encoded_Url : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_setEncodedUrl_QByteArrayCR, "__QtAda_QUrl_setEncodedUrl_QByteArrayCR");

   procedure QUrl_setEncodedUrl_QByteArrayCR_ParsingMode
    (Self : Internals.QUrl_Access;
     Encoded_Url : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Mode : Parsing_Mode);
   pragma Import (C, QUrl_setEncodedUrl_QByteArrayCR_ParsingMode, "__QtAda_QUrl_setEncodedUrl_QByteArrayCR_ParsingMode");

   procedure QUrl_setEncodedUserName_QByteArrayCR
    (Self : Internals.QUrl_Access;
     User_Name : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_setEncodedUserName_QByteArrayCR, "__QtAda_QUrl_setEncodedUserName_QByteArrayCR");

   procedure QUrl_setFragment_QStringCR
    (Self : Internals.QUrl_Access;
     Fragment : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setFragment_QStringCR, "__QtAda_QUrl_setFragment_QStringCR");

   procedure QUrl_setHost_QStringCR
    (Self : Internals.QUrl_Access;
     Host : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setHost_QStringCR, "__QtAda_QUrl_setHost_QStringCR");

   procedure QUrl_setPassword_QStringCR
    (Self : Internals.QUrl_Access;
     Password : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setPassword_QStringCR, "__QtAda_QUrl_setPassword_QStringCR");

   procedure QUrl_setPath_QStringCR
    (Self : Internals.QUrl_Access;
     Path : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setPath_QStringCR, "__QtAda_QUrl_setPath_QStringCR");

   procedure QUrl_setPort_int
    (Self : Internals.QUrl_Access;
     Port : Qt4.Q_Integer);
   pragma Import (C, QUrl_setPort_int, "__QtAda_QUrl_setPort_int");

   procedure QUrl_setScheme_QStringCR
    (Self : Internals.QUrl_Access;
     Scheme : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setScheme_QStringCR, "__QtAda_QUrl_setScheme_QStringCR");

   procedure QUrl_setUrl_QStringCR
    (Self : Internals.QUrl_Access;
     Url : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setUrl_QStringCR, "__QtAda_QUrl_setUrl_QStringCR");

   procedure QUrl_setUrl_QStringCR_ParsingMode
    (Self : Internals.QUrl_Access;
     Url : Qt4.Strings.Internals.QString_Access;
     Mode : Parsing_Mode);
   pragma Import (C, QUrl_setUrl_QStringCR_ParsingMode, "__QtAda_QUrl_setUrl_QStringCR_ParsingMode");

   procedure QUrl_setUserInfo_QStringCR
    (Self : Internals.QUrl_Access;
     User_Info : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setUserInfo_QStringCR, "__QtAda_QUrl_setUserInfo_QStringCR");

   procedure QUrl_setUserName_QStringCR
    (Self : Internals.QUrl_Access;
     User_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_setUserName_QStringCR, "__QtAda_QUrl_setUserName_QStringCR");

   procedure QUrl_toLocalFile
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_toLocalFile, "__QtAda_QUrl_toLocalFile_Q");

   procedure QUrl_userInfo
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_userInfo, "__QtAda_QUrl_userInfo_Q");

   procedure QUrl_userName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QUrl_Access);
   pragma Import (C, QUrl_userName, "__QtAda_QUrl_userName_Q");

   function eq_QUrlCR
    (Self : Internals.QUrl_Access;
     Url : Internals.QUrl_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, eq_QUrlCR, "__QtAda_QUrl_eq_QUrlCR_Q");

   procedure QUrl_fromAce_QByteArrayCR
    (Returns : Qt4.Strings.Internals.QString_Access;
     Domain : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_fromAce_QByteArrayCR, "__QtAda_QUrl_fromAce_QByteArrayCR_S");

   procedure QUrl_fromEncoded_QByteArrayCR
    (Returns : Internals.QUrl_Access;
     Input : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_fromEncoded_QByteArrayCR, "__QtAda_QUrl_fromEncoded_QByteArrayCR_S");

   procedure QUrl_fromEncoded_QByteArrayCR_ParsingMode
    (Returns : Internals.QUrl_Access;
     Input : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Mode : Parsing_Mode);
   pragma Import (C, QUrl_fromEncoded_QByteArrayCR_ParsingMode, "__QtAda_QUrl_fromEncoded_QByteArrayCR_ParsingMode_S");

   procedure QUrl_fromLocalFile_QStringCR
    (Returns : Internals.QUrl_Access;
     Local_File : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_fromLocalFile_QStringCR, "__QtAda_QUrl_fromLocalFile_QStringCR_S");

   procedure QUrl_fromPercentEncoding_QByteArrayCR
    (Returns : Qt4.Strings.Internals.QString_Access;
     Domain : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_fromPercentEncoding_QByteArrayCR, "__QtAda_QUrl_fromPercentEncoding_QByteArrayCR_S");

   procedure QUrl_idnWhitelist
    (Returns : Qt4.String_Lists.Internals.QStringList_Access);
   pragma Import (C, QUrl_idnWhitelist, "__QtAda_QUrl_idnWhitelist_S");

   procedure QUrl_setIdnWhitelist_QStringListCR
    (List : Qt4.String_Lists.Internals.QStringList_Access);
   pragma Import (C, QUrl_setIdnWhitelist_QStringListCR, "__QtAda_QUrl_setIdnWhitelist_QStringListCR_S");

   procedure QUrl_toAce_QStringCR
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Domain : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QUrl_toAce_QStringCR, "__QtAda_QUrl_toAce_QStringCR_S");

   procedure QUrl_toPercentEncoding_QStringCR_QByteArrayCR_QByteArrayCR
    (Returns : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Input : Qt4.Strings.Internals.QString_Access;
     Exclude : Qt4.Byte_Arrays.Internals.QByteArray_Access;
     Include : Qt4.Byte_Arrays.Internals.QByteArray_Access);
   pragma Import (C, QUrl_toPercentEncoding_QStringCR_QByteArrayCR_QByteArrayCR, "__QtAda_QUrl_toPercentEncoding_QStringCR_QByteArrayCR_QByteArrayCR_S");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Url) is
   begin
      Self.Object := adjust_QUrl (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Url) is
   begin
      if not Self.Wrapper then
         finalize_QUrl (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Url) is
      use type Internals.QUrl_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QUrl (Self.Storage'Address);
      end if;
   end Initialize;

   ------------
   -- Create --
   ------------

   function Create
    (Url : Qt4.Strings.Q_String'Class)
       return Q_Url
   is
   begin
      return Self : Q_Url
        := (Ada.Finalization.Controlled with others => <>)
      do
         Self.Object := initialize_QUrl_QStringCR (Self.Storage'Address, Qt4.Strings.Internals.QString_View (Url));
      end return;
   end Create;

   ------------
   -- Create --
   ------------

   function Create
    (Url : Qt4.Strings.Q_String'Class;
     Mode : Parsing_Mode)
       return Q_Url
   is
   begin
      return Self : Q_Url
        := (Ada.Finalization.Controlled with others => <>)
      do
         Self.Object := initialize_QUrl_QStringCR_ParsingMode (Self.Storage'Address, Qt4.Strings.Internals.QString_View (Url), Mode);
      end return;
   end Create;

   ----------------------------
   -- Add_Encoded_Query_Item --
   ----------------------------

   procedure Add_Encoded_Query_Item
    (Self : in out Q_Url'Class;
     Key : Qt4.Byte_Arrays.Q_Byte_Array'Class;
     Value : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_addEncodedQueryItem_QByteArrayCR_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Key), Qt4.Byte_Arrays.Internals.QByteArray_View (Value));
   end Add_Encoded_Query_Item;

   --------------------
   -- Add_Query_Item --
   --------------------

   procedure Add_Query_Item
    (Self : in out Q_Url'Class;
     Key : Qt4.Strings.Q_String'Class;
     Value : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_addQueryItem_QStringCR_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Key), Qt4.Strings.Internals.QString_View (Value));
   end Add_Query_Item;

   ---------------------------
   -- All_Query_Item_Values --
   ---------------------------

   function All_Query_Item_Values
    (Self : Q_Url'Class;
     Key : Qt4.Strings.Q_String'Class)
       return Qt4.String_Lists.Q_String_List
   is
   begin
      return Returns : Qt4.String_Lists.Q_String_List do
         QUrl_allQueryItemValues_QStringCR (Qt4.String_Lists.Internals.QStringList_View (Returns), Self.Object, Qt4.Strings.Internals.QString_View (Key));
      end return;
   end All_Query_Item_Values;

   ---------------
   -- Authority --
   ---------------

   function Authority
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_authority (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Authority;

   -----------
   -- Clear --
   -----------

   procedure Clear
    (Self : in out Q_Url'Class)
   is
   begin
      QUrl_clear (Self.Object);
   end Clear;

   ----------------------
   -- Encoded_Fragment --
   ----------------------

   function Encoded_Fragment
    (Self : Q_Url'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_encodedFragment (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns), Self.Object);
      end return;
   end Encoded_Fragment;

   ------------------
   -- Encoded_Host --
   ------------------

   function Encoded_Host
    (Self : Q_Url'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_encodedHost (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns), Self.Object);
      end return;
   end Encoded_Host;

   ----------------------
   -- Encoded_Password --
   ----------------------

   function Encoded_Password
    (Self : Q_Url'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_encodedPassword (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns), Self.Object);
      end return;
   end Encoded_Password;

   ------------------
   -- Encoded_Path --
   ------------------

   function Encoded_Path
    (Self : Q_Url'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_encodedPath (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns), Self.Object);
      end return;
   end Encoded_Path;

   -------------------
   -- Encoded_Query --
   -------------------

   function Encoded_Query
    (Self : Q_Url'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_encodedQuery (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns), Self.Object);
      end return;
   end Encoded_Query;

   ------------------------------
   -- Encoded_Query_Item_Value --
   ------------------------------

   function Encoded_Query_Item_Value
    (Self : Q_Url'Class;
     Key : Qt4.Byte_Arrays.Q_Byte_Array'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_encodedQueryItemValue_QByteArrayCR (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns), Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Key));
      end return;
   end Encoded_Query_Item_Value;

   -----------------------
   -- Encoded_User_Name --
   -----------------------

   function Encoded_User_Name
    (Self : Q_Url'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_encodedUserName (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns), Self.Object);
      end return;
   end Encoded_User_Name;

   ------------------
   -- Error_String --
   ------------------

   function Error_String
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_errorString (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Error_String;

   --------------
   -- Fragment --
   --------------

   function Fragment
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_fragment (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Fragment;

   ----------------------------
   -- Has_Encoded_Query_Item --
   ----------------------------

   function Has_Encoded_Query_Item
    (Self : Q_Url'Class;
     Key : Qt4.Byte_Arrays.Q_Byte_Array'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QUrl_hasEncodedQueryItem_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Key)), 0);
   end Has_Encoded_Query_Item;

   ------------------
   -- Has_Fragment --
   ------------------

   function Has_Fragment
    (Self : Q_Url'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QUrl_hasFragment (Self.Object), 0);
   end Has_Fragment;

   ---------------
   -- Has_Query --
   ---------------

   function Has_Query
    (Self : Q_Url'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QUrl_hasQuery (Self.Object), 0);
   end Has_Query;

   --------------------
   -- Has_Query_Item --
   --------------------

   function Has_Query_Item
    (Self : Q_Url'Class;
     Key : Qt4.Strings.Q_String'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QUrl_hasQueryItem_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Key)), 0);
   end Has_Query_Item;

   ----------
   -- Host --
   ----------

   function Host
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_host (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Host;

   --------------
   -- Is_Empty --
   --------------

   function Is_Empty
    (Self : Q_Url'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QUrl_isEmpty (Self.Object), 0);
   end Is_Empty;

   ------------------
   -- Is_Parent_Of --
   ------------------

   function Is_Parent_Of
    (Self : Q_Url'Class;
     Child_Url : Q_Url'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QUrl_isParentOf_QUrlCR (Self.Object, Child_Url.Object), 0);
   end Is_Parent_Of;

   -----------------
   -- Is_Relative --
   -----------------

   function Is_Relative
    (Self : Q_Url'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QUrl_isRelative (Self.Object), 0);
   end Is_Relative;

   --------------
   -- Is_Valid --
   --------------

   function Is_Valid
    (Self : Q_Url'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QUrl_isValid (Self.Object), 0);
   end Is_Valid;

   --------------
   -- Password --
   --------------

   function Password
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_password (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Password;

   ----------
   -- Path --
   ----------

   function Path
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_path (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Path;

   ----------
   -- Port --
   ----------

   function Port
    (Self : Q_Url'Class)
       return Qt4.Q_Integer
   is
   begin
      return QUrl_port (Self.Object);
   end Port;

   ----------
   -- Port --
   ----------

   function Port
    (Self : Q_Url'Class;
     Default_Port : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return QUrl_port_int (Self.Object, Default_Port);
   end Port;

   ----------------------
   -- Query_Item_Value --
   ----------------------

   function Query_Item_Value
    (Self : Q_Url'Class;
     Key : Qt4.Strings.Q_String'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_queryItemValue_QStringCR (Qt4.Strings.Internals.QString_View (Returns), Self.Object, Qt4.Strings.Internals.QString_View (Key));
      end return;
   end Query_Item_Value;

   ------------------------------------
   -- Remove_All_Encoded_Query_Items --
   ------------------------------------

   procedure Remove_All_Encoded_Query_Items
    (Self : in out Q_Url'Class;
     Key : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_removeAllEncodedQueryItems_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Key));
   end Remove_All_Encoded_Query_Items;

   ----------------------------
   -- Remove_All_Query_Items --
   ----------------------------

   procedure Remove_All_Query_Items
    (Self : in out Q_Url'Class;
     Key : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_removeAllQueryItems_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Key));
   end Remove_All_Query_Items;

   -------------------------------
   -- Remove_Encoded_Query_Item --
   -------------------------------

   procedure Remove_Encoded_Query_Item
    (Self : in out Q_Url'Class;
     Key : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_removeEncodedQueryItem_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Key));
   end Remove_Encoded_Query_Item;

   -----------------------
   -- Remove_Query_Item --
   -----------------------

   procedure Remove_Query_Item
    (Self : in out Q_Url'Class;
     Key : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_removeQueryItem_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Key));
   end Remove_Query_Item;

   --------------
   -- Resolved --
   --------------

   function Resolved
    (Self : Q_Url'Class;
     Relative : Q_Url'Class)
       return Q_Url
   is
   begin
      return Returns : Q_Url do
         QUrl_resolved_QUrlCR (Returns.Object, Self.Object, Relative.Object);
      end return;
   end Resolved;

   ------------
   -- Scheme --
   ------------

   function Scheme
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_scheme (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Scheme;

   -------------------
   -- Set_Authority --
   -------------------

   procedure Set_Authority
    (Self : in out Q_Url'Class;
     Authority : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setAuthority_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Authority));
   end Set_Authority;

   --------------------------
   -- Set_Encoded_Fragment --
   --------------------------

   procedure Set_Encoded_Fragment
    (Self : in out Q_Url'Class;
     Fragment : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_setEncodedFragment_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Fragment));
   end Set_Encoded_Fragment;

   ----------------------
   -- Set_Encoded_Host --
   ----------------------

   procedure Set_Encoded_Host
    (Self : in out Q_Url'Class;
     Host : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_setEncodedHost_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Host));
   end Set_Encoded_Host;

   --------------------------
   -- Set_Encoded_Password --
   --------------------------

   procedure Set_Encoded_Password
    (Self : in out Q_Url'Class;
     Password : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_setEncodedPassword_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Password));
   end Set_Encoded_Password;

   ----------------------
   -- Set_Encoded_Path --
   ----------------------

   procedure Set_Encoded_Path
    (Self : in out Q_Url'Class;
     Path : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_setEncodedPath_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Path));
   end Set_Encoded_Path;

   -----------------------
   -- Set_Encoded_Query --
   -----------------------

   procedure Set_Encoded_Query
    (Self : in out Q_Url'Class;
     Query : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_setEncodedQuery_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Query));
   end Set_Encoded_Query;

   ---------------------
   -- Set_Encoded_Url --
   ---------------------

   procedure Set_Encoded_Url
    (Self : in out Q_Url'Class;
     Encoded_Url : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_setEncodedUrl_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Encoded_Url));
   end Set_Encoded_Url;

   ---------------------
   -- Set_Encoded_Url --
   ---------------------

   procedure Set_Encoded_Url
    (Self : in out Q_Url'Class;
     Encoded_Url : Qt4.Byte_Arrays.Q_Byte_Array'Class;
     Mode : Parsing_Mode)
   is
   begin
      QUrl_setEncodedUrl_QByteArrayCR_ParsingMode (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Encoded_Url), Mode);
   end Set_Encoded_Url;

   ---------------------------
   -- Set_Encoded_User_Name --
   ---------------------------

   procedure Set_Encoded_User_Name
    (Self : in out Q_Url'Class;
     User_Name : Qt4.Byte_Arrays.Q_Byte_Array'Class)
   is
   begin
      QUrl_setEncodedUserName_QByteArrayCR (Self.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (User_Name));
   end Set_Encoded_User_Name;

   ------------------
   -- Set_Fragment --
   ------------------

   procedure Set_Fragment
    (Self : in out Q_Url'Class;
     Fragment : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setFragment_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Fragment));
   end Set_Fragment;

   --------------
   -- Set_Host --
   --------------

   procedure Set_Host
    (Self : in out Q_Url'Class;
     Host : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setHost_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Host));
   end Set_Host;

   ------------------
   -- Set_Password --
   ------------------

   procedure Set_Password
    (Self : in out Q_Url'Class;
     Password : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setPassword_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Password));
   end Set_Password;

   --------------
   -- Set_Path --
   --------------

   procedure Set_Path
    (Self : in out Q_Url'Class;
     Path : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setPath_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Path));
   end Set_Path;

   --------------
   -- Set_Port --
   --------------

   procedure Set_Port
    (Self : in out Q_Url'Class;
     Port : Qt4.Q_Integer)
   is
   begin
      QUrl_setPort_int (Self.Object, Port);
   end Set_Port;

   ----------------
   -- Set_Scheme --
   ----------------

   procedure Set_Scheme
    (Self : in out Q_Url'Class;
     Scheme : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setScheme_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Scheme));
   end Set_Scheme;

   -------------
   -- Set_Url --
   -------------

   procedure Set_Url
    (Self : in out Q_Url'Class;
     Url : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setUrl_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Url));
   end Set_Url;

   -------------
   -- Set_Url --
   -------------

   procedure Set_Url
    (Self : in out Q_Url'Class;
     Url : Qt4.Strings.Q_String'Class;
     Mode : Parsing_Mode)
   is
   begin
      QUrl_setUrl_QStringCR_ParsingMode (Self.Object, Qt4.Strings.Internals.QString_View (Url), Mode);
   end Set_Url;

   -------------------
   -- Set_User_Info --
   -------------------

   procedure Set_User_Info
    (Self : in out Q_Url'Class;
     User_Info : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setUserInfo_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (User_Info));
   end Set_User_Info;

   -------------------
   -- Set_User_Name --
   -------------------

   procedure Set_User_Name
    (Self : in out Q_Url'Class;
     User_Name : Qt4.Strings.Q_String'Class)
   is
   begin
      QUrl_setUserName_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (User_Name));
   end Set_User_Name;

   -------------------
   -- To_Local_File --
   -------------------

   function To_Local_File
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_toLocalFile (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end To_Local_File;

   ---------------
   -- User_Info --
   ---------------

   function User_Info
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_userInfo (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end User_Info;

   ---------------
   -- User_Name --
   ---------------

   function User_Name
    (Self : Q_Url'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_userName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end User_Name;

   ---------
   -- "=" --
   ---------

   overriding
   function "="
    (Self : Q_Url;
     Url : Q_Url)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (eq_QUrlCR (Self.Object, Url.Object), 0);
   end "=";

   --------------
   -- From_Ace --
   --------------

   function From_Ace
    (Domain : Qt4.Byte_Arrays.Q_Byte_Array'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_fromAce_QByteArrayCR (Qt4.Strings.Internals.QString_View (Returns), Qt4.Byte_Arrays.Internals.QByteArray_View (Domain));
      end return;
   end From_Ace;

   ------------------
   -- From_Encoded --
   ------------------

   function From_Encoded
    (Input : Qt4.Byte_Arrays.Q_Byte_Array'Class)
       return Q_Url
   is
   begin
      return Returns : Q_Url do
         QUrl_fromEncoded_QByteArrayCR (Returns.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Input));
      end return;
   end From_Encoded;

   ------------------
   -- From_Encoded --
   ------------------

   function From_Encoded
    (Input : Qt4.Byte_Arrays.Q_Byte_Array'Class;
     Mode : Parsing_Mode)
       return Q_Url
   is
   begin
      return Returns : Q_Url do
         QUrl_fromEncoded_QByteArrayCR_ParsingMode (Returns.Object, Qt4.Byte_Arrays.Internals.QByteArray_View (Input), Mode);
      end return;
   end From_Encoded;

   ---------------------
   -- From_Local_File --
   ---------------------

   function From_Local_File
    (Local_File : Qt4.Strings.Q_String'Class)
       return Q_Url
   is
   begin
      return Returns : Q_Url do
         QUrl_fromLocalFile_QStringCR (Returns.Object, Qt4.Strings.Internals.QString_View (Local_File));
      end return;
   end From_Local_File;

   ---------------------------
   -- From_Percent_Encoding --
   ---------------------------

   function From_Percent_Encoding
    (Domain : Qt4.Byte_Arrays.Q_Byte_Array'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QUrl_fromPercentEncoding_QByteArrayCR (Qt4.Strings.Internals.QString_View (Returns), Qt4.Byte_Arrays.Internals.QByteArray_View (Domain));
      end return;
   end From_Percent_Encoding;

   -------------------
   -- Idn_Whitelist --
   -------------------

   function Idn_Whitelist
     return Qt4.String_Lists.Q_String_List
   is
   begin
      return Returns : Qt4.String_Lists.Q_String_List do
         QUrl_idnWhitelist (Qt4.String_Lists.Internals.QStringList_View (Returns));
      end return;
   end Idn_Whitelist;

   -----------------------
   -- Set_Idn_Whitelist --
   -----------------------

   procedure Set_Idn_Whitelist
    (List : Qt4.String_Lists.Q_String_List'Class)
   is
   begin
      QUrl_setIdnWhitelist_QStringListCR (Qt4.String_Lists.Internals.QStringList_View (List));
   end Set_Idn_Whitelist;

   ------------
   -- To_Ace --
   ------------

   function To_Ace
    (Domain : Qt4.Strings.Q_String'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_toAce_QStringCR (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns), Qt4.Strings.Internals.QString_View (Domain));
      end return;
   end To_Ace;

   -------------------------
   -- To_Percent_Encoding --
   -------------------------

   function To_Percent_Encoding
    (Input : Qt4.Strings.Q_String'Class;
     Exclude : Qt4.Byte_Arrays.Q_Byte_Array'Class;
     Include : Qt4.Byte_Arrays.Q_Byte_Array'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
   begin
      return Returns : Qt4.Byte_Arrays.Q_Byte_Array do
         QUrl_toPercentEncoding_QStringCR_QByteArrayCR_QByteArrayCR
          (Qt4.Byte_Arrays.Internals.QByteArray_View (Returns),
           Qt4.Strings.Internals.QString_View (Input),
           Qt4.Byte_Arrays.Internals.QByteArray_View (Exclude),
           Qt4.Byte_Arrays.Internals.QByteArray_View (Include));
      end return;
   end To_Percent_Encoding;

   ---------------
   -- Internals --
   ---------------

   package body Internals is

   ---------------
   -- QUrl_View --
   ---------------

      function QUrl_View
       (Item : Q_Url'Class)
          return QUrl_Access
      is
      begin
         return Item.Object;
      end QUrl_View;

      package QUrl_Conversions is
        new System.Address_To_Access_Conversions
             (QUrl);

   --------------------
   -- QUrlTo_Pointer --
   --------------------

      function To_Pointer
       (Address : System.Address)
          return QUrl_Access
      is
      begin
         return
           QUrl_Access
            (QUrl_Conversions.To_Pointer
            (Address));
      end To_Pointer;

   --------------------
   -- QUrlTo_Address --
   --------------------

      function To_Address
       (Pointer : QUrl_Access)
          return System.Address
      is
      begin
         return
           QUrl_Conversions.To_Address
            (QUrl_Conversions.Object_Pointer
              (Pointer));
      end To_Address;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QUrl_Access)
          return Q_Url
      is
      begin
         return Q_Url'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   end Internals;

end Qt4.Urls;
