org.tizen.common_2.0.0.201310241620

16:49:58.158 INFO  jd.cli.Main - Decompiling org.tizen.common_2.0.0.201310241620.jar
package org.tizen.common;

public abstract interface Adaptable
{
  public abstract <T> T adapt(Class<T> paramClass);
}

/* Location:
 * Qualified Name:     org.tizen.common.Adaptable
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface AdaptableWithArgument
{
  public abstract <T, A> T adapt(Class<T> paramClass, A paramA);
}

/* Location:
 * Qualified Name:     org.tizen.common.AdaptableWithArgument
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AppIdGenerator
  implements Factory<String>
{
  final Logger logger = LoggerFactory.getLogger(AppIdGenerator.class);
  protected static AppIdGenerator instance = new AppIdGenerator();
  
  public static AppIdGenerator getInstance()
  {
    return instance;
  }
  
  public String create()
  {
    try
    {
      return generate();
    }
    catch (Exception e)
    {
      logger.error("Exception occurred:", e);
    }
    return "";
  }
  
  final char[] PSEUDO_CHARS = { '0', '1', '2', '3', '4', '5', '6', '7', 
    '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 
    'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 
    'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 
    'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 
    'y', 'z' };
  final BigInteger PSEUDO_CHAR_SIZE = new BigInteger("62");
  static final String[] RESERVED_APPID = {
    "TIZEN", 
    "PRIVT", 
    "WIDGT" };
  
  private String convertBytesToAlphaNumeric(byte[] in, int size)
  {
    BigInteger randomBigInt = new BigInteger(in).abs();
    StringBuffer out = new StringBuffer(size + 1);
    for (int i = 0; i < size; i++)
    {
      BigInteger[] dividedAndremainder = randomBigInt.divideAndRemainder(PSEUDO_CHAR_SIZE);
      randomBigInt = dividedAndremainder[0];
      out.append(PSEUDO_CHARS[dividedAndremainder[1].intValue()]);
    }
    String ret = new String(out);
    return ret;
  }
  
  private byte[] generateRandomBytes(int size)
    throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
  {
    SecureRandom random = new SecureRandom();
    KeyGenerator keyGen = KeyGenerator.getInstance("AES");
    keyGen.init(128);
    
    byte[] bytes = new byte[size];
    random.nextBytes(bytes);
    
    SecretKey secretkey = keyGen.generateKey();
    byte[] key = secretkey.getEncoded();
    SecretKeySpec secretkeySpec = new SecretKeySpec(key, "AES");
    
    Cipher cipher = Cipher.getInstance("AES");
    cipher.init(1, secretkeySpec);
    
    return cipher.doFinal(bytes);
  }
  
  private boolean check(String appId)
  {
    String[] arrayOfString;
    int j = (arrayOfString = RESERVED_APPID).length;
    for (int i = 0; i < j; i++)
    {
      String prefix = arrayOfString[i];
      if (appId.startsWith(prefix)) {
        return false;
      }
    }
    return true;
  }
  
  public String generate(int size)
    throws Exception
  {
    String appId = "";
    do
    {
      appId = convertBytesToAlphaNumeric(generateRandomBytes(size), size);
    } while (!
    
      check(appId));
    return appId;
  }
  
  public String generate()
    throws Exception
  {
    return generate(10);
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.AppIdGenerator
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public enum Architecture$Group
{
  x86,  arm,  unknown;
}

/* Location:
 * Qualified Name:     org.tizen.common.Architecture.Group
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

import org.tizen.common.util.Assert;

public enum Architecture
{
  i386(new Object[] { Group.x86 }),  i486(new Object[] { Group.x86 }),  i586(new Object[] { Group.x86 }),  i686(new Object[] { Group.x86 }),  ia32(new Object[] { Group.x86 }),  armel(new Object[] { Group.arm }),  armv7a(new Object[] { Group.arm, "ARMv7-a" }),  armv7l(new Object[] { Group.arm });
  
  protected Object[] attributes;
  
  public static enum Group
  {
    x86,  arm,  unknown;
  }
  
  private Architecture(Object... attributes)
  {
    Assert.notNull(attributes);
    this.attributes = attributes;
  }
  
  public Group getGroup()
  {
    Object[] arrayOfObject;
    int j = (arrayOfObject = attributes).length;
    for (int i = 0; i < j; i++)
    {
      Object attribute = arrayOfObject[i];
      if ((attribute instanceof Group)) {
        return (Group)attribute;
      }
    }
    return Group.unknown;
  }
  
  public String getName()
  {
    Object[] arrayOfObject;
    int j = (arrayOfObject = attributes).length;
    for (int i = 0; i < j; i++)
    {
      Object attribute = arrayOfObject[i];
      if ((attribute instanceof String)) {
        return (String)attribute;
      }
    }
    return name();
  }
  
  public static Group getGroup(String arch)
  {
    Architecture result = valueOf(arch);
    return result != null ? result.getGroup() : Group.unknown;
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.Architecture
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface Cabinet<T>
  extends Runnable
{
  public abstract T getData();
  
  public abstract void setData(T paramT);
}

/* Location:
 * Qualified Name:     org.tizen.common.Cabinet
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

import org.apache.log4j.spi.RepositorySelector;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.RegistryFactory;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.tizen.common.core.application.InstallPathConfig;
import org.tizen.common.core.command.EclipseExecutor;
import org.tizen.common.core.command.Executor;
import org.tizen.common.core.command.Prompter;
import org.tizen.common.core.command.prompter.EclipsePrompter;
import org.tizen.common.core.command.prompter.SWTPrompter;
import org.tizen.common.util.DialogUtil;
import org.tizen.common.util.HostUtil;
import org.tizen.common.util.log.TizenLog4jConfigurator;
import org.tizen.sdblib.ICrashReportServiceListener;
import org.tizen.sdblib.SmartDevelopmentBridge;
import org.tizen.sdblib.exception.ServerException;
import org.tizen.sdblib.service.CrashReportService;

public class CommonPlugin
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.tizen.common";
  private static CommonPlugin plugin;
  protected EclipsePrompter prompter = null;
  protected Executor executor = null;
  protected RepositorySelector selector = null;
  protected CrashReportService crService = null;
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
    
    getPreferenceStore().addPropertyChangeListener(new TizenLog4jConfigurator());
    
    plugin = this;
    initializeExecutor();
    initializeSmartDeviceBridge();
    initializeCrashReportService();
  }
  
  public void stop(BundleContext context)
    throws Exception
  {
    finalizeSmartDeviceBridge();
    finalizeExecutor();
    plugin = null;
    super.stop(context);
  }
  
  public static void setDefault(CommonPlugin plugin)
  {
    plugin = plugin;
  }
  
  public static CommonPlugin getDefault()
  {
    return plugin;
  }
  
  protected void initializeDefaultPreferences(IPreferenceStore store)
  {
    if (InstallPathConfig.getSDKPath() != null) {
      store.setDefault("sdkpath", InstallPathConfig.getSDKPath());
    }
    store.setDefault("sdkupdate", false);
    
    store.setDefault("org.tizen.common.option.rds", true);
    
    store.setDefault("response_timeout", 300000);
  }
  
  public void setExecutor(Executor executor)
  {
    this.executor = executor;
  }
  
  public Executor getExecutor()
  {
    return executor;
  }
  
  public Prompter getPrompter()
  {
    return prompter;
  }
  
  protected void initializeExecutor()
  {
    prompter = new EclipsePrompter(new SWTPrompter());
    executor = new EclipseExecutor(prompter);
  }
  
  protected void finalizeExecutor() {}
  
  protected void initializeSmartDeviceBridge()
  {
    String sdbPath = InstallPathConfig.getSDBPath();
    if (!HostUtil.exists(sdbPath)) {
      DialogUtil.openMessageDialog(String.format("There is no %s.", new Object[] { sdbPath }));
    } else {
      try
      {
        SmartDevelopmentBridge bridge = SmartDevelopmentBridge.createBridge(sdbPath, false);
        bridge.waitforStart(5000L);
        if (!bridge.getStarted())
        {
          DialogUtil.openErrorDialog("Failed to start sdb. Read sdb log in ${tizen_sdk}/tools for details.");
          
          bridge.stopBridge();
        }
      }
      catch (Throwable t)
      {
        plugin.getLog().log(new Status(4, "org.tizen.common", "Problem occurred while initializing sdb", t));
        DialogUtil.openErrorDialog("Failed to start sdb");
      }
    }
  }
  
  protected void finalizeSmartDeviceBridge() {}
  
  protected void initializeCrashReportService()
    throws ServerException
  {
    crService = new CrashReportService();
    
    IExtensionRegistry x = RegistryFactory.getRegistry();
    IConfigurationElement[] ces = x.getConfigurationElementsFor("org.tizen.common.crashreporter");
    IConfigurationElement[] arrayOfIConfigurationElement1;
    int j = (arrayOfIConfigurationElement1 = ces).length;
    for (int i = 0; i < j; i++)
    {
      IConfigurationElement ce = arrayOfIConfigurationElement1[i];
      if ("client".equals(ce.getName()))
      {
        String className = ce.getAttribute("class");
        if (className != null) {
          try
          {
            Object obj = ce.createExecutableExtension("class");
            if ((obj instanceof ICrashReportServiceListener)) {
              crService.addCrashReportServiceListener((ICrashReportServiceListener)obj);
            }
          }
          catch (CoreException e)
          {
            plugin.getLog().log(new Status(2, "org.tizen.common", "Error occurred while adding cs create listener", e));
          }
        }
      }
    }
    crService.boot();
  }
  
  protected void destroyCrashReportService()
  {
    crService.down();
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.CommonPlugin
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface Factory<T>
{
  public abstract T create();
}

/* Location:
 * Qualified Name:     org.tizen.common.Factory
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface FactoryWithArgument<T, A>
{
  public abstract T create(A paramA);
}

/* Location:
 * Qualified Name:     org.tizen.common.FactoryWithArgument
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface IApplicationConfiguration
  extends ITizenNativeProject
{
  public abstract String getBinaryName();
  
  public abstract String generateAppId();
  
  public abstract String getBuildArchitecture();
}

/* Location:
 * Qualified Name:     org.tizen.common.IApplicationConfiguration
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

import java.util.List;

public abstract interface ITizenNativeProject
  extends ITizenProject
{
  public abstract List<String> getBuildConfigurations();
  
  public abstract String getDefaultBuildConfiguration();
}

/* Location:
 * Qualified Name:     org.tizen.common.ITizenNativeProject
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

import java.io.File;
import org.eclipse.core.resources.IProject;

public abstract interface ITizenNativeXMLStore
{
  public static final String EXSD_STORE_EXTENSION_POINT_ID = "org.tizen.nativecommon.store";
  public static final String EXSD_APP_XML_STORE_CLASS_ID = "org.tizen.nativecpp.misc.core.NewAppXmlStore";
  
  public abstract void setProject(String paramString);
  
  public abstract void setProject(IProject paramIProject);
  
  public abstract boolean loadXml();
  
  public abstract void mergeAppData(ITizenNativeXMLStore paramITizenNativeXMLStore);
  
  public abstract void mergePrivData(ITizenNativeXMLStore paramITizenNativeXMLStore);
  
  public abstract boolean storeXml(File paramFile);
}

/* Location:
 * Qualified Name:     org.tizen.common.ITizenNativeXMLStore
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface ITizenProject
{
  public abstract String getAppId();
  
  public abstract String getPackageId();
  
  public abstract TizenProjectType getTizenProjectType();
}

/* Location:
 * Qualified Name:     org.tizen.common.ITizenProject
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface ITizenWebProject
  extends ITizenProject
{}

/* Location:
 * Qualified Name:     org.tizen.common.ITizenWebProject
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.tizen.common.messages";
  public static String NewIconDialog_Title;
  public static String NewIconDialog_OptionLabel;
  public static String NewIconDialog_ShadowCheckBoxLabel;
  public static String NewIconDialog_FileSelectError;
  public static String NewIconDialog_RenameInputDialogTitle;
  public static String NewIconDialog_RenameInputDialogMessage;
  public static String NewIconDialog_EmptyFileName;
  public static String NewIconDialog_ExistFileName;
  public static String NewIconDialog_ImageFileLabel;
  public static String NewIconDialog_BrowseBtnLabel;
  public static String NewIconDialog_CircularCheckBoxLabel;
  public static String NewIconDialog_MessageDialogTitle;
  public static String NewIconDialog_MessageDialogMessage;
  public static String NewIconDialog_InvalidFileName;
  
  static
  {
    NLS.initializeMessages("org.tizen.common.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.Messages
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public enum ScreenDensity
{
  XHIGH("xhigh", "Xhigh Density", 117),  HIGH("high", "High Density", 90);
  
  private final String fName;
  private final String fDisplayName;
  private final int fIconSize;
  
  private ScreenDensity(String value, String display, int size)
  {
    fName = value;
    fDisplayName = display;
    fIconSize = size;
  }
  
  public int getIconSize()
  {
    return fIconSize;
  }
  
  public String getName()
  {
    return fName;
  }
  
  public String getDisplayName()
  {
    return fDisplayName;
  }
  
  public String getIconDirectory()
  {
    return "screen-density-" + fName;
  }
  
  public static ScreenDensity getEnumFromDisplayName(String disName)
  {
    ScreenDensity[] arrayOfScreenDensity;
    int j = (arrayOfScreenDensity = values()).length;
    for (int i = 0; i < j; i++)
    {
      ScreenDensity sd = arrayOfScreenDensity[i];
      if (sd.getDisplayName().equals(disName)) {
        return sd;
      }
    }
    return null;
  }
  
  public static ScreenDensity getEnum(String name)
  {
    ScreenDensity[] arrayOfScreenDensity;
    int j = (arrayOfScreenDensity = values()).length;
    for (int i = 0; i < j; i++)
    {
      ScreenDensity sd = arrayOfScreenDensity[i];
      if (sd.getName().equals(name)) {
        return sd;
      }
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.ScreenDensity
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface Surrogate<T>
{
  public abstract T getAdapter();
}

/* Location:
 * Qualified Name:     org.tizen.common.Surrogate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public abstract interface SurrogateWithArgument<T, A>
{
  public abstract T getAdapter(A paramA);
}

/* Location:
 * Qualified Name:     org.tizen.common.SurrogateWithArgument
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

import java.net.URL;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;

public class TizenHelpContextIds
{
  public static String HELP_CONTENT_BASE_URL = PlatformUI.getWorkbench().getHelpSystem().resolve("", false).toString();
  private static final String HELP_COMMON = "org.tizen.ide.common.";
  public static final String HELP_COMMON_CONNECTION_EXPLORER_CONTEXT = "org.tizen.ide.common.connection_explorer_context";
  public static final String HELP_COMMON_LOG_CONTEXT = "org.tizen.ide.common.log_context";
  public static final String HELP_COMMON_CERTIFICATE_GENERTOR_CONTEXT = "org.tizen.ide.common.certificate_generator_context";
  private static final String HELP_NATIVE = "org.tizen.ide.native.";
  public static final String HELP_NATIVE_CODECOVERAGE_CONTEXT = "org.tizen.ide.native.codecoverage_context";
  public static final String HELP_NATIVE_UNITTEST_CONTEXT = "org.tizen.ide.native.unittest_context";
  public static final String HELP_NATIVE_MANIFEST_CONTEXT = "org.tizen.ide.native.manifest_context";
  public static final String HELP_NATIVE_PROJECT_WIZARD_CONTEXT = "org.tizen.ide.native.project_wizard_context";
  public static final String HELP_NATIVE_PROJECT_WIZARD_SETTINGS_CONTEXT = "org.tizen.ide.native.project_wizard_settings_context";
  public static final String HELP_NATIVE_SMART_LAUNCH_CONTEXT = "org.tizen.ide.native.smart_launch_context";
  public static final String HELP_NATIVE_DEBUG_ATTACH_CONTEXT = "org.tizen.ide.native.debug_attach_context";
  private static final String HELP_WEB = "org.tizen.ide.web.";
  public static final String HELP_WEB_WIDGET_CONFIGURATION_EDITOR_CONTEXT = "org.tizen.ide.web.widget_configuration_editor_context";
  public static final String HELP_WEB_HTML_EDITOR_CONTEXT = "org.tizen.ide.web.html_editor_context";
  public static final String HELP_WEB_JAVASCRIPT_EDITOR_CONTEXT = "org.tizen.ide.web.javascript_editor_context";
  public static final String HELP_WEB_CSS_EDITOR_CONTEXT = "org.tizen.ide.web.css_editor_context";
  public static final String HELP_WEB_HTML_PREVIEW_CONTEXT = "org.tizen.ide.web.html_preview_context";
  public static final String HELP_WEB_CSS_PREVIEW_CONTEXT = "org.tizen.ide.web.css_preview_context";
  public static final String HELP_WEB_PREFERENCES_CONTEXT = "org.tizen.ide.web.preferences_context";
  public static final String HELP_WEB_SIMULATOR_PREFERENCES_CONTEXT = "org.tizen.ide.web.simulator_preferences_context";
  public static final String HELP_WEB_NEW_PROJECT_WIZARD_CONTEXT = "org.tizen.ide.web.new_project_wizard_context";
  public static final String HELP_WEB_USER_TEMPLATE_CONTEXT = "org.tizen.ide.web.user_template_context";
  public static final String HELP_WEB_PROJECT_BUILD_PROPERTIES_CONTEXT = "org.tizen.ide.web.project_build_properties_context";
  public static final String HELP_WEB_LOCALIZE_WIDGET_CONTEXT = "org.tizen.ide.web.localize_widget_context";
}

/* Location:
 * Qualified Name:     org.tizen.common.TizenHelpContextIds
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

import org.tizen.sdblib.IDevice;

public class TizenPlatformConstants
{
  public static final String ELM_SCALE_GETTER = TOOLS_TARGET_PATH + "/elm_scale_getter/get_elm_scale ";
  public static final String TOOLS_TARGET_PATH = "/home/developer/sdk_tools";
  
  static
  {
    GDBSERVER_CMD = TOOLS_TARGET_PATH + "/gdbserver/gdbserver";
    GDBSERVER_PLATFORM_CMD = TOOLS_TARGET_PATH + "/gdbserver-platform/gdbserver";
    APP_INSTALL_PATH = "/opt/usr/apps";
    TEMPORARY_PKG_PATH = "/opt/usr/apps/tmp/";
    APP_ICON_INSTALL_PATH = "shared/res";
    TEMPORARY_DIR_PATH = "/tmp";
    DEBUG_COREFILE_PATH = "/opt/usr/share/crash/dump";
    DEBUG_COREFILE_EXTENSION = "coredump";
    DEBUG_COREFILE_EXTRACT_COMMAND = "tar -xvf %s -C %s --wildcards --no-anchored '%s'";
    DEBUG_COREFILE_EXTRACT_TEMP_PATH = "/tmp";
    
    SIGNING_DEFAULT = true;
    SIGNING_BUILD_PACKAGE = true;
    
    MANIFEST_XML_FILE_NAME = "manifest.xml";
    
    PKG_TOOL = "/usr/bin/pkgcmd";
    PKG_TOOL_LIST_COMMAND = PKG_TOOL + " -l  | grep %s";
    PKG_TOOL_REMOVE_COMMAND = PKG_TOOL + " -q -u -t %s -n %s";
    PKG_TOOL_INSTALL_COMMAND = PKG_TOOL + " -q -i -t %s -p %s";
    PKG_TOOL_REINSTALL_COMMAND = PKG_TOOL + " -q -r -t %s -n %s";
    PKG_TOOL_RUNNING_CHECK_COMMAND = PKG_TOOL + " -C -t %s -n %s";
    PKG_TOOL_TERMINATE_COMMAND = PKG_TOOL + " -k -t %s -n %s";
    
    PKG_TOOL_INSTALL_PATH_COMMAND = PKG_TOOL + " -a";
    PKG_TOOL_ROAPP_CHECK_COMMAND = "/usr/bin/pkginfo --pkg %s | grep -i Removable";
    ROAPP_RESULT = "Removable: 0";
    RWAPP_RESULT = "Removable: 1";
    
    REMOVE_FILE_COMMAND = "rm -rf %s";
    
    LAUNCH_CMD = "/usr/bin/launch_app %s";
    SDK_ROOT_COMMAND = "/usr/bin/da_command";
    CMD_PROCESS = SDK_ROOT_COMMAND + " process | grep %s";
    PROCESS_GET_PROCESS_ID_COMMAND = SDK_ROOT_COMMAND + " process | grep '%s' | grep -v grep | awk '{print $2}'";
    
    DLOGUTIL_CMD = "/usr/bin/dlogutil %s";
  }
  
  public static final String DEBUG_ATTACH_CMD_FORMAT = "-m debug -P %s -attach %s";
  public static final String LOCALHOST = "127.0.0.1";
  public static final String ENVIRONMENT_SETTING_CMD = "export ";
  public static final String CMD_RESULT_CHECK = "; echo $?;";
  public static final String CMD_RESULT_PREFIX = "cmd_ret:";
  public static final String CMD_SUFFIX = "; echo cmd_ret:$?;";
  public static final String CMD_SUCCESS = "cmd_ret:0";
  public static final String CMD_FAILURE = "cmd_ret:1";
  public static final String CMD_PROCESS;
  public static final int OS = 1024;
  public static final String PACKAGENAME_PREFIX = "org.tizen";
  public static final String DEBIAN_INSTALL_PATH = "opt/*";
  public static final String PKGTYPE_TPK = "TPK";
  public static final String PKGTYPE_RPM = "RPM";
  public static final String PKGTYPE_DEB = "DEB";
  public static final String DEBUG_COREFILE_PATH;
  public static final String DEBUG_COREFILE_EXTENSION;
  public static final String DEBUG_COREFILE_EXTRACT_COMMAND;
  public static final String DEBUG_COREFILE_EXTRACT_TEMP_PATH;
  public static final String GDBSERVER_CMD;
  public static final String GDBSERVER_PLATFORM_CMD;
  public static final String ATTACH_OPTION = " --attach ";
  public static final String HOST_GDBSERVER_PATH = "/usr/bin/gdbserver";
  public static final String SDK_ROOT_COMMAND;
  /**
   * @deprecated
   */
  public static final String APP_INSTALL_PATH;
  public static final String APP_ICON_INSTALL_PATH;
  /**
   * @deprecated
   */
  public static final String TEMPORARY_PKG_PATH;
  public static final String TEMPORARY_DIR_PATH;
  public static final String PKG_TOOL;
  public static final String PKG_TOOL_LIST_COMMAND;
  public static final String PKG_TOOL_REMOVE_COMMAND;
  public static final String PKG_TOOL_INSTALL_COMMAND;
  public static final String PKG_TOOL_RUNNING_CHECK_COMMAND;
  public static final String PKG_TOOL_TERMINATE_COMMAND;
  public static final String PKG_TOOL_REINSTALL_COMMAND;
  public static final String PKG_TOOL_INSTALL_PATH_COMMAND;
  public static final String PKG_TOOL_ROAPP_CHECK_COMMAND;
  public static final String REMOVE_FILE_COMMAND;
  public static final String DLOGUTIL_CMD;
  public static final String ROAPP_RESULT;
  public static final String RWAPP_RESULT;
  public static final String RDS_PUSH_DIRECTORY_COMMAND = "mkdir -p -m 755 \"%s\"; echo cmd_ret:$?;";
  public static final String RDS_CHANGE_OWNER_COMMAND = "chown -R app:app \"%s\"; echo cmd_ret:$?;";
  public static final String LAUNCH_CMD;
  public static final String LAUNCH_CMD_SUCCESS = "... successfully launched";
  public static final String LAUNCH_CMD_FAILURE = "... launch failed";
  public static final String CONTROL_EXTENSION = ".control";
  public static final boolean SIGNING_DEFAULT;
  public static final boolean SIGNING_BUILD_PACKAGE;
  public static final String CODE_COVERAGE_BUILD_OPTION = "-fprofile-arcs -ftest-coverage";
  public static final String CODE_COVERAGE_LAUNCH_OPTION = " __AUL_SDK__ CODE_COVERAGE";
  public static final String PROCESS_GET_PROCESS_ID_COMMAND;
  public static final String PROCESS_SIGKILL_COMMAND = "kill -9 %s";
  public static final String PKG_TOOL_RUNNUNG_CHECK_COMMAND_RUNNING = "is Running";
  public static final String MANIFEST_XML_FILE_NAME;
  
  public static String getAppTmpDirectory(IDevice device)
  {
    return device.getAppInstallPath() + TEMPORARY_DIR_PATH;
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.TizenPlatformConstants
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common;

public enum TizenProjectType
{
  TIZEN_C_UI_APPLICATION(true, false, false),  TIZEN_C_SERVICE_APPLICATION(false, false, false),  TIZEN_C_SHAREDLIBRARY(false, false, false),  TIZEN_C_STATICLIBRARY(false, false, false),  TIZEN_CPP_UI_APPLICATION(true, true, true),  TIZEN_CPP_SERVICE_APPLICATION(false, false, true),  TIZEN_CPP_SHAREDLIBRARY(false, false, true),  TIZEN_CPP_STATICLIBRARY(false, false, false),  TIZEN_CPP_UNITTEST(true, false, false),  TIZEN_PLATFORM_PROJECT(false, false, false),  TIZEN_WEB_APPLICATION(false, true, false),  TIZEN_WEB_UIFW_APPLICATION(false, true, false),  TIZEN_WEB_UIBUILDER_APPLICATION(false, true, false);
  
  private boolean isNeededIconValidation;
  private boolean isRootPrj;
  private boolean isRefPrj;
  
  private TizenProjectType(boolean isNeededIconValidation, boolean isRootPrj, boolean isRefPrj)
  {
    this.isNeededIconValidation = isNeededIconValidation;
    this.isRootPrj = isRootPrj;
    this.isRefPrj = isRefPrj;
  }
  
  public boolean isNeededIconValidation()
  {
    return isNeededIconValidation;
  }
  
  public boolean isRootProject()
  {
    return isRootPrj;
  }
  
  public boolean isReferencedProject()
  {
    return isRefPrj;
  }
  
  public boolean isNativeProject()
  {
    switch (this)
    {
    case TIZEN_CPP_SERVICE_APPLICATION: 
    case TIZEN_CPP_SHAREDLIBRARY: 
    case TIZEN_CPP_STATICLIBRARY: 
    case TIZEN_CPP_UI_APPLICATION: 
    case TIZEN_CPP_UNITTEST: 
    case TIZEN_C_SERVICE_APPLICATION: 
    case TIZEN_C_SHAREDLIBRARY: 
    case TIZEN_C_STATICLIBRARY: 
    case TIZEN_C_UI_APPLICATION: 
    case TIZEN_PLATFORM_PROJECT: 
      return true;
    }
    return false;
  }
  
  public boolean isNativeApplicationProject()
  {
    switch (this)
    {
    case TIZEN_CPP_SERVICE_APPLICATION: 
    case TIZEN_CPP_SHAREDLIBRARY: 
    case TIZEN_CPP_UNITTEST: 
    case TIZEN_C_SERVICE_APPLICATION: 
    case TIZEN_C_UI_APPLICATION: 
      return true;
    }
    return false;
  }
  
  public boolean isNativeSharedLibraryProject()
  {
    switch (this)
    {
    case TIZEN_CPP_STATICLIBRARY: 
    case TIZEN_C_SHAREDLIBRARY: 
      return true;
    }
    return false;
  }
  
  public boolean isNativeStaticLibraryProject()
  {
    switch (this)
    {
    case TIZEN_CPP_UI_APPLICATION: 
    case TIZEN_C_STATICLIBRARY: 
      return true;
    }
    return false;
  }
  
  public boolean isNativeDebuggableProject()
  {
    switch (this)
    {
    case TIZEN_CPP_UNITTEST: 
    case TIZEN_C_SERVICE_APPLICATION: 
    case TIZEN_C_UI_APPLICATION: 
      return true;
    }
    return false;
  }
  
  public boolean isWebProject()
  {
    switch (this)
    {
    case TIZEN_WEB_APPLICATION: 
    case TIZEN_WEB_UIBUILDER_APPLICATION: 
    case TIZEN_WEB_UIFW_APPLICATION: 
      return true;
    }
    return false;
  }
  
  public boolean isPlatformProject()
  {
    switch (this)
    {
    case TIZEN_PLATFORM_PROJECT: 
      return true;
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.TizenProjectType
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common.classloader;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class AbstractClassSource
  implements ClassSource
{
  protected final Logger logger = LoggerFactory.getLogger(getClass());
  
  public InputStream getResourceAsStream(String path)
    throws IOException
  {
    logger.trace("Path :{}", path);
    URL url = getResource(path);
    logger.trace("URL :{}", url);
    
    return url.openStream();
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.classloader.AbstractClassSource
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common.classloader;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

public abstract interface ClassSource
{
  public abstract URL getResource(String paramString)
    throws IOException;
  
  public abstract InputStream getResourceAsStream(String paramString)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.tizen.common.classloader.ClassSource
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common.classloader;

import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class CompositeClassSource
  extends AbstractClassSource
  implements ClassSource
{
  protected final ArrayList<ClassSource> sources = new ArrayList();
  
  public CompositeClassSource(ClassSource... sources)
  {
    this.sources.addAll(Arrays.asList(sources));
  }
  
  public URL getResource(String path)
    throws IOException
  {
    for (ClassSource source : sources)
    {
      URL url = source.getResource(path);
      if (url != null) {
        return url;
      }
    }
    return null;
  }
  
  public Collection<URL> getResources(String path)
    throws IOException
  {
    ArrayList<URL> ret = new ArrayList();
    for (ClassSource source : sources) {
      if ((source instanceof CompositeClassSource))
      {
        ret.addAll(((CompositeClassSource)source).getResources(path));
      }
      else
      {
        URL url = source.getResource(path);
        if (url != null) {
          ret.add(url);
        }
      }
    }
    return ret;
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.classloader.CompositeClassSource
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common.classloader;

import java.io.IOException;
import java.net.URL;
import java.security.SecureClassLoader;
import java.util.Collections;
import java.util.Enumeration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CustomClassLoader
  extends SecureClassLoader
{
  protected Logger logger = LoggerFactory.getLogger(getClass());
  protected final ClassLoader parent;
  protected final CompositeClassSource source;
  
  public CustomClassLoader(ClassSource... sources)
  {
    this(null, sources);
  }
  
  public CustomClassLoader(ClassLoader parent, ClassSource... sources)
  {
    this.parent = parent;
    source = new CompositeClassSource(sources);
  }
  
  /* Error */
  protected Class<?> findClass(String name)
    throws java.lang.ClassNotFoundException
  {
    // Byte code:
    //   0: new 55	java/lang/StringBuilder
    //   3: dup
    //   4: aload_1
    //   5: bipush 46
    //   7: bipush 47
    //   9: invokevirtual 57	java/lang/String:replace	(CC)Ljava/lang/String;
    //   12: invokestatic 63	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   15: invokespecial 67	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   18: ldc 70
    //   20: invokevirtual 72	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   23: invokevirtual 76	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   26: astore_2
    //   27: aload_0
    //   28: aload_2
    //   29: invokevirtual 80	org/tizen/common/classloader/CustomClassLoader:findResource	(Ljava/lang/String;)Ljava/net/URL;
    //   32: astore_3
    //   33: aload_3
    //   34: ifnonnull +9 -> 43
    //   37: aload_0
    //   38: aload_1
    //   39: invokespecial 84	java/security/SecureClassLoader:findClass	(Ljava/lang/String;)Ljava/lang/Class;
    //   42: areturn
    //   43: aconst_null
    //   44: astore 4
    //   46: aload_3
    //   47: invokevirtual 86	java/net/URL:openStream	()Ljava/io/InputStream;
    //   50: astore 4
    //   52: aload 4
    //   54: invokestatic 92	org/tizen/common/util/IOUtil:getBytes	(Ljava/io/InputStream;)[B
    //   57: astore 5
    //   59: aload_0
    //   60: aload_1
    //   61: aload 5
    //   63: iconst_0
    //   64: aload 5
    //   66: arraylength
    //   67: invokevirtual 98	org/tizen/common/classloader/CustomClassLoader:defineClass	(Ljava/lang/String;[BII)Ljava/lang/Class;
    //   70: astore 7
    //   72: iconst_1
    //   73: anewarray 27	java/lang/Object
    //   76: dup
    //   77: iconst_0
    //   78: aload 4
    //   80: aastore
    //   81: invokestatic 102	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   84: aload 7
    //   86: areturn
    //   87: astore 5
    //   89: new 51	java/lang/ClassNotFoundException
    //   92: dup
    //   93: ldc 106
    //   95: aload 5
    //   97: invokespecial 108	java/lang/ClassNotFoundException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   100: athrow
    //   101: astore 6
    //   103: iconst_1
    //   104: anewarray 27	java/lang/Object
    //   107: dup
    //   108: iconst_0
    //   109: aload 4
    //   111: aastore
    //   112: invokestatic 102	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   115: aload 6
    //   117: athrow
    // Line number table:
    //   Java source line #76	-> byte code offset #0
    //   Java source line #77	-> byte code offset #27
    //   Java source line #79	-> byte code offset #33
    //   Java source line #81	-> byte code offset #37
    //   Java source line #84	-> byte code offset #43
    //   Java source line #87	-> byte code offset #46
    //   Java source line #88	-> byte code offset #52
    //   Java source line #89	-> byte code offset #59
    //   Java source line #97	-> byte code offset #72
    //   Java source line #98	-> byte code offset #78
    //   Java source line #89	-> byte code offset #84
    //   Java source line #92	-> byte code offset #87
    //   Java source line #94	-> byte code offset #89
    //   Java source line #97	-> byte code offset #101
    //   Java source line #98	-> byte code offset #109
    //   Java source line #99	-> byte code offset #115
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	118	0	this	CustomClassLoader
    //   0	118	1	name	String
    //   26	3	2	path	String
    //   32	15	3	url	URL
    //   44	66	4	in	java.io.InputStream
    //   57	8	5	bytes	byte[]
    //   87	9	5	e	IOException
    //   101	15	6	localObject	Object
    //   70	15	7	localClass	Class
    // Exception table:
    //   from	to	target	type
    //   46	72	87	java/io/IOException
    //   46	72	101	finally
    //   87	101	101	finally
  }
  
  public URL getResource(String name)
  {
    logger.trace("Resource Name :{}", name);
    
    URL url = findResource(name);
    if (url == null) {
      if (parent != null) {
        url = parent.getResource(name);
      }
    }
    return url;
  }
  
  public Enumeration<URL> getResources(String name)
    throws IOException
  {
    return Collections.enumeration(source.getResources(name));
  }
  
  protected URL findResource(String name)
  {
    logger.trace("Resource Name :{}", name);
    try
    {
      return source.getResource(name);
    }
    catch (IOException localIOException) {}
    return null;
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.classloader.CustomClassLoader
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common.classloader;

import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URL;

public class DirectoryClassSource
  extends AbstractClassSource
  implements ClassSource
{
  protected final File root;
  
  public DirectoryClassSource(String root)
  {
    this.root = new File(root);
  }
  
  public URL getResource(String path)
    throws IOException
  {
    File file = new File(root, path);
    if ((file.exists()) && (file.canRead())) {
      return file.toURI().toURL();
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.classloader.DirectoryClassSource
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common.classloader;

import java.io.IOException;
import java.net.URL;
import org.slf4j.Logger;
import org.tizen.common.util.Assert;

public class JarClassSource
  extends AbstractClassSource
  implements ClassSource
{
  protected final String url;
  
  public JarClassSource(String url)
  {
    logger.info("URL :{}", url);
    Assert.notNull(url);
    this.url = url;
  }
  
  public URL getResource(String path)
    throws IOException
  {
    logger.trace("Path :{}", path);
    URL u = new URL("jar", "", url + "!/" + path);
    
    logger.info("Provide url :{}", u);
    return u;
  }
}

/* Location:
 * Qualified Name:     org.tizen.common.classloader.JarClassSource
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common.config;

public enum ExpressionParser$Status
{
  ST_EXP,  ST_ESCAPE,  ST_VAR;
}

/* Location:
 * Qualified Name:     org.tizen.common.config.ExpressionParser.Status
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.common.config;

import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.HashMap;

public class ExpressionParser
{
  protected static final char CH_VAR = '$';
  protected static final char CH_VAR_OPEN = '{';
  protected static final char CH_VAR_CLOSE = '}';
  protected static final char CH_ESCAPE = '^';
  
  protected static enum Status
  {
    ST_EXP,  ST_ESCAPE,  ST_VAR;
  }
  
  protected static String parse(String exp)
  {
    Status status = Status.ST_EXP;
    if (exp == null) {
      return null;
    }
    StringReader reader = new StringReader(exp);
    StringWriter writer = new StringWriter();
    int ch = 0;
    
    StringWriter variableWriter = new StringWriter();
    try
    {
      HashMap<String, String> var2val = new HashMap();
      while ((ch = reader.read()) >= 0) {
        switch (status)
        {
        case ST_ESCAPE: 
          if (36 == ch)
          {
            ch = reader.read();
            if (123 == ch)
            {
              status = Status.ST_VAR;
              variableWriter = new StringWriter();
              continue;
            }
            writer.write(36);
          }
          else if (94 == ch)
          {
            status = Status.ST_ESCAPE;
          }
          break;
        case ST_EXP: 
          writer.write((char)ch);
          status = Status.ST_EXP;
          break;
        case ST_VAR: 
          if (125 == ch)
          {
            String variable = variableWriter.toString();
      
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

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-2017. Infinite Loop Ltd