Examples of includesFrom()


Examples of org.apache.vysper.xmpp.modules.roster.SubscriptionType.includesFrom()

    }

    protected Result addAskSubscribed(RosterItem item) {
        SubscriptionType type = item.getSubscriptionType();
        AskSubscriptionType typeAsk = item.getAskSubscriptionType();
        if (type.includesFrom()) return ALREADY_SET;
        if (typeAsk == ASK_SUBSCRIBE) return FAILED; // TODO think about return value
        if (typeAsk == ASK_SUBSCRIBED) return OK;
        item.setAskSubscriptionType(ASK_SUBSCRIBED);
        return OK;
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.SubscriptionType.includesFrom()

        return OK;
    }

    protected Result addFrom(RosterItem item) {
        SubscriptionType type = item.getSubscriptionType();
        if (type.includesFrom()) return ALREADY_SET;
        if (type == NONE) {
            type = FROM;
        } else if (type == TO) {
            type = BOTH;
        }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.SubscriptionType.includesFrom()

        return OK;
    }

    protected Result removeFrom(RosterItem item) {
        SubscriptionType type = item.getSubscriptionType();
        if (!type.includesFrom()) {
            // if sub was asked, remove that.
            AskSubscriptionType askType = item.getAskSubscriptionType();
            if (askType != ASK_SUBSCRIBED) return ALREADY_SET;
            item.setAskSubscriptionType(NOT_SET);
            return OK;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.