From 4e52f24d7ca65b7274007ac3e5c0b6d9400d1bef Mon Sep 17 00:00:00 2001 From: Alan Young Date: Mon, 30 Mar 2015 10:46:16 +0200 Subject: Add GetDiscoItemsRequest Change-Id: I4ec639aba4eb60d0bc1e25f2d86f17592f819d64 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 { + + 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); + } + +} -- cgit v0.10.2-6-g49f6