summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Young <consult.awy@gmail.com>2015-03-30 08:46:16 (GMT)
committerAlan Young <consult.awy@gmail.com>2015-04-10 06:52:20 (GMT)
commit4e52f24d7ca65b7274007ac3e5c0b6d9400d1bef (patch)
tree3c56bb97f69458b98e9ee1e9211833c79915cd6b
parent2811d9f331111d9e8014ff2f4bf7dd2707cc56fc (diff)
downloadstroke-4e52f24d7ca65b7274007ac3e5c0b6d9400d1bef.zip
stroke-4e52f24d7ca65b7274007ac3e5c0b6d9400d1bef.tar.bz2
Add GetDiscoItemsRequest
Change-Id: I4ec639aba4eb60d0bc1e25f2d86f17592f819d64
-rw-r--r--src/com/isode/stroke/disco/GetDiscoItemsRequest.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/com/isode/stroke/disco/GetDiscoItemsRequest.java b/src/com/isode/stroke/disco/GetDiscoItemsRequest.java
new file mode 100644
index 0000000..1214816
--- /dev/null
+++ b/src/com/isode/stroke/disco/GetDiscoItemsRequest.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2010-2015, Isode Limited.
+ * All rights reserved.
+ */
+package com.isode.stroke.disco;
+
+import com.isode.stroke.elements.DiscoItems;
+import com.isode.stroke.elements.IQ;
+import com.isode.stroke.jid.JID;
+import com.isode.stroke.queries.GenericRequest;
+import com.isode.stroke.queries.IQRouter;
+
+public class GetDiscoItemsRequest extends GenericRequest<DiscoItems> {
+
+ public static GetDiscoItemsRequest create(final JID jid, IQRouter router) {
+ return new GetDiscoItemsRequest(jid, router);
+ }
+
+ public static GetDiscoItemsRequest create(final JID jid, final String node, IQRouter router) {
+ return new GetDiscoItemsRequest(jid, node, router);
+ }
+
+ private GetDiscoItemsRequest(final JID jid, IQRouter router) {
+ super(IQ.Type.Get, jid, new DiscoItems(), router);
+ }
+
+ private GetDiscoItemsRequest(final JID jid, final String node, IQRouter router) {
+ this(jid, router);
+ getPayloadGeneric().setNode(node);
+ }
+
+}