aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src')
-rw-r--r--xmpp-vala/src/module/bind.vala5
-rw-r--r--xmpp-vala/src/module/iq/module.vala4
-rw-r--r--xmpp-vala/src/module/message/module.vala5
-rw-r--r--xmpp-vala/src/module/presence/module.vala4
-rw-r--r--xmpp-vala/src/module/roster/module.vala6
-rw-r--r--xmpp-vala/src/module/roster/versioning_module.vala3
-rw-r--r--xmpp-vala/src/module/sasl.vala4
-rw-r--r--xmpp-vala/src/module/session.vala5
-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
23 files changed, 2 insertions, 120 deletions
diff --git a/xmpp-vala/src/module/bind.vala b/xmpp-vala/src/module/bind.vala
index a13f9640..71aae149 100644
--- a/xmpp-vala/src/module/bind.vala
+++ b/xmpp-vala/src/module/bind.vala
@@ -41,7 +41,6 @@ namespace Xmpp.Bind {
}
public override void attach(XmppStream stream) {
- Iq.Module.require(stream);
stream.received_features_node.connect(this.received_features_node);
}
@@ -49,10 +48,6 @@ namespace Xmpp.Bind {
stream.received_features_node.disconnect(this.received_features_node);
}
- 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 !stream.has_flag(Flag.IDENTITY) || !stream.get_flag(Flag.IDENTITY).finished;
}
diff --git a/xmpp-vala/src/module/iq/module.vala b/xmpp-vala/src/module/iq/module.vala
index c3b7bffe..088519ff 100644
--- a/xmpp-vala/src/module/iq/module.vala
+++ b/xmpp-vala/src/module/iq/module.vala
@@ -38,10 +38,6 @@ namespace Xmpp.Iq {
stream.received_iq_stanza.disconnect(on_received_iq_stanza);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Iq.Module());
- }
-
public override bool mandatory_outstanding(XmppStream stream) { return false; }
public override bool negotiation_active(XmppStream stream) { return false; }
diff --git a/xmpp-vala/src/module/message/module.vala b/xmpp-vala/src/module/message/module.vala
index 060cb4cb..f7038ef8 100644
--- a/xmpp-vala/src/module/message/module.vala
+++ b/xmpp-vala/src/module/message/module.vala
@@ -26,12 +26,7 @@ namespace Xmpp.Message {
received_message(stream, message);
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Message.Module());
- }
-
public override void attach(XmppStream stream) {
- Bind.Module.require(stream);
stream.received_message_stanza.connect(received_message_stanza);
}
diff --git a/xmpp-vala/src/module/presence/module.vala b/xmpp-vala/src/module/presence/module.vala
index a2cdf1d7..ef5f4d74 100644
--- a/xmpp-vala/src/module/presence/module.vala
+++ b/xmpp-vala/src/module/presence/module.vala
@@ -95,10 +95,6 @@ namespace Xmpp.Presence {
}
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Presence.Module());
- }
-
public override string get_ns() { return NS_URI; }
public override string get_id() { return IDENTITY.id; }
}
diff --git a/xmpp-vala/src/module/roster/module.vala b/xmpp-vala/src/module/roster/module.vala
index 4c1028fb..85693686 100644
--- a/xmpp-vala/src/module/roster/module.vala
+++ b/xmpp-vala/src/module/roster/module.vala
@@ -65,14 +65,8 @@ public class Module : XmppStreamModule, Iq.Handler {
public void on_iq_get(XmppStream stream, Iq.Stanza iq) { }
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stream.add_module(new Module());
- }
-
public override void attach(XmppStream stream) {
- Iq.Module.require(stream);
stream.get_module(Iq.Module.IDENTITY).register_for_namespace(NS_URI, this);
- Presence.Module.require(stream);
stream.get_module(Presence.Module.IDENTITY).initial_presence_sent.connect(roster_get);
stream.add_flag(new Flag());
}
diff --git a/xmpp-vala/src/module/roster/versioning_module.vala b/xmpp-vala/src/module/roster/versioning_module.vala
index fbdb6cef..ce87ec2a 100644
--- a/xmpp-vala/src/module/roster/versioning_module.vala
+++ b/xmpp-vala/src/module/roster/versioning_module.vala
@@ -16,7 +16,6 @@ public class VersioningModule : XmppStreamModule {
}
public override void attach(XmppStream stream) {
- Module.require(stream);
stream.get_module(Module.IDENTITY).pre_get_roster.connect(on_pre_get_roster);
stream.get_module(Module.IDENTITY).received_roster.connect(on_received_roster);
stream.get_module(Module.IDENTITY).item_updated.connect(on_item_updated);
@@ -72,4 +71,4 @@ public interface Storage : Object {
public abstract void remove_item(Roster.Item item);
}
-} \ No newline at end of file
+}
diff --git a/xmpp-vala/src/module/sasl.vala b/xmpp-vala/src/module/sasl.vala
index dee9d3e6..d15c4549 100644
--- a/xmpp-vala/src/module/sasl.vala
+++ b/xmpp-vala/src/module/sasl.vala
@@ -88,10 +88,6 @@ namespace Xmpp.PlainSasl {
}
}
- public static void require(XmppStream stream) {
- if (stream.get_module(IDENTITY) == null) stderr.printf("PlainSaslModule required but not attached!\n");
- }
-
private static uchar[] get_plain_bytes(string name_s, string password_s) {
var name = name_s.to_utf8();
var password = password_s.to_utf8();
diff --git a/xmpp-vala/src/module/session.vala b/xmpp-vala/src/module/session.vala
index 82d8cfc2..babf735c 100644
--- a/xmpp-vala/src/module/session.vala
+++ b/xmpp-vala/src/module/session.vala
@@ -8,7 +8,6 @@ public class Module : XmppStreamNegotiationModule {
public static ModuleIdentity<Module> IDENTITY = new ModuleIdentity<Module>(NS_URI, "session");
public override void attach(XmppStream stream) {
- Bind.Module.require(stream);
stream.get_module(Bind.Module.IDENTITY).bound_to_resource.connect(on_bound_resource);
}
@@ -16,10 +15,6 @@ public class Module : XmppStreamNegotiationModule {
stream.get_module(Bind.Module.IDENTITY).bound_to_resource.disconnect(on_bound_resource);
}
- 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) {
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; }