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 org.jivesoftware.smack.packet.PacketExtension;
021import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
022import org.jivesoftware.smackx.disco.packet.DiscoverItems;
023
024import java.util.List;
025
026
027/**
028 * The NodeInformationProvider is responsible for providing supported indentities, features
029 * and hosted items (i.e. DiscoverItems.Item) about a given node. This information will be
030 * requested each time this XMPPP client receives a disco info or items requests on the
031 * given node. each time this XMPPP client receives a disco info or items requests on the
032 * given node.
033 *
034 * @author Gaston Dombiak
035 */
036public interface NodeInformationProvider {
037
038    /**
039     * Returns a list of the Items {@link org.jivesoftware.smackx.disco.packet.DiscoverItems.Item}
040     * defined in the node. For example, the MUC protocol specifies that an XMPP client should 
041     * answer an Item for each joined room when asked for the rooms where the use has joined.
042     *  
043     * @return a list of the Items defined in the node.
044     */
045    List<DiscoverItems.Item> getNodeItems();
046
047    /**
048     * Returns a list of the features defined in the node. For
049     * example, the entity caps protocol specifies that an XMPP client
050     * should answer with each feature supported by the client version
051     * or extension.
052     *
053     * @return a list of the feature strings defined in the node.
054     */
055    List<String> getNodeFeatures();
056
057    /**
058     * Returns a list of the indentites defined in the node. For
059     * example, the x-command protocol must provide an identity of
060     * category automation and type command-node for each command.
061     *
062     * @return a list of the Identities defined in the node.
063     */
064    List<DiscoverInfo.Identity> getNodeIdentities();
065
066    /**
067     * Returns a list of the packet extensions defined in the node.
068     *
069     * @return a list of the packet extensions defined in the node.
070     */
071    List<PacketExtension> getNodePacketExtensions();
072}