Search in sources :

Example 1 with StreamInitiationProvider

use of org.jivesoftware.smackx.si.provider.StreamInitiationProvider in project Zom-Android by zom.

the class XmppConnection method addProviderManagerExtensions.

public static void addProviderManagerExtensions() {
    ProviderManager.addIQProvider("query", "jabber:iq:private", new PrivateDataManager.PrivateDataIQProvider());
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/bytestreams", new BytestreamsProvider());
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/disco#items", new DiscoverItemsProvider());
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/disco#info", new DiscoverInfoProvider());
    // Time
    try {
        ProviderManager.addIQProvider("query", "jabber:iq:time", Class.forName("org.jivesoftware.smackx.packet.Time"));
    } catch (ClassNotFoundException e) {
        Log.w("TestClient", "Can't load class for org.jivesoftware.smackx.packet.Time");
    }
    // Pings
    ProviderManager.addIQProvider("ping", "urn:xmpp:ping", new PingProvider());
    // Roster Exchange
    // providerManager.addExtensionProvider("x", "jabber:x:roster", new RosterExchangeProvider());
    ProviderManager.addIQProvider("vCard", "vcard-temp", new VCardProvider());
    // Message Events
    // providerManager.addExtensionProvider("x", "jabber:x:event",
    // new MessageEventProvider());
    // XHTML
    ProviderManager.addExtensionProvider("html", "http://jabber.org/protocol/xhtml-im", new XHTMLExtensionProvider());
    // Group Chat Invitations
    ProviderManager.addExtensionProvider("x", "jabber:x:conference", new GroupChatInvitation.Provider());
    // Service Discovery # Items
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/disco#items", new DiscoverItemsProvider());
    // Service Discovery # Info
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/disco#info", new DiscoverInfoProvider());
    // Data Forms
    ProviderManager.addExtensionProvider("x", "jabber:x:data", new DataFormProvider());
    // MUC User
    ProviderManager.addExtensionProvider("x", "http://jabber.org/protocol/muc#user", new MUCUserProvider());
    // MUC Admin
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/muc#admin", new MUCAdminProvider());
    // MUC Owner
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/muc#owner", new MUCOwnerProvider());
    // Version
    try {
        ProviderManager.addIQProvider("query", "jabber:iq:version", Class.forName("org.jivesoftware.smackx.packet.Version"));
    } catch (ClassNotFoundException e) {
    // Not sure what's happening here.
    }
    // VCard
    ProviderManager.addIQProvider("vCard", "vcard-temp", new VCardProvider());
    // Offline Message Requests
    ProviderManager.addIQProvider("offline", "http://jabber.org/protocol/offline", new OfflineMessageRequest.Provider());
    // Offline Message Indicator
    ProviderManager.addExtensionProvider("offline", "http://jabber.org/protocol/offline", new OfflineMessageInfo.Provider());
    // Last Activity
    ProviderManager.addIQProvider("query", "jabber:iq:last", new LastActivity.Provider());
    // User Search
    ProviderManager.addIQProvider("query", "jabber:iq:search", new UserSearch.Provider());
    // SharedGroupsInfo
    ProviderManager.addIQProvider("sharedgroup", "http://www.jivesoftware.org/protocol/sharedgroup", new SharedGroupsInfo.Provider());
    // JEP-33: Extended Stanza Addressing
    ProviderManager.addExtensionProvider("addresses", "http://jabber.org/protocol/address", new MultipleAddressesProvider());
    // FileTransfer
    ProviderManager.addIQProvider("si", "http://jabber.org/protocol/si", new StreamInitiationProvider());
    // Privacy
    ProviderManager.addIQProvider("query", "jabber:iq:privacy", new PrivacyProvider());
    ProviderManager.addIQProvider("command", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider());
    ProviderManager.addExtensionProvider("malformed-action", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.MalformedActionError());
    ProviderManager.addExtensionProvider("bad-locale", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.BadLocaleError());
    ProviderManager.addExtensionProvider("bad-payload", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.BadPayloadError());
    ProviderManager.addExtensionProvider("bad-sessionid", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.BadSessionIDError());
    ProviderManager.addExtensionProvider("session-expired", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.SessionExpiredError());
    ProviderManager.addIQProvider("offline", "http://jabber.org/protocol/offline", new OfflineMessageRequest.Provider());
    // Offline Message Indicator
    ProviderManager.addExtensionProvider("offline", "http://jabber.org/protocol/offline", new OfflineMessageInfo.Provider());
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/disco#info", new DiscoverInfoProvider());
    ProviderManager.addExtensionProvider("x", "jabber:x:data", new DataFormProvider());
    // pm.addExtensionProvider("status ","", new XMLPlayerList());
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/bytestreams", new BytestreamsProvider());
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/disco#items", new DiscoverItemsProvider());
    ProviderManager.addIQProvider("query", "http://jabber.org/protocol/disco#info", new DiscoverInfoProvider());
    // Private Data Storage
    // ProviderManager.addIQProvider("query","jabber:iq:private", new PrivateDataManager.PrivateDataIQProvider());
    // Time
    /**
     *        try {
     *            ProviderManager.addIQProvider("query","jabber:iq:time", Class.forName("org.jivesoftware.smackx.packet.Time"));
     *        } catch (ClassNotFoundException e) {
     *            Log.w("TestClient", "Can't load class for org.jivesoftware.smackx.packet.Time");
     *        }
     */
    // Roster Exchange
    // ProviderManager.addExtensionProvider("x","jabber:x:roster", new RosterExchangeProvider());
    // Message Events
    // ProviderManager.addExtensionProvider("x","jabber:x:event", new MessageEventProvider());
    // Chat State
    ChatStateExtensionProvider csep = new ChatStateExtensionProvider();
    ProviderManager.addExtensionProvider("active", "http://jabber.org/protocol/chatstates", csep);
    ProviderManager.addExtensionProvider("composing", "http://jabber.org/protocol/chatstates", csep);
    ProviderManager.addExtensionProvider("paused", "http://jabber.org/protocol/chatstates", csep);
    ProviderManager.addExtensionProvider("inactive", "http://jabber.org/protocol/chatstates", csep);
    ProviderManager.addExtensionProvider("gone", "http://jabber.org/protocol/chatstates", csep);
// XHTML
// ProviderManager.addExtensionProvider("html","http://jabber.org/protocol/xhtml-im", new XHTMLExtensionProvider());
// Group Chat Invitations
// ProviderManager.addExtensionProvider("x","jabber:x:conference", new GroupChatInvitation.Provider());
// Service Discovery # Items
// ProviderManager.addIQProvider("query","http://jabber.org/protocol/disco#items", new DiscoverItemsProvider());
// Service Discovery # Info
// ProviderManager.addIQProvider("query","http://jabber.org/protocol/disco#info", new DiscoverInfoProvider());
// Data Forms
// ProviderManager.addExtensionProvider("x","jabber:x:data", new DataFormProvider());
// MUC User
// ProviderManager.addExtensionProvider("x","http://jabber.org/protocol/muc#user", new MUCUserProvider());
// MUC Admin
// ProviderManager.addIQProvider("query","http://jabber.org/protocol/muc#admin", new MUCAdminProvider());
// MUC Owner
// ProviderManager.addIQProvider("query","http://jabber.org/protocol/muc#owner", new MUCOwnerProvider());
// Delayed Delivery
// ProviderManager.addExtensionProvider("x","jabber:x:delay", new DelayInformationProvider());
// Version
/**
 *        try {
 *            ProviderManager.addIQProvider("query","jabber:iq:version", Class.forName("org.jivesoftware.smackx.packet.Version"));
 *        } catch (ClassNotFoundException err) {
 *            //  Not sure what's happening here.
 *        }
 */
// VCard
// ProviderManager.addIQProvider("vCard","vcard-temp", new VCardProvider());
// Offline Message Requests
// ProviderManager.addIQProvider("offline","http://jabber.org/protocol/offline", new OfflineMessageRequest.Provider());
// Offline Message Indicator
// ProviderManager.addExtensionProvider("offline","http://jabber.org/protocol/offline", new OfflineMessageInfo.Provider());
// Last Activity
// ProviderManager.addIQProvider("query","jabber:iq:last", new LastActivity.Provider());
// User Search
// ProviderManager.addIQProvider("query","jabber:iq:search", new UserSearch.Provider());
// SharedGroupsInfo
// ProviderManager.addIQProvider("sharedgroup","http://www.jivesoftware.org/protocol/sharedgroup", new SharedGroupsInfo.Provider());
// JEP-33: Extended Stanza Addressing
// ProviderManager.addExtensionProvider("addresses","http://jabber.org/protocol/address", new MultipleAddressesProvider());
// FileTransfer
// ProviderManager.addIQProvider("si","http://jabber.org/protocol/si", new StreamInitiationProvider());
// ProviderManager.addIQProvider("query","http://jabber.org/protocol/bytestreams", new BytestreamsProvider());
// Privacy
/**
 *        ProviderManager.addIQProvider("query","jabber:iq:privacy", new PrivacyProvider());
 *        ProviderManager.addIQProvider("command", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider());
 *        ProviderManager.addExtensionProvider("malformed-action", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.MalformedActionError());
 *        ProviderManager.addExtensionProvider("bad-locale", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.BadLocaleError());
 *        ProviderManager.addExtensionProvider("bad-payload", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.BadPayloadError());
 *        ProviderManager.addExtensionProvider("bad-sessionid", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.BadSessionIDError());
 *        ProviderManager.addExtensionProvider("session-expired", "http://jabber.org/protocol/commands", new AdHocCommandDataProvider.SessionExpiredError());
 */
}
Also used : GroupChatInvitation(org.jivesoftware.smackx.muc.packet.GroupChatInvitation) MUCUserProvider(org.jivesoftware.smackx.muc.provider.MUCUserProvider) SharedGroupsInfo(org.jivesoftware.smackx.sharedgroups.packet.SharedGroupsInfo) PingProvider(org.jivesoftware.smackx.ping.provider.PingProvider) OfflineMessageInfo(org.jivesoftware.smackx.offline.packet.OfflineMessageInfo) DiscoverInfoProvider(org.jivesoftware.smackx.disco.provider.DiscoverInfoProvider) DiscoverItemsProvider(org.jivesoftware.smackx.disco.provider.DiscoverItemsProvider) VCardProvider(org.jivesoftware.smackx.vcardtemp.provider.VCardProvider) MUCAdminProvider(org.jivesoftware.smackx.muc.provider.MUCAdminProvider) BytestreamsProvider(org.jivesoftware.smackx.bytestreams.socks5.provider.BytestreamsProvider) AdHocCommandDataProvider(org.jivesoftware.smackx.commands.provider.AdHocCommandDataProvider) MUCOwnerProvider(org.jivesoftware.smackx.muc.provider.MUCOwnerProvider) OfflineMessageRequest(org.jivesoftware.smackx.offline.packet.OfflineMessageRequest) PrivateDataManager(org.jivesoftware.smackx.iqprivate.PrivateDataManager) ChatStateExtensionProvider(org.jivesoftware.smackx.chatstates.provider.ChatStateExtensionProvider) MultipleAddressesProvider(org.jivesoftware.smackx.address.provider.MultipleAddressesProvider) PrivacyProvider(org.jivesoftware.smackx.privacy.provider.PrivacyProvider) DataFormProvider(org.jivesoftware.smackx.xdata.provider.DataFormProvider) XHTMLExtensionProvider(org.jivesoftware.smackx.xhtmlim.provider.XHTMLExtensionProvider) LastActivity(org.jivesoftware.smackx.iqlast.packet.LastActivity) UserSearch(org.jivesoftware.smackx.search.UserSearch) StreamInitiationProvider(org.jivesoftware.smackx.si.provider.StreamInitiationProvider)

Aggregations

MultipleAddressesProvider (org.jivesoftware.smackx.address.provider.MultipleAddressesProvider)1 BytestreamsProvider (org.jivesoftware.smackx.bytestreams.socks5.provider.BytestreamsProvider)1 ChatStateExtensionProvider (org.jivesoftware.smackx.chatstates.provider.ChatStateExtensionProvider)1 AdHocCommandDataProvider (org.jivesoftware.smackx.commands.provider.AdHocCommandDataProvider)1 DiscoverInfoProvider (org.jivesoftware.smackx.disco.provider.DiscoverInfoProvider)1 DiscoverItemsProvider (org.jivesoftware.smackx.disco.provider.DiscoverItemsProvider)1 LastActivity (org.jivesoftware.smackx.iqlast.packet.LastActivity)1 PrivateDataManager (org.jivesoftware.smackx.iqprivate.PrivateDataManager)1 GroupChatInvitation (org.jivesoftware.smackx.muc.packet.GroupChatInvitation)1 MUCAdminProvider (org.jivesoftware.smackx.muc.provider.MUCAdminProvider)1 MUCOwnerProvider (org.jivesoftware.smackx.muc.provider.MUCOwnerProvider)1 MUCUserProvider (org.jivesoftware.smackx.muc.provider.MUCUserProvider)1 OfflineMessageInfo (org.jivesoftware.smackx.offline.packet.OfflineMessageInfo)1 OfflineMessageRequest (org.jivesoftware.smackx.offline.packet.OfflineMessageRequest)1 PingProvider (org.jivesoftware.smackx.ping.provider.PingProvider)1 PrivacyProvider (org.jivesoftware.smackx.privacy.provider.PrivacyProvider)1 UserSearch (org.jivesoftware.smackx.search.UserSearch)1 SharedGroupsInfo (org.jivesoftware.smackx.sharedgroups.packet.SharedGroupsInfo)1 StreamInitiationProvider (org.jivesoftware.smackx.si.provider.StreamInitiationProvider)1 VCardProvider (org.jivesoftware.smackx.vcardtemp.provider.VCardProvider)1