diff options
author | Gurmeen Bindra <gurmeen.bindra@isode.com> | 2012-04-23 15:06:39 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-04-27 11:06:27 (GMT) |
commit | 19340ddc7dc929aad094eed3f6a3cd7f84d86a4b (patch) | |
tree | b2c7f71c8e32b15c267b7d62b64f77fb5945d3b7 /src/com/isode/stroke/muc/MUCRegistry.java | |
parent | e2f24c6930603dbd016a6530f7d12b08c97ea900 (diff) | |
download | stroke-19340ddc7dc929aad094eed3f6a3cd7f84d86a4b.zip stroke-19340ddc7dc929aad094eed3f6a3cd7f84d86a4b.tar.bz2 |
MUC Administration related classes
This change ports the MUC Administration related classes from
Swiften to stroke. Also includes the MUC initialisation code in
the CoreClient.
Test-information:
tested the ported unit tests
Diffstat (limited to 'src/com/isode/stroke/muc/MUCRegistry.java')
-rw-r--r-- | src/com/isode/stroke/muc/MUCRegistry.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/com/isode/stroke/muc/MUCRegistry.java b/src/com/isode/stroke/muc/MUCRegistry.java new file mode 100644 index 0000000..984b2ba --- /dev/null +++ b/src/com/isode/stroke/muc/MUCRegistry.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2012, Isode Limited, London, England. + * All rights reserved. + */ +/* + * Copyright (c) 2010, Remko Tronçon + * All rights reserved. + */ +package com.isode.stroke.muc; + +import java.util.Vector; + +import com.isode.stroke.jid.JID; + +/** + * Class representing a MUC Registry + * + */ +public class MUCRegistry { + + /** + * Add the JID of a multi-user chat room to the registry + * @param j JID of the room, not null + */ + public void addMUC(JID j) { + mucs.add(j); + } + + /** + * Determine if the given JID is contained in the Jabber ID + * @param j Jabber ID, not null + * @return true if it exists in the Registry and false otherwise + */ + public boolean isMUC(JID j){ + return mucs.contains(j); + } + + /** + * Remove the Jabber ID from the registry + * @param j Jabber ID to remove, not null + */ + public void removeMUC(JID j) { + mucs.remove(j); + } + + private Vector<JID> mucs = new Vector<JID>(); +} |