org.eclipse.osgi.services_3.3.100.v20120522-1822

    return properties.equals(properties);
  }
  
  public int hashCode()
  {
    return properties.hashCode();
  }
  
  public String toString()
  {
    return properties.toString();
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.event.EventProperties
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.event;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.security.Permission;
import java.security.PermissionCollection;

public final class TopicPermission
  extends Permission
{
  static final long serialVersionUID = -5855563886961618300L;
  public static final String PUBLISH = "publish";
  public static final String SUBSCRIBE = "subscribe";
  private static final int ACTION_PUBLISH = 1;
  private static final int ACTION_SUBSCRIBE = 2;
  private static final int ACTION_ALL = 3;
  private static final int ACTION_NONE = 0;
  private transient int action_mask;
  private volatile transient String prefix;
  private volatile String actions = null;
  
  public TopicPermission(String name, String actions)
  {
    this(name, parseActions(actions));
  }
  
  TopicPermission(String name, int mask)
  {
    super(name);
    setTransients(mask);
  }
  
  private synchronized void setTransients(int mask)
  {
    String name = getName();
    if ((name == null) || (name.length() == 0)) {
      throw new IllegalArgumentException("invalid name");
    }
    if ((mask == 0) || ((mask & 0x3) != mask)) {
      throw new IllegalArgumentException("invalid action string");
    }
    action_mask = mask;
    if (name.equals("*")) {
      prefix = "";
    } else if (name.endsWith("/*")) {
      prefix = name.substring(0, name.length() - 1);
    } else {
      prefix = null;
    }
  }
  
  synchronized int getActionsMask()
  {
    return action_mask;
  }
  
  private static int parseActions(String actions)
  {
    boolean seencomma = false;
    int mask = 0;
    if (actions == null) {
      return mask;
    }
    char[] a = actions.toCharArray();
    int i = a.length - 1;
    if (i < 0) {
      return mask;
    }
    while (i != -1)
    {
      char c;
      while ((i != -1) && (((c = a[i]) == ' ') || (c == '\r') || (c == '\n') || (c == '\f') || (c == '\t'))) {
        i--;
      }
      if ((i >= 8) && ((a[(i - 8)] == 's') || (a[(i - 8)] == 'S')) && ((a[(i - 7)] == 'u') || (a[(i - 7)] == 'U')) && ((a[(i - 6)] == 'b') || (a[(i - 6)] == 'B')) && ((a[(i - 5)] == 's') || (a[(i - 5)] == 'S')) && ((a[(i - 4)] == 'c') || (a[(i - 4)] == 'C')) && ((a[(i - 3)] == 'r') || (a[(i - 3)] == 'R')) && ((a[(i - 2)] == 'i') || (a[(i - 2)] == 'I')) && ((a[(i - 1)] == 'b') || (a[(i - 1)] == 'B')) && ((a[i] == 'e') || (a[i] == 'E')))
      {
        int matchlen = 9;
        mask |= 0x2;
      }
      else if ((i >= 6) && ((a[(i - 6)] == 'p') || (a[(i - 6)] == 'P')) && ((a[(i - 5)] == 'u') || (a[(i - 5)] == 'U')) && ((a[(i - 4)] == 'b') || (a[(i - 4)] == 'B')) && ((a[(i - 3)] == 'l') || (a[(i - 3)] == 'L')) && ((a[(i - 2)] == 'i') || (a[(i - 2)] == 'I')) && ((a[(i - 1)] == 's') || (a[(i - 1)] == 'S')) && ((a[i] == 'h') || (a[i] == 'H')))
      {
        int matchlen = 7;
        mask |= 0x1;
      }
      else
      {
        throw new IllegalArgumentException(new StringBuffer().append("invalid permission: ").append(actions).toString());
      }
      int matchlen;
      seencomma = false;
      while ((i >= matchlen) && (!seencomma))
      {
        switch (a[(i - matchlen)])
        {
        case ',': 
          seencomma = true;
        case '\t': 
        case '\n': 
        case '\f': 
        case '\r': 
        case ' ': 
          break;
        default: 
          throw new IllegalArgumentException(new StringBuffer().append("invalid permission: ").append(actions).toString());
        }
        i--;
      }
      i -= matchlen;
    }
    if (seencomma) {
      throw new IllegalArgumentException(new StringBuffer().append("invalid permission: ").append(actions).toString());
    }
    return mask;
  }
  
  public boolean implies(Permission p)
  {
    if ((p instanceof TopicPermission))
    {
      TopicPermission requested = (TopicPermission)p;
      int requestedMask = requested.getActionsMask();
      if ((getActionsMask() & requestedMask) == requestedMask)
      {
        String requestedName = requested.getName();
        String pre = prefix;
        if (pre != null) {
          return requestedName.startsWith(pre);
        }
        return requestedName.equals(getName());
      }
    }
    return false;
  }
  
  public String getActions()
  {
    String result = actions;
    if (result == null)
    {
      StringBuffer sb = new StringBuffer();
      boolean comma = false;
      int mask = getActionsMask();
      if ((mask & 0x1) == 1)
      {
        sb.append("publish");
        comma = true;
      }
      if ((mask & 0x2) == 2)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("subscribe");
      }
      actions = (result = sb.toString());
    }
    return result;
  }
  
  public PermissionCollection newPermissionCollection()
  {
    return new TopicPermissionCollection();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof TopicPermission)) {
      return false;
    }
    TopicPermission tp = (TopicPermission)obj;
    return (getActionsMask() == tp.getActionsMask()) && (getName().equals(tp.getName()));
  }
  
  public int hashCode()
  {
    int h = 527 + getName().hashCode();
    h = 31 * h + getActions().hashCode();
    return h;
  }
  
  private synchronized void writeObject(ObjectOutputStream s)
    throws IOException
  {
    if (actions == null) {
      getActions();
    }
    s.defaultWriteObject();
  }
  
  private synchronized void readObject(ObjectInputStream s)
    throws IOException, ClassNotFoundException
  {
    s.defaultReadObject();
    setTransients(parseActions(actions));
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.event.TopicPermission
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.event;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectInputStream.GetField;
import java.io.ObjectOutputStream;
import java.io.ObjectOutputStream.PutField;
import java.io.ObjectStreamField;
import java.security.Permission;
import java.security.PermissionCollection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;

final class TopicPermissionCollection
  extends PermissionCollection
{
  static final long serialVersionUID = -614647783533924048L;
  private transient Map<String, TopicPermission> permissions;
  private boolean all_allowed;
  
  public TopicPermissionCollection()
  {
    permissions = new HashMap();
    all_allowed = false;
  }
  
  public void add(Permission permission)
  {
    if (!(permission instanceof TopicPermission)) {
      throw new IllegalArgumentException(new StringBuffer().append("invalid permission: ").append(permission).toString());
    }
    if (isReadOnly()) {
      throw new SecurityException("attempt to add a Permission to a readonly PermissionCollection");
    }
    TopicPermission tp = (TopicPermission)permission;
    String name = tp.getName();
    int newMask = tp.getActionsMask();
    synchronized (this)
    {
      TopicPermission existing = (TopicPermission)permissions.get(name);
      if (existing != null)
      {
        int oldMask = existing.getActionsMask();
        if (oldMask != newMask) {
          permissions.put(name, new TopicPermission(name, oldMask | newMask));
        }
      }
      else
      {
        permissions.put(name, tp);
      }
      if ((!all_allowed) && 
        (name.equals("*"))) {
        all_allowed = true;
      }
    }
  }
  
  public boolean implies(Permission permission)
  {
    if (!(permission instanceof TopicPermission)) {
      return false;
    }
    TopicPermission requested = (TopicPermission)permission;
    String name = requested.getName();
    int desired = requested.getActionsMask();
    int effective = 0;
    TopicPermission x;
    synchronized (this)
    {
      if (all_allowed)
      {
        TopicPermission x = (TopicPermission)permissions.get("*");
        if (x != null)
        {
          effective |= x.getActionsMask();
          if ((effective & desired) == desired) {
            return true;
          }
        }
      }
      x = (TopicPermission)permissions.get(name);
    }
    if (x != null)
    {
      effective |= x.getActionsMask();
      if ((effective & desired) == desired) {
        return true;
      }
    }
    int offset = name.length() - 1;
    int last;
    while ((last = name.lastIndexOf("/", offset)) != -1)
    {
      name = new StringBuffer().append(name.substring(0, last + 1)).append("*").toString();
      synchronized (this)
      {
        x = (TopicPermission)permissions.get(name);
      }
      if (x != null)
      {
        effective |= x.getActionsMask();
        if ((effective & desired) == desired) {
          return true;
        }
      }
      offset = last - 1;
    }
    return false;
  }
  
  public synchronized Enumeration<Permission> elements()
  {
    List<Permission> all = new ArrayList(permissions.values());
    return Collections.enumeration(all);
  }
  
  private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("permissions", Hashtable.class), new ObjectStreamField("all_allowed", Boolean.TYPE) };
  
  private synchronized void writeObject(ObjectOutputStream out)
    throws IOException
  {
    Hashtable<String, TopicPermission> hashtable = new Hashtable(permissions);
    
    ObjectOutputStream.PutField pfields = out.putFields();
    pfields.put("permissions", hashtable);
    pfields.put("all_allowed", all_allowed);
    out.writeFields();
  }
  
  private synchronized void readObject(ObjectInputStream in)
    throws IOException, ClassNotFoundException
  {
    ObjectInputStream.GetField gfields = in.readFields();
    Hashtable<String, TopicPermission> hashtable = (Hashtable)gfields.get("permissions", null);
    
    permissions = new HashMap(hashtable);
    all_allowed = gfields.get("all_allowed", false);
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.event.TopicPermissionCollection
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.http;

import java.io.IOException;
import java.net.URL;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public abstract interface HttpContext
{
  public static final String REMOTE_USER = "org.osgi.service.http.authentication.remote.user";
  public static final String AUTHENTICATION_TYPE = "org.osgi.service.http.authentication.type";
  public static final String AUTHORIZATION = "org.osgi.service.useradmin.authorization";
  
  public abstract boolean handleSecurity(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse)
    throws IOException;
  
  public abstract URL getResource(String paramString);
  
  public abstract String getMimeType(String paramString);
}

/* Location:
 * Qualified Name:     org.osgi.service.http.HttpContext
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.http;

import java.util.Dictionary;
import javax.servlet.Servlet;
import javax.servlet.ServletException;

public abstract interface HttpService
{
  public abstract void registerServlet(String paramString, Servlet paramServlet, Dictionary paramDictionary, HttpContext paramHttpContext)
    throws ServletException, NamespaceException;
  
  public abstract void registerResources(String paramString1, String paramString2, HttpContext paramHttpContext)
    throws NamespaceException;
  
  public abstract void unregister(String paramString);
  
  public abstract HttpContext createDefaultHttpContext();
}

/* Location:
 * Qualified Name:     org.osgi.service.http.HttpService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.http;

public class NamespaceException
  extends Exception
{
  static final long serialVersionUID = 7235606031147877747L;
  
  public NamespaceException(String message)
  {
    super(message);
  }
  
  public NamespaceException(String message, Throwable cause)
  {
    super(message, cause);
  }
  
  public Throwable getException()
  {
    return getCause();
  }
  
  public Throwable getCause()
  {
    return super.getCause();
  }
  
  public Throwable initCause(Throwable cause)
  {
    return super.initCause(cause);
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.http.NamespaceException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.io;

import java.io.IOException;
import javax.microedition.io.Connection;

public abstract interface ConnectionFactory
{
  public static final String IO_SCHEME = "io.scheme";
  
  public abstract Connection createConnection(String paramString, int paramInt, boolean paramBoolean)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.io.ConnectionFactory
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.io;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.microedition.io.Connection;

public abstract interface ConnectorService
{
  public static final int READ = 1;
  public static final int WRITE = 2;
  public static final int READ_WRITE = 3;
  
  public abstract Connection open(String paramString)
    throws IOException;
  
  public abstract Connection open(String paramString, int paramInt)
    throws IOException;
  
  public abstract Connection open(String paramString, int paramInt, boolean paramBoolean)
    throws IOException;
  
  public abstract InputStream openInputStream(String paramString)
    throws IOException;
  
  public abstract DataInputStream openDataInputStream(String paramString)
    throws IOException;
  
  public abstract OutputStream openOutputStream(String paramString)
    throws IOException;
  
  public abstract DataOutputStream openDataOutputStream(String paramString)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.io.ConnectorService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceReference;

public abstract interface LogEntry
{
  public abstract Bundle getBundle();
  
  public abstract ServiceReference getServiceReference();
  
  public abstract int getLevel();
  
  public abstract String getMessage();
  
  public abstract Throwable getException();
  
  public abstract long getTime();
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogEntry
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import java.util.EventListener;

public abstract interface LogListener
  extends EventListener
{
  public abstract void logged(LogEntry paramLogEntry);
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import java.util.Enumeration;

public abstract interface LogReaderService
{
  public abstract void addLogListener(LogListener paramLogListener);
  
  public abstract void removeLogListener(LogListener paramLogListener);
  
  public abstract Enumeration getLog();
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogReaderService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import org.osgi.framework.ServiceReference;

public abstract interface LogService
{
  public static final int LOG_ERROR = 1;
  public static final int LOG_WARNING = 2;
  public static final int LOG_INFO = 3;
  public static final int LOG_DEBUG = 4;
  
  public abstract void log(int paramInt, String paramString);
  
  public abstract void log(int paramInt, String paramString, Throwable paramThrowable);
  
  public abstract void log(ServiceReference paramServiceReference, int paramInt, String paramString);
  
  public abstract void log(ServiceReference paramServiceReference, int paramInt, String paramString, Throwable paramThrowable);
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

public abstract interface AttributeDefinition
{
  public static final int STRING = 1;
  public static final int LONG = 2;
  public static final int INTEGER = 3;
  public static final int SHORT = 4;
  public static final int CHARACTER = 5;
  public static final int BYTE = 6;
  public static final int DOUBLE = 7;
  public static final int FLOAT = 8;
  /**
   * @deprecated
   */
  public static final int BIGINTEGER = 9;
  /**
   * @deprecated
   */
  public static final int BIGDECIMAL = 10;
  public static final int BOOLEAN = 11;
  public static final int PASSWORD = 12;
  
  public abstract String getName();
  
  public abstract String getID();
  
  public abstract String getDescription();
  
  public abstract int getCardinality();
  
  public abstract int getType();
  
  public abstract String[] getOptionValues();
  
  public abstract String[] getOptionLabels();
  
  public abstract String validate(String paramString);
  
  public abstract String[] getDefaultValue();
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.AttributeDefinition
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

import org.osgi.framework.Bundle;

public abstract interface MetaTypeInformation
  extends MetaTypeProvider
{
  public abstract String[] getPids();
  
  public abstract String[] getFactoryPids();
  
  public abstract Bundle getBundle();
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.MetaTypeInformation
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

public abstract interface MetaTypeProvider
{
  public static final String METATYPE_PID = "metatype.pid";
  public static final String METATYPE_FACTORY_PID = "metatype.factory.pid";
  
  public abstract ObjectClassDefinition getObjectClassDefinition(String paramString1, String paramString2);
  
  public abstract String[] getLocales();
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.MetaTypeProvider
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

import org.osgi.framework.Bundle;

public abstract interface MetaTypeService
{
  public static final String METATYPE_DOCUMENTS_LOCATION = "OSGI-INF/metatype";
  
  public abstract MetaTypeInformation getMetaTypeInformation(Bundle paramBundle);
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.MetaTypeService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

import java.io.IOException;
import java.io.InputStream;

public abstract interface ObjectClassDefinition
{
  public static final int REQUIRED = 1;
  public static final int OPTIONAL = 2;
  public static final int ALL = -1;
  
  public abstract String getName();
  
  public abstract String getID();
  
  public abstract String getDescription();
  
  public abstract AttributeDefinition[] getAttributeDefinitions(int paramInt);
  
  public abstract InputStream getIcon(int paramInt)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.ObjectClassDefinition
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.provisioning;

import java.io.IOException;
import java.util.Dictionary;
import java.util.zip.ZipInputStream;

public abstract interface ProvisioningService
{
  public static final String PROVISIONING_SPID = "provisioning.spid";
  public static final String PROVISIONING_REFERENCE = "provisioning.reference";
  public static final String PROVISIONING_AGENT_CONFIG = "provisioning.agent.config";
  public static final String PROVISIONING_UPDATE_COUNT = "provisioning.update.count";
  public static final String PROVISIONING_START_BUNDLE = "provisioning.start.bundle";
  public static final String PROVISIONING_ROOTX509 = "provisioning.rootx509";
  public static final String PROVISIONING_RSH_SECRET = "provisioning.rsh.secret";
  public static final String MIME_STRING = "text/plain;charset=utf-8";
  public static final String MIME_BYTE_ARRAY = "application/octet-stream";
  public static final String MIME_BUNDLE = "application/vnd.osgi.bundle";
  public static final String MIME_BUNDLE_ALT = "application/x-osgi-bundle";
  public static final String MIME_BUNDLE_URL = "text/x-osgi-bundle-url";
  public static final String INITIALPROVISIONING_ENTRIES = "InitialProvisioning-Entries";
  
  public abstract Dictionary getInformation();
  
  public abstract void setInformation(Dictionary paramDictionary);
  
  public abstract void addInformation(Dictionary paramDictionary);
  
  public abstract void addInformation(ZipInputStream paramZipInputStream)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.provisioning.ProvisioningService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

import java.util.Dictionary;

public abstract interface UPnPAction
{
  public abstract String getName();
  
  public abstract String getReturnArgumentName();
  
  public abstract String[] getInputArgumentNames();
  
  public abstract String[] getOutputArgumentNames();
  
  public abstract UPnPStateVariable getStateVariable(String paramString);
  
  public abstract Dictionary invoke(Dictionary paramDictionary)
    throws Exception;
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

import java.util.Dictionary;

public abstract interface UPnPDevice
{
  public static final int MATCH_GENERIC = 1;
  public static final int MATCH_TYPE = 3;
  public static final int MATCH_MANUFACTURER_MODEL = 7;
  public static final int MATCH_MANUFACTURER_MODEL_REVISION = 15;
  public static final int MATCH_MANUFACTURER_MODEL_REVISION_SERIAL = 31;
  public static final String DEVICE_CATEGORY = "UPnP";
  public static final String UPNP_EXPORT = "UPnP.export";
  public static final String UDN = "UPnP.device.UDN";
  public static final String ID = "UPnP.device.UDN";
  public static final String TYPE = "UPnP.device.type";
  public static final String MANUFACTURER = "UPnP.device.manufacturer";
  public static final String MODEL_NAME = "UPnP.device.modelName";
  public static final String FRIENDLY_NAME = "UPnP.device.friendlyName";
  public static final String MANUFACTURER_URL = "UPnP.device.manufacturerURL";
  public static final String MODEL_DESCRIPTION = "UPnP.device.modelDescription";
  public static final String MODEL_NUMBER = "UPnP.device.modelNumber";
  public static final String MODEL_URL = "UPnP.device.modelURL";
  public static final String SERIAL_NUMBER = "UPnP.device.serialNumber";
  public static final String UPC = "UPnP.device.UPC";
  public static final String PRESENTATION_URL = "UPnP.presentationURL";
  public static final String PARENT_UDN = "UPnP.device.parentUDN";
  public static final String CHILDREN_UDN = "UPnP.device.childrenUDN";
  
  public abstract UPnPService getService(String paramString);
  
  public abstract UPnPService[] getServices();
  
  public abstract UPnPIcon[] getIcons(String paramString);
  
  public abstract Dictionary getDescriptions(String paramString);
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPDevice
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

import java.util.Dictionary;

public abstract interface UPnPEventListener
{
  public static final String UPNP_FILTER = "upnp.filter";
  
  public abstract void notifyUPnPEvent(String paramString1, String paramString2, Dictionary paramDictionary);
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPEventListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

public class UPnPException
  extends Exception
{
  static final long serialVersionUID = -262013318122195146L;
  public static final int INVALID_ACTION = 401;
  public static final int INVALID_ARGS = 402;
  public static final int INVALID_SEQUENCE_NUMBER = 403;
  public static final int INVALID_VARIABLE = 404;
  public static final int DEVICE_INTERNAL_ERROR = 501;
  private final int errorCode;
  
  public UPnPException(int errorCode, String errorDescription)
  {
    super(errorDescription);
    this.errorCode = errorCode;
  }
  
  public UPnPException(int errorCode, String errorDescription, Throwable errorCause)
  {
    super(errorDescription, errorCause);
    this.errorCode = errorCode;
  }
  
  public int getUPnPErrorCode()
  {
    return errorCode;
  }
  
  /**
   * @deprecated
   */
  public int getUPnPError_Code()
  {
    return getUPnPErrorCode();
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

import java.io.IOException;
import java.io.InputStream;

public abstract interface UPnPIcon
{
  public abstract String getMimeType();
  
  public abstract int getWidth();
  
  public abstract int getHeight();
  
  public abstract int getSize();
  
  public abstract int getDepth();
  
  public abstract InputStream getInputStream()
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPIcon
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

public abstract interface UPnPLocalStateVariable
  extends UPnPStateVariable
{
  public abstract Object getCurrentValue();
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPLocalStateVariable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

public abstract interface UPnPService
{
  public static final String TYPE = "UPnP.service.type";
  public static final String ID = "UPnP.service.id";
  
  public abstract String getId();
  
  public abstract String getType();
  
  public abstract String getVersion();
  
  public abstract UPnPAction getAction(String paramString);
  
  public abstract UPnPAction[] getActions();
  
  public abstract UPnPStateVariable[] getStateVariables();
  
  public abstract UPnPStateVariable getStateVariable(String paramString);
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

public abstract interface UPnPStateVariable
{
  public static final String TYPE_UI1 = "ui1";
  public static final String TYPE_UI2 = "ui2";
  public static final String TYPE_UI4 = "ui4";
  public static final String TYPE_I1 = "i1";
  public static final String TYPE_I2 = "i2";
  public static final String TYPE_I4 = "i4";
  public static final String TYPE_INT = "int";
  public static final String TYPE_R4 = "r4";
  public static final String TYPE_R8 = "r8";
  public static final String TYPE_NUMBER = "number";
  public static final String TYPE_FIXED_14_4 = "fixed.14.4";
  public static final String TYPE_FLOAT = "float";
  public static final String TYPE_CHAR = "char";
  public static final String TYPE_STRING = "string";
  public static final String TYPE_DATE = "date";
  public static final String TYPE_DATETIME = "dateTime";
  public static final String TYPE_DATETIME_TZ = "dateTime.tz";
  public static final String TYPE_TIME = "time";
  public static final String TYPE_TIME_TZ = "time.tz";
  public static final String TYPE_BOOLEAN = "boolean";
  public static final String TYPE_BIN_BASE64 = "bin.base64";
  public static final String TYPE_BIN_HEX = "bin.hex";
  public static final String TYPE_URI = "uri";
  public static final String TYPE_UUID = "uuid";
  
  public abstract String getName();
  
  public abstract Class getJavaDataType();
  
  public abstract String getUPnPDataType();
  
  public abstract Object getDefaultValue();
  
  public abstract String[] getAllowedValues();
  
  public abstract Number getMinimum();
  
  public abstract Number getMaximum();
  
  public abstract Number getStep();
  
  public abstract boolean sendsEvents();
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPStateVariable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

public abstract interface Authorization
{
  public abstract String getName();
  
  public abstract boolean hasRole(String paramString);
  
  public abstract String[] getRoles();
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.Authorization
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

public abstract interface Group
  extends User
{
  public abstract boolean addMember(Role paramRole);
  
  public abstract boolean addRequiredMember(Role paramRole);
  
  public abstract boolean removeMember(Role paramRole);
  
  public abstract Role[] getMembers();
  
  public abstract Role[] getRequiredMembers();
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.Group
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import java.util.Dictionary;

public abstract interface Role
{
  public static final String USER_ANYONE = "user.anyone";
  public static final int ROLE = 0;
  public static final int USER = 1;
  public static final int GROUP = 2;
  
  public abstract String getName();
  
  public abstract int getType();
  
  public abstract Dictionary getProperties();
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.Role
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import java.util.Dictionary;

public abstract interface User
  extends Role
{
  public abstract Dictionary getCredentials();
  
  public abstract boolean hasCredential(String paramString, Object paramObject);
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.User
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import org.osgi.framework.InvalidSyntaxException;

public abstract interface UserAdmin
{
  public abstract Role createRole(String paramString, int paramInt);
  
  public abstract boolean removeRole(String paramString);
  
  public abstract Role getRole(String paramString);
  
  public abstract Role[] getRoles(String paramString)
    throws InvalidSyntaxException;
  
  public abstract User getUser(String paramString1, String paramString2);
  
  public abstract Authorization getAuthorization(User paramUser);
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdmin
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import org.osgi.framework.ServiceReference;

public class UserAdminEvent
{
  private ServiceReference ref;
  private int type;
  private Role role;
  public static final int ROLE_CREATED = 1;
  public static final int ROLE_CHANGED = 2;
  public static final int ROLE_REMOVED = 4;
  
  public UserAdminEvent(ServiceReference ref, int type, Role role)
  {
    this.ref = ref;
    this.type = type;
    this.role = role;
  }
  
  public ServiceReference getServiceReference()
  {
    return ref;
  }
  
  public int getType()
  {
    return type;
  }
  
  public Role getRole()
  {
    return role;
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdminEvent
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

public abstract interface UserAdminListener
{
  public abstract void roleChanged(UserAdminEvent paramUserAdminEvent);
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdminListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.security.BasicPermission;
import java.security.Permission;
import java.security.PermissionCollection;

public final class UserAdminPermission
  extends BasicPermission
{
  static final long serialVersionUID = -1179971692401603789L;
  public static final String ADMIN = "admin";
  public static final String CHANGE_PROPERTY = "changeProperty";
  private static final int ACTION_CHANGE_PROPERTY = 1;
  public static final String CHANGE_CREDENTIAL = "changeCredential";
  private static final int ACTION_CHANGE_CREDENTIAL = 2;
  public static final String GET_CREDENTIAL = "getCredential";
  private static final int ACTION_GET_CREDENTIAL = 4;
  private static final int ACTION_ALL = 7;
  static final int ACTION_NONE = 0;
  private volatile String actions = null;
  private transient int action_mask;
  
  public UserAdminPermission(String name, String actions)
  {
    this(name, parseActions(actions));
  }
  
  UserAdminPermission(String name, int mask)
  {
    super(name);
    setTransients(mask);
  }
  
  private synchronized void setTransients(int mask)
  {
    if (getName().equals("admin"))
    {
      if (mask != 0) {
        throw new IllegalArgumentException("Actions specified for no-action UserAdminPermission");
      }
    }
    else if ((mask == 0) || ((mask & 0x7) != mask)) {
      throw new IllegalArgumentException("Invalid action string");
    }
    action_mask = mask;
  }
  
  synchronized int getActionsMask()
  {
    return action_mask;
  }
  
  private static int parseActions(String actions)
  {
    boolean seencomma = false;
    int mask = 0;
    if (actions == null) {
      return mask;
    }
    char[] a = actions.toCharArray();
    int i = a.length - 1;
    if (i < 0) {
      return mask;
    }
    while (i != -1)
    {
      char c;
      while ((i != -1) && (((c = a[i]) == ' ') || (c == '\r') || (c == '\n') || (c == '\f') || (c == '\t'))) {
        i--;
      }
      if ((i >= 12) && (match_get(a, i - 10)) && (match_credential(a, i)))
      {
        int matchlen = 13;
        mask |= 0x4;
      }
      else if ((i >= 13) && (match_change(a, i - 8)) && (match_property(a, i)))
      {
        int matchlen = 14;
        mask |= 0x1;
      }
      else if ((i >= 15) && (match_change(a, i - 10)) && (match_credential(a, i)))
      {
        int matchlen = 16;
        mask |= 0x2;
      }
      else
      {
        throw new IllegalArgumentException("invalid permission: " + actions);
      }
      int matchlen;
      seencomma = false;
      while ((i >= matchlen) && (!seencomma))
      {
        switch (a[(i - matchlen)])
        {
        case ',': 
          seencomma = true;
        case '\t': 
        case '\n': 
        case '\f': 
        case '\r': 
        case ' ': 
          break;
        default: 
          throw new IllegalArgumentException("invalid permission: " + actions);
        }
        i--;
      }
      i -= matchlen;
    }
    if (seencomma) {
      throw new IllegalArgumentException("invalid permission: " + actions);
    }
    return mask;
  }
  
  private static boolean match_change(char[] a, int i)
  {
    return ((a[(i - 5)] == 'c') || (a[(i - 5)] == 'C')) && ((a[(i - 4)] == 'h') || (a[(i - 4)] == 'H')) && ((a[(i - 3)] == 'a') || (a[(i - 3)] == 'A')) && ((a[(i - 2)] == 'n') || (a[(i - 2)] == 'N')) && ((a[(i - 1)] == 'g') || (a[(i - 1)] == 'G')) && ((a[(i - 0)] == 'e') || (a[(i - 0)] == 'E'));
  }
  
  private static boolean match_get(char[] a, int i)
  {
    return ((a[(i - 2)] == 'g') || (a[(i - 2)] == 'G')) && ((a[(i - 1)] == 'e') || (a[(i - 1)] == 'E')) && ((a[(i - 0)] == 't') || (a[(i - 0)] == 'T'));
  }
  
  private static boolean match_property(char[] a, int i)
  {
    return ((a[(i - 7)] == 'p') || (a[(i - 7)] == 'P')) && ((a[(i - 6)] == 'r') || (a[(i - 6)] == 'R')) && ((a[(i - 5)] == 'o') || (a[(i - 5)] == 'O')) && ((a[(i - 4)] == 'p') || (a[(i - 4)] == 'P')) && ((a[(i - 3)] == 'e') || (a[(i - 3)] == 'E')) && ((a[(i - 2)] == 'r') || (a[(i - 2)] == 'R')) && ((a[(i - 1)] == 't') || (a[(i - 1)] == 'T')) && ((a[(i - 0)] == 'y') || (a[(i - 0)] == 'Y'));
  }
  
  private static boolean match_credential(char[] a, int i)
  {
    return ((a[(i - 9)] == 'c') || (a[(i - 9)] == 'C')) && ((a[(i - 8)] == 'r') || (a[(i - 8)] == 'R')) && ((a[(i - 7)] == 'e') || (a[(i - 7)] == 'E')) && ((a[(i - 6)] == 'd') || (a[(i - 6)] == 'D')) && ((a[(i - 5)] == 'e') || (a[(i - 5)] == 'E')) && ((a[(i - 4)] == 'n') || (a[(i - 4)] == 'N')) && ((a[(i - 3)] == 't') || (a[(i - 3)] == 'T')) && ((a[(i - 2)] == 'i') || (a[(i - 2)] == 'I')) && ((a[(i - 1)] == 'a') || (a[(i - 1)] == 'A')) && ((a[(i - 0)] == 'l') || (a[(i - 0)] == 'L'));
  }
  
  public boolean implies(Permission p)
  {
    if ((p instanceof UserAdminPermission))
    {
      UserAdminPermission requested = (UserAdminPermission)p;
      int mask = getActionsMask();
      int targetMask = requested.getActionsMask();
      return ((targetMask & mask) == targetMask) && ((targetMask != 0) || (mask == 0)) && (super.implies(p));
    }
    return false;
  }
  
  public String getActions()
  {
    String result = actions;
    if (result == null)
    {
      StringBuffer sb = new StringBuffer();
      boolean comma = false;
      int mask = getActionsMask();
      if ((mask & 0x2) == 2)
      {
        sb.append("changeCredential");
        comma = true;
      }
      if ((mask & 0x1) == 1)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("changeProperty");
        comma = true;
      }
      if ((mask & 0x4) == 4)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("getCredential");
      }
      actions = (result = sb.toString());
    }
    return result;
  }
  
  public PermissionCollection newPermissionCollection()
  {
    return new UserAdminPermissionCollection();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof UserAdminPermission)) {
      return false;
    }
    UserAdminPermission uap = (UserAdminPermission)obj;
    
    return (getActionsMask() == uap.getActionsMask()) && (getName().equals(uap.getName()));
  }
  
  public int hashCode()
  {
    int h = 527 + getName().hashCode();
    h = 31 * h + getActions().hashCode();
    return h;
  }
  
  private synchronized void writeObject(ObjectOutputStream s)
    throws IOException
  {
    if (actions == null) {
      getActions();
    }
    s.defaultWriteObject();
  }
  
  private synchronized void readObject(ObjectInputStream s)
    throws IOException, ClassNotFoundException
  {
    s.defaultReadObject();
    setTransients(parseActions(actions));
  }
  
  public String toString()
  {
    StringBuffer sb = new StringBuffer();
    sb.append('(');
    sb.append(getClass().getName());
    sb.append(" \"");
    sb.append(getName());
    String a = getActions();
    if (a.length() > 0)
    {
      sb.append("\" \"");
      sb.append(a);
    }
    sb.append("\")");
    return sb.toString();
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdminPermission
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import java.security.Permission;
import java.security.PermissionCollection;
import java.util.Enumeration;
import java.util.Hashtable;

final class UserAdminPermissionCollection
  extends PermissionCollec
1 2 3

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd