[PATCH 1/1] Decorated public exported functions with DBUS_EXPORT macro. This eliminates the need for a module definition file on windows and reduces required maintenance effort.

ralf.habacker at freenet.de ralf.habacker at freenet.de
Thu Mar 4 13:01:21 PST 2010


---
 cmake/Doxyfile.cmake       |    3 +-
 dbus/dbus-1-symbols.def.in |  226 +-------------------------------------------
 dbus/dbus-address.h        |    6 +
 dbus/dbus-bus.h            |   13 +++
 dbus/dbus-connection.h     |   80 +++++++++++++++-
 dbus/dbus-errors.h         |    7 ++
 dbus/dbus-macros.h         |   19 ++++
 dbus/dbus-memory.h         |    6 +
 dbus/dbus-message.h        |   73 ++++++++++++++
 dbus/dbus-misc.h           |    3 +-
 dbus/dbus-pending-call.h   |   11 ++
 dbus/dbus-server.h         |   15 +++
 dbus/dbus-signature.h      |   11 ++
 dbus/dbus-threads.h        |    2 +
 14 files changed, 248 insertions(+), 227 deletions(-)

diff --git a/cmake/Doxyfile.cmake b/cmake/Doxyfile.cmake
index 9bdfde8..e00984e 100644
--- a/cmake/Doxyfile.cmake
+++ b/cmake/Doxyfile.cmake
@@ -148,7 +148,8 @@ PREDEFINED             = "DBUS_BEGIN_DECLS=" 			\
 			 "DOXYGEN_SHOULD_SKIP_THIS" 		\
                          "DBUS_GNUC_DEPRECATED="                \
 			 "_DBUS_DEFINE_GLOBAL_LOCK(name)="	\
-			 "_DBUS_GNUC_PRINTF(from,to)="
+			 "_DBUS_GNUC_PRINTF(from,to)=" \
+			 "DBUS_EXPORT="
 SKIP_FUNCTION_MACROS   = YES
 #---------------------------------------------------------------------------
 # Configuration::addtions related to external references   
diff --git a/dbus/dbus-1-symbols.def.in b/dbus/dbus-1-symbols.def.in
index ca9eb59..7144a2d 100644
--- a/dbus/dbus-1-symbols.def.in
+++ b/dbus/dbus-1-symbols.def.in
@@ -507,227 +507,5 @@ _dbus_win_utf8_to_utf16
 _dbus_win_warn_win_error
 _dbus_write_socket
 _dbus_write_socket_two
-dbus_address_entries_free
-dbus_address_entry_get_method
-dbus_address_entry_get_value
-dbus_address_escape_value
-dbus_address_unescape_value
-dbus_bus_add_match
-dbus_bus_get
-dbus_bus_get_id
-dbus_bus_get_private
-dbus_bus_get_unique_name
-dbus_bus_get_unix_user
-dbus_bus_name_has_owner
-dbus_bus_register
-dbus_bus_release_name
-dbus_bus_remove_match
-dbus_bus_request_name
-dbus_bus_set_unique_name
-dbus_bus_start_service_by_name
-dbus_connection_add_filter
-dbus_connection_allocate_data_slot
-dbus_connection_borrow_message
-dbus_connection_can_send_type
-dbus_connection_close
-dbus_connection_dispatch
-dbus_connection_flush
-dbus_connection_free_data_slot
-dbus_connection_free_preallocated_send
-dbus_connection_get_adt_audit_session_data
-dbus_connection_get_data
-dbus_connection_get_dispatch_status
-dbus_connection_get_is_anonymous
-dbus_connection_get_is_authenticated
-dbus_connection_get_is_connected
-dbus_connection_get_max_message_size
-dbus_connection_get_max_message_unix_fds
-dbus_connection_get_max_received_size
-dbus_connection_get_max_received_unix_fds
-dbus_connection_get_object_path_data
-dbus_connection_get_outgoing_size
-dbus_connection_get_outgoing_unix_fds
-dbus_connection_get_server_id
-dbus_connection_get_socket
-dbus_connection_get_unix_fd
-dbus_connection_get_unix_process_id
-dbus_connection_get_unix_user
-dbus_connection_get_windows_user
-dbus_connection_has_messages_to_send
-dbus_connection_list_registered
-dbus_connection_open
-dbus_connection_open_private
-dbus_connection_pop_message
-dbus_connection_preallocate_send
-dbus_connection_read_write
-dbus_connection_read_write_dispatch
-dbus_connection_ref
-dbus_connection_register_fallback
-dbus_connection_register_object_path
-dbus_connection_remove_filter
-dbus_connection_return_message
-dbus_connection_send
-dbus_connection_send_preallocated
-dbus_connection_send_with_reply
-dbus_connection_send_with_reply_and_block
-dbus_connection_set_allow_anonymous
-dbus_connection_set_change_sigpipe
-dbus_connection_set_data
-dbus_connection_set_dispatch_status_function
-dbus_connection_set_exit_on_disconnect
-dbus_connection_set_max_message_size
-dbus_connection_set_max_message_unix_fds
-dbus_connection_set_max_received_size
-dbus_connection_set_max_received_unix_fds
-dbus_connection_set_route_peer_messages
-dbus_connection_set_timeout_functions
-dbus_connection_set_unix_user_function
-dbus_connection_set_wakeup_main_function
-dbus_connection_set_watch_functions
-dbus_connection_set_windows_user_function
-dbus_connection_steal_borrowed_message
-dbus_connection_try_register_fallback
-dbus_connection_try_register_object_path
-dbus_connection_unref
-dbus_connection_unregister_object_path
-dbus_error_free
-dbus_error_has_name
-dbus_error_init
-dbus_error_is_set
-dbus_free
-dbus_free_string_array
-dbus_get_local_machine_id
-dbus_get_version
-dbus_malloc
-dbus_malloc0
-dbus_message_allocate_data_slot
-dbus_message_append_args
-dbus_message_append_args_valist
-dbus_message_contains_unix_fds
-dbus_message_copy
-dbus_message_demarshal
-dbus_message_demarshal_bytes_needed
-dbus_message_free_data_slot
-dbus_message_get_args
-dbus_message_get_args_valist
-dbus_message_get_auto_start
-dbus_message_get_data
-dbus_message_get_destination
-dbus_message_get_error_name
-dbus_message_get_interface
-dbus_message_get_member
-dbus_message_get_no_reply
-dbus_message_get_path
-dbus_message_get_path_decomposed
-dbus_message_get_reply_serial
-dbus_message_get_sender
-dbus_message_get_serial
-dbus_message_get_signature
-dbus_message_get_type
-dbus_message_has_destination
-dbus_message_has_interface
-dbus_message_has_member
-dbus_message_has_path
-dbus_message_has_sender
-dbus_message_has_signature
-dbus_message_is_error
-dbus_message_is_method_call
-dbus_message_is_signal
-dbus_message_iter_abandon_container
-dbus_message_iter_append_basic
-dbus_message_iter_append_fixed_array
-dbus_message_iter_close_container
-dbus_message_iter_get_arg_type
-dbus_message_iter_get_array_len
-dbus_message_iter_get_basic
-dbus_message_iter_get_element_type
-dbus_message_iter_get_fixed_array
-dbus_message_iter_get_signature
-dbus_message_iter_has_next
-dbus_message_iter_init
-dbus_message_iter_init_append
-dbus_message_iter_next
-dbus_message_iter_open_container
-dbus_message_iter_recurse
-dbus_message_lock
-dbus_message_marshal
-dbus_message_new
-dbus_message_new_error
-dbus_message_new_error_printf
-dbus_message_new_method_call
-dbus_message_new_method_return
-dbus_message_new_signal
-dbus_message_ref
-dbus_message_set_auto_start
-dbus_message_set_data
-dbus_message_set_destination
-dbus_message_set_error_name
-dbus_message_set_interface
-dbus_message_set_member
-dbus_message_set_no_reply
-dbus_message_set_path
-dbus_message_set_reply_serial
-dbus_message_set_sender
-dbus_message_set_serial
-dbus_message_type_from_string
-dbus_message_type_to_string
-dbus_message_unref
-dbus_move_error
-dbus_parse_address
-dbus_pending_call_allocate_data_slot
-dbus_pending_call_block
-dbus_pending_call_cancel
-dbus_pending_call_free_data_slot
-dbus_pending_call_get_completed
-dbus_pending_call_get_data
-dbus_pending_call_ref
-dbus_pending_call_set_data
-dbus_pending_call_set_notify
-dbus_pending_call_steal_reply
-dbus_pending_call_unref
-dbus_realloc
-dbus_server_allocate_data_slot
-dbus_server_disconnect
-dbus_server_free_data_slot
-dbus_server_get_address
-dbus_server_get_data
-dbus_server_get_id
-dbus_server_get_is_connected
-dbus_server_listen
-dbus_server_ref
-dbus_server_set_auth_mechanisms
-dbus_server_set_data
-dbus_server_set_new_connection_function
-dbus_server_set_timeout_functions
-dbus_server_set_watch_functions
-dbus_server_unref
-dbus_set_error
-dbus_set_error_const
-dbus_set_error_from_message
-dbus_shutdown
-dbus_signature_iter_get_current_type
-dbus_signature_iter_get_element_type
-dbus_signature_iter_get_signature
-dbus_signature_iter_init
-dbus_signature_iter_next
-dbus_signature_iter_recurse
-dbus_signature_validate
-dbus_signature_validate_single
-dbus_threads_init
-dbus_threads_init_default
-dbus_timeout_get_data
-dbus_timeout_get_enabled
-dbus_timeout_get_interval
-dbus_timeout_handle
-dbus_timeout_set_data
-dbus_type_is_basic
-dbus_type_is_container
-dbus_type_is_fixed
-dbus_watch_get_data
-dbus_watch_get_enabled
-dbus_watch_get_fd
-dbus_watch_get_flags
-dbus_watch_get_socket
-dbus_watch_get_unix_fd
-dbus_watch_handle
-dbus_watch_set_data
+
+
diff --git a/dbus/dbus-address.h b/dbus/dbus-address.h
index 07d5339..e51ef0a 100644
--- a/dbus/dbus-address.h
+++ b/dbus/dbus-address.h
@@ -40,16 +40,22 @@ DBUS_BEGIN_DECLS
 /** Opaque type representing one of the semicolon-separated items in an address */
 typedef struct DBusAddressEntry DBusAddressEntry;
 
+DBUS_EXPORT
 dbus_bool_t dbus_parse_address            (const char         *address,
 					   DBusAddressEntry ***entry,
 					   int                *array_len,
 					   DBusError          *error);
+DBUS_EXPORT
 const char *dbus_address_entry_get_value  (DBusAddressEntry   *entry,
 					   const char         *key);
+DBUS_EXPORT
 const char *dbus_address_entry_get_method (DBusAddressEntry   *entry);
+DBUS_EXPORT
 void        dbus_address_entries_free     (DBusAddressEntry  **entries);
 
+DBUS_EXPORT
 char* dbus_address_escape_value   (const char *value);
+DBUS_EXPORT
 char* dbus_address_unescape_value (const char *value,
                                    DBusError  *error);
 
diff --git a/dbus/dbus-bus.h b/dbus/dbus-bus.h
index e36449c..02a9571 100644
--- a/dbus/dbus-bus.h
+++ b/dbus/dbus-bus.h
@@ -36,41 +36,54 @@ DBUS_BEGIN_DECLS
  * @{
  */
 
+DBUS_EXPORT
 DBusConnection *dbus_bus_get              (DBusBusType     type,
 					   DBusError      *error);
+DBUS_EXPORT
 DBusConnection *dbus_bus_get_private      (DBusBusType     type,
 					   DBusError      *error);
 
+DBUS_EXPORT
 dbus_bool_t     dbus_bus_register         (DBusConnection *connection,
 					   DBusError      *error);
+DBUS_EXPORT
 dbus_bool_t     dbus_bus_set_unique_name  (DBusConnection *connection,
 					   const char     *unique_name);
+DBUS_EXPORT
 const char*     dbus_bus_get_unique_name  (DBusConnection *connection);
+DBUS_EXPORT
 unsigned long   dbus_bus_get_unix_user    (DBusConnection *connection,
 			                   const char     *name,
                                            DBusError      *error);
+DBUS_EXPORT
 char*           dbus_bus_get_id           (DBusConnection *connection,
                                            DBusError      *error);
+DBUS_EXPORT
 int             dbus_bus_request_name     (DBusConnection *connection,
 					   const char     *name,
 					   unsigned int    flags,
 					   DBusError      *error);
+DBUS_EXPORT
 int             dbus_bus_release_name     (DBusConnection *connection,
 					   const char     *name,
 					   DBusError      *error);
+DBUS_EXPORT
 dbus_bool_t     dbus_bus_name_has_owner   (DBusConnection *connection,
 					   const char     *name,
 					   DBusError      *error);
 
+DBUS_EXPORT
 dbus_bool_t     dbus_bus_start_service_by_name (DBusConnection *connection,
                                                 const char     *name,
                                                 dbus_uint32_t   flags,
                                                 dbus_uint32_t  *reply,
                                                 DBusError      *error);
 
+DBUS_EXPORT
 void            dbus_bus_add_match        (DBusConnection *connection,
                                            const char     *rule,
                                            DBusError      *error);
+DBUS_EXPORT
 void            dbus_bus_remove_match     (DBusConnection *connection,
                                            const char     *rule,
                                            DBusError      *error);
diff --git a/dbus/dbus-connection.h b/dbus/dbus-connection.h
index ede3dcd..3e2a7d8 100644
--- a/dbus/dbus-connection.h
+++ b/dbus/dbus-connection.h
@@ -168,133 +168,189 @@ typedef void (* DBusPendingCallNotifyFunction) (DBusPendingCall *pending,
 typedef DBusHandlerResult (* DBusHandleMessageFunction) (DBusConnection     *connection,
                                                          DBusMessage        *message,
                                                          void               *user_data);
-
+DBUS_EXPORT
 DBusConnection*    dbus_connection_open                         (const char                 *address,
                                                                  DBusError                  *error);
+DBUS_EXPORT
 DBusConnection*    dbus_connection_open_private                 (const char                 *address,
                                                                  DBusError                  *error);
+DBUS_EXPORT
 DBusConnection*    dbus_connection_ref                          (DBusConnection             *connection);
+DBUS_EXPORT
 void               dbus_connection_unref                        (DBusConnection             *connection);
+DBUS_EXPORT
 void               dbus_connection_close                        (DBusConnection             *connection);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_is_connected             (DBusConnection             *connection);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_is_authenticated         (DBusConnection             *connection);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_is_anonymous             (DBusConnection             *connection);
+DBUS_EXPORT
 char*              dbus_connection_get_server_id                (DBusConnection             *connection);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_can_send_type                (DBusConnection             *connection,
                                                                  int                         type);
+
+DBUS_EXPORT
 void               dbus_connection_set_exit_on_disconnect       (DBusConnection             *connection,
                                                                  dbus_bool_t                 exit_on_disconnect);
+DBUS_EXPORT
 void               dbus_connection_flush                        (DBusConnection             *connection);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_read_write_dispatch          (DBusConnection             *connection,
                                                                  int                         timeout_milliseconds);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_read_write                   (DBusConnection             *connection,
                                                                  int                         timeout_milliseconds);
+DBUS_EXPORT
 DBusMessage*       dbus_connection_borrow_message               (DBusConnection             *connection);
+DBUS_EXPORT
 void               dbus_connection_return_message               (DBusConnection             *connection,
                                                                  DBusMessage                *message);
+DBUS_EXPORT
 void               dbus_connection_steal_borrowed_message       (DBusConnection             *connection,
                                                                  DBusMessage                *message);
+DBUS_EXPORT
 DBusMessage*       dbus_connection_pop_message                  (DBusConnection             *connection);
+DBUS_EXPORT
 DBusDispatchStatus dbus_connection_get_dispatch_status          (DBusConnection             *connection);
+DBUS_EXPORT
 DBusDispatchStatus dbus_connection_dispatch                     (DBusConnection             *connection);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_has_messages_to_send         (DBusConnection *connection);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_send                         (DBusConnection             *connection,
                                                                  DBusMessage                *message,
                                                                  dbus_uint32_t              *client_serial);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_send_with_reply              (DBusConnection             *connection,
                                                                  DBusMessage                *message,
                                                                  DBusPendingCall           **pending_return,
                                                                  int                         timeout_milliseconds);
+DBUS_EXPORT
 DBusMessage *      dbus_connection_send_with_reply_and_block    (DBusConnection             *connection,
                                                                  DBusMessage                *message,
                                                                  int                         timeout_milliseconds,
                                                                  DBusError                  *error);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_set_watch_functions          (DBusConnection             *connection,
                                                                  DBusAddWatchFunction        add_function,
                                                                  DBusRemoveWatchFunction     remove_function,
                                                                  DBusWatchToggledFunction    toggled_function,
                                                                  void                       *data,
                                                                  DBusFreeFunction            free_data_function);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_set_timeout_functions        (DBusConnection             *connection,
                                                                  DBusAddTimeoutFunction      add_function,
                                                                  DBusRemoveTimeoutFunction   remove_function,
                                                                  DBusTimeoutToggledFunction  toggled_function,
                                                                  void                       *data,
                                                                  DBusFreeFunction            free_data_function);
+DBUS_EXPORT
 void               dbus_connection_set_wakeup_main_function     (DBusConnection             *connection,
                                                                  DBusWakeupMainFunction      wakeup_main_function,
                                                                  void                       *data,
                                                                  DBusFreeFunction            free_data_function);
+DBUS_EXPORT
 void               dbus_connection_set_dispatch_status_function (DBusConnection             *connection,
                                                                  DBusDispatchStatusFunction  function,
                                                                  void                       *data,
                                                                  DBusFreeFunction            free_data_function);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_unix_user                (DBusConnection             *connection,
                                                                  unsigned long              *uid);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_unix_process_id          (DBusConnection             *connection,
                                                                  unsigned long              *pid);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_adt_audit_session_data   (DBusConnection             *connection,
                                                                  void                      **data,
                                                                  dbus_int32_t               *data_size);
+DBUS_EXPORT
 void               dbus_connection_set_unix_user_function       (DBusConnection             *connection,
                                                                  DBusAllowUnixUserFunction   function,
                                                                  void                       *data,
                                                                  DBusFreeFunction            free_data_function);
+DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_windows_user             (DBusConnection             *connection,
                                                                  char                      **windows_sid_p); 
+DBUS_EXPORT
 void               dbus_connection_set_windows_user_function    (DBusConnection             *connection,
                                                                  DBusAllowWindowsUserFunction function,
                                                                  void                       *data,
                                                                  DBusFreeFunction            free_data_function);
+DBUS_EXPORT
 void               dbus_connection_set_allow_anonymous          (DBusConnection             *connection,
                                                                  dbus_bool_t                 value);
+DBUS_EXPORT
 void               dbus_connection_set_route_peer_messages      (DBusConnection             *connection,
                                                                  dbus_bool_t                 value);
 
 
 /* Filters */
 
+DBUS_EXPORT
 dbus_bool_t dbus_connection_add_filter    (DBusConnection            *connection,
                                            DBusHandleMessageFunction  function,
                                            void                      *user_data,
                                            DBusFreeFunction           free_data_function);
+DBUS_EXPORT
 void        dbus_connection_remove_filter (DBusConnection            *connection,
                                            DBusHandleMessageFunction  function,
                                            void                      *user_data);
 
 
 /* Other */
+DBUS_EXPORT
 dbus_bool_t dbus_connection_allocate_data_slot (dbus_int32_t     *slot_p);
+DBUS_EXPORT
 void        dbus_connection_free_data_slot     (dbus_int32_t     *slot_p);
+DBUS_EXPORT
 dbus_bool_t dbus_connection_set_data           (DBusConnection   *connection,
                                                 dbus_int32_t      slot,
                                                 void             *data,
                                                 DBusFreeFunction  free_data_func);
+DBUS_EXPORT
 void*       dbus_connection_get_data           (DBusConnection   *connection,
                                                 dbus_int32_t      slot);
 
+DBUS_EXPORT
 void        dbus_connection_set_change_sigpipe (dbus_bool_t       will_modify_sigpipe); 
 
+DBUS_EXPORT
 void dbus_connection_set_max_message_size  (DBusConnection *connection,
                                             long            size);
+DBUS_EXPORT
 long dbus_connection_get_max_message_size  (DBusConnection *connection);
+DBUS_EXPORT
 void dbus_connection_set_max_received_size (DBusConnection *connection,
                                             long            size);
+DBUS_EXPORT
 long dbus_connection_get_max_received_size (DBusConnection *connection);
 
+DBUS_EXPORT
 void dbus_connection_set_max_message_unix_fds (DBusConnection *connection,
                                                long            n);
+DBUS_EXPORT
 long dbus_connection_get_max_message_unix_fds (DBusConnection *connection);
+DBUS_EXPORT
 void dbus_connection_set_max_received_unix_fds(DBusConnection *connection,
                                                long            n);
+DBUS_EXPORT
 long dbus_connection_get_max_received_unix_fds(DBusConnection *connection);
 
+DBUS_EXPORT
 long dbus_connection_get_outgoing_size     (DBusConnection *connection);
+DBUS_EXPORT
 long dbus_connection_get_outgoing_unix_fds (DBusConnection *connection);
 
+DBUS_EXPORT
 DBusPreallocatedSend* dbus_connection_preallocate_send       (DBusConnection       *connection);
+DBUS_EXPORT
 void                  dbus_connection_free_preallocated_send (DBusConnection       *connection,
                                                               DBusPreallocatedSend *preallocated);
+DBUS_EXPORT
 void                  dbus_connection_send_preallocated      (DBusConnection       *connection,
                                                               DBusPreallocatedSend *preallocated,
                                                               DBusMessage          *message,
@@ -335,40 +391,49 @@ struct DBusObjectPathVTable
   void (* dbus_internal_pad4) (void *); /**< Reserved for future expansion */
 };
 
+DBUS_EXPORT
 dbus_bool_t dbus_connection_try_register_object_path (DBusConnection              *connection,
                                                       const char                  *path,
                                                       const DBusObjectPathVTable  *vtable,
                                                       void                        *user_data,
                                                       DBusError                   *error);
 
+DBUS_EXPORT
 dbus_bool_t dbus_connection_register_object_path   (DBusConnection              *connection,
                                                     const char                  *path,
                                                     const DBusObjectPathVTable  *vtable,
                                                     void                        *user_data);
 
+DBUS_EXPORT
 dbus_bool_t dbus_connection_try_register_fallback (DBusConnection              *connection,
                                                    const char                  *path,
                                                    const DBusObjectPathVTable  *vtable,
                                                    void                        *user_data,
                                                    DBusError                   *error);
 
+DBUS_EXPORT
 dbus_bool_t dbus_connection_register_fallback      (DBusConnection              *connection,
                                                     const char                  *path,
                                                     const DBusObjectPathVTable  *vtable,
                                                     void                        *user_data);
+DBUS_EXPORT
 dbus_bool_t dbus_connection_unregister_object_path (DBusConnection              *connection,
                                                     const char                  *path);
 
+DBUS_EXPORT
 dbus_bool_t dbus_connection_get_object_path_data   (DBusConnection              *connection,
                                                     const char                  *path,
                                                     void                       **data_p);
 
+DBUS_EXPORT
 dbus_bool_t dbus_connection_list_registered        (DBusConnection              *connection,
                                                     const char                  *parent_path,
                                                     char                      ***child_entries);
 
+DBUS_EXPORT
 dbus_bool_t dbus_connection_get_unix_fd            (DBusConnection              *connection,
                                                     int                         *fd);
+DBUS_EXPORT
 dbus_bool_t dbus_connection_get_socket             (DBusConnection              *connection,
                                                     int                         *fd);
 
@@ -381,18 +446,26 @@ dbus_bool_t dbus_connection_get_socket             (DBusConnection
  */
 
 #ifndef DBUS_DISABLE_DEPRECATED
+DBUS_EXPORT
 DBUS_DEPRECATED int dbus_watch_get_fd      (DBusWatch        *watch);
 #endif
 
+DBUS_EXPORT
 int          dbus_watch_get_unix_fd (DBusWatch        *watch);
+DBUS_EXPORT
 int          dbus_watch_get_socket  (DBusWatch        *watch);
+DBUS_EXPORT
 unsigned int dbus_watch_get_flags   (DBusWatch        *watch);
+DBUS_EXPORT
 void*        dbus_watch_get_data    (DBusWatch        *watch);
+DBUS_EXPORT
 void         dbus_watch_set_data    (DBusWatch        *watch,
                                      void             *data,
                                      DBusFreeFunction  free_data_function);
+DBUS_EXPORT
 dbus_bool_t  dbus_watch_handle      (DBusWatch        *watch,
                                      unsigned int      flags);
+DBUS_EXPORT
 dbus_bool_t  dbus_watch_get_enabled (DBusWatch        *watch);
 
 /** @} */
@@ -402,12 +475,17 @@ dbus_bool_t  dbus_watch_get_enabled (DBusWatch        *watch);
  * @{
  */
 
+DBUS_EXPORT
 int         dbus_timeout_get_interval (DBusTimeout      *timeout);
+DBUS_EXPORT
 void*       dbus_timeout_get_data     (DBusTimeout      *timeout);
+DBUS_EXPORT
 void        dbus_timeout_set_data     (DBusTimeout      *timeout,
                                        void             *data,
                                        DBusFreeFunction  free_data_function);
+DBUS_EXPORT
 dbus_bool_t dbus_timeout_handle       (DBusTimeout      *timeout);
+DBUS_EXPORT
 dbus_bool_t dbus_timeout_get_enabled  (DBusTimeout      *timeout);
 
 /** @} */
diff --git a/dbus/dbus-errors.h b/dbus/dbus-errors.h
index 0ddf247..cf08e5e 100644
--- a/dbus/dbus-errors.h
+++ b/dbus/dbus-errors.h
@@ -60,19 +60,26 @@ struct DBusError
 
 #define DBUS_ERROR_INIT { NULL, NULL, TRUE, 0, 0, 0, 0, NULL }
 
+DBUS_EXPORT
 void        dbus_error_init      (DBusError       *error);
+DBUS_EXPORT
 void        dbus_error_free      (DBusError       *error);
+DBUS_EXPORT
 void        dbus_set_error       (DBusError       *error,
                                   const char      *name,
                                   const char      *message,
                                   ...);
+DBUS_EXPORT
 void        dbus_set_error_const (DBusError       *error,
                                   const char      *name,
                                   const char      *message);
+DBUS_EXPORT
 void        dbus_move_error      (DBusError       *src,
                                   DBusError       *dest);
+DBUS_EXPORT
 dbus_bool_t dbus_error_has_name  (const DBusError *error,
                                   const char      *name);
+DBUS_EXPORT
 dbus_bool_t dbus_error_is_set    (const DBusError *error);
 
 /** @} */
diff --git a/dbus/dbus-macros.h b/dbus/dbus-macros.h
index 379c4e2..b49afd9 100644
--- a/dbus/dbus-macros.h
+++ b/dbus/dbus-macros.h
@@ -150,6 +150,25 @@
  * this macro in your own code; please consider it to be internal to libdbus.
  */
 
+/*
+ * @def DBUS_EXPORT
+ *
+ * dbus export declaration
+ * Export declarations eliminates the need for a module definition file(.def)
+ * on windows.
+ *
+ */
+
+#if defined(DBUS_WIN)
+#  if defined(dbus_1_EXPORTS)
+#  define DBUS_EXPORT __declspec(dllexport)
+#  else
+#  define DBUS_EXPORT __declspec(dllimport)
+#  endif
+#else
+#define DBUS_EXPORT
+#endif
+
 /** @} */
 
 #endif /* DBUS_MACROS_H */
diff --git a/dbus/dbus-memory.h b/dbus/dbus-memory.h
index aad439b..ea28423 100644
--- a/dbus/dbus-memory.h
+++ b/dbus/dbus-memory.h
@@ -37,19 +37,25 @@ DBUS_BEGIN_DECLS
  * @{
  */
 
+DBUS_EXPORT
 void* dbus_malloc        (size_t bytes);
+DBUS_EXPORT
 void* dbus_malloc0       (size_t bytes);
+DBUS_EXPORT
 void* dbus_realloc       (void  *memory,
                           size_t bytes);
+DBUS_EXPORT
 void  dbus_free          (void  *memory);
 
 #define dbus_new(type, count)  ((type*)dbus_malloc (sizeof (type) * (count)))
 #define dbus_new0(type, count) ((type*)dbus_malloc0 (sizeof (type) * (count)))
 
+DBUS_EXPORT
 void dbus_free_string_array (char **str_array);
 
 typedef void (* DBusFreeFunction) (void *memory);
 
+DBUS_EXPORT
 void dbus_shutdown (void);
 
 /** @} */
diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h
index a89fcd5..5500492 100644
--- a/dbus/dbus-message.h
+++ b/dbus/dbus-message.h
@@ -66,166 +66,239 @@ struct DBusMessageIter
   void *pad3;           /**< Don't use this */
 };
 
+DBUS_EXPORT
 DBusMessage* dbus_message_new               (int          message_type);
+DBUS_EXPORT
 DBusMessage* dbus_message_new_method_call   (const char  *bus_name,
                                              const char  *path,
                                              const char  *interface,
                                              const char  *method);
+DBUS_EXPORT
 DBusMessage* dbus_message_new_method_return (DBusMessage *method_call);
+DBUS_EXPORT
 DBusMessage* dbus_message_new_signal        (const char  *path,
                                              const char  *interface,
                                              const char  *name);
+DBUS_EXPORT
 DBusMessage* dbus_message_new_error         (DBusMessage *reply_to,
                                              const char  *error_name,
                                              const char  *error_message);
+DBUS_EXPORT
 DBusMessage* dbus_message_new_error_printf  (DBusMessage *reply_to,
                                              const char  *error_name,
                                              const char  *error_format,
 					     ...);
 
+DBUS_EXPORT
 DBusMessage* dbus_message_copy              (const DBusMessage *message);
 
+DBUS_EXPORT
 DBusMessage*  dbus_message_ref              (DBusMessage   *message);
+DBUS_EXPORT
 void          dbus_message_unref            (DBusMessage   *message);
+DBUS_EXPORT
 int           dbus_message_get_type         (DBusMessage   *message);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_set_path         (DBusMessage   *message,
                                              const char    *object_path);
+DBUS_EXPORT
 const char*   dbus_message_get_path         (DBusMessage   *message);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_has_path         (DBusMessage   *message, 
                                              const char    *object_path);  
+DBUS_EXPORT
 dbus_bool_t   dbus_message_set_interface    (DBusMessage   *message,
                                              const char    *interface);       
+DBUS_EXPORT
 const char*   dbus_message_get_interface    (DBusMessage   *message);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_has_interface    (DBusMessage   *message, 
                                              const char    *interface);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_set_member       (DBusMessage   *message,
                                              const char    *member);
+DBUS_EXPORT
 const char*   dbus_message_get_member       (DBusMessage   *message);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_has_member       (DBusMessage   *message, 
                                              const char    *member);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_set_error_name   (DBusMessage   *message,
                                              const char    *name);
+DBUS_EXPORT
 const char*   dbus_message_get_error_name   (DBusMessage   *message);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_set_destination  (DBusMessage   *message,
                                              const char    *destination);
+DBUS_EXPORT
 const char*   dbus_message_get_destination  (DBusMessage   *message);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_set_sender       (DBusMessage   *message,
                                              const char    *sender);
+DBUS_EXPORT
 const char*   dbus_message_get_sender       (DBusMessage   *message);
+DBUS_EXPORT
 const char*   dbus_message_get_signature    (DBusMessage   *message);
+DBUS_EXPORT
 void          dbus_message_set_no_reply     (DBusMessage   *message,
                                              dbus_bool_t    no_reply);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_get_no_reply     (DBusMessage   *message);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_is_method_call   (DBusMessage   *message,
                                              const char    *interface,
                                              const char    *method);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_is_signal        (DBusMessage   *message,
                                              const char    *interface,
                                              const char    *signal_name);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_is_error         (DBusMessage   *message,
                                              const char    *error_name);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_has_destination  (DBusMessage   *message,
                                              const char    *bus_name);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_has_sender       (DBusMessage   *message,
                                              const char    *unique_bus_name);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_has_signature    (DBusMessage   *message,
                                              const char    *signature);
+DBUS_EXPORT
 dbus_uint32_t dbus_message_get_serial       (DBusMessage   *message);
+DBUS_EXPORT
 void          dbus_message_set_serial       (DBusMessage   *message, 
                                              dbus_uint32_t  serial);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_set_reply_serial (DBusMessage   *message,
                                              dbus_uint32_t  reply_serial);
+DBUS_EXPORT
 dbus_uint32_t dbus_message_get_reply_serial (DBusMessage   *message);
 
+DBUS_EXPORT
 void          dbus_message_set_auto_start   (DBusMessage   *message,
                                              dbus_bool_t    auto_start);
+DBUS_EXPORT
 dbus_bool_t   dbus_message_get_auto_start   (DBusMessage   *message);
 
+DBUS_EXPORT
 dbus_bool_t   dbus_message_get_path_decomposed (DBusMessage   *message,
                                                 char        ***path);
 
+DBUS_EXPORT
 dbus_bool_t dbus_message_append_args          (DBusMessage     *message,
 					       int              first_arg_type,
 					       ...);
+DBUS_EXPORT
 dbus_bool_t dbus_message_append_args_valist   (DBusMessage     *message,
 					       int              first_arg_type,
 					       va_list          var_args);
+DBUS_EXPORT
 dbus_bool_t dbus_message_get_args             (DBusMessage     *message,
 					       DBusError       *error,
 					       int              first_arg_type,
 					       ...);
+DBUS_EXPORT
 dbus_bool_t dbus_message_get_args_valist      (DBusMessage     *message,
 					       DBusError       *error,
 					       int              first_arg_type,
 					       va_list          var_args);
 
+DBUS_EXPORT
 dbus_bool_t dbus_message_contains_unix_fds    (DBusMessage *message);
 
+DBUS_EXPORT
 dbus_bool_t dbus_message_iter_init             (DBusMessage     *message,
                                                 DBusMessageIter *iter);
+DBUS_EXPORT
 dbus_bool_t dbus_message_iter_has_next         (DBusMessageIter *iter);
+DBUS_EXPORT
 dbus_bool_t dbus_message_iter_next             (DBusMessageIter *iter);
+DBUS_EXPORT
 char*       dbus_message_iter_get_signature    (DBusMessageIter *iter);
+DBUS_EXPORT
 int         dbus_message_iter_get_arg_type     (DBusMessageIter *iter);
+DBUS_EXPORT
 int         dbus_message_iter_get_element_type (DBusMessageIter *iter);
+DBUS_EXPORT
 void        dbus_message_iter_recurse          (DBusMessageIter *iter,
                                                 DBusMessageIter *sub);
+DBUS_EXPORT
 void        dbus_message_iter_get_basic        (DBusMessageIter *iter,
                                                 void            *value);
 #ifndef DBUS_DISABLE_DEPRECATED
 /* This function returns the wire protocol size of the array in bytes,
  * you do not want to know that probably
  */
+DBUS_EXPORT
 DBUS_DEPRECATED int         dbus_message_iter_get_array_len    (DBusMessageIter *iter);
 #endif
+DBUS_EXPORT
 void        dbus_message_iter_get_fixed_array  (DBusMessageIter *iter,
                                                 void            *value,
                                                 int             *n_elements);
 
 
+DBUS_EXPORT
 void        dbus_message_iter_init_append        (DBusMessage     *message,
                                                   DBusMessageIter *iter);
+DBUS_EXPORT
 dbus_bool_t dbus_message_iter_append_basic       (DBusMessageIter *iter,
                                                   int              type,
                                                   const void      *value);
+DBUS_EXPORT
 dbus_bool_t dbus_message_iter_append_fixed_array (DBusMessageIter *iter,
                                                   int              element_type,
                                                   const void      *value,
                                                   int              n_elements);
+DBUS_EXPORT
 dbus_bool_t dbus_message_iter_open_container     (DBusMessageIter *iter,
                                                   int              type,
                                                   const char      *contained_signature,
                                                   DBusMessageIter *sub);
+DBUS_EXPORT
 dbus_bool_t dbus_message_iter_close_container    (DBusMessageIter *iter,
                                                   DBusMessageIter *sub);
+DBUS_EXPORT
 void        dbus_message_iter_abandon_container  (DBusMessageIter *iter,
                                                   DBusMessageIter *sub);
 
+DBUS_EXPORT
 void dbus_message_lock    (DBusMessage  *message);
 
+DBUS_EXPORT
 dbus_bool_t  dbus_set_error_from_message  (DBusError    *error,
                                            DBusMessage  *message);
 
 
+DBUS_EXPORT
 dbus_bool_t dbus_message_allocate_data_slot (dbus_int32_t     *slot_p);
+DBUS_EXPORT
 void        dbus_message_free_data_slot     (dbus_int32_t     *slot_p);
+DBUS_EXPORT
 dbus_bool_t dbus_message_set_data           (DBusMessage      *message,
                                              dbus_int32_t      slot,
                                              void             *data,
                                              DBusFreeFunction  free_data_func);
+DBUS_EXPORT
 void*       dbus_message_get_data           (DBusMessage      *message,
                                              dbus_int32_t      slot);
 
+DBUS_EXPORT
 int         dbus_message_type_from_string (const char *type_str);
+DBUS_EXPORT
 const char* dbus_message_type_to_string   (int type);
 
+DBUS_EXPORT
 dbus_bool_t  dbus_message_marshal   (DBusMessage  *msg,
                                      char        **marshalled_data_p,
                                      int          *len_p);
+DBUS_EXPORT
 DBusMessage* dbus_message_demarshal (const char *str,
                                      int         len,
                                      DBusError  *error);
 
+DBUS_EXPORT
 int          dbus_message_demarshal_bytes_needed (const char *str, 
                                                   int len);
 
diff --git a/dbus/dbus-misc.h b/dbus/dbus-misc.h
index f8cb12f..3504bca 100644
--- a/dbus/dbus-misc.h
+++ b/dbus/dbus-misc.h
@@ -36,9 +36,10 @@ DBUS_BEGIN_DECLS
  * @addtogroup DBusMisc
  * @{
  */
-
+DBUS_EXPORT
 char*       dbus_get_local_machine_id  (void);
 
+DBUS_EXPORT
 void        dbus_get_version           (int *major_version_p,
                                         int *minor_version_p,
                                         int *micro_version_p);
diff --git a/dbus/dbus-pending-call.h b/dbus/dbus-pending-call.h
index b1b4e23..8f64b8b 100644
--- a/dbus/dbus-pending-call.h
+++ b/dbus/dbus-pending-call.h
@@ -38,23 +38,34 @@ DBUS_BEGIN_DECLS
  * @{
  */
 
+DBUS_EXPORT
 DBusPendingCall* dbus_pending_call_ref       (DBusPendingCall               *pending);
+DBUS_EXPORT
 void         dbus_pending_call_unref         (DBusPendingCall               *pending);
+DBUS_EXPORT
 dbus_bool_t  dbus_pending_call_set_notify    (DBusPendingCall               *pending,
                                               DBusPendingCallNotifyFunction  function,
                                               void                          *user_data,
                                               DBusFreeFunction               free_user_data);
+DBUS_EXPORT
 void         dbus_pending_call_cancel        (DBusPendingCall               *pending);
+DBUS_EXPORT
 dbus_bool_t  dbus_pending_call_get_completed (DBusPendingCall               *pending);
+DBUS_EXPORT
 DBusMessage* dbus_pending_call_steal_reply   (DBusPendingCall               *pending);
+DBUS_EXPORT
 void         dbus_pending_call_block         (DBusPendingCall               *pending);
 
+DBUS_EXPORT
 dbus_bool_t dbus_pending_call_allocate_data_slot (dbus_int32_t     *slot_p);
+DBUS_EXPORT
 void        dbus_pending_call_free_data_slot     (dbus_int32_t     *slot_p);
+DBUS_EXPORT
 dbus_bool_t dbus_pending_call_set_data           (DBusPendingCall  *pending,
                                                   dbus_int32_t      slot,
                                                   void             *data,
                                                   DBusFreeFunction  free_data_func);
+DBUS_EXPORT
 void*       dbus_pending_call_get_data           (DBusPendingCall  *pending,
                                                   dbus_int32_t      slot);
 
diff --git a/dbus/dbus-server.h b/dbus/dbus-server.h
index 6d7d2fa..bdbefa0 100644
--- a/dbus/dbus-server.h
+++ b/dbus/dbus-server.h
@@ -48,39 +48,54 @@ typedef void (* DBusNewConnectionFunction) (DBusServer     *server,
                                             DBusConnection *new_connection,
                                             void           *data);
 
+DBUS_EXPORT
 DBusServer* dbus_server_listen           (const char     *address,
                                           DBusError      *error);
+DBUS_EXPORT
 DBusServer* dbus_server_ref              (DBusServer     *server);
+DBUS_EXPORT
 void        dbus_server_unref            (DBusServer     *server);
+DBUS_EXPORT
 void        dbus_server_disconnect       (DBusServer     *server);
+DBUS_EXPORT
 dbus_bool_t dbus_server_get_is_connected (DBusServer     *server);
+DBUS_EXPORT
 char*       dbus_server_get_address      (DBusServer     *server);
+DBUS_EXPORT
 char*       dbus_server_get_id           (DBusServer     *server);
+DBUS_EXPORT
 void        dbus_server_set_new_connection_function (DBusServer                *server,
                                                      DBusNewConnectionFunction  function,
                                                      void                      *data,
                                                      DBusFreeFunction           free_data_function);
+DBUS_EXPORT
 dbus_bool_t dbus_server_set_watch_functions         (DBusServer                *server,
                                                      DBusAddWatchFunction       add_function,
                                                      DBusRemoveWatchFunction    remove_function,
                                                      DBusWatchToggledFunction   toggled_function,
                                                      void                      *data,
                                                      DBusFreeFunction           free_data_function);
+DBUS_EXPORT
 dbus_bool_t dbus_server_set_timeout_functions       (DBusServer                *server,
                                                      DBusAddTimeoutFunction     add_function,
                                                      DBusRemoveTimeoutFunction  remove_function,
                                                      DBusTimeoutToggledFunction toggled_function,
                                                      void                      *data,
                                                      DBusFreeFunction           free_data_function);
+DBUS_EXPORT
 dbus_bool_t dbus_server_set_auth_mechanisms         (DBusServer                *server,
                                                      const char               **mechanisms);
 
+DBUS_EXPORT
 dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t     *slot_p);
+DBUS_EXPORT
 void        dbus_server_free_data_slot     (dbus_int32_t     *slot_p);
+DBUS_EXPORT
 dbus_bool_t dbus_server_set_data           (DBusServer       *server,
                                             int               slot,
                                             void             *data,
                                             DBusFreeFunction  free_data_func);
+DBUS_EXPORT
 void*       dbus_server_get_data           (DBusServer       *server,
                                             int               slot);
 
diff --git a/dbus/dbus-signature.h b/dbus/dbus-signature.h
index ef3c6f9..ebf00c1 100644
--- a/dbus/dbus-signature.h
+++ b/dbus/dbus-signature.h
@@ -50,28 +50,39 @@ typedef struct
   int dummy17;           /**< Don't use this */
 } DBusSignatureIter;
 
+DBUS_EXPORT
 void            dbus_signature_iter_init             (DBusSignatureIter       *iter,
 						      const char              *signature);
 
+DBUS_EXPORT
 int             dbus_signature_iter_get_current_type (const DBusSignatureIter *iter);
 
+DBUS_EXPORT
 char *          dbus_signature_iter_get_signature    (const DBusSignatureIter *iter);
 
+DBUS_EXPORT
 int             dbus_signature_iter_get_element_type (const DBusSignatureIter *iter);
 
+DBUS_EXPORT
 dbus_bool_t     dbus_signature_iter_next             (DBusSignatureIter       *iter);
 
+DBUS_EXPORT
 void            dbus_signature_iter_recurse          (const DBusSignatureIter *iter,
 						      DBusSignatureIter       *subiter);
 
+DBUS_EXPORT
 dbus_bool_t     dbus_signature_validate              (const char       *signature,
 						      DBusError        *error);
 
+DBUS_EXPORT
 dbus_bool_t     dbus_signature_validate_single       (const char       *signature,
 						      DBusError        *error);
 
+DBUS_EXPORT
 dbus_bool_t     dbus_type_is_basic                   (int            typecode);
+DBUS_EXPORT
 dbus_bool_t     dbus_type_is_container               (int            typecode);
+DBUS_EXPORT
 dbus_bool_t     dbus_type_is_fixed                   (int            typecode);
 
 /** @} */
diff --git a/dbus/dbus-threads.h b/dbus/dbus-threads.h
index 1fd83f2..ba07ca5 100644
--- a/dbus/dbus-threads.h
+++ b/dbus/dbus-threads.h
@@ -186,7 +186,9 @@ typedef struct
   
 } DBusThreadFunctions;
 
+DBUS_EXPORT
 dbus_bool_t  dbus_threads_init         (const DBusThreadFunctions *functions);
+DBUS_EXPORT
 dbus_bool_t  dbus_threads_init_default (void);
 
 /** @} */
-- 
1.6.4.msysgit.0


--------------060002080201040401050700--


More information about the dbus mailing list