aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0166_jingle/content_description.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-03-19 22:46:39 +0100
committerfiaxh <git@lightrise.org>2021-03-21 12:40:04 +0100
commit2b90fcc39a1079346d6c5e2bfff8987104da737a (patch)
treee9c645a82010392623ec2cd3333e8dd1c8d4431a /xmpp-vala/src/module/xep/0166_jingle/content_description.vala
parent148cf48d2b68354881066e2587e2673c91d2619a (diff)
downloaddino-2b90fcc39a1079346d6c5e2bfff8987104da737a.tar.gz
dino-2b90fcc39a1079346d6c5e2bfff8987104da737a.zip
Improve & refactor Jingle base implementation
Co-authored-by: Marvin W <git@larma.de>
Diffstat (limited to 'xmpp-vala/src/module/xep/0166_jingle/content_description.vala')
-rw-r--r--xmpp-vala/src/module/xep/0166_jingle/content_description.vala27
1 files changed, 27 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/xep/0166_jingle/content_description.vala b/xmpp-vala/src/module/xep/0166_jingle/content_description.vala
new file mode 100644
index 00000000..1a24e52e
--- /dev/null
+++ b/xmpp-vala/src/module/xep/0166_jingle/content_description.vala
@@ -0,0 +1,27 @@
+using Gee;
+using Xmpp.Xep;
+using Xmpp;
+
+namespace Xmpp.Xep.Jingle {
+
+ public interface ContentType : Object {
+ public abstract string ns_uri { get; }
+ public abstract TransportType required_transport_type { get; }
+ public abstract uint8 required_components { get; }
+ public abstract ContentParameters parse_content_parameters(StanzaNode description) throws IqError;
+ }
+
+ public interface ContentParameters : Object {
+ /** Called when the counterpart proposes the content */
+ public abstract async void handle_proposed_content(XmppStream stream, Jingle.Session session, Content content);
+
+ /** Called when we accept the content that was proposed by the counterpart */
+ public abstract void accept(XmppStream stream, Jingle.Session session, Jingle.Content content);
+ /** Called when the counterpart accepts the content that was proposed by us*/
+ public abstract void handle_accept(XmppStream stream, Jingle.Session session, Jingle.Content content, StanzaNode description_node);
+
+ public abstract void terminate(bool we_terminated, string? reason_name, string? reason_text);
+
+ public abstract StanzaNode get_description_node();
+ }
+} \ No newline at end of file