Implement detach
This commit is contained in:
parent
94794666d7
commit
1b1fac0bb5
|
@ -14,7 +14,9 @@ public class Module : XmppStreamModule, Iq.Handler {
|
||||||
stream.add_flag(new Flag());
|
stream.add_flag(new Flag());
|
||||||
stream.get_module(Iq.Module.IDENTITY).register_for_namespace(NS_URI, this);
|
stream.get_module(Iq.Module.IDENTITY).register_for_namespace(NS_URI, this);
|
||||||
}
|
}
|
||||||
public override void detach(XmppStream stream) { }
|
public override void detach(XmppStream stream) {
|
||||||
|
stream.get_module(Iq.Module.IDENTITY).unregister_from_namespace(NS_URI, this);
|
||||||
|
}
|
||||||
|
|
||||||
public void on_iq_set(XmppStream stream, Iq.Stanza iq) {
|
public void on_iq_set(XmppStream stream, Iq.Stanza iq) {
|
||||||
// the iq module ensures that there's only one child node
|
// the iq module ensures that there's only one child node
|
||||||
|
|
|
@ -117,7 +117,9 @@ public class Module : XmppStreamModule, Iq.Handler {
|
||||||
stream.get_module(Iq.Module.IDENTITY).register_for_namespace(NS_URI, this);
|
stream.get_module(Iq.Module.IDENTITY).register_for_namespace(NS_URI, this);
|
||||||
current_stream = stream;
|
current_stream = stream;
|
||||||
}
|
}
|
||||||
public override void detach(XmppStream stream) { }
|
public override void detach(XmppStream stream) {
|
||||||
|
stream.get_module(Iq.Module.IDENTITY).unregister_from_namespace(NS_URI, this);
|
||||||
|
}
|
||||||
|
|
||||||
public void register_content_type(ContentType content_type) {
|
public void register_content_type(ContentType content_type) {
|
||||||
content_types[content_type.content_type_ns_uri()] = content_type;
|
content_types[content_type.content_type_ns_uri()] = content_type;
|
||||||
|
|
Loading…
Reference in a new issue