[gssdp] client: Use recommended include order
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp] client: Use recommended include order
- Date: Sat, 15 Oct 2016 17:58:21 +0000 (UTC)
commit 4f6fe140a5c3de0c2b80bb16dacc4579f42a816e
Author: Jens Georg <mail jensge org>
Date: Tue Oct 11 21:35:06 2016 +0200
client: Use recommended include order
Signed-off-by: Jens Georg <mail jensge org>
libgssdp/gssdp-client.c | 23 +++++++++++++----------
libgssdp/gssdp-pktinfo-message.c | 6 +++++-
libgssdp/gssdp-resource-browser.c | 11 +++++++----
libgssdp/gssdp-resource-browser.h | 2 ++
libgssdp/gssdp-resource-group.c | 13 ++++++++-----
libgssdp/gssdp-resource-group.h | 2 ++
libgssdp/gssdp-socket-functions.c | 11 +++++++----
libgssdp/gssdp-socket-source.c | 5 ++++-
8 files changed, 48 insertions(+), 25 deletions(-)
---
diff --git a/libgssdp/gssdp-client.c b/libgssdp/gssdp-client.c
index 981cd3c..2b9bb11 100644
--- a/libgssdp/gssdp-client.c
+++ b/libgssdp/gssdp-client.c
@@ -32,7 +32,20 @@
* and #GSSDPResourceGroup.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
+#include "gssdp-client.h"
+#include "gssdp-client-private.h"
+#include "gssdp-error.h"
+#include "gssdp-socket-source.h"
+#include "gssdp-protocol.h"
+#include "gssdp-socket-functions.h"
+#ifdef HAVE_PKTINFO
+#include "gssdp-pktinfo-message.h"
+#endif
+
#include <sys/types.h>
#include <glib.h>
#ifndef G_OS_WIN32
@@ -75,16 +88,6 @@ typedef unsigned long in_addr_t;
#include <sys/ioctl.h>
#endif
-#include "gssdp-client.h"
-#include "gssdp-client-private.h"
-#include "gssdp-error.h"
-#include "gssdp-socket-source.h"
-#include "gssdp-protocol.h"
-#include "gssdp-socket-functions.h"
-#ifdef HAVE_PKTINFO
-#include "gssdp-pktinfo-message.h"
-#endif
-
#ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 46
#endif
diff --git a/libgssdp/gssdp-pktinfo-message.c b/libgssdp/gssdp-pktinfo-message.c
index 90e1e12..fb6d723 100644
--- a/libgssdp/gssdp-pktinfo-message.c
+++ b/libgssdp/gssdp-pktinfo-message.c
@@ -19,10 +19,14 @@
* Boston, MA 02110-1301, USA.
*/
-#include <netinet/ip.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /* HAVE_CONFIG_H */
#include "gssdp-pktinfo-message.h"
+#include <netinet/ip.h>
+
struct _GSSDPPktinfoMessage {
GSocketControlMessage parent;
};
diff --git a/libgssdp/gssdp-resource-browser.c b/libgssdp/gssdp-resource-browser.c
index 7d1d73e..e6fc3ce 100644
--- a/libgssdp/gssdp-resource-browser.c
+++ b/libgssdp/gssdp-resource-browser.c
@@ -30,16 +30,19 @@
* automatically when activating the browser.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include <libsoup/soup.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
+#endif /* HAVE_CONFIG_H */
#include "gssdp-resource-browser.h"
#include "gssdp-client-private.h"
#include "gssdp-protocol.h"
+#include <libsoup/soup.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
#define RESCAN_TIMEOUT 5 /* 5 seconds */
#define MAX_DISCOVERY_MESSAGES 3
#define DISCOVERY_FREQUENCY 500 /* 500 ms */
diff --git a/libgssdp/gssdp-resource-browser.h b/libgssdp/gssdp-resource-browser.h
index 95ec72c..78a646b 100644
--- a/libgssdp/gssdp-resource-browser.h
+++ b/libgssdp/gssdp-resource-browser.h
@@ -24,6 +24,8 @@
#include "gssdp-client.h"
+#include <glib-object.h>
+
G_BEGIN_DECLS
#define GSSDP_TYPE_RESOURCE_BROWSER (gssdp_resource_browser_get_type ())
diff --git a/libgssdp/gssdp-resource-group.c b/libgssdp/gssdp-resource-group.c
index 10d6cf7..fb85dbc 100644
--- a/libgssdp/gssdp-resource-group.c
+++ b/libgssdp/gssdp-resource-group.c
@@ -28,18 +28,21 @@
* service as multiple SSDP resources (UPnP does this for example).
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-
-#include <libsoup/soup.h>
+#endif /* HAVE_CONFIG_H */
#include "gssdp-resource-group.h"
#include "gssdp-resource-browser.h"
#include "gssdp-client-private.h"
#include "gssdp-protocol.h"
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include <libsoup/soup.h>
+
#define DEFAULT_MAN_HEADER "\"ssdp:discover\""
struct _GSSDPResourceGroupPrivate {
diff --git a/libgssdp/gssdp-resource-group.h b/libgssdp/gssdp-resource-group.h
index 312c7f9..53160b6 100644
--- a/libgssdp/gssdp-resource-group.h
+++ b/libgssdp/gssdp-resource-group.h
@@ -24,6 +24,8 @@
#include "gssdp-client.h"
+#include <glib-object.h>
+
G_BEGIN_DECLS
#define GSSDP_TYPE_RESOURCE_GROUP (gssdp_resource_group_get_type ())
diff --git a/libgssdp/gssdp-socket-functions.c b/libgssdp/gssdp-socket-functions.c
index 0ba8c6d..c142e4b 100644
--- a/libgssdp/gssdp-socket-functions.c
+++ b/libgssdp/gssdp-socket-functions.c
@@ -19,7 +19,14 @@
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
+#include "gssdp-error.h"
+#include "gssdp-socket-functions.h"
+#include "gssdp-pktinfo-message.h"
+
#include <errno.h>
#include <string.h>
@@ -36,10 +43,6 @@
#include <arpa/inet.h>
#endif
-#include "gssdp-error.h"
-#include "gssdp-socket-functions.h"
-#include "gssdp-pktinfo-message.h"
-
static char*
gssdp_socket_error_message (int error) {
#ifdef G_OS_WIN32
diff --git a/libgssdp/gssdp-socket-source.c b/libgssdp/gssdp-socket-source.c
index a332dc8..48c3226 100644
--- a/libgssdp/gssdp-socket-source.c
+++ b/libgssdp/gssdp-socket-source.c
@@ -24,14 +24,17 @@
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include <glib.h>
+#endif /* HAVE_CONFIG_H */
#include "gssdp-socket-functions.h"
#include "gssdp-socket-source.h"
#include "gssdp-protocol.h"
#include "gssdp-error.h"
+#include <glib.h>
+
struct _GSSDPSocketSource {
GObject parent;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]