Permissions.java :  » Game » gameporting » com » sun » midp » security » Android Open Source

Android Open Source » Game » gameporting 
gameporting » com » sun » midp » security » Permissions.java
/*
 * @(#)Permissions.java  1.29 02/08/15 @(#)
 *
 * Copyright (c) 2001-2002 Sun Microsystems, Inc.  All rights reserved.
 * PROPRIETARY/CONFIDENTIAL
 * Use is subject to license terms.
 */

package com.sun.midp.security;

import com.sonyericsson.midp.security.Domains;
import com.sonyericsson.midp.security.Groups;
import com.sonyericsson.ui.RescId;

public class Permissions extends AutoPermissions{
  /**
   * Domain Must match the enum in midp_jah_prov.h.
   * 
   * @todo Perhaps move this to a class if its own (Domain)?
   */
   
  public static final int PERMISSION_LAST = COUNT;
  
  public static final int DOMAIN_UNTRUSTED = Domains.UNTRUSTED;

  public static final int DOMAIN_TRUSTED_THIRD_PARTY = Domains.THIRD_PARTY;

  public static final int DOMAIN_OPERATOR = Domains.OPERATOR;

  public static final int DOMAIN_MANUFACTURER = Domains.MANUFACTURER;

  /**
   * Find the given permission name in the global names list.
   *
   * @param apiName
   *          the name of the API to find.
   *
   * @return int the index into global names list.
   *
   * @exception IllegalArgumentException
   *              if apiName is not found in the global names list
   */
  public static int getPermissionId(String apiName) {
    if (apiName == null) {
      throw new IllegalArgumentException();
    }
    return com.sonyericsson.midp.security.Permissions.getPermissionIndex(apiName);
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.