aboutsummaryrefslogtreecommitdiff
path: root/vala-xmpp/src/module/xep/0048_bookmarks/conference.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-10 17:01:45 +0100
committerfiaxh <git@mx.ax.lt>2017-03-10 17:11:25 +0100
commit2fe8489d368a371aefbfbe66e74621a8df14cdc2 (patch)
tree4dec90236b28101383753ffe4a1c7a34b09b0208 /vala-xmpp/src/module/xep/0048_bookmarks/conference.vala
parent7a1aa8c806a63cfd031c082524501e26d4a181ee (diff)
downloaddino-2fe8489d368a371aefbfbe66e74621a8df14cdc2.tar.gz
dino-2fe8489d368a371aefbfbe66e74621a8df14cdc2.zip
Rename vala-xmpp library to xmpp-vala
Diffstat (limited to 'vala-xmpp/src/module/xep/0048_bookmarks/conference.vala')
-rw-r--r--vala-xmpp/src/module/xep/0048_bookmarks/conference.vala74
1 files changed, 0 insertions, 74 deletions
diff --git a/vala-xmpp/src/module/xep/0048_bookmarks/conference.vala b/vala-xmpp/src/module/xep/0048_bookmarks/conference.vala
deleted file mode 100644
index 818ab3d0..00000000
--- a/vala-xmpp/src/module/xep/0048_bookmarks/conference.vala
+++ /dev/null
@@ -1,74 +0,0 @@
-using Xmpp.Core;
-
-namespace Xmpp.Xep.Bookmarks {
-
-public class Conference {
-
- public const string ATTRIBUTE_AUTOJOIN = "autojoin";
- public const string ATTRIBUTE_JID = "jid";
- public const string ATTRIBUTE_NAME = "name";
-
- public const string NODE_NICK = "nick";
- public const string NODE_PASSWORD = "password";
-
- public StanzaNode stanza_node;
-
- public bool autojoin {
- get {
- string? attr = stanza_node.get_attribute(ATTRIBUTE_AUTOJOIN);
- return attr == "true" || attr == "1"; // "1" isn't standard, but it's used
- }
- set { stanza_node.set_attribute(ATTRIBUTE_AUTOJOIN, value.to_string()); }
- }
-
- public string jid {
- get { return stanza_node.get_attribute(ATTRIBUTE_JID); }
- set { stanza_node.set_attribute(ATTRIBUTE_JID, value); }
- }
-
- public string? name {
- get { return stanza_node.get_attribute(ATTRIBUTE_NAME); }
- set { stanza_node.set_attribute(ATTRIBUTE_NAME, value); }
- }
-
- public string? nick {
- get {
- StanzaNode? nick_node = stanza_node.get_subnode(NODE_NICK);
- return nick_node == null? null : nick_node.get_string_content();
- }
- set {
- StanzaNode? nick_node = stanza_node.get_subnode(NODE_NICK);
- if (nick_node == null) {
- nick_node = new StanzaNode.build(NODE_NICK, NS_URI);
- stanza_node.put_node(nick_node);
- }
- nick_node.put_node(new StanzaNode.text(value));
- }
- }
-
- public string? password {
- get {
- StanzaNode? password_node = stanza_node.get_subnode(NODE_PASSWORD);
- return password_node == null? null : password_node.get_string_content();
- }
- set {
- StanzaNode? password_node = stanza_node.get_subnode(NODE_PASSWORD);
- if (password_node == null) {
- password_node = new StanzaNode.build(NODE_PASSWORD);
- stanza_node.put_node(password_node);
- }
- password_node.put_node(new StanzaNode.text(value));
- }
- }
-
- public Conference.from_stanza_node(StanzaNode stanza_node) {
- this.stanza_node = stanza_node;
- }
-
- public Conference(string jid) {
- this.stanza_node = new StanzaNode.build("conference", NS_URI);
- this.jid = jid;
- }
-}
-
-} \ No newline at end of file