Browse Source

* PChar -> PAnsiChar

Michaël Van Canneyt 2 năm trước cách đây
mục cha
commit
a4265d4c64

+ 7 - 7
packages/dbus/examples/busexample.pp

@@ -23,7 +23,7 @@ var
 {
  * Send a broadcast signal
  }
-procedure BusSend(sigvalue: PChar);
+procedure BusSend(sigvalue: PAnsiChar);
 var
   msg: PDBusMessage;
   args: DBusMessageIter;
@@ -82,7 +82,7 @@ procedure BusReceive;
 var
   msg: PDBusMessage;
   args: DBusMessageIter;
-  sigvalue: PChar;
+  sigvalue: PAnsiChar;
 begin
   WriteLn('Listening for signals');
 
@@ -146,7 +146,7 @@ var
   stat: Boolean = true;
   level: dbus_uint32_t = 21614;
   serial: dbus_uint32_t = 0;
-  param: PChar = '';
+  param: PAnsiChar = '';
 begin
    // read the arguments
    if (dbus_message_iter_init(msg, @args) = 0) then
@@ -193,7 +193,7 @@ procedure BusListen;
 var
   msg, reply: PDBusMessage;
   args: DBusMessageIter;
-  param: PChar;
+  param: PAnsiChar;
 begin
   WriteLn('Listening for method calls');
 
@@ -234,7 +234,7 @@ end;
 {
  * Call a method on a remote object
  }
-procedure BusCall(param: PChar);
+procedure BusCall(param: PAnsiChar);
 var
   msg: PDBusMessage;
   args: DBusMessageIter;
@@ -346,10 +346,10 @@ begin
   if (ParamCount <> 1) and (ParamCount <> 2) then WriteLn(SINTAX_TEXT)
   else
   begin
-    if ParamStr(1) = 'send' then BusSend(PChar(ParamStr(2)))
+    if ParamStr(1) = 'send' then BusSend(PAnsiChar(ParamStr(2)))
     else if ParamStr(1) = 'receive' then BusReceive()
     else if ParamStr(1) = 'listen' then BusListen()
-    else if ParamStr(1) = 'call' then BusCall(PChar(ParamStr(2)))
+    else if ParamStr(1) = 'call' then BusCall(PAnsiChar(ParamStr(2)))
     else WriteLn(SINTAX_TEXT);
   end;
 

+ 5 - 5
packages/dbus/src/dbus-address.inc

@@ -35,12 +35,12 @@ type
 
   PPPDBusAddressEntry = ^PPDBusAddressEntry;
 
-function dbus_parse_address(const address: PChar; entry: PPPDBusAddressEntry;
+function dbus_parse_address(const address: PAnsiChar; entry: PPPDBusAddressEntry;
  array_len: PInteger; error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
-function dbus_address_entry_get_value(entry: PDBusAddressEntry; const key: PChar): PChar; cdecl; external LibDBus;
-function dbus_address_entry_get_method(entry: PDBusAddressEntry): PChar; cdecl; external LibDBus;
+function dbus_address_entry_get_value(entry: PDBusAddressEntry; const key: PAnsiChar): PAnsiChar; cdecl; external LibDBus;
+function dbus_address_entry_get_method(entry: PDBusAddressEntry): PAnsiChar; cdecl; external LibDBus;
 procedure dbus_address_entries_free(entries: PPDBusAddressEntry); cdecl; external LibDBus;
 
-function dbus_address_escape_value(const value: PChar): PChar; cdecl; external LibDBus;
-function dbus_address_unescape_value(const value: PChar; error: PDBusError): PChar; cdecl; external LibDBus;
+function dbus_address_escape_value(const value: PAnsiChar): PAnsiChar; cdecl; external LibDBus;
+function dbus_address_unescape_value(const value: PAnsiChar; error: PDBusError): PAnsiChar; cdecl; external LibDBus;
 

+ 10 - 10
packages/dbus/src/dbus-bus.inc

@@ -29,25 +29,25 @@ function dbus_bus_get_private(type_: DBusBusType; error: PDBusError): PDBusConne
  
 function dbus_bus_register(connection: PDBusConnection; error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
 function dbus_bus_set_unique_name(connection: PDBusConnection;
- const unique_name: PChar): dbus_bool_t; cdecl; external LibDBus;
-function dbus_bus_get_unique_name(connection: PDBusConnection): PChar; cdecl; external LibDBus;
+ const unique_name: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_bus_get_unique_name(connection: PDBusConnection): PAnsiChar; cdecl; external LibDBus;
 function dbus_bus_get_unix_user(connection: PDBusConnection;
- const name: PChar; error: PDBusError): culong; cdecl; external LibDBus;
-function dbus_bus_get_id(connection: PDBusConnection; error: PDBusError): PChar; cdecl; external LibDBus;
+ const name: PAnsiChar; error: PDBusError): culong; cdecl; external LibDBus;
+function dbus_bus_get_id(connection: PDBusConnection; error: PDBusError): PAnsiChar; cdecl; external LibDBus;
 function dbus_bus_request_name(connection: PDBusConnection;
- const name: PChar; flags: cuint; error: PDBusError): cint; cdecl; external LibDBus;
+ const name: PAnsiChar; flags: cuint; error: PDBusError): cint; cdecl; external LibDBus;
 function dbus_bus_release_name(connection: PDBusConnection;
- const name: PChar; error: PDBusError): cint; cdecl; external LibDBus;
+ const name: PAnsiChar; error: PDBusError): cint; cdecl; external LibDBus;
 function dbus_bus_name_has_owner(connection: PDBusConnection;
- const name: PChar; error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
+ const name: PAnsiChar; error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_bus_start_service_by_name (connection: PDBusConnection;
- const name: PChar; flags: dbus_uint32_t; reply: Pdbus_uint32_t;
+ const name: PAnsiChar; flags: dbus_uint32_t; reply: Pdbus_uint32_t;
  error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
 
 procedure dbus_bus_add_match(connection: PDBusConnection;
- const rule: PChar; error: PDBusError); cdecl; external LibDBus;
+ const rule: PAnsiChar; error: PDBusError); cdecl; external LibDBus;
 procedure dbus_bus_remove_match(connection: PDBusConnection;
- const rule: PChar; error: PDBusError); cdecl; external LibDBus;
+ const rule: PAnsiChar; error: PDBusError); cdecl; external LibDBus;
 
 

+ 13 - 13
packages/dbus/src/dbus-connection.inc

@@ -74,7 +74,7 @@ type
    uid: cuint; data: Pointer): dbus_bool_t; cdecl;
 
   DBusAllowWindowsUserFunction = function(connection: PDBusConnection;
-   user_sid: PChar; data: Pointer): dbus_bool_t; cdecl;
+   user_sid: PAnsiChar; data: Pointer): dbus_bool_t; cdecl;
 
   DBusPendingCallNotifyFunction = procedure(pending: PDBusPendingCall;
    user_data: Pointer); cdecl;
@@ -82,15 +82,15 @@ type
   DBusHandleMessageFunction = function(connection: PDBusConnection;
    message_: PDBusMessage; user_data: Pointer): DBusHandlerResult; cdecl;
 
-function dbus_connection_open(const address: PChar; error: PDBusError): PDBusConnection; cdecl; external LibDBus;
-function dbus_connection_open_private(const address: PChar; error: PDBusError): PDBusConnection; cdecl; external LibDBus;
+function dbus_connection_open(const address: PAnsiChar; error: PDBusError): PDBusConnection; cdecl; external LibDBus;
+function dbus_connection_open_private(const address: PAnsiChar; error: PDBusError): PDBusConnection; cdecl; external LibDBus;
 function dbus_connection_ref(connection: PDBusConnection): PDBusConnection; cdecl; external LibDBus;
 procedure dbus_connection_unref(connection: PDBusConnection); cdecl; external LibDBus;
 procedure dbus_connection_close(connection: PDBusConnection); cdecl; external LibDBus;
 function dbus_connection_get_is_connected(connection: PDBusConnection): dbus_bool_t; cdecl; external LibDBus;
 function dbus_connection_get_is_authenticated(connection: PDBusConnection): dbus_bool_t; cdecl; external LibDBus;
 function dbus_connection_get_is_anonymous(connection: PDBusConnection): dbus_bool_t; cdecl; external LibDBus;
-function dbus_connection_get_server_id(connection: PDBusConnection):pchar;cdecl; external LibDBus;
+function dbus_connection_get_server_id(connection: PDBusConnection):PAnsiChar;cdecl; external LibDBus;
 procedure dbus_connection_set_exit_on_disconnect(connection: PDBusConnection;
  exit_on_disconnect: dbus_bool_t); cdecl; external LibDBus;
 procedure dbus_connection_flush(connection: PDBusConnection); cdecl; external LibDBus;
@@ -147,7 +147,7 @@ procedure dbus_connection_set_unix_user_function(connection: PDBusConnection;
  free_data_function: DBusFreeFunction); cdecl; external LibDBus;
 
 function dbus_connection_get_windows_user(connection: PDBusConnection;
- windows_sid_p: PPChar): dbus_bool_t; cdecl; external LibDBus;
+ windows_sid_p: PPAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 procedure dbus_connection_set_windows_user_function(connection: PDBusConnection;
  function_: DBusAllowWindowsUserFunction;
  data: Pointer;
@@ -236,31 +236,31 @@ type
   end;
 
 function dbus_connection_try_register_object_path(connection: PDBusConnection;
-  path: PChar; vtable: PDBusObjectPathVTable; user_data: Pointer;
+  path: PAnsiChar; vtable: PDBusObjectPathVTable; user_data: Pointer;
   error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_connection_register_object_path(connection: PDBusConnection;
- path: PChar; vtable: PDBusObjectPathVTable;
+ path: PAnsiChar; vtable: PDBusObjectPathVTable;
  user_data: Pointer): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_connection_try_register_fallback(connection: PDBusConnection;
- path: PChar; vtable: PDBusObjectPathVTable; user_data: Pointer;
+ path: PAnsiChar; vtable: PDBusObjectPathVTable; user_data: Pointer;
  error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_connection_register_fallback(connection: PDBusConnection;
- const path: PChar;
+ const path: PAnsiChar;
  const vtable: PDBusObjectPathVTable;
  user_data: Pointer): dbus_bool_t; cdecl; external LibDBus;
 function dbus_connection_unregister_object_path(connection: PDBusConnection;
- const path: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const path: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_connection_get_object_path_data(connection: PDBusConnection;
- const path: PChar;
+ const path: PAnsiChar;
  data_p: PPointer): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_connection_list_registered(connection: PDBusConnection;
- const parent_path: PChar;
- child_entries: PPPChar): dbus_bool_t; cdecl; external LibDBus;
+ const parent_path: PAnsiChar;
+ child_entries: PPPAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_connection_get_unix_fd(connection: PDBusConnection;
  fd: Pcint): dbus_bool_t; cdecl; external LibDBus;

+ 5 - 5
packages/dbus/src/dbus-errors.inc

@@ -33,8 +33,8 @@ type
  * Object representing an exception.
  }
   DBusError = record
-    name: PChar;    {< error name }
-    message: PChar; {< error message }
+    name: PAnsiChar;    {< error name }
+    message: PAnsiChar; {< error message }
 
     dummy1: cuint; //: 1; {< placeholder }
 //  unsigned int dummy2 : 1; {< placeholder }
@@ -47,9 +47,9 @@ type
 
 procedure dbus_error_init(error: PDBusError); cdecl; external LibDBus;
 procedure dbus_error_free(error: PDBusError); cdecl; external LibDBus;
-procedure dbus_set_error(error: PDBusError; const name, message: PChar; others: array of const); cdecl; external LibDBus;
-procedure dbus_set_error_const(error: PDBusError; const name, message: PChar); cdecl; external LibDBus;
+procedure dbus_set_error(error: PDBusError; const name, message: PAnsiChar; others: array of const); cdecl; external LibDBus;
+procedure dbus_set_error_const(error: PDBusError; const name, message: PAnsiChar); cdecl; external LibDBus;
 procedure dbus_move_error(src, dest: PDBusError); cdecl; external LibDBus;
-function dbus_error_has_name(const error: PDBusError; const name: PChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_error_has_name(const error: PDBusError; const name: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_error_is_set(const error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
 

+ 1 - 1
packages/dbus/src/dbus-memory.inc

@@ -33,7 +33,7 @@ procedure dbus_free(memory: Pointer); cdecl; external LibDBus;
 //#define dbus_new(type, count)  ((type*)dbus_malloc (sizeof (type) * (count)));
 //#define dbus_new0(type, count) ((type*)dbus_malloc0 (sizeof (type) * (count)));
 
-procedure dbus_free_string_array(str_array: PPChar); cdecl; external LibDBus;
+procedure dbus_free_string_array(str_array: PPAnsiChar); cdecl; external LibDBus;
 
 type
   DBusFreeFunction = procedure(memory: Pointer); cdecl;

+ 33 - 33
packages/dbus/src/dbus-message.inc

@@ -57,13 +57,13 @@ type
 
 function dbus_message_new(message_type: Integer): PDBusMessage; cdecl; external LibDBus;
 function dbus_message_new_method_call(
- const bus_name, path, interface_, method: PChar): PDBusMessage; cdecl; external LibDBus;
+ const bus_name, path, interface_, method: PAnsiChar): PDBusMessage; cdecl; external LibDBus;
 function dbus_message_new_method_return(method_call: PDBusMessage): PDBusMessage; cdecl; external LibDBus;
-function dbus_message_new_signal(const path, interface_, name: PChar): PDBusMessage; cdecl; external LibDBus;
+function dbus_message_new_signal(const path, interface_, name: PAnsiChar): PDBusMessage; cdecl; external LibDBus;
 function dbus_message_new_error(reply_to: PDBusMessage;
- const error_name, error_message: PChar): PDBusMessage; cdecl; external LibDBus;
+ const error_name, error_message: PAnsiChar): PDBusMessage; cdecl; external LibDBus;
 function dbus_message_new_error_printf(reply_to: PDBusMessage;
- const error_name, error_format: PChar;
+ const error_name, error_format: PAnsiChar;
  others: array of const): PDBusMessage; cdecl; external LibDBus;
 
 function dbus_message_copy(const message_: PDBusMessage): PDBusMessage; cdecl; external LibDBus;
@@ -72,45 +72,45 @@ function dbus_message_ref(message_: PDBusMessage): PDBusMessage; cdecl; external
 procedure dbus_message_unref(message_: PDBusMessage); cdecl; external LibDBus;
 function dbus_message_get_type(message_: PDBusMessage): cint; cdecl; external LibDBus;
 function dbus_message_set_path(message_: PDBusMessage;
- const object_path: PChar): dbus_bool_t; cdecl; external LibDBus;
-function dbus_message_get_path(message_: PDBusMessage): PChar; cdecl; external LibDBus;
+ const object_path: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_message_get_path(message_: PDBusMessage): PAnsiChar; cdecl; external LibDBus;
 function dbus_message_has_path(message_: PDBusMessage;
- const object_path: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const object_path: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_set_interface(message_: PDBusMessage;
- const interface_: PChar): dbus_bool_t; cdecl; external LibDBus;
-function dbus_message_get_interface(message_: PDBusMessage): PChar; cdecl; external LibDBus;
+ const interface_: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_message_get_interface(message_: PDBusMessage): PAnsiChar; cdecl; external LibDBus;
 function dbus_message_has_interface(message_: PDBusMessage;
- const interface_: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const interface_: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_set_member(message_: PDBusMessage;
- const member: PChar): dbus_bool_t; cdecl; external LibDBus;
-function dbus_message_get_member(message_: PDBusMessage): PChar; cdecl; external LibDBus;
+ const member: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_message_get_member(message_: PDBusMessage): PAnsiChar; cdecl; external LibDBus;
 function dbus_message_has_member(message_: PDBusMessage;
- const member: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const member: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_set_error_name(message_: PDBusMessage;
- const name: PChar): dbus_bool_t; cdecl; external LibDBus;
-function dbus_message_get_error_name(message_: PDBusMessage): PChar; cdecl; external LibDBus;
+ const name: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_message_get_error_name(message_: PDBusMessage): PAnsiChar; cdecl; external LibDBus;
 function dbus_message_set_destination(message_: PDBusMessage;
- const destination: PChar): dbus_bool_t; cdecl; external LibDBus;
-function dbus_message_get_destination(message_: PDBusMessage): PChar; cdecl; external LibDBus;
+ const destination: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_message_get_destination(message_: PDBusMessage): PAnsiChar; cdecl; external LibDBus;
 function dbus_message_set_sender(message_: PDBusMessage;
- const sender: PChar): dbus_bool_t; cdecl; external LibDBus;
-function dbus_message_get_sender(message_: PDBusMessage): PChar; cdecl; external LibDBus;
-function dbus_message_get_signature(message_: PDBusMessage): PChar; cdecl; external LibDBus;
+ const sender: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_message_get_sender(message_: PDBusMessage): PAnsiChar; cdecl; external LibDBus;
+function dbus_message_get_signature(message_: PDBusMessage): PAnsiChar; cdecl; external LibDBus;
 procedure dbus_message_set_no_reply(message_: PDBusMessage;
  no_reply: dbus_bool_t); cdecl; external LibDBus;
 function dbus_message_get_no_reply(message_: PDBusMessage): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_is_method_call(message_: PDBusMessage;
- const interface_, method: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const interface_, method: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_is_signal(message_: PDBusMessage;
- const interface_, signal_name: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const interface_, signal_name: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_is_error(message_: PDBusMessage;
- const error_name: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const error_name: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_has_destination(message_: PDBusMessage;
- const bus_name: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const bus_name: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_has_sender(message_: PDBusMessage;
- const unique_bus_name: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const unique_bus_name: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_has_signature(message_: PDBusMessage;
- const signature: PChar): dbus_bool_t; cdecl; external LibDBus;
+ const signature: PAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_get_serial(message_: PDBusMessage): dbus_uint32_t; cdecl; external LibDBus;
 function dbus_message_set_reply_serial(message_: PDBusMessage;
  reply_serial: dbus_uint32_t): dbus_bool_t; cdecl; external LibDBus;
@@ -119,7 +119,7 @@ function dbus_message_get_reply_serial(message_: PDBusMessage): dbus_uint32_t; c
 procedure dbus_message_set_auto_start(message_: PDBusMessage; auto_start: dbus_bool_t); cdecl; external LibDBus;
 function dbus_message_get_auto_start(message_: PDBusMessage): dbus_bool_t; cdecl; external LibDBus;
 
-function dbus_message_get_path_decomposed(message_: PDBusMessage; path: PPPChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_message_get_path_decomposed(message_: PDBusMessage; path: PPPAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_message_append_args(message_: PDBusMessage;
  first_arg_type: cint; others: array of const): dbus_bool_t; cdecl; external LibDBus;
@@ -134,7 +134,7 @@ function dbus_message_get_args_valist(message_: PDBusMessage;
 function dbus_message_iter_init(message_: PDBusMessage; iter: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_iter_has_next(iter: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_iter_next(iter: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
-function dbus_message_iter_get_signature(iter: PDBusMessageIter): PChar; cdecl; external LibDBus;
+function dbus_message_iter_get_signature(iter: PDBusMessageIter): PAnsiChar; cdecl; external LibDBus;
 function dbus_message_iter_get_arg_type(iter: PDBusMessageIter): cint; cdecl; external LibDBus;
 function dbus_message_iter_get_element_type(iter: PDBusMessageIter): cint; cdecl; external LibDBus;
 procedure dbus_message_iter_recurse(iter, sub: PDBusMessageIter); cdecl; external LibDBus;
@@ -151,7 +151,7 @@ function dbus_message_iter_append_basic(iter: PDBusMessageIter;
 function dbus_message_iter_append_fixed_array(iter: PDBusMessageIter;
  element_type: cint; const value: Pointer; n_elements: cint): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_iter_open_container(iter: PDBusMessageIter;
- type_: cint; const contained_signature: PChar; sub: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
+ type_: cint; const contained_signature: PAnsiChar; sub: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_iter_close_container(iter, sub: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
 
 
@@ -164,12 +164,12 @@ function dbus_message_set_data(message_: PDBusMessage;
  slot: dbus_int32_t; data: Pointer; free_data_func: DBusFreeFunction): dbus_bool_t; cdecl; external LibDBus;
 function dbus_message_get_data(message_: PDBusMessage; slot: dbus_int32_t): Pointer; cdecl; external LibDBus;
 
-function dbus_message_type_from_string(const type_str: PChar): cint; cdecl; external LibDBus;
-function dbus_message_type_to_string(type_: cint): PChar; cdecl; external LibDBus;
+function dbus_message_type_from_string(const type_str: PAnsiChar): cint; cdecl; external LibDBus;
+function dbus_message_type_to_string(type_: cint): PAnsiChar; cdecl; external LibDBus;
 
 function dbus_message_marshal(msg: PDBusMessage;
- marshalled_data_p: PPChar;
+ marshalled_data_p: PPAnsiChar;
  len_p: pcint): dbus_bool_t; cdecl; external LibDBus;
-function dbus_message_demarshal(const str: PChar;
+function dbus_message_demarshal(const str: PAnsiChar;
  len: cint; error: PDBusError): PDBusMessage; cdecl; external LibDBus;
 

+ 1 - 1
packages/dbus/src/dbus-misc.inc

@@ -22,7 +22,7 @@
  }
 
 
-function dbus_get_local_machine_id: PChar; cdecl; external LibDBus;
+function dbus_get_local_machine_id: PAnsiChar; cdecl; external LibDBus;
 
 procedure dbus_get_version(major_version_p, minor_version_p,
   micro_version_p: Pcint); cdecl; external LibDBus;

+ 4 - 4
packages/dbus/src/dbus-server.inc

@@ -34,13 +34,13 @@ type
   DBusNewConnectionFunction = procedure (server: PDBusServer;
    new_connection: PDBusConnection; data: Pointer); cdecl;
 
-function dbus_server_listen(const address: PChar; error: PDBusError): PDBusServer; cdecl; external LibDBus;
+function dbus_server_listen(const address: PAnsiChar; error: PDBusError): PDBusServer; cdecl; external LibDBus;
 function dbus_server_ref(server: PDBusServer): PDBusServer; cdecl; external LibDBus;
 procedure dbus_server_unref(server: PDBusServer); cdecl; external LibDBus;
 procedure dbus_server_disconnect(server: PDBusServer); cdecl; external LibDBus;
 function dbus_server_get_is_connected(server: PDBusServer): dbus_bool_t; cdecl; external LibDBus;
-function dbus_server_get_address(server: PDBusServer): PChar; cdecl; external LibDBus;
-function dbus_server_get_id(server: PDBusServer): PChar; cdecl; external LibDBus;
+function dbus_server_get_address(server: PDBusServer): PAnsiChar; cdecl; external LibDBus;
+function dbus_server_get_id(server: PDBusServer): PAnsiChar; cdecl; external LibDBus;
 procedure dbus_server_set_new_connection_function(server: PDBusServer;
  function_: DBusNewConnectionFunction; data: Pointer; free_data_function: DBusFreeFunction); cdecl; external LibDBus;
 function dbus_server_set_watch_functions(server: PDBusServer;
@@ -55,7 +55,7 @@ function dbus_server_set_timeout_functions(server: PDBusServer;
  toggled_function: DBusTimeoutToggledFunction;
  data: Pointer;
  free_data_function: DBusFreeFunction): dbus_bool_t; cdecl; external LibDBus;
-function dbus_server_set_auth_mechanisms(server: PDBusServer; const mechanisms: PPChar): dbus_bool_t; cdecl; external LibDBus;
+function dbus_server_set_auth_mechanisms(server: PDBusServer; const mechanisms: PPAnsiChar): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_server_allocate_data_slot(slot_p: Pdbus_int32_t): dbus_bool_t; cdecl; external LibDBus;
 procedure dbus_server_free_data_slot(slot_p: Pdbus_int32_t); cdecl; external LibDBus;

+ 4 - 4
packages/dbus/src/dbus-signature.inc

@@ -40,11 +40,11 @@ type
   
   PDBusSignatureIter = ^DBusSignatureIter;
 
-procedure dbus_signature_iter_init(iter: PDBusSignatureIter; const signature: PChar); cdecl; external LibDBus;
+procedure dbus_signature_iter_init(iter: PDBusSignatureIter; const signature: PAnsiChar); cdecl; external LibDBus;
 
 function dbus_signature_iter_get_current_type(const iter: PDBusSignatureIter): Integer; cdecl; external LibDBus;
 
-function dbus_signature_iter_get_signature(const iter: PDBusSignatureIter): PChar; cdecl; external LibDBus;
+function dbus_signature_iter_get_signature(const iter: PDBusSignatureIter): PAnsiChar; cdecl; external LibDBus;
 
 function dbus_signature_iter_get_element_type(const iter: PDBusSignatureIter): Integer; cdecl; external LibDBus;
 
@@ -52,9 +52,9 @@ function dbus_signature_iter_next(const iter: PDBusSignatureIter): dbus_bool_t;
 
 procedure dbus_signature_iter_recurse(const iter: PDBusSignatureIter; subiter: PDBusSignatureIter); cdecl; external LibDBus;
 
-function dbus_signature_validate(const signature: PChar; error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
+function dbus_signature_validate(const signature: PAnsiChar; error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
 
-function dbus_signature_validate_single(const signature: PChar; error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
+function dbus_signature_validate_single(const signature: PAnsiChar; error: PDBusError): dbus_bool_t; cdecl; external LibDBus;
 
 function dbus_type_is_basic(typecode: cint): dbus_bool_t; cdecl; external LibDBus;
 function dbus_type_is_container(typecode: cint): dbus_bool_t; cdecl; external LibDBus;

+ 135 - 135
packages/dbus/src/dbuscomp.pp

@@ -34,7 +34,7 @@ Type
   TInt64Array = Array of Int64;
   TQWordArray = Array of QWord;
   TDoubleArray = Array of Double;
-  TStringArray = Array of String;
+  TStringArray = Array of AnsiString;
 
   TDBUSDictionary = Class;
   { TDBusMessageIterator }
@@ -43,8 +43,8 @@ Type
   private
     FIter : DBUSMessageIter;
   protected
-    Procedure Error(Const Msg : String);
-    Procedure Error(Const Fmt : String; Args : Array of Const);
+    Procedure Error(Const Msg : AnsiString);
+    Procedure Error(Const Fmt : AnsiString; Args : Array of Const);
   Public
     Constructor Create(AIter : DBUSMessageIter);
     Function GetFixedArray(Const AElementType : cint; Var P : Pointer) : cInt;
@@ -63,7 +63,7 @@ Type
     Procedure GetArgument(var Arg : Int64);
     Procedure GetArgument(Var Arg : QWord);
     Procedure GetArgument(var Arg : Double);
-    Procedure GetArgument(var Arg : String);
+    Procedure GetArgument(var Arg : AnsiString);
     Procedure GetArgument(Var Arg : TByteArray);
     Procedure GetArgument(Var Arg : TBooleanArray);
     Procedure GetArgument(Var Arg : TSmallIntArray);
@@ -87,7 +87,7 @@ Type
     Procedure AppendArgument(Const Arg : Int64);
     Procedure AppendArgument(Const Arg : QWord);
     Procedure AppendArgument(Const Arg : Double);
-    Procedure AppendArgument(Const Arg : String);
+    Procedure AppendArgument(Const Arg : AnsiString);
   end;
 
   TDBUSDictItem = Class(TCollectionItem)
@@ -128,8 +128,8 @@ Type
     Procedure CheckAllocated;
     Function Allocated : boolean;
     Function Copy : TDBUSMessage;
-    Procedure Error(Const Msg : String);
-    Procedure Error(Const Fmt : String; Args : Array of Const);
+    Procedure Error(Const Msg : AnsiString);
+    Procedure Error(Const Fmt : AnsiString; Args : Array of Const);
     Property Message : PDBUSMessage Read GetMessage;
     Property FromSource : Boolean Read FFromSource;
     Property Serial : dbus_uint32_t Read GetSerial;
@@ -147,7 +147,7 @@ Type
     Procedure AppendArgument(Const Arg : Int64);
     Procedure AppendArgument(Const Arg : QWord);
     Procedure AppendArgument(Const Arg : Double);
-    Procedure AppendArgument(Const Arg : String);
+    Procedure AppendArgument(Const Arg : AnsiString);
     Procedure Get(AType : cInt; Var Value);
     Procedure GetArgument(Var Arg : Byte);
     Procedure GetArgument(Var Arg : Boolean);
@@ -158,7 +158,7 @@ Type
     Procedure GetArgument(var Arg : Int64);
     Procedure GetArgument(Var Arg : QWord);
     Procedure GetArgument(var Arg : Double);
-    Procedure GetArgument(var Arg : String);
+    Procedure GetArgument(var Arg : AnsiString);
     Procedure GetArgument(Var Arg : TByteArray);
     Procedure GetArgument(Var Arg : TBooleanArray);
     Procedure GetArgument(Var Arg : TSmallIntArray);
@@ -174,10 +174,10 @@ Type
     Procedure GetArgument(Const Arg : TDBUSDictionary);
     Function GetNextArgumentType : cInt;
     Function GetArrayElementType : cInt;
-    Function HasPath(Const APath : String) : boolean; virtual;
-    Function HasSender(Const ASender : String) : boolean; virtual;
-    Function HasSignature(Const ASignature : String) : boolean; virtual;
-    Function IsError(Const AError : string) : Boolean; virtual;
+    Function HasPath(Const APath : AnsiString) : boolean; virtual;
+    Function HasSender(Const ASender : AnsiString) : boolean; virtual;
+    Function HasSignature(Const ASignature : AnsiString) : boolean; virtual;
+    Function IsError(Const AError : AnsiString) : Boolean; virtual;
   end;
 
   TDBUSGUID = Array[1..32] of Byte;
@@ -190,15 +190,15 @@ Type
   end;
   TDBUSInterfaceMessage = Class(TDBusMessage)
   Private
-    FInterface: String;
-    FPath: String;
-    procedure SetInterface(const AValue: String);
-    function GetInterface: String;
-    procedure SetPath(const AValue: String);
+    FInterface: AnsiString;
+    FPath: AnsiString;
+    procedure SetInterface(const AValue: AnsiString);
+    function GetInterface: AnsiString;
+    procedure SetPath(const AValue: AnsiString);
   Public
-    Function HasPath(Const APath : String) : boolean; override;
-    Property ObjectPath : String Read FPath Write SetPath;
-    Property InterfaceName : String Read GetInterface Write SetInterface;
+    Function HasPath(Const APath : AnsiString) : boolean; override;
+    Property ObjectPath : AnsiString Read FPath Write SetPath;
+    Property InterfaceName : AnsiString Read GetInterface Write SetInterface;
   end;
 
 
@@ -206,31 +206,31 @@ Type
 
   TDBusMethodCallMessage = Class(TDBUSInterfaceMessage)
   private
-    FDestination: String;
-    FMethod: String;
-    procedure SetDestination(const AValue: String);
-    procedure SetMethod(const AValue: String);
+    FDestination: AnsiString;
+    FMethod: AnsiString;
+    procedure SetDestination(const AValue: AnsiString);
+    procedure SetMethod(const AValue: AnsiString);
   Protected
     Class function MessageType : cint; override;
     Procedure AllocateMessage; override;
   Public
-    Constructor Create(Const ADestination,AObjectPath,AInterface,AMethod : String); virtual; overload;
-    Property Destination : String Read FDestination Write SetDestination;
-    Property MethodName : String Read FMethod Write SetMethod;
+    Constructor Create(Const ADestination,AObjectPath,AInterface,AMethod : AnsiString); virtual; overload;
+    Property Destination : AnsiString Read FDestination Write SetDestination;
+    Property MethodName : AnsiString Read FMethod Write SetMethod;
   end;
 
   { TDBusSignalMessage }
 
   TDBusSignalMessage = Class(TDBusInterfaceMessage)
   private
-    FName: String;
-    procedure SetName(const AValue: String);
+    FName: AnsiString;
+    procedure SetName(const AValue: AnsiString);
   Protected
     Class function MessageType : cint; override;
     Procedure AllocateMessage; override;
   Public
-    Constructor Create(Const AObjectPath,AInterface,AName : String); virtual; overload;
-    Property Name : String Read FName Write SetName;
+    Constructor Create(Const AObjectPath,AInterface,AName : AnsiString); virtual; overload;
+    Property Name : AnsiString Read FName Write SetName;
   end;
 
   { TDBusReplyToMessage }
@@ -246,19 +246,19 @@ Type
 
   TDBusErrorMessage = Class(TDBusReplyToMessage)
   private
-    FErrorMessage: String;
-    FErrorName: String;
-    FName: String;
-    procedure SetErrorMessage(const AValue: String);
-    procedure SetErrorName(const AValue: String);
+    FErrorMessage: AnsiString;
+    FErrorName: AnsiString;
+    FName: AnsiString;
+    procedure SetErrorMessage(const AValue: AnsiString);
+    procedure SetErrorName(const AValue: AnsiString);
   Protected
     Class function MessageType : cint; override;
     Procedure AllocateMessage; override;
   Public
-    Constructor Create(Const AReplyTo : TDBUSMessage; Const AErrorName,AErrorMessage : String); overload;
-    Constructor Create(Const AReplyTo : TDBUSMessage; Const AErrorName,AFormat : String; Args : Array of const); overload;
-    Property ErrorName : String Read FErrorName Write SetErrorName;
-    Property ErrorMessage : String Read FErrorMessage Write SetErrorMessage;
+    Constructor Create(Const AReplyTo : TDBUSMessage; Const AErrorName,AErrorMessage : AnsiString); overload;
+    Constructor Create(Const AReplyTo : TDBUSMessage; Const AErrorName,AFormat : AnsiString; Args : Array of const); overload;
+    Property ErrorName : AnsiString Read FErrorName Write SetErrorName;
+    Property ErrorMessage : AnsiString Read FErrorMessage Write SetErrorMessage;
   end;
 
   { TDBusMethodReturnMessage }
@@ -343,15 +343,15 @@ Type
   TDBUSObjectItem = Class(TDbusMessageItem)
   private
     FFallBack: Boolean;
-    FPath: String;
+    FPath: AnsiString;
     procedure SetFallback(const AValue: Boolean);
-    procedure SetPath(const AValue: String);
+    procedure SetPath(const AValue: AnsiString);
   Public
     Procedure Register; override;
     Procedure Unregister; override;
     function AllowRegister : Boolean; override;
   Published
-    Property Path : String Read FPath Write SetPath;
+    Property Path : AnsiString Read FPath Write SetPath;
     Property FallBack : Boolean Read FFallBack Write SetFallback;
   end;
   TDBUSObjectItemClass = Class of TDBUSObjectItem;
@@ -381,7 +381,7 @@ Type
     FMaxReceivedSize : clong;
     FMaxMessageSize: clong;
     FObjects: TDBUSObjects;
-    FPath: String;
+    FPath: AnsiString;
     FShared: Boolean;
     function GetAnonymous: boolean;
     function GetAuthenticated: boolean;
@@ -390,14 +390,14 @@ Type
     function GetMaxMessageSize: clong;
     function GetMaxReceivedSize: clong;
     function GetOutgoingSize: clong;
-    function GetServerID: String;
+    function GetServerID: AnsiString;
     procedure SetConnected(const AValue: Boolean);
     procedure SetFilters(const AValue: TDBUSFilters);
     procedure SetKind(const AValue: TConnectionKind);
     procedure SetMaxMessageSize(const AValue: clong);
     procedure SetMaxReceivedSize(const AValue: clong);
     procedure SetObjects(const AValue: TDBUSObjects);
-    procedure SetPath(const AValue: String);
+    procedure SetPath(const AValue: AnsiString);
     procedure SetShared(const AValue: Boolean);
   Protected
     Procedure CheckError;
@@ -409,7 +409,7 @@ Type
   Public
     Constructor Create(AOwner : TComponent); override;
     Destructor Destroy; override;
-    Procedure Error(Const Msg : String);
+    Procedure Error(Const Msg : AnsiString);
     Procedure ResetError;
     procedure Connect;
     procedure Disconnect;
@@ -432,14 +432,14 @@ Type
     Function GetUnixFileDescriptor(Var fd : cInt) : Boolean;
     Function GetUnixProcessID(Var ID : CUlong) : Boolean;
     Function GetUnixUser(Var UID : CUlong) : Boolean;
-    Function GetWindowsUser(Var SID : String) : Boolean;
+    Function GetWindowsUser(Var SID : AnsiString) : Boolean;
     Function GetSocket(Var SD : cint) : Boolean;
-    Function GetObjectPathData(Const Path : String; DoCheck : Boolean = False) : TDBUSObjectItem;
+    Function GetObjectPathData(Const Path : AnsiString; DoCheck : Boolean = False) : TDBUSObjectItem;
     Procedure SetAllowAnonymous(AValue : Boolean);
     Procedure SetRoutePeerMessages(AValue : Boolean);
     Procedure ReturnMessage(var AMessage : TDBUSMessage);
     Procedure StealBorrowedMessage(var AMessage : TDBUSMessage);
-    Procedure ListRegistered(Const APath : String; AList : TStrings);
+    Procedure ListRegistered(Const APath : AnsiString; AList : TStrings);
     Class Function AllocateDataSlot(Var slot : dbus_int32_t) : Boolean;
     Class procedure FreeDataSlot(Var slot : dbus_int32_t);
     Function SetData(Const Slot: dbus_int32_t; Const Data : Pointer; Const FreeFunction : DBUSFreeFunction) : Boolean;
@@ -451,13 +451,13 @@ Type
     Property Connected : Boolean Read GetConnected Write SetConnected;
     Property Kind : TConnectionKind Read FKind Write SetKind;
     Property Shared : Boolean read FShared Write SetShared default true;
-    Property Path : String Read FPath Write SetPath;
+    Property Path : AnsiString Read FPath Write SetPath;
     Property MaxMessageSize : clong Read GetMaxMessageSize Write SetMaxMessageSize;
     Property MaxReceiveSize : clong Read GetMaxReceivedSize Write SetMaxReceivedSize;
     Property OutgoingSize : clong Read GetOutgoingSize;
     Property Authenticated : boolean Read GetAuthenticated;
     Property Anonymous : boolean Read GetAnonymous;
-    Property ServerID : String Read GetServerID;
+    Property ServerID : AnsiString Read GetServerID;
     Property Filters : TDBUSFilters Read FFilters Write SetFilters;
     Property Objects : TDBUSObjects Read FObjects Write SetObjects;
   end;
@@ -482,14 +482,14 @@ Type
 
   EDBus = Class(Exception)
   private
-    FName: String;
+    FName: AnsiString;
   Public
-    Property Name : String Read FName;
+    Property Name : AnsiString Read FName;
   end;
 
 Function CreateMessageFromSource(M : PDbusMessage) : TDBusMessage;
-Procedure RaiseDBUSError(Const AName,AMsg : String);
-Procedure RaiseDBUSError(Const AName,Fmt : String; Args : Array of const);
+Procedure RaiseDBUSError(Const AName,AMsg : AnsiString);
+Procedure RaiseDBUSError(Const AName,Fmt : AnsiString; Args : Array of const);
 
 implementation
 
@@ -535,7 +535,7 @@ begin
     end
 end;
 
-procedure RaiseDBUSError(const AName, AMsg: String);
+procedure RaiseDBUSError(const AName, AMsg: AnsiString);
 
 Var
   E : EDBUS;
@@ -546,7 +546,7 @@ begin
   Raise E;
 end;
 
-procedure RaiseDBUSError(const AName, Fmt: String; Args: array of const);
+procedure RaiseDBUSError(const AName, Fmt: AnsiString; Args: array of const);
 begin
   RaiseDBUSError(AName,Format(Fmt,Args));
 end;
@@ -600,10 +600,10 @@ begin
   Result:=dbus_connection_get_outgoing_size(fconn);
 end;
 
-function TCustomDBUSConnection.GetServerID: String;
+function TCustomDBUSConnection.GetServerID: AnsiString;
 
 Var
-  p : pchar;
+  p : PAnsiChar;
 
 begin
   CheckConnected;
@@ -658,7 +658,7 @@ begin
   FObjects.Assign(AValue);
 end;
 
-procedure TCustomDBUSConnection.SetPath(const AValue: String);
+procedure TCustomDBUSConnection.SetPath(const AValue: AnsiString);
 begin
   if FPath=AValue then exit;
   CheckDisconnected;
@@ -733,7 +733,7 @@ begin
   inherited Destroy;
 end;
 
-procedure TCustomDBUSConnection.Error(Const Msg: String);
+procedure TCustomDBUSConnection.Error(Const Msg: AnsiString);
 
 Var
   E : EDBUS;
@@ -763,9 +763,9 @@ begin
       If (FPath='') then
         Error(SErrNoDBUSPath);
       if Shared then
-        fconn:=dbus_connection_open(pchar(FPath),@Ferr)
+        fconn:=dbus_connection_open(PAnsiChar(FPath),@Ferr)
       else
-        fconn:=dbus_connection_open_private(pchar(FPath),@Ferr);
+        fconn:=dbus_connection_open_private(PAnsiChar(FPath),@Ferr);
       CheckError;
       end;
     ckSystem,
@@ -951,10 +951,10 @@ begin
   Result:=dbus_connection_get_unix_user(FConn,@UID)<>0;
 end;
 
-function TCustomDBUSConnection.GetWindowsUser(var SID: String): Boolean;
+function TCustomDBUSConnection.GetWindowsUser(var SID: AnsiString): Boolean;
 
 Var
-  P : PChar;
+  P : PAnsiChar;
 
 begin
   checkconnected;
@@ -971,7 +971,7 @@ begin
   Result:=dbus_connection_get_socket(FConn,@SD)<>0;
 end;
 
-function TCustomDBUSConnection.GetObjectPathData(const Path : String; DoCheck : Boolean = False): TDBUSObjectItem;
+function TCustomDBUSConnection.GetObjectPathData(const Path : AnsiString; DoCheck : Boolean = False): TDBUSObjectItem;
 
 Var
   P : Pointer;
@@ -979,7 +979,7 @@ Var
 
 begin
   CheckConnected;
-  dbus_connection_get_object_path_data(FConn,Pchar(Path),@P);
+  dbus_connection_get_object_path_data(FConn,PAnsiChar(Path),@P);
   Result:=Nil;
   If (P<>Nil) then
     if DoCheck then
@@ -1023,16 +1023,16 @@ begin
   dbus_connection_steal_borrowed_message(FConn,AMessage.Message);
 end;
 
-procedure TCustomDBUSConnection.ListRegistered(const APath: String;
+procedure TCustomDBUSConnection.ListRegistered(const APath: AnsiString;
   AList: TStrings);
 
 Var
-  P : PPchar;
+  P : PPAnsiChar;
 
 begin
   CheckConnected;
   AList.Clear;
-  if (dbus_connection_list_registered(FConn,PChar(APath),@P)<>0) then
+  if (dbus_connection_list_registered(FConn,PAnsiChar(APath),@P)<>0) then
     If (P<>Nil) then
       begin
       While (P^<>Nil) do
@@ -1172,12 +1172,12 @@ begin
   Result:=CreateMessageFromSource(dbus_message_copy(message));
 end;
 
-procedure TDBusMessage.Error(const Msg: String);
+procedure TDBusMessage.Error(const Msg: AnsiString);
 begin
   RaiseDBusError(ClassName,Msg);
 end;
 
-procedure TDBusMessage.Error(const Fmt: String; Args: array of const);
+procedure TDBusMessage.Error(const Fmt: AnsiString; Args: array of const);
 begin
   RaiseDBUSError(ClassName,Fmt,Args);
 end;
@@ -1295,7 +1295,7 @@ begin
   end;
 end;
 
-procedure TDBusMessage.AppendArgument(Const Arg: String);
+procedure TDBusMessage.AppendArgument(Const Arg: AnsiString);
 
 begin
   BeginAppend;
@@ -1342,7 +1342,7 @@ begin
   try
     Result:=FGetIterator.GetArgumentType;
     If (Result<>DBUS_TYPE_ARRAY) then
-      Error(SErrInvalidArgumentType,[Char(DBUS_TYPE_ARRAY),Char(Result)]);
+      Error(SErrInvalidArgumentType,[AnsiChar(DBUS_TYPE_ARRAY),AnsiChar(Result)]);
     Result:=FGetIterator.GetElementType;
   finally
     EndGet;
@@ -1449,7 +1449,7 @@ begin
   end;
 end;
 
-procedure TDBusMessage.GetArgument(var Arg: String);
+procedure TDBusMessage.GetArgument(var Arg: AnsiString);
 
 begin
   BeginGet;
@@ -1609,47 +1609,47 @@ begin
   end;
 end;
 
-function TDBusMessage.HasPath(const APath: String): boolean;
+function TDBusMessage.HasPath(const APath: AnsiString): boolean;
 begin
   Result:=Allocated;
   if Result then
-    Result:=dbus_message_has_path(Message,PChar(APath))<>0;
+    Result:=dbus_message_has_path(Message,PAnsiChar(APath))<>0;
 end;
 
-function TDBusMessage.HasSender(const ASender: String): boolean;
+function TDBusMessage.HasSender(const ASender: AnsiString): boolean;
 begin
   Result:=Allocated;
   if Result then
-    Result:=dbus_message_has_sender(message,PChar(ASender))<>0;
+    Result:=dbus_message_has_sender(message,PAnsiChar(ASender))<>0;
 end;
 
-function TDBusMessage.HasSignature(const ASignature: String): boolean;
+function TDBusMessage.HasSignature(const ASignature: AnsiString): boolean;
 begin
   Result:=Allocated;
   If Result then
-    Result:=dbus_message_has_signature(Message,Pchar(ASignature))<>0;
+    Result:=dbus_message_has_signature(Message,PAnsiChar(ASignature))<>0;
 end;
 
-function TDBusMessage.IsError(const AError : string): Boolean;
+function TDBusMessage.IsError(const AError : AnsiString): Boolean;
 begin
   Result:=Allocated;
   if Result then
-    Result:=dbus_message_is_error(message,Pchar(AError))<>0;
+    Result:=dbus_message_is_error(message,PAnsiChar(AError))<>0;
 end;
 
 { TDBusMethodCallMessage }
 
-procedure TDBusMethodCallMessage.SetDestination(const AValue: String);
+procedure TDBusMethodCallMessage.SetDestination(const AValue: AnsiString);
 begin
   if FDestination=AValue then exit;
   CheckNotAllocated;
   FDestination:=AValue;
 end;
 
-function TDBusInterfaceMessage.GetInterface: String;
+function TDBusInterfaceMessage.GetInterface: AnsiString;
 
 Var
-  p : pchar;
+  p : PAnsiChar;
 begin
   If not Allocated then
     Result:=FInterface
@@ -1661,21 +1661,21 @@ begin
     end;
 end;
 
-procedure TDBusInterfaceMessage.SetInterface(const AValue: String);
+procedure TDBusInterfaceMessage.SetInterface(const AValue: AnsiString);
 begin
   if FInterface=AValue then exit;
   CheckNotAllocated;
   FInterface:=AValue;
 end;
 
-procedure TDBusMethodCallMessage.SetMethod(const AValue: String);
+procedure TDBusMethodCallMessage.SetMethod(const AValue: AnsiString);
 begin
   if FMethod=AValue then exit;
   CheckNotAllocated;
   FMethod:=AValue;
 end;
 
-procedure TDBusInterfaceMessage.SetPath(const AValue: String);
+procedure TDBusInterfaceMessage.SetPath(const AValue: AnsiString);
 begin
   if FPath=AValue then exit;
   CheckNotAllocated;
@@ -1683,7 +1683,7 @@ begin
 end;
 
 constructor TDBusMethodCallMessage.Create(const ADestination, AObjectPath,
-  AInterface, AMethod: String);
+  AInterface, AMethod: AnsiString);
 begin
   FDestination:=ADestination;
   FPath:=AObjectPath;
@@ -1699,24 +1699,24 @@ end;
 procedure TDBusMethodCallMessage.AllocateMessage;
 
 Var
-  d,i : pchar;
+  d,i : PAnsiChar;
 
 begin
   CheckNotAllocated;
   d:=nil;
   i:=nil;
   if (FDestination<>'') then
-    d:=PChar(FDestination);
+    d:=PAnsiChar(FDestination);
   if (FInterface<>'') then
-    i:=PChar(FInterface);
+    i:=PAnsiChar(FInterface);
   if (FPath='') then
     Error(SErrEmptyPath);
   if (FMethod='') then
     Error(SErrEmptyMethod);
-  FMessage:=dbus_message_new_method_call(d,pchar(FPath),i,pchar(FMethod));
+  FMessage:=dbus_message_new_method_call(d,PAnsiChar(FPath),i,PAnsiChar(FMethod));
 end;
 
-function TDBusInterfaceMessage.HasPath(const APath: String): boolean;
+function TDBusInterfaceMessage.HasPath(const APath: AnsiString): boolean;
 begin
   If Allocated then
     Result:=Inherited  HasPath(APath)
@@ -1909,7 +1909,7 @@ var
     dbus_internal_pad4:Nil
   );
 
-procedure TDBUSObjectItem.SetPath(const AValue: String);
+procedure TDBUSObjectItem.SetPath(const AValue: AnsiString);
 begin
   If (FPath=AValue) then exit;
   FPath:=AValue;
@@ -1932,9 +1932,9 @@ begin
     Raise Exception.Create(SErrObjectWithoutPath);
   If HaveHandle then
     if FallBack then
-      FRegistered:=0<>dbus_connection_register_fallback(ConnHandle,Pchar(Path),@ObjectVTable,Self)
+      FRegistered:=0<>dbus_connection_register_fallback(ConnHandle,PAnsiChar(Path),@ObjectVTable,Self)
     else
-      FRegistered:=0<>dbus_connection_register_object_path(ConnHandle,Pchar(Path),@ObjectVTable,Self);
+      FRegistered:=0<>dbus_connection_register_object_path(ConnHandle,PAnsiChar(Path),@ObjectVTable,Self);
 end;
 
 procedure TDBUSObjectItem.Unregister;
@@ -1942,7 +1942,7 @@ begin
   If Path='' then
     Raise Exception.Create(SErrObjectWithoutPath);
   if HaveHandle then
-   FRegistered:=0=dbus_connection_unregister_object_path(ConnHandle,Pchar(Path));
+   FRegistered:=0=dbus_connection_unregister_object_path(ConnHandle,PAnsiChar(Path));
 end;
 
 function TDBUSObjectItem.AllowRegister: Boolean;
@@ -1975,7 +1975,7 @@ end;
 
 { TDBusSignalMessage }
 
-procedure TDBusSignalMessage.SetName(const AValue: String);
+procedure TDBusSignalMessage.SetName(const AValue: AnsiString);
 begin
   if FName=AValue then exit;
   CheckNotAllocated;
@@ -1990,22 +1990,22 @@ end;
 procedure TDBusSignalMessage.AllocateMessage;
 
 Var
-  i : pchar;
+  i : PAnsiChar;
 
 begin
   CheckNotAllocated;
   i:=nil;
   if (FInterface<>'') then
-    i:=PChar(FInterface);
+    i:=PAnsiChar(FInterface);
   if (FPath='') then
     Error(SErrEmptyPath);
   if (FName='') then
     Error(SErrEmptyName);
-  FMessage:=dbus_message_new_signal(PChar(FPath),I,Pchar(Name));
+  FMessage:=dbus_message_new_signal(PAnsiChar(FPath),I,PAnsiChar(Name));
 end;
 
 constructor TDBusSignalMessage.Create(const AObjectPath, AInterface,
-  AName: String);
+  AName: AnsiString);
 begin
   FPath:=AObjectPath;
   FInterface:=AInterface;
@@ -2014,14 +2014,14 @@ end;
 
 { TDBusErrorMessage }
 
-procedure TDBusErrorMessage.SetErrorMessage(const AValue: String);
+procedure TDBusErrorMessage.SetErrorMessage(const AValue: AnsiString);
 begin
   if FErrorMessage=AValue then exit;
   CheckNotAllocated;
   FErrorMessage:=AValue;
 end;
 
-procedure TDBusErrorMessage.SetErrorName(const AValue: String);
+procedure TDBusErrorMessage.SetErrorName(const AValue: AnsiString);
 begin
   if FErrorName=AValue then exit;
   CheckNotAllocated;
@@ -2048,7 +2048,7 @@ end;
 procedure TDBusErrorMessage.AllocateMessage;
 
 Var
-  P : PChar;
+  P : PAnsiChar;
 
 begin
   If (ErrorName='') then
@@ -2057,12 +2057,12 @@ begin
     Error(SErrNoReplyTo);
   P:=Nil;
   If (ErrorMessage<>'') then
-    P:=Pchar(ErrorMessage);
-  FMessage:=dbus_message_new_error(ReplyTo.Message,Pchar(FErrorName),P);
+    P:=PAnsiChar(ErrorMessage);
+  FMessage:=dbus_message_new_error(ReplyTo.Message,PAnsiChar(FErrorName),P);
 end;
 
 constructor TDBusErrorMessage.Create(const AReplyTo: TDBUSMessage;
-  const AErrorName, AErrorMessage: String);
+  const AErrorName, AErrorMessage: AnsiString);
 begin
   Inherited Create(AReplyto);
   FErrorName:=AErrorName;
@@ -2070,7 +2070,7 @@ begin
 end;
 
 constructor TDBusErrorMessage.Create(const AReplyTo: TDBUSMessage;
-  const AErrorName, AFormat: String; Args: array of const);
+  const AErrorName, AFormat: AnsiString; Args: array of const);
 begin
   Inherited Create(AReplyTo);
   FErrorName:=AErrorName;
@@ -2105,12 +2105,12 @@ end;
 
 { TDBusMessageIterator }
 
-procedure TDBusMessageIterator.Error(const Msg: String);
+procedure TDBusMessageIterator.Error(const Msg: AnsiString);
 begin
   RaiseDBusError(ClassName,Msg);
 end;
 
-procedure TDBusMessageIterator.Error(const Fmt: String; Args: array of const);
+procedure TDBusMessageIterator.Error(const Fmt: AnsiString; Args: array of const);
 begin
   RaiseDBUSError(ClassName,Fmt,Args);
 end;
@@ -2129,10 +2129,10 @@ Var
 begin
   A:=dbus_message_iter_get_arg_type(@FIter);
   If (A<>DBUS_TYPE_ARRAY) then
-    Error(SErrInvalidArgumentType,[Char(DBUS_TYPE_ARRAY),Char(A)]);
+    Error(SErrInvalidArgumentType,[AnsiChar(DBUS_TYPE_ARRAY),AnsiChar(A)]);
   A:=dbus_message_iter_get_element_type(@FIter);
   If (A<>AElementType) then
-    Error(SErrInvalidArrayElementType,[Char(AElementType),Char(A)]);
+    Error(SErrInvalidArrayElementType,[AnsiChar(AElementType),AnsiChar(A)]);
   dbus_message_iter_recurse(@FIter, @AI);
   dbus_message_iter_get_fixed_array(@AI,@P,@Result);
 end;
@@ -2177,7 +2177,7 @@ begin
   if (A=DBUS_TYPE_INVALID) then
     Error(SErrNoMoreArguments);
   if (A<>AType) then
-    Error(SErrInvalidArgumentType,[Char(AType),Char(A)]);
+    Error(SErrInvalidArgumentType,[AnsiChar(AType),AnsiChar(A)]);
   dbus_message_iter_get_basic(@FIter,@value);
   next;
 end;
@@ -2232,9 +2232,9 @@ begin
   Get(DBUS_TYPE_DOUBLE,Arg);
 end;
 
-procedure TDBusMessageIterator.GetArgument(var Arg: String);
+procedure TDBusMessageIterator.GetArgument(var Arg: AnsiString);
 Var
-  P : Pchar;
+  P : PAnsiChar;
 
 begin
   p:=Nil;
@@ -2369,15 +2369,15 @@ Var
   A : cInt;
   AI : DBUSMessageIter;
   l : integer;
-  p : Pchar;
+  p : PAnsiChar;
 
 begin
   A:=dbus_message_iter_get_arg_type(@fIter);
   If (A<>DBUS_TYPE_ARRAY) then
-    Error(SErrInvalidArgumentType,[Char(DBUS_TYPE_ARRAY),Char(A)]);
+    Error(SErrInvalidArgumentType,[AnsiChar(DBUS_TYPE_ARRAY),AnsiChar(A)]);
    A:=dbus_message_iter_get_element_type(@fIter);
   If (A<>DBUS_TYPE_STRING) then
-      Error(SErrInvalidArrayElementType,[Char(DBUS_TYPE_STRING),Char(A)]);
+      Error(SErrInvalidArrayElementType,[AnsiChar(DBUS_TYPE_STRING),AnsiChar(A)]);
   dbus_message_iter_recurse(@Fiter, @AI);
   setlength(Arg,0);
   l:=0;
@@ -2403,15 +2403,15 @@ procedure TDBusMessageIterator.GetArgument(var Arg: TStringList);
 Var
   A : cInt;
   AI : DBUSMessageIter;
-  p : Pchar;
+  p : PAnsiChar;
 
 begin
   A:=GetArgumentType;
   If (A<>DBUS_TYPE_ARRAY) then
-    Error(SErrInvalidArgumentType,[Char(DBUS_TYPE_ARRAY),Char(A)]);
+    Error(SErrInvalidArgumentType,[AnsiChar(DBUS_TYPE_ARRAY),AnsiChar(A)]);
   A:=GetElementType;
   If (A<>DBUS_TYPE_STRING) then
-      Error(SErrInvalidArrayElementType,[Char(DBUS_TYPE_STRING),Char(A)]);
+      Error(SErrInvalidArrayElementType,[AnsiChar(DBUS_TYPE_STRING),AnsiChar(A)]);
   dbus_message_iter_recurse(@FIter, @AI);
   Arg.Clear;
   while (dbus_message_iter_get_arg_type(@AI)<>DBUS_TYPE_INVALID) do
@@ -2430,7 +2430,7 @@ procedure TDBusMessageIterator.GetArgument(var Arg: Variant);
 Var
   A : cInt;
   AI : DBUSMessageIter;
-  p : Pchar;
+  p : PAnsiChar;
   By : Byte;
   Boo : Boolean;
   S : smallint;
@@ -2440,13 +2440,13 @@ Var
   I64 : Int64;
   Q : QWord;
   D : Double;
-  St : String;
+  St : AnsiString;
   IR : TDBusMessageIterator;
 
 begin
   A:=GetArgumentType;
   If (A<>DBUS_TYPE_VARIANT) then
-    Error(SErrInvalidArgumentType,[Char(DBUS_TYPE_VARIANT),Char(A)]);
+    Error(SErrInvalidArgumentType,[AnsiChar(DBUS_TYPE_VARIANT),AnsiChar(A)]);
   IR:=Recurse;
   try
     A:=IR.GetArgumentType;
@@ -2502,7 +2502,7 @@ begin
       Arg:=St;
       end;
     else
-      Error(SErrInvalidVariantType,[Char(DBUS_TYPE_VARIANT),Char(A)]);
+      Error(SErrInvalidVariantType,[AnsiChar(DBUS_TYPE_VARIANT),AnsiChar(A)]);
     end;
   finally
     IR.free;
@@ -2519,10 +2519,10 @@ Var
 begin
   A:=GetArgumentType;
   If (A<>DBUS_TYPE_ARRAY) then
-      Error(SErrInvalidArgumentType,[Char(DBUS_TYPE_ARRAY),Char(A)]);
+      Error(SErrInvalidArgumentType,[AnsiChar(DBUS_TYPE_ARRAY),AnsiChar(A)]);
   A:=GetElementType;
   If (A<>DBUS_TYPE_DICT_ENTRY) then
-    Error(SErrInvalidArrayElementType,[Char(DBUS_TYPE_DICT_ENTRY),Char(A)]);
+    Error(SErrInvalidArrayElementType,[AnsiChar(DBUS_TYPE_DICT_ENTRY),AnsiChar(A)]);
   I:=Recurse;
   try
     While I.HasNext do
@@ -2588,13 +2588,13 @@ begin
   Append(DBUS_TYPE_DOUBLE,Arg);
 end;
 
-procedure TDBusMessageIterator.AppendArgument(Const Arg: String);
+procedure TDBusMessageIterator.AppendArgument(Const Arg: AnsiString);
 
 Var
-  P : PChar;
+  P : PAnsiChar;
 
 begin
-  P:=Pchar(Arg);
+  P:=PAnsiChar(Arg);
   Append(DBUS_TYPE_STRING,P);
 end;