001/**
002 *
003 * Copyright 2003-2007 Jive Software.
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 *     http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018package org.jivesoftware.smackx.disco;
019
020import java.util.List;
021
022import org.jivesoftware.smack.packet.ExtensionElement;
023
024import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
025import org.jivesoftware.smackx.disco.packet.DiscoverItems;
026
027
028/**
029 * The NodeInformationProvider is responsible for providing supported identities, features
030 * and hosted items (i.e. DiscoverItems.Item) about a given node. This information will be
031 * requested each time this XMPPP client receives a disco info or items requests on the
032 * given node. each time this XMPPP client receives a disco info or items requests on the
033 * given node.
034 *
035 * @author Gaston Dombiak
036 */
037public interface NodeInformationProvider {
038
039    /**
040     * Returns a list of the Items {@link org.jivesoftware.smackx.disco.packet.DiscoverItems.Item}
041     * defined in the node. For example, the MUC protocol specifies that an XMPP client should
042     * answer an Item for each joined room when asked for the rooms where the use has joined.
043     *
044     * @return a list of the Items defined in the node.
045     */
046    List<DiscoverItems.Item> getNodeItems();
047
048    /**
049     * Returns a list of the features defined in the node. For
050     * example, the entity caps protocol specifies that an XMPP client
051     * should answer with each feature supported by the client version
052     * or extension.
053     *
054     * @return a list of the feature strings defined in the node.
055     */
056    List<String> getNodeFeatures();
057
058    /**
059     * Returns a list of the identities defined in the node. For
060     * example, the x-command protocol must provide an identity of
061     * category automation and type command-node for each command.
062     *
063     * @return a list of the Identities defined in the node.
064     */
065    List<DiscoverInfo.Identity> getNodeIdentities();
066
067    /**
068     * Returns a list of the stanza extensions defined in the node.
069     *
070     * @return a list of the stanza extensions defined in the node.
071     */
072    List<ExtensionElement> getNodePacketExtensions();
073}