summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-02-01 16:19:15 (GMT)
committerWill Thompson <will.thompson@collabora.co.uk>2012-02-06 13:26:17 (GMT)
commit6de1714422763cb4b96be9dd9085b8745b19d18a (patch)
tree59f89b45cd1f03aa6e28ef34ea49f7aeacbb7dae
parent25cc1aba2e10faa7d85030a57331c541a04cbe4d (diff)
downloadwocky-6de1714422763cb4b96be9dd9085b8745b19d18a.tar.gz
wocky-6de1714422763cb4b96be9dd9085b8745b19d18a.tar.xz
Move some of pubsub-node-protected.h to internal.h
As Simon mentions on <https://bugs.freedesktop.org/show_bug.cgi?id=27489#c1> and comments in that file specify, some bits of wocky-pubsub-node-protected.h are intended for applications, and other bits are internal to Wocky. So let's split the later bits into a new header, wocky-pubsub-node-internal.h, which is not included by wocky.h and has internal-only header guards.
-rw-r--r--wocky/Makefile.am1
-rw-r--r--wocky/wocky-pubsub-node-internal.h44
-rw-r--r--wocky/wocky-pubsub-node-protected.h20
-rw-r--r--wocky/wocky-pubsub-node.c1
-rw-r--r--wocky/wocky-pubsub-service.c1
5 files changed, 48 insertions, 19 deletions
diff --git a/wocky/Makefile.am b/wocky/Makefile.am
index 11bee8c..74ce41a 100644
--- a/wocky/Makefile.am
+++ b/wocky/Makefile.am
@@ -79,6 +79,7 @@ handwritten_headers = \
wocky-pubsub-helpers.h \
wocky-pubsub-node.h \
wocky-pubsub-node-protected.h \
+ wocky-pubsub-node-internal.h \
wocky-pubsub-service.h \
wocky-pubsub-service-protected.h \
wocky-resource-contact.h \
diff --git a/wocky/wocky-pubsub-node-internal.h b/wocky/wocky-pubsub-node-internal.h
new file mode 100644
index 0000000..93d429e
--- /dev/null
+++ b/wocky/wocky-pubsub-node-internal.h
@@ -0,0 +1,44 @@
+/*
+ * wocky-pubsub-node-internal.h - internal methods on WockyPubsubNode
+ * used by WockyPubsubService
+ * Copyright © 2010 Collabora Ltd.
+ * Copyright © 2010 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#if !defined (WOCKY_COMPILATION)
+# error "This is an internal header."
+#endif
+
+#ifndef WOCKY_PUBSUB_NODE_INTERNAL_H
+#define WOCKY_PUBSUB_NODE_INTERNAL_H
+
+#include "wocky-pubsub-node.h"
+
+typedef void (*WockyPubsubNodeEventHandler) (
+ WockyPubsubNode *self,
+ WockyStanza *event_stanza,
+ WockyNode *event_node,
+ WockyNode *action_node);
+
+typedef struct {
+ const gchar *action;
+ WockyPubsubNodeEventHandler method;
+} WockyPubsubNodeEventMapping;
+
+const WockyPubsubNodeEventMapping *_wocky_pubsub_node_get_event_mappings (
+ guint *n_mappings);
+
+#endif /* WOCKY_PUBSUB_NODE_INTERNAL_H */
diff --git a/wocky/wocky-pubsub-node-protected.h b/wocky/wocky-pubsub-node-protected.h
index 13ad85a..2d1b537 100644
--- a/wocky/wocky-pubsub-node-protected.h
+++ b/wocky/wocky-pubsub-node-protected.h
@@ -1,5 +1,5 @@
/*
- * wocky-pubsub-node-internal.h - protected methods on WockyPubsubNode
+ * wocky-pubsub-node-protected.h - protected methods on WockyPubsubNode
* Copyright © 2010 Collabora Ltd.
* Copyright © 2010 Nokia Corporation
*
@@ -26,24 +26,6 @@
#include "wocky-pubsub-node.h"
-/* for use by WockyPubsubService */
-
-typedef void (*WockyPubsubNodeEventHandler) (
- WockyPubsubNode *self,
- WockyStanza *event_stanza,
- WockyNode *event_node,
- WockyNode *action_node);
-
-typedef struct {
- const gchar *action;
- WockyPubsubNodeEventHandler method;
-} WockyPubsubNodeEventMapping;
-
-const WockyPubsubNodeEventMapping *_wocky_pubsub_node_get_event_mappings (
- guint *n_mappings);
-
-/* for use by subclasses */
-
WockyPorter *wocky_pubsub_node_get_porter (WockyPubsubNode *self);
WockyStanza *wocky_pubsub_node_make_subscribe_stanza (WockyPubsubNode *self,
diff --git a/wocky/wocky-pubsub-node.c b/wocky/wocky-pubsub-node.c
index a5d1810..f829f1b 100644
--- a/wocky/wocky-pubsub-node.c
+++ b/wocky/wocky-pubsub-node.c
@@ -19,6 +19,7 @@
#include "wocky-pubsub-node.h"
#include "wocky-pubsub-node-protected.h"
+#include "wocky-pubsub-node-internal.h"
#include "wocky-namespaces.h"
#include "wocky-porter.h"
diff --git a/wocky/wocky-pubsub-service.c b/wocky/wocky-pubsub-service.c
index ce92329..63964ac 100644
--- a/wocky/wocky-pubsub-service.c
+++ b/wocky/wocky-pubsub-service.c
@@ -25,6 +25,7 @@
#include "wocky-pubsub-helpers.h"
#include "wocky-pubsub-node.h"
#include "wocky-pubsub-node-protected.h"
+#include "wocky-pubsub-node-internal.h"
#include "wocky-namespaces.h"
#include "wocky-signals-marshal.h"