FileDocCategorySizeDatePackage
DefaultPresenceMapping.javaAPI DocAndroid 1.5 API2410Wed May 06 22:42:46 BST 2009com.android.im.imps

DefaultPresenceMapping

public class DefaultPresenceMapping extends Object implements PresenceMapping

Fields Summary
Constructors Summary
Methods Summary
public java.util.MapgetExtra(int status)

        return null;
    
public booleangetOnlineStatus(int status)

        return status != ImPluginConstants.PRESENCE_OFFLINE;
    
public intgetPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues)

        if (!onlineStatus) {
            return ImPluginConstants.PRESENCE_OFFLINE;
        }
        if (ImPluginConstants.PA_NOT_AVAILABLE.equals(userAvailability)) {
            return ImPluginConstants.PRESENCE_AWAY;
        } else if (ImPluginConstants.PA_DISCREET.equals(userAvailability)) {
            return ImPluginConstants.PRESENCE_DO_NOT_DISTURB;
        } else {
            return ImPluginConstants.PRESENCE_AVAILABLE;
        }
    
public int[]getSupportedPresenceStatus()

        return new int[] {
                ImPluginConstants.PRESENCE_AVAILABLE,
                ImPluginConstants.PRESENCE_DO_NOT_DISTURB,
                ImPluginConstants.PRESENCE_AWAY
        };
    
public java.lang.StringgetUserAvaibility(int status)

        switch (status) {
            case ImPluginConstants.PRESENCE_AVAILABLE:
                return ImPluginConstants.PA_AVAILABLE;

            case ImPluginConstants.PRESENCE_AWAY:
                return ImPluginConstants.PA_NOT_AVAILABLE;

            case ImPluginConstants.PRESENCE_DO_NOT_DISTURB:
                return ImPluginConstants.PA_DISCREET;

            default:
                return null;
        }
    
public booleanrequireAllPresenceValues()

        return false;