aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-12 23:27:20 +0200
committerfiaxh <git@mx.ax.lt>2017-08-14 22:38:17 +0200
commitb0264b3e0034ddd9ea76d0e13bb4c3c709ba3b3e (patch)
tree9ee146149360fa87a123c77e8d983ae393ed8f8f /xmpp-vala/src/module/xep
parenta59f728bdd7b81964a460b96b6c56da0d9dfda01 (diff)
downloaddino-b0264b3e0034ddd9ea76d0e13bb4c3c709ba3b3e.tar.gz
dino-b0264b3e0034ddd9ea76d0e13bb4c3c709ba3b3e.zip
xmpp-vala: Remove require-functions
Diffstat (limited to 'xmpp-vala/src/module/xep')
-rw-r--r--xmpp-vala/src/module/xep/0030_service_discovery/module.vala1
-rw-r--r--xmpp-vala/src/module/xep/0045_muc/module.vala7
-rw-r--r--xmpp-vala/src/module/xep/0048_bookmarks/module.vala4
-rw-r--r--xmpp-vala/src/module/xep/0049_private_xml_storage.vala8
-rw-r--r--xmpp-vala/src/module/xep/0054_vcard/module.vala6
-rw-r--r--xmpp-vala/src/module/xep/0060_pubsub.vala7
-rw-r--r--xmpp-vala/src/module/xep/0084_user_avatars.vala5
-rw-r--r--xmpp-vala/src/module/xep/0085_chat_state_notifications.vala5
-rw-r--r--xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala6
-rw-r--r--xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala7
-rw-r--r--xmpp-vala/src/module/xep/0199_ping.vala5
-rw-r--r--xmpp-vala/src/module/xep/0203_delayed_delivery.vala4
-rw-r--r--xmpp-vala/src/module/xep/0280_message_carbons.vala9
-rw-r--r--xmpp-vala/src/module/xep/0333_chat_markers.vala8
-rw-r--r--xmpp-vala/src/module/xep/0368_srv_records_tls.vala4
15 files changed, 1 insertions, 85 deletions
diff --git a/xmpp-vala/src/module/xep/0030_service_discovery/module.vala b/xmpp-vala/src/module/xep/0030_service_discovery/module.vala
index c3e08a60..4d7a3245 100644
--- a/xmpp-vala/src/module/xep/0030_service_discovery/module.vala
+++ b/xmpp-vala/src/module/xep/0030_service_discovery/module.vala
@@ -71,7 +71,6 @@ public class Module : XmppStreamModule, Iq.Handler {
public void on_iq_set(XmppStream stream, Iq.Stanza iq) { }
public override void attach(XmppStream stream) {
- Iq.Module.require(stream);
stream.get_module(Iq.Module.IDENTITY).register_for_namespace(NS_URI_INFO, this);
stream.add_flag(new Flag());
add_feature(stream, NS_URI_INFO);
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala
index a40f18d8..a5d99b2c 100644
--- a/xmpp-vala/src/module/xep/0045_muc/module.vala
+++ b/xmpp-vala/src/module/xep/0045_muc/module.vala
@@ -162,9 +162,7 @@ public class Module : XmppStreamModule {
public override void attach(XmppStream stream) {
stream.add_flag(new Muc.Flag());
- Message.Module.require(stream);
stream.get_module(Message.Module.IDENTITY).received_message.connect(on_received_message);
- Presence.Module.require(stream);
stream.get_module(Presence.Module.IDENTITY).received_presence.connect(on_received_presence);
stream.get_module(Presence.Module.IDENTITY).received_available.connect(on_received_available);
stream.get_module(Presence.Module.IDENTITY).received_unavailable.connect(on_received_unavailable);
@@ -186,11 +184,6 @@ public class Module : XmppStreamModule {
stream.get_module(Presence.Module.IDENTITY).received_unavailable.disconnect(on_received_unavailable);
}
- public static void require(XmppStream stream) {
- Presence.Module.require(stream);
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Muc.Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0048_bookmarks/module.vala b/xmpp-vala/src/module/xep/0048_bookmarks/module.vala
index 6f42621a..6b354c57 100644
--- a/xmpp-vala/src/module/xep/0048_bookmarks/module.vala
+++ b/xmpp-vala/src/module/xep/0048_bookmarks/module.vala
@@ -70,10 +70,6 @@ public class Module : XmppStreamModule {
public override void detach(XmppStream stream) { }
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0049_private_xml_storage.vala b/xmpp-vala/src/module/xep/0049_private_xml_storage.vala
index 26a297b4..fd367dd8 100644
--- a/xmpp-vala/src/module/xep/0049_private_xml_storage.vala
+++ b/xmpp-vala/src/module/xep/0049_private_xml_storage.vala
@@ -26,16 +26,10 @@ namespace Xmpp.Xep.PrivateXmlStorage {
});
}
- public override void attach(XmppStream stream) {
- Iq.Module.require(stream);
- }
+ public override void attach(XmppStream stream) { }
public override void detach(XmppStream stream) { }
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new PrivateXmlStorage.Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
}
diff --git a/xmpp-vala/src/module/xep/0054_vcard/module.vala b/xmpp-vala/src/module/xep/0054_vcard/module.vala
index b1ad3f48..6e1d2217 100644
--- a/xmpp-vala/src/module/xep/0054_vcard/module.vala
+++ b/xmpp-vala/src/module/xep/0054_vcard/module.vala
@@ -16,8 +16,6 @@ public class Module : XmppStreamModule {
}
public override void attach(XmppStream stream) {
- Iq.Module.require(stream);
- Presence.Module.require(stream);
stream.get_module(Presence.Module.IDENTITY).received_presence.connect(on_received_presence);
}
@@ -25,10 +23,6 @@ public class Module : XmppStreamModule {
stream.get_module(Presence.Module.IDENTITY).received_presence.disconnect(on_received_presence);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stderr.printf("VCardModule required but not attached!\n"); ;
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0060_pubsub.vala b/xmpp-vala/src/module/xep/0060_pubsub.vala
index 182e6ffe..65c16c3d 100644
--- a/xmpp-vala/src/module/xep/0060_pubsub.vala
+++ b/xmpp-vala/src/module/xep/0060_pubsub.vala
@@ -41,9 +41,6 @@ namespace Xmpp.Xep.Pubsub {
}
public override void attach(XmppStream stream) {
- Iq.Module.require(stream);
- Message.Module.require(stream);
- ServiceDiscovery.Module.require(stream);
stream.get_module(Message.Module.IDENTITY).received_message.connect(on_received_message);
}
@@ -51,10 +48,6 @@ namespace Xmpp.Xep.Pubsub {
stream.get_module(Message.Module.IDENTITY).received_message.disconnect(on_received_message);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0084_user_avatars.vala b/xmpp-vala/src/module/xep/0084_user_avatars.vala
index 3648a88b..2b37f485 100644
--- a/xmpp-vala/src/module/xep/0084_user_avatars.vala
+++ b/xmpp-vala/src/module/xep/0084_user_avatars.vala
@@ -34,7 +34,6 @@ namespace Xmpp.Xep.UserAvatars {
}
public override void attach(XmppStream stream) {
- Pubsub.Module.require(stream);
stream.get_module(Pubsub.Module.IDENTITY).add_filtered_notification(stream, NS_URI_METADATA, on_pupsub_event);
}
@@ -51,10 +50,6 @@ namespace Xmpp.Xep.UserAvatars {
}
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stderr.printf("UserAvatarsModule required but not attached!\n");
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala b/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
index 9b5ba075..5de504a2 100644
--- a/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
+++ b/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
@@ -30,7 +30,6 @@ public class Module : XmppStreamModule {
}
public override void attach(XmppStream stream) {
- ServiceDiscovery.Module.require(stream);
stream.get_module(ServiceDiscovery.Module.IDENTITY).add_feature(stream, NS_URI);
stream.get_module(Message.Module.IDENTITY).pre_send_message.connect(on_pre_send_message);
stream.get_module(Message.Module.IDENTITY).received_message.connect(on_received_message);
@@ -41,10 +40,6 @@ public class Module : XmppStreamModule {
stream.get_module(Message.Module.IDENTITY).received_message.disconnect(on_received_message);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module()); ;
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala b/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala
index 689c3605..f19d1481 100644
--- a/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala
+++ b/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala
@@ -23,8 +23,6 @@ namespace Xmpp.Xep.EntityCapabilities {
}
public override void attach(XmppStream stream) {
- ServiceDiscovery.Module.require(stream);
- Presence.Module.require(stream);
stream.get_module(Presence.Module.IDENTITY).pre_send_presence_stanza.connect(on_pre_send_presence_stanza);
stream.get_module(Presence.Module.IDENTITY).received_presence.connect(on_received_presence);
stream.get_module(ServiceDiscovery.Module.IDENTITY).add_feature(stream, NS_URI);
@@ -35,10 +33,6 @@ namespace Xmpp.Xep.EntityCapabilities {
stream.get_module(Presence.Module.IDENTITY).received_presence.disconnect(on_received_presence);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stderr.printf("EntityCapabilitiesModule required but not attached!\n");
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala b/xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala
index 423bc3fe..71a864c3 100644
--- a/xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala
+++ b/xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala
@@ -20,9 +20,6 @@ namespace Xmpp.Xep.MessageDeliveryReceipts {
}
public override void attach(XmppStream stream) {
- ServiceDiscovery.Module.require(stream);
- Message.Module.require(stream);
-
stream.get_module(ServiceDiscovery.Module.IDENTITY).add_feature(stream, NS_URI);
stream.get_module(Message.Module.IDENTITY).received_message.connect(received_message);
stream.get_module(Message.Module.IDENTITY).pre_send_message.connect(pre_send_message);
@@ -33,10 +30,6 @@ namespace Xmpp.Xep.MessageDeliveryReceipts {
stream.get_module(Message.Module.IDENTITY).pre_send_message.disconnect(pre_send_message);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0199_ping.vala b/xmpp-vala/src/module/xep/0199_ping.vala
index 3a5c6797..74802be1 100644
--- a/xmpp-vala/src/module/xep/0199_ping.vala
+++ b/xmpp-vala/src/module/xep/0199_ping.vala
@@ -16,16 +16,11 @@ namespace Xmpp.Xep.Ping {
}
public override void attach(XmppStream stream) {
- Iq.Module.require(stream);
stream.get_module(Iq.Module.IDENTITY).register_for_namespace(NS_URI, new IqHandlerImpl());
}
public override void detach(XmppStream stream) { }
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0203_delayed_delivery.vala b/xmpp-vala/src/module/xep/0203_delayed_delivery.vala
index fe56abc2..d2d94367 100644
--- a/xmpp-vala/src/module/xep/0203_delayed_delivery.vala
+++ b/xmpp-vala/src/module/xep/0203_delayed_delivery.vala
@@ -28,10 +28,6 @@ namespace Xmpp.Xep.DelayedDelivery {
public override void detach(XmppStream stream) { }
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0280_message_carbons.vala b/xmpp-vala/src/module/xep/0280_message_carbons.vala
index 318e4421..b2d21646 100644
--- a/xmpp-vala/src/module/xep/0280_message_carbons.vala
+++ b/xmpp-vala/src/module/xep/0280_message_carbons.vala
@@ -17,11 +17,6 @@ namespace Xmpp.Xep.MessageCarbons {
}
public override void attach(XmppStream stream) {
- Bind.Module.require(stream);
- Iq.Module.require(stream);
- Message.Module.require(stream);
- ServiceDiscovery.Module.require(stream);
-
stream.stream_negotiated.connect(enable);
stream.get_module(Message.Module.IDENTITY).pre_received_message.connect(pre_received_message);
stream.get_module(ServiceDiscovery.Module.IDENTITY).add_feature(stream, NS_URI);
@@ -32,10 +27,6 @@ namespace Xmpp.Xep.MessageCarbons {
stream.get_module(Message.Module.IDENTITY).pre_received_message.disconnect(pre_received_message);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0333_chat_markers.vala b/xmpp-vala/src/module/xep/0333_chat_markers.vala
index 9c1b9c74..a0e42510 100644
--- a/xmpp-vala/src/module/xep/0333_chat_markers.vala
+++ b/xmpp-vala/src/module/xep/0333_chat_markers.vala
@@ -30,10 +30,6 @@ public class Module : XmppStreamModule {
}
public override void attach(XmppStream stream) {
- Iq.Module.require(stream);
- Message.Module.require(stream);
- ServiceDiscovery.Module.require(stream);
-
stream.get_module(ServiceDiscovery.Module.IDENTITY).add_feature(stream, NS_URI);
stream.get_module(Message.Module.IDENTITY).pre_send_message.connect(on_pre_send_message);
stream.get_module(Message.Module.IDENTITY).received_message.connect(on_received_message);
@@ -44,10 +40,6 @@ public class Module : XmppStreamModule {
stream.get_module(Message.Module.IDENTITY).received_message.disconnect(on_received_message);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
diff --git a/xmpp-vala/src/module/xep/0368_srv_records_tls.vala b/xmpp-vala/src/module/xep/0368_srv_records_tls.vala
index da70b513..154e8a4f 100644
--- a/xmpp-vala/src/module/xep/0368_srv_records_tls.vala
+++ b/xmpp-vala/src/module/xep/0368_srv_records_tls.vala
@@ -13,10 +13,6 @@ public class Module : XmppStreamNegotiationModule {
public override void detach(XmppStream stream) { }
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override bool mandatory_outstanding(XmppStream stream) { return false; }
public override bool negotiation_active(XmppStream stream) { return false; }
public override string get_ns() { return IDENTITY.ns; }