[libepc] Avoid use of deprecated G_CONST_RETURN.



commit 805724e65618f6a05c5c6996e3ed83d1f79aed94
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jun 15 11:58:43 2011 +0200

    Avoid use of deprecated G_CONST_RETURN.
    
    * libepc-ui/password-dialog.[h|cc]:
    * libepc/consumer.[h|cc]:
    * libepc/contents.[h|cc]:
    * libepc/dispatcher.[h|cc]:
    * libepc/protocol.[h|cc]:
    * libepc/publisher.[h|cc]:
    * libepc/service-info.[h|cc]:
    * libepc/service-type.[h|cc]:
    * libepc/shell.[h|cc]: Use const instead.

 ChangeLog                   |   47 +++++++++++++++++++++++++++---------------
 libepc-ui/password-dialog.c |    6 ++--
 libepc-ui/password-dialog.h |    6 ++--
 libepc/consumer.c           |    4 +-
 libepc/consumer.h           |    4 +-
 libepc/contents.c           |    2 +-
 libepc/contents.h           |    2 +-
 libepc/dispatcher.c         |    4 +-
 libepc/dispatcher.h         |    4 +-
 libepc/protocol.c           |    4 +-
 libepc/protocol.h           |    4 +-
 libepc/publisher.c          |   20 +++++++++---------
 libepc/publisher.h          |   16 +++++++-------
 libepc/service-info.c       |   10 ++++----
 libepc/service-info.h       |   10 ++++----
 libepc/service-type.c       |    2 +-
 libepc/service-type.h       |    2 +-
 libepc/shell.c              |    2 +-
 libepc/shell.h              |    2 +-
 19 files changed, 82 insertions(+), 69 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 72565d1..e909454 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-06-15  Murray Cumming  <murrayc murrayc com>
+
+	Avoid use of deprecated G_CONST_RETURN.
+
+	* libepc-ui/password-dialog.[h|cc]:
+	* libepc/consumer.[h|cc]:
+	* libepc/contents.[h|cc]:
+	* libepc/dispatcher.[h|cc]:
+	* libepc/protocol.[h|cc]:
+	* libepc/publisher.[h|cc]:
+	* libepc/service-info.[h|cc]:
+	* libepc/service-type.[h|cc]:
+	* libepc/shell.[h|cc]: Use const instead.
+
 	=== Release 0.4.0 ===
 
 2010-05-12  Murray Cumming  <murrayc murrayc com>
@@ -6,7 +20,7 @@
 
 	* libepc-ui/progress-window.c
 	* examples/consumer-ui.c: Remove ifdefed code for older versions
-	of GTK+. We use GTK+ 3 now anyway. This was causing a compiler 
+	of GTK+. We use GTK+ 3 now anyway. This was causing a compiler
 	warning about extra tokens after #ifdef.
 
 2010-05-12  Christopher Dale  <chrelad gmail com>
@@ -94,13 +108,13 @@
 	Patch by Petr Salinger.
 
 	* tests/framework.c (epc_test_list_ifaces):
-	Use ifr_index if ifr_ifindex does not exist. Fixes build failure 
+	Use ifr_index if ifr_ifindex does not exist. Fixes build failure
 	on GNU/kFreeBSD. Bug #592474.
 
 2009-08-21  Murray Cumming  <murrayc murrayc com>
 
 	* libepc/shell.c (epc_shell_progress_update_default):
-	Change the Operation Proceeded string to the more correct Operation in 
+	Change the Operation Proceeded string to the more correct Operation in
 	Progress and added a translator comment, to fix bug #589339.
 	(Luca Ferretti)
 
@@ -108,7 +122,7 @@
 
 2009-05-18  Murray Cumming  <murrayc murrayc com>
 
-	* libepc/shell.c (epc_shell_create_service_browser): Fix a warning about 
+	* libepc/shell.c (epc_shell_create_service_browser): Fix a warning about
 	no return value. Bug #583000 (Vincent Untz).
 
 	=== Release 0.3.9 ===
@@ -121,8 +135,8 @@
 
 2008-11-02  Murray Cumming  <murrayc murrayc com>
 
-	* libepc/shell.c (epc_shell_create_service_browser): 
-	Return if epc_shell_get_avahi_client() returns a GError, instead of 
+	* libepc/shell.c (epc_shell_create_service_browser):
+	Return if epc_shell_get_avahi_client() returns a GError, instead of
 	then setting the already-set GError later.
 
 2008-10-23  Mathias Hasselmann  <mathias taschenorakel de>
@@ -180,8 +194,8 @@
 
 2008-10-19  Murray Cumming  <murrayc murrayc com>
 
-	* Makefile.am: Specify LIBEPC_LIBS for the examples, 
-	because not all (such as gthread-2.0) are implicitly provided 
+	* Makefile.am: Specify LIBEPC_LIBS for the examples,
+	because not all (such as gthread-2.0) are implicitly provided
 	by the build library.
 	Bug #556689 (GÃtz Waschk).
 
@@ -200,9 +214,9 @@
 
 2008-07-29  Murray Cumming  <murrayc murrayc com>
 
-	* libepc/publisher.c: epc_publisher_install_handlers(): Check for 
-	a NULL service_name before calling soup_auth_domain_digest_new() to 
-	avoid a crash. However, we need to know why it can be NULL and 
+	* libepc/publisher.c: epc_publisher_install_handlers(): Check for
+	a NULL service_name before calling soup_auth_domain_digest_new() to
+	avoid a crash. However, we need to know why it can be NULL and
 	prevent that instead.
 	Bug #540631.
 
@@ -931,21 +945,21 @@
 
 	* docs/reference/libepc/libepc-1.0-sections.txt, libepc/shell.c,
 	libepc/shell.h: Remove epc_shell_ref and epc_shell_unref.
-	* libepc/consumer.c, libepc/dispatcher.c, libepc/publisher.c, 
+	* libepc/consumer.c, libepc/dispatcher.c, libepc/publisher.c,
 	libepc/service-monitor.c, tests/framework.c:
 	Don't call epc_shell_ref and epc_shell_unref.
 
 2007-11-27  Murray Cumming  <murrayc murrayc com>
 
-	* libepc/publisher.c: epc_publisher_set_auth_handler() documentation: 
+	* libepc/publisher.c: epc_publisher_set_auth_handler() documentation:
 	Note that this should be used _after_ adding the key.
 
 2007-11-27  Murray Cumming  <murrayc murrayc com>
 
-	* libepc/consumer.c: epc_consumer_lookup(): Mention the specific error 
+	* libepc/consumer.c: epc_consumer_lookup(): Mention the specific error
 	code that is relevant when using authentication.
 	* libepc/publisher.c:
-	* libepc/publisher.h: EpcAuthHandler: mention the two different 
+	* libepc/publisher.h: EpcAuthHandler: mention the two different
 	auth methods (and what to do) in the documentation.
 	EpcAuthFlags: Some minor changes to the documention.
 
@@ -1105,7 +1119,7 @@
 
 2007-11-22  Murray Cumming  <murrayc murrayc com>
 
-	* examples/consumer-ui.c: (main): Rename the transport 
+	* examples/consumer-ui.c: (main): Rename the transport
 	variable to service_type because that is what it is.
 
 2007-11-21  Mathias Hasselmann  <mathias openismus com>
@@ -2040,4 +2054,3 @@
 2007-10-31  Mathias Hasselmann  <mathias openismus com>
 
 	Initial commit of the Easy Publish and Consume library.
-
diff --git a/libepc-ui/password-dialog.c b/libepc-ui/password-dialog.c
index c105a57..b570d85 100644
--- a/libepc-ui/password-dialog.c
+++ b/libepc-ui/password-dialog.c
@@ -482,7 +482,7 @@ epc_password_dialog_set_username (EpcPasswordDialog *self,
  *
  * Returns: the current user name of the dialog.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_password_dialog_get_username (EpcPasswordDialog *self)
 {
   g_return_val_if_fail (EPC_IS_PASSWORD_DIALOG (self), NULL);
@@ -518,7 +518,7 @@ epc_password_dialog_set_password (EpcPasswordDialog *self,
  *
  * Returns: the current password of the dialog.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_password_dialog_get_password (EpcPasswordDialog *self)
 {
   g_return_val_if_fail (EPC_IS_PASSWORD_DIALOG (self), NULL);
@@ -554,7 +554,7 @@ epc_password_dialog_set_realm (EpcPasswordDialog *self,
  *
  * Returns: the current realm of the dialog.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_password_dialog_get_realm (EpcPasswordDialog *self)
 {
   g_return_val_if_fail (EPC_IS_PASSWORD_DIALOG (self), NULL);
diff --git a/libepc-ui/password-dialog.h b/libepc-ui/password-dialog.h
index 49851de..f703718 100644
--- a/libepc-ui/password-dialog.h
+++ b/libepc-ui/password-dialog.h
@@ -81,15 +81,15 @@ gboolean              epc_password_dialog_is_anonymous          (EpcPasswordDial
 
 void                  epc_password_dialog_set_username          (EpcPasswordDialog *dialog,
                                                                  const gchar       *username);
-G_CONST_RETURN gchar* epc_password_dialog_get_username          (EpcPasswordDialog *dialog);
+const gchar* epc_password_dialog_get_username          (EpcPasswordDialog *dialog);
 
 void                  epc_password_dialog_set_password          (EpcPasswordDialog *dialog,
                                                                  const gchar       *password);
-G_CONST_RETURN gchar* epc_password_dialog_get_password          (EpcPasswordDialog *dialog);
+const gchar* epc_password_dialog_get_password          (EpcPasswordDialog *dialog);
 
 void                  epc_password_dialog_set_realm             (EpcPasswordDialog *dialog,
                                                                  const gchar       *realm);
-G_CONST_RETURN gchar* epc_password_dialog_get_realm             (EpcPasswordDialog *dialog);
+const gchar* epc_password_dialog_get_realm             (EpcPasswordDialog *dialog);
 
 void                  epc_password_dialog_attach                (EpcPasswordDialog *dialog,
                                                                  EpcConsumer       *consumer);
diff --git a/libepc/consumer.c b/libepc/consumer.c
index ecce71b..5ca4c40 100644
--- a/libepc/consumer.c
+++ b/libepc/consumer.c
@@ -828,7 +828,7 @@ epc_consumer_get_protocol (EpcConsumer *self)
  *
  * Returns: The user name this consumer uses.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_consumer_get_username (EpcConsumer *self)
 {
   g_return_val_if_fail (EPC_IS_CONSUMER (self), NULL);
@@ -844,7 +844,7 @@ epc_consumer_get_username (EpcConsumer *self)
  *
  * Returns: The password this consumer uses.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_consumer_get_password (EpcConsumer *self)
 {
   g_return_val_if_fail (EPC_IS_CONSUMER (self), NULL);
diff --git a/libepc/consumer.h b/libepc/consumer.h
index 73fe4ad..c3d8a84 100644
--- a/libepc/consumer.h
+++ b/libepc/consumer.h
@@ -98,8 +98,8 @@ void                  epc_consumer_set_password          (EpcConsumer          *
                                                           const gchar          *password);
 
 EpcProtocol           epc_consumer_get_protocol          (EpcConsumer          *consumer);
-G_CONST_RETURN gchar* epc_consumer_get_username          (EpcConsumer          *consumer);
-G_CONST_RETURN gchar* epc_consumer_get_password          (EpcConsumer          *consumer);
+const gchar* epc_consumer_get_username          (EpcConsumer          *consumer);
+const gchar* epc_consumer_get_password          (EpcConsumer          *consumer);
 
 gboolean              epc_consumer_resolve_publisher     (EpcConsumer          *consumer,
                                                           guint                 timeout);
diff --git a/libepc/contents.c b/libepc/contents.c
index 7a26e5d..38c9e5e 100644
--- a/libepc/contents.c
+++ b/libepc/contents.c
@@ -267,7 +267,7 @@ epc_contents_is_stream (EpcContents *contents)
  *
  * Returns: Returns the MIME type of the buffer.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_contents_get_mime_type (EpcContents *self)
 {
   g_return_val_if_fail (NULL != self, NULL);
diff --git a/libepc/contents.h b/libepc/contents.h
index 32bfb54..ce7cae3 100644
--- a/libepc/contents.h
+++ b/libepc/contents.h
@@ -69,7 +69,7 @@ EpcContents*          epc_contents_ref           (EpcContents         *contents)
 void                  epc_contents_unref         (EpcContents         *contents);
 
 gboolean              epc_contents_is_stream     (EpcContents         *contents);
-G_CONST_RETURN gchar* epc_contents_get_mime_type (EpcContents         *contents);
+const gchar* epc_contents_get_mime_type (EpcContents         *contents);
 
 gconstpointer         epc_contents_get_data      (EpcContents         *contents,
                                                   gsize               *length);
diff --git a/libepc/dispatcher.c b/libepc/dispatcher.c
index d830af4..5689fe6 100644
--- a/libepc/dispatcher.c
+++ b/libepc/dispatcher.c
@@ -1052,7 +1052,7 @@ epc_dispatcher_set_collision_handling (EpcDispatcher       *self,
  *
  * Returns: The user friendly name of the service.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_dispatcher_get_name (EpcDispatcher *self)
 {
   g_return_val_if_fail (EPC_IS_DISPATCHER (self), NULL);
@@ -1069,7 +1069,7 @@ epc_dispatcher_get_name (EpcDispatcher *self)
  * Returns: The unique identifier of the service, or %NULL on error.
  * Since: 0.3.1
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_dispatcher_get_cookie (EpcDispatcher *self)
 {
   g_return_val_if_fail (EPC_IS_DISPATCHER (self), NULL);
diff --git a/libepc/dispatcher.h b/libepc/dispatcher.h
index 20d3fcd..8c7e8a2 100644
--- a/libepc/dispatcher.h
+++ b/libepc/dispatcher.h
@@ -110,9 +110,9 @@ void                  epc_dispatcher_set_cookie             (EpcDispatcher
 void                  epc_dispatcher_set_collision_handling (EpcDispatcher        *dispatcher,
                                                              EpcCollisionHandling  method);
 
-G_CONST_RETURN gchar* epc_dispatcher_get_name               (EpcDispatcher        *dispatcher);
+const gchar* epc_dispatcher_get_name               (EpcDispatcher        *dispatcher);
 EpcCollisionHandling  epc_dispatcher_get_collision_handling (EpcDispatcher        *dispatcher);
-G_CONST_RETURN gchar* epc_dispatcher_get_cookie             (EpcDispatcher        *dispatcher);
+const gchar* epc_dispatcher_get_cookie             (EpcDispatcher        *dispatcher);
 
 G_END_DECLS
 
diff --git a/libepc/protocol.c b/libepc/protocol.c
index 26618db..e620895 100644
--- a/libepc/protocol.c
+++ b/libepc/protocol.c
@@ -118,7 +118,7 @@ epc_protocol_from_name (const gchar *name,
  * Returns: Returns the DNS-SD service type associated
  * with @protocol, or %NULL on unknown protocols.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_protocol_get_service_type (EpcProtocol protocol)
 {
   switch (protocol)
@@ -146,7 +146,7 @@ epc_protocol_get_service_type (EpcProtocol protocol)
  * Returns: Returns the URI scheme associated with @protocol,
  * or %NULL on unknown protocols.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_protocol_get_uri_scheme (EpcProtocol  protocol)
 {
   switch (protocol)
diff --git a/libepc/protocol.h b/libepc/protocol.h
index 3b718ef..cb0d468 100644
--- a/libepc/protocol.h
+++ b/libepc/protocol.h
@@ -51,8 +51,8 @@ gchar*                epc_protocol_build_uri        (EpcProtocol   protocol,
                                                      guint16       port,
                                                      const gchar  *path);
 
-G_CONST_RETURN gchar* epc_protocol_get_service_type (EpcProtocol   protocol) G_GNUC_CONST;
-G_CONST_RETURN gchar* epc_protocol_get_uri_scheme   (EpcProtocol   protocol) G_GNUC_CONST;
+const gchar* epc_protocol_get_service_type (EpcProtocol   protocol) G_GNUC_CONST;
+const gchar* epc_protocol_get_uri_scheme   (EpcProtocol   protocol) G_GNUC_CONST;
 
 G_END_DECLS
 
diff --git a/libepc/publisher.c b/libepc/publisher.c
index a25042b..61aa93b 100644
--- a/libepc/publisher.c
+++ b/libepc/publisher.c
@@ -347,7 +347,7 @@ epc_publisher_handle_file (EpcPublisher *publisher G_GNUC_UNUSED,
   return contents;
 }
 
-static G_CONST_RETURN gchar*
+static const gchar*
 epc_publisher_get_key (const gchar *path)
 {
   const gchar *key;
@@ -1046,7 +1046,7 @@ epc_publisher_is_server_created (EpcPublisher *self)
   return (NULL != self->priv->server);
 }
 
-static G_CONST_RETURN gchar*
+static const gchar*
 epc_publisher_compute_name (EpcPublisher *self)
 {
   const gchar *name = self->priv->service_name;
@@ -2262,7 +2262,7 @@ epc_publisher_set_auth_flags (EpcPublisher *self,
  *
  * Returns: The human friendly name of this #EpcPublisher.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_publisher_get_service_name (EpcPublisher *self)
 {
   g_return_val_if_fail (EPC_IS_PUBLISHER (self), NULL);
@@ -2278,7 +2278,7 @@ epc_publisher_get_service_name (EpcPublisher *self)
  *
  * Returns: The DNS-SD domain of this #EpcPublisher, or %NULL.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_publisher_get_service_domain (EpcPublisher *self)
 {
   g_return_val_if_fail (EPC_IS_PUBLISHER (self), NULL);
@@ -2294,7 +2294,7 @@ epc_publisher_get_service_domain (EpcPublisher *self)
  *
  * Returns: The certificate's file name, or %NULL.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_publisher_get_certificate_file (EpcPublisher *self)
 {
   g_return_val_if_fail (EPC_IS_PUBLISHER (self), NULL);
@@ -2310,7 +2310,7 @@ epc_publisher_get_certificate_file (EpcPublisher *self)
  *
  * Returns: The private key's file name, or %NULL.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_publisher_get_private_key_file (EpcPublisher *self)
 {
   g_return_val_if_fail (EPC_IS_PUBLISHER (self), NULL);
@@ -2343,7 +2343,7 @@ epc_publisher_get_protocol (EpcPublisher *self)
  *
  * Returns: The server's contents path.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_publisher_get_contents_path (EpcPublisher *self)
 {
   g_return_val_if_fail (EPC_IS_PUBLISHER (self), NULL);
@@ -2377,7 +2377,7 @@ epc_publisher_get_auth_flags (EpcPublisher *self)
  * Returns: The unique identifier of the service, or %NULL on error.
  * Since: 0.3.1
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_publisher_get_service_cookie (EpcPublisher *self)
 {
   g_return_val_if_fail (EPC_IS_PUBLISHER (self), NULL);
@@ -2731,7 +2731,7 @@ epc_auth_context_get_publisher (const EpcAuthContext *context)
  *
  * Returns: The resource key.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_auth_context_get_key (const EpcAuthContext *context)
 {
   g_return_val_if_fail (NULL != context, NULL);
@@ -2749,7 +2749,7 @@ epc_auth_context_get_key (const EpcAuthContext *context)
  *
  * Returns: The password sent, or %NULL.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_auth_context_get_password (const EpcAuthContext *context)
 {
   g_return_val_if_fail (NULL != context, NULL);
diff --git a/libepc/publisher.h b/libepc/publisher.h
index 7be948f..eaa2ee9 100644
--- a/libepc/publisher.h
+++ b/libepc/publisher.h
@@ -156,15 +156,15 @@ void                  epc_publisher_set_collision_handling (EpcPublisher
 void                  epc_publisher_set_service_cookie     (EpcPublisher          *publisher,
                                                             const gchar           *cookie);
 
-G_CONST_RETURN gchar* epc_publisher_get_service_name       (EpcPublisher          *publisher);
-G_CONST_RETURN gchar* epc_publisher_get_service_domain     (EpcPublisher          *publisher);
-G_CONST_RETURN gchar* epc_publisher_get_certificate_file   (EpcPublisher          *publisher);
-G_CONST_RETURN gchar* epc_publisher_get_private_key_file   (EpcPublisher          *publisher);
+const gchar* epc_publisher_get_service_name       (EpcPublisher          *publisher);
+const gchar* epc_publisher_get_service_domain     (EpcPublisher          *publisher);
+const gchar* epc_publisher_get_certificate_file   (EpcPublisher          *publisher);
+const gchar* epc_publisher_get_private_key_file   (EpcPublisher          *publisher);
 EpcProtocol           epc_publisher_get_protocol           (EpcPublisher          *publisher);
-G_CONST_RETURN gchar* epc_publisher_get_contents_path      (EpcPublisher          *publisher);
+const gchar* epc_publisher_get_contents_path      (EpcPublisher          *publisher);
 EpcAuthFlags          epc_publisher_get_auth_flags         (EpcPublisher          *publisher);
 EpcCollisionHandling  epc_publisher_get_collision_handling (EpcPublisher          *publisher);
-G_CONST_RETURN gchar* epc_publisher_get_service_cookie     (EpcPublisher          *publisher);
+const gchar* epc_publisher_get_service_cookie     (EpcPublisher          *publisher);
 
 void                  epc_publisher_add                    (EpcPublisher          *publisher,
                                                             const gchar           *key,
@@ -214,8 +214,8 @@ gchar*                epc_publisher_expand_name            (const gchar
                                                             GError               **error);
 
 EpcPublisher*         epc_auth_context_get_publisher       (const EpcAuthContext  *context);
-G_CONST_RETURN gchar* epc_auth_context_get_key             (const EpcAuthContext  *context);
-G_CONST_RETURN gchar* epc_auth_context_get_password        (const EpcAuthContext  *context);
+const gchar* epc_auth_context_get_key             (const EpcAuthContext  *context);
+const gchar* epc_auth_context_get_password        (const EpcAuthContext  *context);
 gboolean              epc_auth_context_check_password      (const EpcAuthContext  *context,
                                                             const gchar           *password);
 
diff --git a/libepc/service-info.c b/libepc/service-info.c
index 0733867..004c746 100644
--- a/libepc/service-info.c
+++ b/libepc/service-info.c
@@ -191,7 +191,7 @@ epc_service_info_unref (EpcServiceInfo *self)
  *
  * Returns: A DNS-SD service type.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_service_info_get_service_type (const EpcServiceInfo *self)
 {
   g_return_val_if_fail (NULL != self, NULL);
@@ -206,7 +206,7 @@ epc_service_info_get_service_type (const EpcServiceInfo *self)
  *
  * Returns: A DNS host name.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_service_info_get_host (const EpcServiceInfo *self)
 {
   g_return_val_if_fail (NULL != self, NULL);
@@ -238,7 +238,7 @@ epc_service_info_get_port (const EpcServiceInfo *self)
  *
  * Returns: The requested service detail, or %NULL.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_service_info_get_detail (const EpcServiceInfo *self,
                              const gchar          *name)
 {
@@ -273,7 +273,7 @@ epc_service_info_get_detail (const EpcServiceInfo *self,
  *
  * Returns: A network interface name, or %NULL.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_service_info_get_interface (const EpcServiceInfo *self)
 {
   g_return_val_if_fail (NULL != self, NULL);
@@ -309,7 +309,7 @@ epc_service_info_get_address_family (const EpcServiceInfo *self)
  *
  * Returns: A IP address, or %NULL.
  */
-G_CONST_RETURN AvahiAddress*
+const AvahiAddress*
 epc_service_info_get_address (const EpcServiceInfo *self)
 {
   g_return_val_if_fail (NULL != self, NULL);
diff --git a/libepc/service-info.h b/libepc/service-info.h
index 72ea4f0..76fa122 100644
--- a/libepc/service-info.h
+++ b/libepc/service-info.h
@@ -66,15 +66,15 @@ EpcServiceInfo*              epc_service_info_new_full           (const gchar
 EpcServiceInfo*              epc_service_info_ref                (EpcServiceInfo        *info);
 void                         epc_service_info_unref              (EpcServiceInfo        *info);
 
-G_CONST_RETURN gchar*        epc_service_info_get_service_type   (const EpcServiceInfo  *info);
-G_CONST_RETURN gchar*        epc_service_info_get_host           (const EpcServiceInfo  *info);
+const gchar*        epc_service_info_get_service_type   (const EpcServiceInfo  *info);
+const gchar*        epc_service_info_get_host           (const EpcServiceInfo  *info);
 guint                        epc_service_info_get_port           (const EpcServiceInfo  *info);
-G_CONST_RETURN gchar*        epc_service_info_get_detail         (const EpcServiceInfo  *info,
+const gchar*        epc_service_info_get_detail         (const EpcServiceInfo  *info,
                                                                   const gchar           *name);
 
-G_CONST_RETURN gchar*        epc_service_info_get_interface      (const EpcServiceInfo  *info);
+const gchar*        epc_service_info_get_interface      (const EpcServiceInfo  *info);
 EpcAddressFamily             epc_service_info_get_address_family (const EpcServiceInfo  *info);
-G_CONST_RETURN AvahiAddress* epc_service_info_get_address        (const EpcServiceInfo  *info);
+const AvahiAddress* epc_service_info_get_address        (const EpcServiceInfo  *info);
 
 G_END_DECLS
 
diff --git a/libepc/service-type.c b/libepc/service-type.c
index f67009e..f76d5f5 100644
--- a/libepc/service-type.c
+++ b/libepc/service-type.c
@@ -149,7 +149,7 @@ epc_service_type_new (EpcProtocol  protocol,
  *
  * Returns: The base-service-type.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_service_type_get_base (const gchar *type)
 {
   const gchar *base;
diff --git a/libepc/service-type.h b/libepc/service-type.h
index 5b5aabc..73b0020 100644
--- a/libepc/service-type.h
+++ b/libepc/service-type.h
@@ -43,7 +43,7 @@ G_BEGIN_DECLS
 
 gchar*                epc_service_type_new            (EpcProtocol  protocol,
                                                        const gchar *application);
-G_CONST_RETURN gchar* epc_service_type_get_base       (const gchar *type) G_GNUC_PURE;
+const gchar* epc_service_type_get_base       (const gchar *type) G_GNUC_PURE;
 EpcProtocol           epc_service_type_get_protocol   (const gchar *service_type) G_GNUC_PURE;
 gchar**               epc_service_type_list_supported (const gchar *application);
 
diff --git a/libepc/shell.c b/libepc/shell.c
index 322506d..c59deea 100644
--- a/libepc/shell.c
+++ b/libepc/shell.c
@@ -433,7 +433,7 @@ epc_shell_restart_avahi_client (const gchar *strloc G_GNUC_UNUSED)
  *
  * Returns: The official host name, or %NULL on error.
  */
-G_CONST_RETURN gchar*
+const gchar*
 epc_shell_get_host_name (GError **error)
 {
   AvahiClient *client = epc_shell_get_avahi_client (error);
diff --git a/libepc/shell.h b/libepc/shell.h
index 9e828fe..5a2bbfa 100644
--- a/libepc/shell.h
+++ b/libepc/shell.h
@@ -101,7 +101,7 @@ AvahiServiceBrowser*  epc_shell_create_service_browser   (AvahiIfIndex
                                                           GError                     **error);
 void                  epc_shell_restart_avahi_client     (const gchar                 *strloc);
 
-G_CONST_RETURN gchar* epc_shell_get_host_name            (GError                     **error);
+const gchar* epc_shell_get_host_name            (GError                     **error);
 
 void                  epc_shell_set_progress_hooks       (const EpcShellProgressHooks *hooks,
                                                           gpointer                     user_data,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]