# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1263838320 -7200 # Node ID 53c80e845d7c33f48aa711238ac0406629e40aae # Parent 3fd91c96c86cb20316c8ad9b76dcf316a8294370 Revision: v2.1.8 Kit: 201003 diff -r 3fd91c96c86c -r 53c80e845d7c bld.inf --- a/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ b/bld.inf Mon Jan 18 20:12:00 2010 +0200 @@ -2,7 +2,7 @@ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * @@ -11,15 +11,19 @@ * * Contributors: * -* Description: +* Description: Generated bld.inf -file * */ -#include "javacommons/bld.inf" -#include "javaruntimes/bld.inf" -#include "javauis/bld.inf" -#include "javamanager/bld.inf" -#include "javatools/bld.inf" -#include "javaextensions/bld.inf" -#include "java_plat/group/bld.inf" -#include "rom/bld.inf" +PRJ_PLATFORMS +default + +#include "javacommons/bld.inf" +#include "javaruntimes/bld.inf" +#include "javauis/bld.inf" +#include "javamanager/bld.inf" +#include "javatools/bld.inf" +#include "javaextensions/bld.inf" +#include "jrt_plat/group/bld.inf" +#include "build/bld.inf" +#include "build/stubsis/bld.inf" diff -r 3fd91c96c86c -r 53c80e845d7c group/bld.inf --- a/group/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ b/group/bld.inf Mon Jan 18 20:12:00 2010 +0200 @@ -20,7 +20,8 @@ // bld.inf of subprojects #ifdef __JAVA_STUBS #include "../java_stubs/group/bld.inf" -#include "../java_plat/group/bld.inf" +#include "../jrt_plat/group/bld.inf" #else -#include "../build/bld.inf" +#include "../build/bldjava.inf" +#include "../bld.inf" #endif // __JAVA_STUBS diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/group/bld.inf --- a/java_plat/group/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Includes all the Java Platform API specific bld.inf files, -* which export files. -* -*/ - -#include "../java_registry_api/build/bld.inf" -#include "../java_superd_parser_api/build/bld.inf" -#include "../java_env_info_api/build/bld.inf" -#include "../java_debug_api/build/bld.inf" diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_debug_api/build/bld.inf --- a/java_plat/java_debug_api/build/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for Java Debug API. -* -*/ -PRJ_EXPORTS - -#include - -../inc/javadebugapi.h APP_LAYER_PLATFORM_EXPORT_PATH(javadebugapi.h) -../inc/javadiagnostic.h APP_LAYER_PLATFORM_EXPORT_PATH(javadiagnostic.h) - diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_debug_api/inc/javadebugapi.h --- a/java_plat/java_debug_api/inc/javadebugapi.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Debug API -* -*/ - - -#ifndef JAVADEBUGAPI_H -#define JAVADEBUGAPI_H - -#include - -/** - * Java Debug API allows it's users to install, remove, start and - * stop Java applications. - * - * @lib javadebugapi.lib - * @since S60 v9.2 - */ - -namespace java -{ -namespace debug -{ - -/** - * Installs Java application. - * Java application is installed silently i.e. no prompts are shown to the user. - * @param[in] aFilename shall point to local JAD or JAR file - * @param[out] aSuiteUid returns the suite uid assigned to the application - * @param[out] aApplicationUid returns a list of application uids assigned to applications inside suite uid - * @capability TrustedUI - * @return true if installation is successful - */ -IMPORT_C TBool installApp(HBufC& aFilename, TUid& aSuiteUid, RArray& aApplicationUid); - -/** - * Uninstalls Java application. - * Java application is removed silently i.e. no prompts are shown to the user. - * If application uid is given then the application suite it belongs is removed too. - * @param[in] aUid application suite uid (or application uid) - * @capability TrustedUI - * @return true if application is uninstalled successfully - */ -IMPORT_C TBool uninstallApp(TUid aSuiteUid); - -/** - * Starts Java application. - * @param[in] aApplicationUid application uid - * @param[in] aUeiParameters includes arguments defined in Unified Emulator Interface (UEI) specification. - * If aUeiParameters contains unsupported options then those options are discarded silently. - * Supported arguments: - * -Xverbose[:options] - * -Xdebug -Xrunjdwp:name=value[,name=value[...]] - * For example, to start Java application in debug mode and set full tracing on - * following UIE arguments could be given: - * "-Xdebug -Xrunjdwp:server=y,address=localhost:8000 -Xverbose:all" - * @capability NetworkControl - * @return true if application is started - */ -IMPORT_C TBool startApp(TUid aApplicationUid, HBufC& aUeiParameters); - -/** - * Stops Java application. - * @param[in] aApplicationUid application uid - * @capability PowerMgmt - * @return true if application is stopped - */ -IMPORT_C TBool stopApp(TUid aApplicationUid); - -} // end namespace debug -} // end namespace java - -#endif // JAVADEBUGAPI_H diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_debug_api/inc/javadiagnostic.h --- a/java_plat/java_debug_api/inc/javadiagnostic.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Diagnostic API -* -*/ - - -#ifndef JAVADIAGNOSTIC_H -#define JAVADIAGNOSTIC_H - -#include - -namespace java -{ -namespace debug -{ - -/** -* DiagnosticListener will be called when Java Runtime outputs to standard out -* or makes log message. -* -* DiagnosticListener may not perform any long lasting or blocking tasks -* in the callback. -* -* Example below illustrates how Java Runtime outputs could be logged to file. -* -* @code -* class LoggingListener : public DiagnosticListener -* { -* public: -* virtual void systemOut(const TDesC8& aData) { flog(aData); }; -* virtual void systemErr(const TDesC8& aData) { flog(aData); }; -* virtual void log(const TDesC8& aData) { flog(aData); }; -* protected: -* virtual void flog(const TDesC8& aData) { -* RFileLogger::Write(KLogDirectory, KLogFileName, EFileLoggingModeAppendRaw, aData); -* }; -* } -* -* LoggingListener listener; -* JavaDiagnostic* jd = JavaDiagnostic::createInstance(); -* jd->setDiagnosticListener(listener); -* ... -* jd->removeDiagnosticListener(); -* delete jd; -* @endcode -*/ -class DiagnosticListener -{ -public: - /** - * Called when Java Runtime writes to the standard output stream - * @param[in] aText may contain multiple lines of data - */ - virtual void systemOut(const TDesC8& aText) = 0; - - /** - * Called when Java Runtime writes to the standard error stream - * @param[in] aText may contain multiple lines of data - */ - virtual void systemErr(const TDesC8& aText) = 0; - - /** - * Called when Java Runtime makes log writing - * @param[in] aText may contain multiple lines of data ending with newline - */ - virtual void log(const TDesC8& aText) = 0; -}; - - -/** -* Java Diagnostic can be used to monitor Java Runtime standard outs and -* log messages. -* -* DiagnosticListener should be set before making any Java Debug API operation, -* like installing or starting Java application, to ensure that all output -* is captured. -* -* There can be only one running Java Diagnostic instance in the system, i.e. -* instance with set listener. -* -* @code -* JavaDiagnostic* jd = JavaDiagnostic::createInstance(); -* jd->setDiagnosticListener(listener); -* ... -* jd->removeDiagnosticListener(); -* delete jd; -* @endcode -* -* @lib javadebugapi.lib -* @since S60 v9.2 -*/ -class JavaDiagnostic -{ -public: - virtual ~JavaDiagnostic() {}; - - /** - * Factory method for JavaDiagnostic. - * Returned pointer must be deleted once done using it. - * @return new JavaDiagnostic object - */ - IMPORT_C static JavaDiagnostic* createInstance(); - - /** - * Sets listener and starts monitoring Java Runtime standard outs and log - * messages. There can be only one running JavaDiagnostic instance in - * the system. - * @param[in] aListener will be called when Java Runtime outputs to standard out - * or makes log message - * @return KErrNone if listener was set and monitoring was started succesfully - * @return KErrAlreadyExists if JavaDiagnostic is already running or setDiagnosticListener - * is called twice without removing listener in between - */ - virtual TInt setDiagnosticListener(DiagnosticListener& aListener) = 0; - - /** - * Removes listener and stops monitoring Java Runtime standard outs and - * log messages. - */ - virtual void removeDiagnosticListener() = 0; -}; - -} // end namespace debug -} // end namespace java - -#endif // JAVADIAGNOSTIC_H diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_debug_api/java_debug_api.metaxml --- a/java_plat/java_debug_api/java_debug_api.metaxml Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - Java Debug API - Java Debug API allows it's users to install, remove, start and stop Java applications. Java application can be launched with Universal Emulator Interface (UEI) arguments that can be used to start JVM in debug mode. - c++ - javamanager - - - - - - no - no - - diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_env_info_api/build/bld.inf --- a/java_plat/java_env_info_api/build/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for Java Env Info API. -* -*/ -PRJ_EXPORTS - -#include - -../inc.s60/javadomainpskeys.h APP_LAYER_PLATFORM_EXPORT_PATH (javadomainpskeys.h) -../inc.s60/javadomainpskeys.h |../../../inc/javadomainpskeys.h -../inc.s60/javaenvinfo.h APP_LAYER_PLATFORM_EXPORT_PATH (javaenvinfo.h) -../inc.s60/javaenvinfo.h |../../../inc/javaenvinfo.h diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_env_info_api/inc.s60/javadomainpskeys.h --- a/java_plat/java_env_info_api/inc.s60/javadomainpskeys.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: javautils pskey definitions -* -*/ - -#ifndef JAVADOMAINPSKEY_H -#define JAVADOMAINPSKEY_H - -/** - * This header provides info about Java environment PS keys. - * - * During Java application installation the JavaInstaller updates the - * installation state to P&S keys. The states are changed as follows: - * - * Installation (or upgrade) begins: iUid = 0, iProgress = 0, iState = INSTALLING - * Installation proceeds: iUid = no_change, iProgress = xx%, iState = no_change - * Installation completes: iUid = suiteUid, iProgress = 100, iState = INSTALL_OK - * Installation fails: iUid = suiteUid, iProgress = 0, iState = INSTALL_FAIL - * - * Uninstallation begins: iUid = 0, iProgress = 0, iState = UNINSTALLING - * Uninstallation proceeds: iUid = no_change, iProgress = xx%, iState = no_change - * Uninstallation completes: iUid = suiteUid, iProgress = 100, iState = UNINSTALL_OK - * Uninstallation fails: iUid = suiteUid, iProgress = 0, iState = UNINSTALL_FAIL - * - * - * - * P&S keys that are updated: - * - * iUid ==> KPSUidJavaLatestInstallation - * iProgress ==> KPSUidJavaLatestInstallationProgress - * iState ==> KPSUidJavaLatestInstallationState - * - * Values for the P&S keys: - * - * INSTALLING = 0x100; - * INSTALL_OK = 0x101; - * INSTALL_FAIL = 0x102; - * UNINSTALLING = 0x200; - * UNINSTALL_OK = 0x201; - * UNINSTALL_FAIL = 0x202; - */ - -#ifndef KPSUidJavaLatestInstallation -/** PS flag for the most recent installed Java application. */ -#define KPSUidJavaLatestInstallation 0x10282567 -#endif - -#ifndef KPSUidJavaLatestInstallationProgress -/** PS flag for indicating JavaInstaller installation progress. */ -#define KPSUidJavaLatestInstallationProgress 0x20019546 -#endif - -#ifndef KPSUidJavaLatestInstallationState -/** PS flag for JavaInstaller latest installation state. */ -#define KPSUidJavaLatestInstallationState 0x20019547 -#endif - -#endif //JAVADOMAINPSKEY_H - diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_env_info_api/inc.s60/javaenvinfo.h --- a/java_plat/java_env_info_api/inc.s60/javaenvinfo.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java environment information utilities -* -*/ - -#ifndef JAVAENVINFO_H -#define JAVAENVINFO_H - -// INCLUDES -#include - -// CLASS DECLARATION - -namespace Java -{ -/** - * Class provides information about Java environment version. - * - * @lib javaenvinfo.lib - * @since S60 5.1 - */ -NONSHARABLE_CLASS(JavaEnvInfo) -{ -public: - - /** - * Returns the Java environment version - * - * @since S60 5.1 - * @return TVersion instance representing the Java environment version - */ - IMPORT_C static TVersion Version(); - - /** - * Returns the part of the user agent header describing the Java environment. - * This string can be used by Browser or any other HTTP client when sending - * HTTP requests to describe the supported Java environment. - * - * The returned string could be for example - * "Configuration/CLDC-1.1 Profile/MIDP-2.1". - * - * @since S60 5.1 - * @return User Agent header string. Caller is responsible for deleting - * this when done with it. - */ - IMPORT_C static HBufC* GetUserAgentHeaderL(); - - /** - * Returns the Java configuration and profile information in human - * readable format. - * - * The used format is ", " - as an example - * "MIDP 2.1, CLDC 1.1". - * - * @since S60 5.1 - * @return String in the format. Caller is responsible for deleting - * this when done with it. - */ - IMPORT_C static HBufC* GetPlatformInfoL(); -private: - - static TVersion JavaEnvInfo::GetJavaVersionL(); -}; - -} - -#endif //JAVAENVINFO_H diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_env_info_api/java_env_info_api.metaxml --- a/java_plat/java_env_info_api/java_env_info_api.metaxml Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - Java Environment Info API - This API provides information about the Java environment and events occurring within it - c++ - java_dom - - - - - - - - - no - no - - diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/build/bld.inf --- a/java_plat/java_registry_api/build/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API build file -* -*/ - -PRJ_EXPORTS - -#include - -../inc/javaregistryentry.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistryentry.h) -../inc/javaregistryapplicationentry.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistryapplicationentry.h) -../inc/javaregistryentrytype.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistryentrytype.h) -../inc/javaregistrypackageentry.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistrypackageentry.h) -../inc/javaregistryincludes.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistryincludes.h) -../inc/javaregistry.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistry.h) -../inc/javaattribute.h APP_LAYER_PLATFORM_EXPORT_PATH(javaattribute.h) -../inc/mjavaattribute.h APP_LAYER_PLATFORM_EXPORT_PATH(mjavaattribute.h) -../inc/appversion.h APP_LAYER_PLATFORM_EXPORT_PATH(appversion.h) -../inc/appversion.inl APP_LAYER_PLATFORM_EXPORT_PATH(appversion.inl) diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/appversion.h --- a/java_plat/java_registry_api/inc/appversion.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - -#ifndef TAPPVERSION_H -#define TAPPVERSION_H - -/** - * This class is used to represent the version of a Java application. - * The standard TVersion provided in Symbian OS can't be used because it - * doesn't allow for major and minor version numbers above 127. - */ -class TAppVersion -{ -public: - - /** - * This constructor creates a 0.0.0 version. - */ - inline TAppVersion(); - - /** - * This is the copy constructor. - * @param aAppVersion is the app version that will be copied - */ - inline TAppVersion(const TAppVersion& aAppVersion); - - /** - * This constructor creates a version according to the arguments. - * @param aMajor is the major version number - * @param aMinor is the minor version number - * @param aBuild is the micro version number - */ - inline TAppVersion(TInt aMajor, TInt aMinor, TInt aBuild); - - /** - * Assignment operator. - * @param aAppVersion is the app version to be assigned to the object - */ - inline TAppVersion& operator =(const TAppVersion& aAppVersion); - - /** - * Equality operator. - * @param aAppVersion is the app version to be compared with - * the object's app version - * @return ETrue if the app versions are the same, EFalse otherwise - */ - inline TBool operator ==(const TAppVersion& aAppVersion) const; - - /** - * Inequality operator. - * @param aAppVersion is the app version to be compared with - * the object's app version - * @return ETrue if the app versions are not the same, EFalse otherwise - */ - inline TBool operator !=(const TAppVersion& aAppVersion) const; - - /** - * Less than operator. - * @param aAppVersion is the app version to be compared with - * the object's app version - * @return ETrue if the app version to the left of the operator is less - * than the version to the right, EFalse otherwise - */ - inline TBool operator <(const TAppVersion& aAppVersion) const; - - /** - * Greater than operator. - * @param aAppVersion is the app version to be compared with - * the object's app version - * @return ETrue if the app version to the left of the operator is - * greater than the version to the right, EFalse otherwise - */ - inline TBool operator >(const TAppVersion& aAppVersion) const; - - /** - * Less or equal operator. - * @param aAppVersion is the app version to be compared with - * the object's app version - * @return ETrue if the app version to the left of the operator is - * less than or equal to the version to the right, EFalse otherwise - */ - inline TBool operator <=(const TAppVersion& aAppVersion) const; - - /** - * Greater or equal operator. - * @param aAppVersion is the app version to be compared with - * the object's app version - * @return ETrue if the app version to the left of the operator is - * greater than or equal to the version to the right, EFalse otherwise - */ - inline TBool operator >=(const TAppVersion& aAppVersion) const; - -public: - TInt iMajor; - TInt iMinor; - TInt iBuild; -}; - -#include - -#endif // TAPPVERSION_H - -// End of File diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/appversion.inl --- a/java_plat/java_registry_api/inc/appversion.inl Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - -#ifndef TAPPVERSIONINL_H -#define TAPPVERSIONINL_H - -TAppVersion::TAppVersion() - : iMajor(0), iMinor(0), iBuild(0) -{ -} - -TAppVersion::TAppVersion(const TAppVersion& aAppVersion) - : iMajor(aAppVersion.iMajor), iMinor(aAppVersion.iMinor), iBuild(aAppVersion.iBuild) -{ -} - -TAppVersion::TAppVersion(TInt aMajor, TInt aMinor, TInt aBuild) - : iMajor(aMajor), iMinor(aMinor), iBuild(aBuild) -{ -} - -TAppVersion& TAppVersion::operator =(const TAppVersion& aAppVersion) -{ - // Assignment operator using the copy constructor - return *new(this) TAppVersion(aAppVersion); -} - -TBool TAppVersion::operator ==(const TAppVersion& aAppVersion) const -{ - return ((iMajor == aAppVersion.iMajor) && - (iMinor == aAppVersion.iMinor) && - (iBuild == aAppVersion.iBuild)); -} - -TBool TAppVersion::operator !=(const TAppVersion& aAppVersion) const -{ - return !(*this == aAppVersion); -} - -TBool TAppVersion::operator <(const TAppVersion& aAppVersion) const -{ - return ((iMajor < aAppVersion.iMajor) || - ((iMajor == aAppVersion.iMajor) && (iMinor < aAppVersion.iMinor)) || - ((iMajor == aAppVersion.iMajor) && (iMinor == aAppVersion.iMinor) && - (iBuild < aAppVersion.iBuild))); -} - -TBool TAppVersion::operator >(const TAppVersion& aAppVersion) const -{ - return (aAppVersion < *this); -} - -TBool TAppVersion::operator <=(const TAppVersion& aAppVersion) const -{ - return !(*this > aAppVersion); -} - -TBool TAppVersion::operator >=(const TAppVersion& aAppVersion) const -{ - return !(*this < aAppVersion); -} - -#endif // TAPPVERSIONINL_H - -//End of File diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/javaattribute.h --- a/java_plat/java_registry_api/inc/javaattribute.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - - -#ifndef CJAVAATTRIBUTE_H -#define CJAVAATTRIBUTE_H - - -#include -#include "mjavaattribute.h" - -/** - * This class is used to access Java application attributes. - * In case of MIDlets, these attributes are defined in - * Java Application Descriptor (JAD) and JAR manifest files. - */ -namespace Java -{ -class CJavaAttribute: public CBase, public MJavaAttribute -{ -public: - - IMPORT_C virtual ~CJavaAttribute(); - - /** - * Construct a new attribute using the given name, value and trusted - * - * @since S60 v5.0 - * @param aName is attribute name - * @param aValue is attribute value - * @param aTrusted is true if attribute can be trusted. - * @return a new CJavaAttribute object - */ - IMPORT_C static CJavaAttribute* NewL(const TDesC& aName, const TDesC& aValue, TBool aTrusted); - /** - * Construct a new attribute using the given name, value and trusted - * and leaves the object on the cleanup stack - * - * @since S60 v5.0 - * @param aName is attribute name - * @param aValue is attribute value - * @param aTrusted is true if attribute can be trusted - * @return a new CJavaAttribute object - */ - IMPORT_C static CJavaAttribute* NewLC(const TDesC& aName, const TDesC& aValue, TBool aTrusted); - - /** - * from MJavaAttribute - */ -public: - virtual const TDesC& Name() const; - virtual const TDesC& Value() const; - virtual TBool Trusted() const; - - -private: - /** - * ConstructL - * - * @since S60 v5.0 - * @param aName - * @param aValue - * @param aTrusted - */ - void ConstructL(const TDesC& aName, const TDesC& aValue, TBool aTrusted); - -private: - /** - * Attribute name - */ - HBufC* iName; - /** - * Attribute value - */ - HBufC* iValue; - /** - * this value indicate, if attribute is trusted (= signed JAR file + - * attribute present in JAR manifest) or not - */ - TBool iTrusted; -}; -} // namespace Java - -#endif // CJAVAATTRIBUTE_H - - -// End of File diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/javaregistry.h --- a/java_plat/java_registry_api/inc/javaregistry.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The main class of Java Registy API. Java Registy API -* can be used to query the installed Java applications -* and their properties. -* -*/ - - - -// JAVAREGISTRY.H -#ifndef __JAVAREGISTRY_H -#define __JAVAREGISTRY_H - -#include -#include "javaregistryentrytype.h" - - -namespace Java -{ -namespace Manager -{ -namespace Registry -{ - -// FORWARD DECLARATION -class CWriteableJavaRegistry; - -}// namespace Registry -}// namespace Manager -}// namespace Java - -namespace Java -{ -class CJavaRegistryEntry; - -/** - * This class provides the Platform API for JavaRegistry. - * It allows for clients to retrieve properties of - * Java install packages, applications, services etc. - * - * @lib javaregistryclient.lib - * @since S60 v3.2 - */ -class CJavaRegistry : public CBase -{ - - // Constructors -public: - - /** - * Creates a CJavaRegistry object. - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @return A pointer to a CJavaRegistry object. - * Caller takes over the ownership of the object being - * transferred. - */ - IMPORT_C static CJavaRegistry* NewL(); - - /** - * Creates a CJavaRegistry object. - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @return A pointer to a CJavaRegistry object. - * Caller takes over the ownership of the object being - * transferred. - */ - IMPORT_C static CJavaRegistry* NewLC(); - - -public: - - // Generic methods - - /** - * Returns whether registry entry with the specified Uid exists. - * Registry entries representing entities installed on - * removable media which are currently not present in the device - * are considered as not existent. - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @param aUid The Uid to be checked. - * @return ETrue if the registry entry exists, EFalse otherwise. - */ - IMPORT_C TBool RegistryEntryExistsL(const TUid& aUid) const; - - /** - * Returns an array of Uids of the existing registry entries. - * Uids of registry entries representing entities installed on - * removable media which are currently not present in the device - * are not returned. - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @param aUids [out] Uids of the registry entries. - */ - IMPORT_C void GetRegistryEntryUidsL(RArray& aUids) const; - - /** - * Returns an array of Uids of the existing registry entries. - * Entries are searched by the specified type. - * Uids of registry entries representing entities installed on - * removable media which are currently not present in the device - * are not returned. - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @param aType Type of registry entries whose Uids are to be returned. - * @param aUids [out] Uids of the matching registry entries. - */ - IMPORT_C void GetRegistryEntryUidsL - (TJavaRegistryEntryType aType, RArray& aUids) const; - - /** - * Returns the corresponding registry entry for a given Uid. - * The returned entry can be casted to the appropriate subclass - * according to the type property. If type is in the package range - * ( EGeneralPackage <= entryType < EGeneralApplication ), it can - * be casted to CJavaRegistryPackageEntry, and if type is - * in the application range ( EGeneralApplication <= entryType ), - * it can be casted to CJavaRegistryApplicationEntry. - * Registry entries representing entities installed on - * removable media which are currently not present in the device - * are not returned. - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @param aUid The Uid of the entry to be retrieved - * @return The returned registry entry or null if registry entry - * not found. Caller takes over the ownership of the object - * being transferred. - */ - IMPORT_C CJavaRegistryEntry* RegistryEntryL(const TUid& aUid) const; - - // Destructor - /** - * CJavaRegistry::~CJavaRegistry destructor - * - * @since S60 v3.2 - */ - virtual ~CJavaRegistry(); - -private: - - // Constructor - - /** - * CJavaRegistry::CJavaRegistry constructor - * - * @since S60 v3.2 - */ - CJavaRegistry(); - - // 2nd phase constructor - - /** - * CJavaRegistry::ConstructL method - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - */ - void ConstructL(); - -private: // Data - - - /** - * CJavaRegistry::iJavaReg member - * Pointer Owned - * @since S60 v3.2 - */ - Java::Manager::Registry::CWriteableJavaRegistry* iJavaReg; - -}; - -}// namespace Java - -#endif // __JAVAREGISTRY_H diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/javaregistryapplicationentry.h --- a/java_plat/java_registry_api/inc/javaregistryapplicationentry.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - - -#ifndef JAVAREGISTRYAPPLICATIONENTRY_H -#define JAVAREGISTRYAPPLICATIONENTRY_H - -#include -#include -#include -#include "javaregistryentry.h" -#include "javaregistryentrytype.h" - -namespace Java -{ -namespace Manager -{ -namespace Registry -{ - -// FORWARD DECLARATION -class CWriteableJavaRegistryApplicationEntry; - -}// namespace Registry -}// namespace Manager - -// FORWARD DECLARATION -class CJavaRegistryPackageEntry; - -/** - * This subclass of CJavaRegistryEntry supports attributes - * for single application, that can't contain embedded entries. - * - * @lib javaregistryclient.lib - * @since S60 v3.2 - */ -class CJavaRegistryApplicationEntry : public CJavaRegistryEntry -{ -public: - - - /** - * CJavaRegistryApplicationEntry::CJavaRegistryApplicationEntry - * constructor - * - * @since S60 v3.2 - * @param aWritableEntry Pointer to a writable entry, to delegate - * getter methods. Pointer ownership taken. - */ - CJavaRegistryApplicationEntry(Java::Manager::Registry:: - CWriteableJavaRegistryApplicationEntry* aWritableEntry); - - /** - * Tells if this application is startable. - * - * @since S60 v3.2 - * @return ETrue if the application is startable, EFalse otherwise. - * Default value if not set: ETrue. - */ - IMPORT_C TBool IsStartable() const; - - /** - * Tells if this application must be shown in Application Shell or - * it must rather be hidden. - * - * @since S60 v3.2 - * @return ETrue if the application is shown in Application Shell, - * EFalse otherwise. - * Default value if not set: ETrue. - */ - IMPORT_C TBool IsVisible() const; - - /** - * Tells if the end user can not uninstall this application. - * - * @since S60 v3.2 - * @return ETrue if the application is resident, EFalse otherwise. - * Default value if not set: EFalse. - */ - IMPORT_C TBool IsResident() const; - - /** - * Gets the group name of this application. This property tells in - * which folder the application icon shall appear. It can be a - * null-string: in that case the Installed folder will be hosting - * midlet icons. - * - * @since S60 v3.2 - * @return Group name of this application. - * Default value if not set: - */ - IMPORT_C const TDesC& GroupName() const; - - /** - * Gets a reference to the install package entry, which is the parent - * of this application. E.g. if this entry represents a MIDlet this - * method returns a reference to the corresponding MIDlet Suite entry. - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @return a CJavaRegistryEntry object. Caller takes over the - * ownership of the object being transferred. - */ - IMPORT_C CJavaRegistryPackageEntry* PackageEntryL() const; - -protected: - - /** - * CJavaRegistryApplicationEntry::WritableEntry method returns the member - * of the parent class, but first casts it to - * CWriteableJavaRegistryApplicationEntry. - * - * @since S60 v3.2 - * @return Returns the member of this class. - */ - Java::Manager::Registry:: - CWriteableJavaRegistryApplicationEntry* WritableEntry() const; - -}; - -} // namespace Java - -#endif // JAVAREGISTRYAPPLICATIONENTRY_H diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/javaregistryentry.h --- a/java_plat/java_registry_api/inc/javaregistryentry.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - - -#ifndef JAVAREGISTRYENTRY_H -#define JAVAREGISTRYENTRY_H - -#include -#include -#include -#include "javaregistryentrytype.h" -#include "javaattribute.h" - - -namespace Java -{ -namespace Manager -{ -namespace Registry -{ - -// FORWARD DECLARATION -class CWriteableJavaRegistryEntry; - -}// namespace Registry -}// namespace Manager - -/** - * This class provides the Domain API for entries in JavaRegistry. - * This class is intended for further derivation. - * It supports only those attributes which exist in all types of - * entries. - * - * @lib javaregistryclient.lib - * @since S60 v3.2 - */ -class CJavaRegistryEntry : public CBase -{ -public: - - /** - * Gets the Uid of this registry entry. - * - * @since S60 v3.2 - * @return A TUid object. - */ - IMPORT_C TUid Uid() const; - - /** - * Gets the type of this registry entry. - * Enumeration TJavaRegistryEntryType defines the currently possible - * options. Mandatory property. - * - * @since S60 v3.2 - * @return Type of this registry entry. - */ - IMPORT_C TJavaRegistryEntryType Type() const; - - /** - * Gets the drive letter where the content of the installation package - * has been installed. - * - * @since S60 v3.2 - * @return Drive letter where the content of the installation package - * has been installed. - * Default value if not set: EDriveC. - */ - IMPORT_C TDriveNumber Drive() const; - - /** - * Gets the name of the entity (midlet, suite, etc.) this entry - * represents. - * - * @since S60 v3.2 - * @return Name of the entity this entry represents. - * Default value if not set: KNullDesC. - */ - IMPORT_C const TDesC& Name() const; - - /** - * Returns the number of certificate chains belonging to the entity - * this entry represents. - * - * @since S60 v3.2 - * @return Number of certificate chains. - */ - IMPORT_C TInt NumberOfCertificateChains() const; - - /** - * Returns the n-th certificate chain of the entity this entry - * represents consisting of X.509 version 3 certificates - * in their DER encoded format concatenated together - * without any separators. - * All certificate chains are returned indifferent if they could be - * validated or not. - * This format is directly suitable to be used with - * function CX509CertChain::DecodeCertsL(). - * - * @since S60 v3.2 - * @param aChain Zero-based index of the certificate chain to be - * retrieved. - * @return N-th certificate chain - * Default value if not set: KNullDesC8. - */ - IMPORT_C const TDesC8& CertificateChain(TInt aChain) const; - - /** - * Returns the content id of the entity this entry represents. - * The content id can be used to check if a DRM protected entity - * has enough right to be launched or not. - * The method can also be used to check if the entity is DRM - * protected or not. - * - * @since S60 v3.2 - * @return Content id of the entity this entry represent or - * KNullDesC if the entity is not DRM protected. - */ - IMPORT_C const TDesC& DrmContentId() const; - - /** - * CJavaRegistryEntry::~CJavaRegistryEntry method - * Destructor - * - * @since S60 v3.2 - */ - IMPORT_C ~CJavaRegistryEntry(); - - /** - * CJavaRegistryEntry::Attribute method gets the - * additional attribute. - * - * @since S60 v5.0 - * @param aName The name the searched attribute. - * @return MJavaAttribute poiter to instance, which contain attribute. - * If attribute doesn't exist return NULL. - */ - IMPORT_C const MJavaAttribute* - CJavaRegistryEntry::AttributeL(const TDesC& aName) const; - - /** - * CJavaRegistryEntry::Attributes method gets the - * array of additional attributes. - * - * @since S60 v5.0 - * @return RPointerArray& with all additional attributes. - */ - IMPORT_C const RPointerArray& - CJavaRegistryEntry::AttributesL() const; - -protected: - - /** - * CJavaRegistryEntry::CJavaRegistryEntry constructor - * - * @since S60 v3.2 - * @param aWritableEntry Pointer to a writable entry, to delegate - * getter methods. Pointer ownership taken. - */ - CJavaRegistryEntry(Java::Manager::Registry:: - CWriteableJavaRegistryEntry* aWritableEntry); - - /** - * CJavaRegistryEntry::WritableEntry method returns the member - * of this class; - * - * @since S60 v3.2 - * @return Returns the member of this class. - */ - Java::Manager::Registry:: - CWriteableJavaRegistryEntry* WritableEntry() const; - -protected: // Data - - - /** - * CJavaRegistryEntry::iWritableEntry member - * Pointer Owned - * - * @since S60 v3.2 - */ - Java::Manager::Registry::CWriteableJavaRegistryEntry* iWritableEntry; - -private: // Data - - - RPointerArray iAttributes; - -}; - -} // namespace Java - -#endif // JAVAREGISTRYENTRY_H diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/javaregistryentrytype.h --- a/java_plat/java_registry_api/inc/javaregistryentrytype.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - - -#ifndef JAVAREGISTRYENTRYTYPE_H -#define JAVAREGISTRYENTRYTYPE_H - -namespace Java -{ - -/** - * This enumeration lists Java Registry Entry types. - */ -enum TJavaRegistryEntryType -{ - // EGeneralPackage defines the starting value of the range including - // the ids of entry types which are considered as package entries - EGeneralPackage = 100, - EMidp2MidletSuite = 101, - EDeploymentPackage = 102, // OSGi Deployment Package - EBundle = 103, - EOsgiAwareMidletSuite = 104, // OSGi Aware Midlet Suite - - // EGeneralApplication defines the starting value of the range including - // the ids of entry types which are considered as application entries - EGeneralApplication = 200, - EMidp2Midlet = 201, - EOsgiService = 202, - EOsgiAwareMidlet = 203, // OSGi Aware Midlet Application - EERCP = 204 // eRCP Application -}; - -} - -#endif diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/javaregistryincludes.h --- a/java_plat/java_registry_api/inc/javaregistryincludes.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - - -#ifndef JAVAREGISTRYDOMAINAPI_H -#define JAVAREGISTRYDOMAINAPI_H - -#include "javaregistry.h" -#include "javaregistryentry.h" -#include "javaregistrypackageentry.h" -#include "javaregistryapplicationentry.h" - -#endif // JAVAREGISTRYDOMAINAPI_H diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/javaregistrypackageentry.h --- a/java_plat/java_registry_api/inc/javaregistrypackageentry.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,200 +0,0 @@ -/* -* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - - -#ifndef JAVAREGISTRYPACKAGEENTRY_H -#define JAVAREGISTRYPACKAGEENTRY_H - -#include -#include -#include -#include "javaregistryentry.h" -#include "javaregistryentrytype.h" - -// FORWARD DECLARATION -class TAppVersion; - -namespace Java -{ -namespace Manager -{ -namespace Registry -{ - -// FORWARD DECLARATION -class CWriteableJavaRegistryPackageEntry; - -}// namespace Registry -}// namespace Manager - - -/** - * This subclass of CJavaRegistryEntry supports attributes - * for packages, that can contain embedded entries. - * - * @lib javaregistryclient.lib - * @since S60 v3.2 - */ -class CJavaRegistryPackageEntry : public CJavaRegistryEntry -{ -public: - - - /** - * CJavaRegistryPackageEntry::CJavaRegistryPackageEntry constructor - * - * @since S60 v3.2 - * @param aWritableEntry Pointer to a writable entry, to delegate - * getter methods. Pointer ownership taken. - */ - CJavaRegistryPackageEntry(Java::Manager::Registry:: - CWriteableJavaRegistryPackageEntry* aWritableEntry); - - /** - * Gets the version of Java entity represented by this package entry. - * - * @since S60 v3.2 - * @return A TAppVersion object. - * Default value if not set: TAppVersion( 0, 0, 0 ). - */ - IMPORT_C TAppVersion Version() const; - - /** - * Gets the vendor name of the Java entity represented by this - * package entry. - * - * @since S60 v3.2 - * @return Vendor name of the Java entity. - * Default value if not set: KNullDesC. - */ - IMPORT_C const TDesC& Vendor() const; - - - /** - * Tells if the Java entity represented by this package entry - * is uninstallable. - * - * @since S60 v3.2 - * @return ETrue if the entity is uninstallable, EFalse otherwise. - * Default value if not set: ETrue. - */ - IMPORT_C TBool IsUninstallable() const; - - /** - * Returns an array of Uids associated with the Java entity - * represented by this package entry. - * E.g. if this entry represents a MIDlet suite this method returns - * an array of MIDlet Uids. - * - * @since S60 v3.2 - * @param aUids [out] Returns Uids of the embedded entries. - */ - IMPORT_C void GetEmbeddedEntries(RArray& aUids) const; - - /** - * Gets the number of embedded entries in Java entity represented - * by this package entry. - * - * @since S60 v3.2 - * @return the number of embedded entries - */ - IMPORT_C TInt NumberOfEmbeddedEntries() const; - - /** - * Returns the corresponding embedded entry for the given Uid. - * The returned entry can be casted to the appropriate subclass - * according to the type property. If type is in the package range - * ( EGeneralPackage <= entryType < EGeneralApplication ), it can - * be casted to CJavaRegistryPackageEntry, and if type is - * in the application range ( EGeneralApplication <= entryType ), - * it can be casted to CJavaRegistryApplicationEntry. - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @param aAppUid The Uid of the embedded entry to be retrieved - * @return The returned embedded entry or null if entry is not found. - * Caller takes over the ownership of the object being - * transferred. - */ - IMPORT_C CJavaRegistryEntry* - EmbeddedEntryByUidL(const TUid& aEntryUid) const; - - /** - * Returns an embedded entry specified by a zero-based index. - * There is not any guaranteed order for embedded entries inside this - * package entry. - * The returned entry can be casted to the appropriate subclass - * according to the type property. If type is in the package range - * ( EGeneralPackage <= entryType < EGeneralApplication ), it can - * be casted to CJavaRegistryPackageEntry, and if type is - * in the application range ( EGeneralApplication <= entryType ), - * it can be casted to CJavaRegistryApplicationEntry. - * - * The function may leave with one of the system-wide error codes. - * - * @since S60 v3.2 - * @param aAppNum Zero-based index of the embedded entry to be - * retrieved. - * @return The returned embedded entry or null if entry is not found. - * Caller takes over the ownership of the object being - * transferred. - */ - IMPORT_C CJavaRegistryEntry* - EmbeddedEntryByNumberL(TInt aEntryNum) const; - - /** - * Returns the amount of disk space taken by the installed application. - * - * @since S60 v5.1 - * @return Returns the size of used disk space in bytes. - */ - IMPORT_C TInt64 UsedUserDiskSpace() const; - - /** - * Tells if the application package is pre-installed. - * - * If a pre-installed application package is upgraded, - * it remains marked as pre-installed. - * - * If a pre-installed application package is uninstalled - * and later installed again, it is no more marked as - * pre-installed. - * - * @since S60 v5.1 - * @return ETrue if the application suite is pre-installed, - * EFalse otherwise. - */ - IMPORT_C TBool IsPreinstalled() const; - -protected: - - /** - * CJavaRegistryPackageEntry::WritableEntry method returns the member - * of the parent class, but first casts it to - * CWriteableJavaRegistrypackageEntry. - * - * @since S60 v3.2 - * @return Returns the member of this class. - */ - Java::Manager::Registry:: - CWriteableJavaRegistryPackageEntry* WritableEntry() const; - -}; - -} // namespace Java - -#endif // JAVAREGISTRYPACKAGEENTRY_H diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/inc/mjavaattribute.h --- a/java_plat/java_registry_api/inc/mjavaattribute.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Java Registy API header file -* -*/ - - -#ifndef MJAVAATTRIBUTE_H -#define MJAVAATTRIBUTE_H - - -#include - -/** - * This interface is used to access Java application attributes. - * In case of MIDlets, these attributes are defined in - * Java Application Descriptor (JAD) and JAR manifest files. - */ -namespace Java -{ -class MJavaAttribute -{ -public: - /** - * This method returns name of attribute - * - * Since S60 v5.0 - */ - virtual const TDesC& Name() const = 0; - /** - * This method returns attribute's value - * - * Since S60 v5.0 - */ - virtual const TDesC& Value() const = 0; - /** - * This method returns if attribut is trusted or not (attribute is trusted if - * JAR file is signed and attribute is present in JAR manifest) - * - * Since S60 v5.0 - */ - virtual TBool Trusted() const = 0; - - virtual ~MJavaAttribute() {}; - - - -}; -} // namespace Registry - -#endif // MJAVAATTRIBUTE_H - - -// End of File diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_registry_api/java_registry_api.metaxml --- a/java_plat/java_registry_api/java_registry_api.metaxml Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - Java Registry API - Provides functionality to get information about installed Java applications and installation packages. - c++ - javamanager - - - - - - - - - no - no - - diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_superd_parser_api/build/bld.inf --- a/java_plat/java_superd_parser_api/build/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for Java DRM Utils API. -* -*/ - - - -PRJ_EXPORTS - -#include - -../inc/javasuperdparser.h APP_LAYER_PLATFORM_EXPORT_PATH(javasuperdparser.h) - -PRJ_EXPORTS diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_superd_parser_api/inc/javasuperdparser.h --- a/java_plat/java_superd_parser_api/inc/javasuperdparser.h Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,344 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CJavaSuperDParser definition. -* -*/ - - -#ifndef C_JAVASUPERDPARSER_H -#define C_JAVASUPERDPARSER_H - -#include -#include -#include -#include - -class CZipFile; -class CZipFileMember; - -namespace Java -{ - -/** - * CJavaSuperDParser includes methods for parsing SuperD packages. - * - * This class includes methods for creating a superdistributable JAR - * package and also methods for parsing a superdistributable JAR - * package when installing it. - * - * A superdistributable JAR package is in uncompressed ZIP format - * containing: - * -# a manifest file (META-INF/MANIFEST.MF), - * -# a JAD file and - * -# either a plaintext JAR file or a JAR file in DCF. - * - * The manifest file must have the following attributes: - * -# Distribution-Package: <SuperD version number> - * -# Distribution-Descriptor-Filename: <JAD file name> - * -# Distribution-Content-Filename: <JAR file name> - * - * To create a superdistributable jar package use the static method - * CreateSuperDPackageL: - * @code - * using namespace Java; - * CJavaSuperDParser::CreateSuperDPackageL( RFs& aFileSession, - * const TDesC& aDestinationFileName, - * const TDesC& aJadFileName, - * const TDesC& aJarFileName ); - * @endcode - * - * To parse a superdistributable jar package: - * @code - * using namespace Java; - * CJavaSuperDParser* parser( NULL ); - * TRAPD( err, parser = CJavaSuperDParser::NewL( aFileSession, - * KSuperDFile, - * KDestinationDir ) ); - * if ( !err ) - * { - * // Now you know that KSuperDFile is a superdistributable package. - * // JAD and JAR file have been written in KDestinationDir. - * } - * delete parser; - * @endcode - * - * CJavaSuperDParser was renamed from CJcfSuperDParser. - * - * @lib javadrmutils.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CJavaSuperDParser) : public CBase -{ - -public: - - /** - * First phase constructor. Creates a CJavaSuperDParser object, parses - * the SuperD package and extracts its contents to the specified - * folder. - * - * @since S60 v3.2 - * @param aFileSession File session handle to be used by this object - * @param aJarFileName Filename of the file containing SuperD - * package - * @param aDestinationFolder Folder where descriptor and content - * files will be saved - * @return The newly created CJavaSuperDParser object handle - * @leave KErrCorrupt If supplied file is not a SuperD package - */ - IMPORT_C static CJavaSuperDParser* NewL(RFs& aFileSession, - const TDesC& aJarFileName, - const TDesC& aDestinationFolder); - - /** - * First phase constructor. Creates a CJavaSuperDParser object, parses - * the SuperD package and extracts its contents to the specified - * folder. - * - * @since S60 v3.2 - * @param aFileSession File session handle to be used by this object - * @param aJarFileHandle File handle of the file containing SuperD - * package - * @param aDestinationFolder Folder where descriptor and content - * files will be saved - * @return The newly created CJavaSuperDParser object handle - * @leave KErrCorrupt If supplied file is not a SuperD package - */ - IMPORT_C static CJavaSuperDParser* NewL(RFs& aFileSession, - RFile& aJarFileHandle, - const TDesC& aDestinationFolder); - - /** - * Destructor. Frees allocated resources. - * - * @since S60 v3.2 - */ - virtual ~CJavaSuperDParser(); - - /** - * Creates a superdistribution package from the given JAD and JAR file. - * - * @since S60 v3.2 - * @param aFileSession File session handle to be used by this object - * @param aDestinationFileName Filename of the destination SuperD - * package. - * @param aDescriptorFileName JAD file name - * @param aContentFileName JAR file name - */ - IMPORT_C static void CreateSuperDPackageL(RFs& aFileSession, - const TDesC& aDestinationFileName, - const TDesC& aDescriptorFileName, - const TDesC& aContentFileName); - - /** - * Returns the name of the JAD file in the SuperD package parsed by - * this object. - * - * @since S60 v3.2 - * @return Descriptor file name - */ - IMPORT_C TFileName DescriptorFileName() const; - - /** - * Returns the name of the JAR file in the SuperD package parsed by - * this object. - * - * @since S60 v3.2 - * @return Content file name - */ - IMPORT_C TFileName ContentFileName() const; - -private: - - /** - * Private C++ constructor. - * - * @since S60 v3.2 - * @param aFileSession File session handle to be used by this object - */ - CJavaSuperDParser(RFs& aFileSession); - - /** - * Second phase Symbian constructor. Extracts the contents of the - * SuperD package into the destination folder. - * - * @since S60 v3.2 - * @param aJarFileName File name of SuperD package in the files system - * @param aDestinationFolder Files from the package will be extracted - * here. - * @leave KErrCorrupt If supplied file is not a SuperD package - */ - void ConstructL(const TDesC& aJarFileName, - const TDesC& aDestinationFolder); - - /** - * Second phase Symbian constructor. Checks and extracts the contents - * of the SuperD package into the destination folder with - * ParseZipFileL. - * - * @since S60 v3.2 - * @param aJarFileHandle File handle to the SuperD package - * @param aDestinationFolder Files from the package will be extracted - * here. - * @leave KErrCorrupt If supplied file is not a SuperD package - */ - void ConstructL(RFile& aJarFileHandle, - const TDesC& aDestinationFolder); - - /** - * Calculates the CRC of a given file according to zip specification. - * - * @since S60 v3.2 - * @param aFile File to calculate the CRC for - * @return CRC value - */ - static TUint32 CalculateCRC(RFile& aFile); - - /** - * Creates and writes the MANIFEST.MF file for the SuperD package. - * The manifest file contains the following three lines: - * -# Distribution-Package: <SuperD version number> - * -# Distribution-Descriptor-Filename: <JAD file name> - * -# Distribution-Content-Filename: <JAR file name> - * - * This function creates a META-INF/MANIFEST.MF (in the META-INF - * directory inside the SuperD JAR file with the structure above, - * and writes it to a RWriteStream with WriteEntryAndUpdateIndexL. - * - * @since S60 v3.2 - * @param aFileSession File session handle to be used by this object - * @param aStream File write stream where the manifest file will be - * written - * @param aCurrentOffset Offset where to start to write in the write - * stream - * @param aZipIndex The zip file index - * @param aRelativeJadFileName Name of the JAD file with relative path - * @param aRelativeJarFileName Name of the JAR file with relative path - */ - static void CreateAndWriteManifestL(RFs& aFileSession, - RWriteStream& aStream, - TInt& aCurrentOffset, - HBufC8*& aZipIndex, - const TDesC8& aRelativeJadFileName, - const TDesC8& aRelativeJarFileName); - /** - * Writes an entry (file or directory) to the zip file stream and - * updates the zip file index. - * - * @since S60 v3.2 - * @param aFileSession File session handle to be used by this object - * @param aStream ZIP file write stream where the entry will be written - * @param aCurrentOffset Offset where to start to write - * @param aZipIndex The zip file index - * @param aRelativeFileName Relative name of the entry inside the ZIP - * file - * @param aFileName Name of the file in the file system which will be - * written in the ZIP file. Use NULL to create a directory. - */ - static void WriteEntryAndUpdateIndexL(RFs& aFileSession, - RWriteStream& aStream, - TInt& aCurrentOffset, - HBufC8*& aZipIndex, - const TDesC8& aRelativeFileName, - const TDesC* aFileName); - /** - * Writes the ZIP index entry to the ZIP output stream. The ZIP index - * should be the last entry in the ZIP file. - * - * @since S60 v3.2 - * @param aStream ZIP file write stream where the entry will be written - * @param aCurrentOffset Offset where to start to write - * @param aZipIndex The zip file index which will be written in the stream - */ - static void WriteIndexL(RWriteStream& aStream, - TInt aCurrentOffset, - const HBufC8* aZipIndex); - - /** - * Checks and parses the contents of the SuperD package. - * - * @since S60 v3.2 - * @param aDestinationFolder Files from the package will be extracted - * here. - */ - void ParseZipFileL(const TDesC& aDestinationFolder); - - /** - * Checks from the manifest file that this is a SuperD package. - * Extracts the JAD and JAR file name from the manifest file in the - * SuperD package and checks wether the package version is compatible - * with the parser. - * - * @since S60 v3.2 - * @param aManifest The manifest file entry in the ZIP file. - */ - void ParseManifestL(CZipFileMember* aManifest); - - /** - * Extracts the JAD and the JAR file from the SuperD package to the - * destination folder. - * - * @since S60 v3.2 - * @param aDestinationFolder Destination folder name. - */ - void WriteFileL(const TDesC& aDestinationFolder); - -private: // data - - /** - * File session handle to be used by this object. - * Not own. - */ - RFs& iFileSession; - - /** - * Zip file object. - * Own. - */ - CZipFile* iZipFile; - - /** - * JAD file entry in the SuperD package. - * Own. - */ - CZipFileMember* iJadMember; - - /** - * JAR file entry in the SuperD package. - * Own. - */ - CZipFileMember* iJarMember; - - /** - * Shows wether there is a valid manifest file in the package. - */ - TBool iManifestFound; - - /** - * Name of the JAD file in the SuperD package. - */ - TFileName iDescriptorFileName; - - /** - * Name of the JAR file in the SuperD package. - */ - TFileName iContentFileName; - -}; - -} - -#endif // C_JAVASUPERDPARSER_H - -// End of File diff -r 3fd91c96c86c -r 53c80e845d7c java_plat/java_superd_parser_api/java_superd_parser_api.metaxml --- a/java_plat/java_superd_parser_api/java_superd_parser_api.metaxml Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - Java SuperD Parser API - Provides functionality to create and parse superdistributable JAR packages. There is a special JAR package format for Java applications. This format is used when end users send DRM protected java applications to each other. Superdistributable package includes Java application in encrypted format. The decryption key can be purchased separately. - c++ - javautils - - - - - - - - - yes - no - - diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/group/bld.inf --- a/java_stubs/group/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/group/bld.inf Mon Jan 18 20:12:00 2010 +0200 @@ -17,7 +17,6 @@ // bld.inf of subprojects -#include "../javadrmutils/build/bld.inf" #include "../javaenvinfo/build/bld.inf" #include "../javaregistry/clientserver/client/build/bld.inf" #include "../javadebugapi/build/bld.inf" diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javadrmutils/build/bld.inf --- a/java_stubs/javadrmutils/build/bld.inf Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for project JavaDrmUtils -* -*/ - - -#include - -PRJ_MMPFILES -javadrmutils.mmp - -PRJ_EXPORTS - diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javadrmutils/build/javadrmutils.mmp --- a/java_stubs/javadrmutils/build/javadrmutils.mmp Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for javadrmutils stub -* -* -*/ - - -#include - -TARGET javadrmutils.dll -TARGETTYPE dll - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -UID 0x100039CE 0x1028246D - -USERINCLUDE ../../../java_plat/java_superd_parser_api/inc - -SOURCEPATH ../src -SOURCE javasuperdparser.cpp - -APP_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javadrmutils/bwins/javadrmutilsu.def --- a/java_stubs/javadrmutils/bwins/javadrmutilsu.def Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - ?ContentFileName@CJavaSuperDParser@Java@@QBE?AV?$TBuf@$0BAA@@@XZ @ 1 NONAME ; class TBuf<256> Java::CJavaSuperDParser::ContentFileName(void) const - ?CreateSuperDPackageL@CJavaSuperDParser@Java@@SAXAAVRFs@@ABVTDesC16@@11@Z @ 2 NONAME ; void Java::CJavaSuperDParser::CreateSuperDPackageL(class RFs &, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &) - ?DescriptorFileName@CJavaSuperDParser@Java@@QBE?AV?$TBuf@$0BAA@@@XZ @ 3 NONAME ; class TBuf<256> Java::CJavaSuperDParser::DescriptorFileName(void) const - ?NewL@CJavaSuperDParser@Java@@SAPAV12@AAVRFs@@AAVRFile@@ABVTDesC16@@@Z @ 4 NONAME ; class Java::CJavaSuperDParser * Java::CJavaSuperDParser::NewL(class RFs &, class RFile &, class TDesC16 const &) - ?NewL@CJavaSuperDParser@Java@@SAPAV12@AAVRFs@@ABVTDesC16@@1@Z @ 5 NONAME ; class Java::CJavaSuperDParser * Java::CJavaSuperDParser::NewL(class RFs &, class TDesC16 const &, class TDesC16 const &) - diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javadrmutils/eabi/javadrmutilsu.def --- a/java_stubs/javadrmutils/eabi/javadrmutilsu.def Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - _ZN4Java17CJavaSuperDParser20CreateSuperDPackageLER3RFsRK7TDesC16S5_S5_ @ 1 NONAME - _ZN4Java17CJavaSuperDParser4NewLER3RFsR5RFileRK7TDesC16 @ 2 NONAME - _ZN4Java17CJavaSuperDParser4NewLER3RFsRK7TDesC16S5_ @ 3 NONAME - _ZNK4Java17CJavaSuperDParser15ContentFileNameEv @ 4 NONAME - _ZNK4Java17CJavaSuperDParser18DescriptorFileNameEv @ 5 NONAME - diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javadrmutils/src/javasuperdparser.cpp --- a/java_stubs/javadrmutils/src/javasuperdparser.cpp Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CJavaSuperDParser implementation (EXCLUDE_JAVA version) -* -*/ - - -#include "javasuperdparser.h" - -using namespace Java; - - -// ======== MEMBER FUNCTIONS ======== - - -// ---------------------------------------------------------------------------- -// CJavaSuperDParser::NewL() -// ---------------------------------------------------------------------------- -// -EXPORT_C CJavaSuperDParser* CJavaSuperDParser::NewL(RFs& /* aFileSession */, - const TDesC& /* aJarFileName */, - const TDesC& /* aDestinationFolder */) -{ - User::Leave(KErrNotSupported); - return NULL; -} - -// ---------------------------------------------------------------------------- -// CJavaSuperDParser::NewL() -// ---------------------------------------------------------------------------- -// -EXPORT_C CJavaSuperDParser* CJavaSuperDParser::NewL(RFs& /* aFileSession */, - RFile& /* aJarFileHandle */, - const TDesC& /* aDestinationFolder */) -{ - User::Leave(KErrNotSupported); - return NULL; -} - -// ---------------------------------------------------------------------------- -// CJavaSuperDParser::~CJavaSuperDParser() -// ---------------------------------------------------------------------------- -// -CJavaSuperDParser::~CJavaSuperDParser() -{ -} - -// ---------------------------------------------------------------------------- -// CJavaSuperDParser::CreateSuperDPackageL() -// ---------------------------------------------------------------------------- -// -EXPORT_C void CJavaSuperDParser::CreateSuperDPackageL(RFs& /* aFileSession */, - const TDesC& /* aDestinationFileName */, - const TDesC& /* aDescriptorFileName */, - const TDesC& /* aContentFileName */) -{ - User::Leave(KErrNotSupported); -} - -// ---------------------------------------------------------------------------- -// CJavaSuperDParser::DescriptorFileName -// ---------------------------------------------------------------------------- -// -EXPORT_C TFileName CJavaSuperDParser::DescriptorFileName() const -{ - return TFileName(KNullDesC); -} - -// ---------------------------------------------------------------------------- -// CJavaSuperDParser::ContentFileName -// ---------------------------------------------------------------------------- -// -EXPORT_C TFileName CJavaSuperDParser::ContentFileName() const -{ - return TFileName(KNullDesC); -} - -// End of File diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javaregistry/clientserver/client/inc/javaattributes.h --- a/java_stubs/javaregistry/clientserver/client/inc/javaattributes.h Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/javaregistry/clientserver/client/inc/javaattributes.h Mon Jan 18 20:12:00 2010 +0200 @@ -16,8 +16,8 @@ */ -#ifndef CJAVAATTRIBUTES_H -#define CJAVAATTRIBUTES_H +#ifndef JAVAATTRIBUTES_H +#define JAVAATTRIBUTES_H #include @@ -202,7 +202,7 @@ } // namespace Manager } // namespace Java -#endif // CJAVAATTRIBUTES_H +#endif // JAVAATTRIBUTES_H // End of File diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javaregistry/clientserver/client/inc/javaregclient.h --- a/java_stubs/javaregistry/clientserver/client/inc/javaregclient.h Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/javaregistry/clientserver/client/inc/javaregclient.h Mon Jan 18 20:12:00 2010 +0200 @@ -16,8 +16,8 @@ */ -#ifndef __JAVAREGCLIENT_H -#define __JAVAREGCLIENT_H +#ifndef JAVAREGCLIENT_H +#define JAVAREGCLIENT_H #include "javaregdef.h" #include "javaregburstates.h" @@ -278,4 +278,4 @@ }//namespace Manager }//namespace Java -#endif //__JAVAREGCLIENT_H +#endif // JAVAREGCLIENT_H diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javaregistry/clientserver/common/inc/javapropertyarray.h --- a/java_stubs/javaregistry/clientserver/common/inc/javapropertyarray.h Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/javaregistry/clientserver/common/inc/javapropertyarray.h Mon Jan 18 20:12:00 2010 +0200 @@ -16,8 +16,8 @@ */ -#ifndef __JAVA_PROPERTY_ARRAY_H -#define __JAVA_PROPERTY_ARRAY_H +#ifndef JAVAPROPERTYARRAY_H +#define JAVAPROPERTYARRAY_H #include #include @@ -204,5 +204,5 @@ }//namespace Manager }//namespace Java -#endif //__JAVA_PROPERTY_ARRAY_H +#endif // JAVAPROPERTYARRAY_H diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javaregistry/clientserver/common/inc/javaregburstates.h --- a/java_stubs/javaregistry/clientserver/common/inc/javaregburstates.h Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/javaregistry/clientserver/common/inc/javaregburstates.h Mon Jan 18 20:12:00 2010 +0200 @@ -38,4 +38,4 @@ }//namespace Manager }//namespace Java -#endif //JAVAREGBURSTATES_H +#endif // JAVAREGBURSTATES_H diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javaregistry/clientserver/common/inc/javaregdef.h --- a/java_stubs/javaregistry/clientserver/common/inc/javaregdef.h Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/javaregistry/clientserver/common/inc/javaregdef.h Mon Jan 18 20:12:00 2010 +0200 @@ -56,5 +56,5 @@ }//namespace Manager }//namespace Java -#endif //JAVAREGDEF_H +#endif // JAVAREGDEF_H diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javaregistry/clientserver/common/inc/javaregproperty.h --- a/java_stubs/javaregistry/clientserver/common/inc/javaregproperty.h Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/javaregistry/clientserver/common/inc/javaregproperty.h Mon Jan 18 20:12:00 2010 +0200 @@ -16,8 +16,8 @@ */ -#ifndef __JAVAREGPROPERTY_H -#define __JAVAREGPROPERTY_H +#ifndef JAVAREGPROPERTY_H +#define JAVAREGPROPERTY_H #include @@ -122,5 +122,5 @@ }//namespace Manager }//namespace Java -#endif //__JAVAREGPROPERTY_H +#endif // JAVAREGPROPERTY_H diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/javaregistry/clientserver/common/inc/javareguidarrayconv.h --- a/java_stubs/javaregistry/clientserver/common/inc/javareguidarrayconv.h Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/javaregistry/clientserver/common/inc/javareguidarrayconv.h Mon Jan 18 20:12:00 2010 +0200 @@ -16,8 +16,8 @@ */ -#ifndef JAVAREGUIDARRAYCONVERTER_H -#define JAVAREGUIDARRAYCONVERTER_H +#ifndef JAVAREGUIDARRAYCONV_H +#define JAVAREGUIDARRAYCONV_H // INCLUDES #include @@ -83,6 +83,6 @@ }//namespace Manager }//namespace Java -#endif // JAVAREGUIDARRAYCONVERTER_H +#endif // JAVAREGUIDARRAYCONV_H // End of File diff -r 3fd91c96c86c -r 53c80e845d7c java_stubs/rom/javastubs.iby --- a/java_stubs/rom/javastubs.iby Thu Jan 07 16:18:57 2010 +0200 +++ b/java_stubs/rom/javastubs.iby Mon Jan 18 20:12:00 2010 +0200 @@ -21,7 +21,6 @@ file=ABI_DIR\BUILD_DIR\javaenvinfo.dll \SHARED_LIB_DIR\javaenvinfo.dll file=ABI_DIR\BUILD_DIR\javaregistryclient.dll \SHARED_LIB_DIR\javaregistryclient.dll -file=ABI_DIR\BUILD_DIR\javadrmutils.dll \SHARED_LIB_DIR\javadrmutils.dll file=ABI_DIR\BUILD_DIR\javadebugapi.dll \SHARED_LIB_DIR\javadebugapi.dll #endif // __JAVASTUBS_IBY__ diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/group/bld.inf Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,21 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Includes all the Java Platform API specific bld.inf files, +* which export files. +* +*/ + +#include "../java_registry_api/build/bld.inf" +#include "../java_env_info_api/build/bld.inf" +#include "../java_debug_api/build/bld.inf" diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_debug_api/build/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_debug_api/build/bld.inf Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,23 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information file for Java Debug API. +* +*/ +PRJ_EXPORTS + +#include + +../inc/javadebugapi.h APP_LAYER_PLATFORM_EXPORT_PATH(javadebugapi.h) +../inc/javadiagnostic.h APP_LAYER_PLATFORM_EXPORT_PATH(javadiagnostic.h) + diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_debug_api/inc/javadebugapi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_debug_api/inc/javadebugapi.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,85 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Debug API +* +*/ + + +#ifndef JAVADEBUGAPI_H +#define JAVADEBUGAPI_H + +#include + +/** + * Java Debug API allows it's users to install, remove, start and + * stop Java applications. + * + * @lib javadebugapi.lib + * @since S60 v9.2 + */ + +namespace java +{ +namespace debug +{ + +/** + * Installs Java application. + * Java application is installed silently i.e. no prompts are shown to the user. + * @param[in] aFilename shall point to local JAD or JAR file + * @param[out] aSuiteUid returns the suite uid assigned to the application + * @param[out] aApplicationUid returns a list of application uids assigned to applications inside suite uid + * @capability TrustedUI + * @return true if installation is successful + */ +IMPORT_C TBool installApp(HBufC& aFilename, TUid& aSuiteUid, RArray& aApplicationUid); + +/** + * Uninstalls Java application. + * Java application is removed silently i.e. no prompts are shown to the user. + * If application uid is given then the application suite it belongs is removed too. + * @param[in] aUid application suite uid (or application uid) + * @capability TrustedUI + * @return true if application is uninstalled successfully + */ +IMPORT_C TBool uninstallApp(TUid aSuiteUid); + +/** + * Starts Java application. + * @param[in] aApplicationUid application uid + * @param[in] aUeiParameters includes arguments defined in Unified Emulator Interface (UEI) specification. + * If aUeiParameters contains unsupported options then those options are discarded silently. + * Supported arguments: + * -Xverbose[:options] + * -Xdebug -Xrunjdwp:name=value[,name=value[...]] + * For example, to start Java application in debug mode and set full tracing on + * following UIE arguments could be given: + * "-Xdebug -Xrunjdwp:server=y,address=localhost:8000 -Xverbose:all" + * @capability NetworkControl + * @return true if application is started + */ +IMPORT_C TBool startApp(TUid aApplicationUid, HBufC& aUeiParameters); + +/** + * Stops Java application. + * @param[in] aApplicationUid application uid + * @capability PowerMgmt + * @return true if application is stopped + */ +IMPORT_C TBool stopApp(TUid aApplicationUid); + +} // end namespace debug +} // end namespace java + +#endif // JAVADEBUGAPI_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_debug_api/inc/javadiagnostic.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_debug_api/inc/javadiagnostic.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,138 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Diagnostic API +* +*/ + + +#ifndef JAVADIAGNOSTIC_H +#define JAVADIAGNOSTIC_H + +#include + +namespace java +{ +namespace debug +{ + +/** +* DiagnosticListener will be called when Java Runtime outputs to standard out +* or makes log message. +* +* DiagnosticListener may not perform any long lasting or blocking tasks +* in the callback. +* +* Example below illustrates how Java Runtime outputs could be logged to file. +* +* @code +* class LoggingListener : public DiagnosticListener +* { +* public: +* virtual void systemOut(const TDesC8& aData) { flog(aData); }; +* virtual void systemErr(const TDesC8& aData) { flog(aData); }; +* virtual void log(const TDesC8& aData) { flog(aData); }; +* protected: +* virtual void flog(const TDesC8& aData) { +* RFileLogger::Write(KLogDirectory, KLogFileName, EFileLoggingModeAppendRaw, aData); +* }; +* } +* +* LoggingListener listener; +* JavaDiagnostic* jd = JavaDiagnostic::createInstance(); +* jd->setDiagnosticListener(listener); +* ... +* jd->removeDiagnosticListener(); +* delete jd; +* @endcode +*/ +class DiagnosticListener +{ +public: + /** + * Called when Java Runtime writes to the standard output stream + * @param[in] aText may contain multiple lines of data + */ + virtual void systemOut(const TDesC8& aText) = 0; + + /** + * Called when Java Runtime writes to the standard error stream + * @param[in] aText may contain multiple lines of data + */ + virtual void systemErr(const TDesC8& aText) = 0; + + /** + * Called when Java Runtime makes log writing + * @param[in] aText may contain multiple lines of data ending with newline + */ + virtual void log(const TDesC8& aText) = 0; +}; + + +/** +* Java Diagnostic can be used to monitor Java Runtime standard outs and +* log messages. +* +* DiagnosticListener should be set before making any Java Debug API operation, +* like installing or starting Java application, to ensure that all output +* is captured. +* +* There can be only one running Java Diagnostic instance in the system, i.e. +* instance with set listener. +* +* @code +* JavaDiagnostic* jd = JavaDiagnostic::createInstance(); +* jd->setDiagnosticListener(listener); +* ... +* jd->removeDiagnosticListener(); +* delete jd; +* @endcode +* +* @lib javadebugapi.lib +* @since S60 v9.2 +*/ +class JavaDiagnostic +{ +public: + virtual ~JavaDiagnostic() {}; + + /** + * Factory method for JavaDiagnostic. + * Returned pointer must be deleted once done using it. + * @return new JavaDiagnostic object + */ + IMPORT_C static JavaDiagnostic* createInstance(); + + /** + * Sets listener and starts monitoring Java Runtime standard outs and log + * messages. There can be only one running JavaDiagnostic instance in + * the system. + * @param[in] aListener will be called when Java Runtime outputs to standard out + * or makes log message + * @return KErrNone if listener was set and monitoring was started succesfully + * @return KErrAlreadyExists if JavaDiagnostic is already running or setDiagnosticListener + * is called twice without removing listener in between + */ + virtual TInt setDiagnosticListener(DiagnosticListener& aListener) = 0; + + /** + * Removes listener and stops monitoring Java Runtime standard outs and + * log messages. + */ + virtual void removeDiagnosticListener() = 0; +}; + +} // end namespace debug +} // end namespace java + +#endif // JAVADIAGNOSTIC_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_debug_api/java_debug_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_debug_api/java_debug_api.metaxml Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,15 @@ + + + Java Debug API + Java Debug API allows it's users to install, remove, start and stop Java applications. Java application can be launched with Universal Emulator Interface (UEI) arguments that can be used to start JVM in debug mode. + c++ + javamanager + + + + + + no + no + + diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_env_info_api/build/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_env_info_api/build/bld.inf Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,22 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information file for Java Env Info API. +* +*/ +PRJ_EXPORTS + +#include + +../inc/javadomainpskeys.h APP_LAYER_PLATFORM_EXPORT_PATH (javadomainpskeys.h) +../inc/javaenvinfo.h APP_LAYER_PLATFORM_EXPORT_PATH (javaenvinfo.h) diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_env_info_api/inc/javadomainpskeys.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_env_info_api/inc/javadomainpskeys.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,71 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: javautils pskey definitions +* +*/ + +#ifndef JAVADOMAINPSKEYS_H +#define JAVADOMAINPSKEYS_H + +/** + * This header provides info about Java environment PS keys. + * + * During Java application installation the JavaInstaller updates the + * installation state to P&S keys. The states are changed as follows: + * + * Installation (or upgrade) begins: iUid = 0, iProgress = 0, iState = INSTALLING + * Installation proceeds: iUid = no_change, iProgress = xx%, iState = no_change + * Installation completes: iUid = suiteUid, iProgress = 100, iState = INSTALL_OK + * Installation fails: iUid = suiteUid, iProgress = 0, iState = INSTALL_FAIL + * + * Uninstallation begins: iUid = 0, iProgress = 0, iState = UNINSTALLING + * Uninstallation proceeds: iUid = no_change, iProgress = xx%, iState = no_change + * Uninstallation completes: iUid = suiteUid, iProgress = 100, iState = UNINSTALL_OK + * Uninstallation fails: iUid = suiteUid, iProgress = 0, iState = UNINSTALL_FAIL + * + * + * + * P&S keys that are updated: + * + * iUid ==> KPSUidJavaLatestInstallation + * iProgress ==> KPSUidJavaLatestInstallationProgress + * iState ==> KPSUidJavaLatestInstallationState + * + * Values for the P&S keys: + * + * INSTALLING = 0x100; + * INSTALL_OK = 0x101; + * INSTALL_FAIL = 0x102; + * UNINSTALLING = 0x200; + * UNINSTALL_OK = 0x201; + * UNINSTALL_FAIL = 0x202; + */ + +#ifndef KPSUidJavaLatestInstallation +/** PS flag for the most recent installed Java application. */ +#define KPSUidJavaLatestInstallation 0x10282567 +#endif + +#ifndef KPSUidJavaLatestInstallationProgress +/** PS flag for indicating JavaInstaller installation progress. */ +#define KPSUidJavaLatestInstallationProgress 0x20019546 +#endif + +#ifndef KPSUidJavaLatestInstallationState +/** PS flag for JavaInstaller latest installation state. */ +#define KPSUidJavaLatestInstallationState 0x20019547 +#endif + +#endif // JAVADOMAINPSKEYS_H + diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_env_info_api/inc/javaenvinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_env_info_api/inc/javaenvinfo.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,79 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java environment information utilities +* +*/ + +#ifndef JAVAENVINFO_H +#define JAVAENVINFO_H + +// INCLUDES +#include + +// CLASS DECLARATION + +namespace Java +{ +/** + * Class provides information about Java environment version. + * + * @lib javaenvinfo.lib + * @since S60 5.1 + */ +NONSHARABLE_CLASS(JavaEnvInfo) +{ +public: + + /** + * Returns the Java environment version + * + * @since S60 5.1 + * @return TVersion instance representing the Java environment version + */ + IMPORT_C static TVersion Version(); + + /** + * Returns the part of the user agent header describing the Java environment. + * This string can be used by Browser or any other HTTP client when sending + * HTTP requests to describe the supported Java environment. + * + * The returned string could be for example + * "Configuration/CLDC-1.1 Profile/MIDP-2.1". + * + * @since S60 5.1 + * @return User Agent header string. Caller is responsible for deleting + * this when done with it. + */ + IMPORT_C static HBufC* GetUserAgentHeaderL(); + + /** + * Returns the Java configuration and profile information in human + * readable format. + * + * The used format is ", " - as an example + * "MIDP 2.1, CLDC 1.1". + * + * @since S60 5.1 + * @return String in the format. Caller is responsible for deleting + * this when done with it. + */ + IMPORT_C static HBufC* GetPlatformInfoL(); +private: + + static TVersion JavaEnvInfo::GetJavaVersionL(); +}; + +} + +#endif // JAVAENVINFO_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_env_info_api/java_env_info_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_env_info_api/java_env_info_api.metaxml Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,18 @@ + + + Java Environment Info API + This API provides information about the Java environment and events occurring within it + c++ + java_dom + + + + + + + + + no + no + + diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/build/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/build/bld.inf Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,31 @@ +/* +* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API build file +* +*/ + +PRJ_EXPORTS + +#include + +../inc/javaregistryentry.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistryentry.h) +../inc/javaregistryapplicationentry.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistryapplicationentry.h) +../inc/javaregistryentrytype.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistryentrytype.h) +../inc/javaregistrypackageentry.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistrypackageentry.h) +../inc/javaregistryincludes.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistryincludes.h) +../inc/javaregistry.h APP_LAYER_PLATFORM_EXPORT_PATH(javaregistry.h) +../inc/javaattribute.h APP_LAYER_PLATFORM_EXPORT_PATH(javaattribute.h) +../inc/mjavaattribute.h APP_LAYER_PLATFORM_EXPORT_PATH(mjavaattribute.h) +../inc/appversion.h APP_LAYER_PLATFORM_EXPORT_PATH(appversion.h) +../inc/appversion.inl APP_LAYER_PLATFORM_EXPORT_PATH(appversion.inl) diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/appversion.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/appversion.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,117 @@ +/* +* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + +#ifndef APPVERSION_H +#define APPVERSION_H + +/** + * This class is used to represent the version of a Java application. + * The standard TVersion provided in Symbian OS can't be used because it + * doesn't allow for major and minor version numbers above 127. + */ +class TAppVersion +{ +public: + + /** + * This constructor creates a 0.0.0 version. + */ + inline TAppVersion(); + + /** + * This is the copy constructor. + * @param aAppVersion is the app version that will be copied + */ + inline TAppVersion(const TAppVersion& aAppVersion); + + /** + * This constructor creates a version according to the arguments. + * @param aMajor is the major version number + * @param aMinor is the minor version number + * @param aBuild is the micro version number + */ + inline TAppVersion(TInt aMajor, TInt aMinor, TInt aBuild); + + /** + * Assignment operator. + * @param aAppVersion is the app version to be assigned to the object + */ + inline TAppVersion& operator =(const TAppVersion& aAppVersion); + + /** + * Equality operator. + * @param aAppVersion is the app version to be compared with + * the object's app version + * @return ETrue if the app versions are the same, EFalse otherwise + */ + inline TBool operator ==(const TAppVersion& aAppVersion) const; + + /** + * Inequality operator. + * @param aAppVersion is the app version to be compared with + * the object's app version + * @return ETrue if the app versions are not the same, EFalse otherwise + */ + inline TBool operator !=(const TAppVersion& aAppVersion) const; + + /** + * Less than operator. + * @param aAppVersion is the app version to be compared with + * the object's app version + * @return ETrue if the app version to the left of the operator is less + * than the version to the right, EFalse otherwise + */ + inline TBool operator <(const TAppVersion& aAppVersion) const; + + /** + * Greater than operator. + * @param aAppVersion is the app version to be compared with + * the object's app version + * @return ETrue if the app version to the left of the operator is + * greater than the version to the right, EFalse otherwise + */ + inline TBool operator >(const TAppVersion& aAppVersion) const; + + /** + * Less or equal operator. + * @param aAppVersion is the app version to be compared with + * the object's app version + * @return ETrue if the app version to the left of the operator is + * less than or equal to the version to the right, EFalse otherwise + */ + inline TBool operator <=(const TAppVersion& aAppVersion) const; + + /** + * Greater or equal operator. + * @param aAppVersion is the app version to be compared with + * the object's app version + * @return ETrue if the app version to the left of the operator is + * greater than or equal to the version to the right, EFalse otherwise + */ + inline TBool operator >=(const TAppVersion& aAppVersion) const; + +public: + TInt iMajor; + TInt iMinor; + TInt iBuild; +}; + +#include + +#endif // APPVERSION_H + +// End of File diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/appversion.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/appversion.inl Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,79 @@ +/* +* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + +#ifndef TAPPVERSIONINL_H +#define TAPPVERSIONINL_H + +TAppVersion::TAppVersion() + : iMajor(0), iMinor(0), iBuild(0) +{ +} + +TAppVersion::TAppVersion(const TAppVersion& aAppVersion) + : iMajor(aAppVersion.iMajor), iMinor(aAppVersion.iMinor), iBuild(aAppVersion.iBuild) +{ +} + +TAppVersion::TAppVersion(TInt aMajor, TInt aMinor, TInt aBuild) + : iMajor(aMajor), iMinor(aMinor), iBuild(aBuild) +{ +} + +TAppVersion& TAppVersion::operator =(const TAppVersion& aAppVersion) +{ + // Assignment operator using the copy constructor + return *new(this) TAppVersion(aAppVersion); +} + +TBool TAppVersion::operator ==(const TAppVersion& aAppVersion) const +{ + return ((iMajor == aAppVersion.iMajor) && + (iMinor == aAppVersion.iMinor) && + (iBuild == aAppVersion.iBuild)); +} + +TBool TAppVersion::operator !=(const TAppVersion& aAppVersion) const +{ + return !(*this == aAppVersion); +} + +TBool TAppVersion::operator <(const TAppVersion& aAppVersion) const +{ + return ((iMajor < aAppVersion.iMajor) || + ((iMajor == aAppVersion.iMajor) && (iMinor < aAppVersion.iMinor)) || + ((iMajor == aAppVersion.iMajor) && (iMinor == aAppVersion.iMinor) && + (iBuild < aAppVersion.iBuild))); +} + +TBool TAppVersion::operator >(const TAppVersion& aAppVersion) const +{ + return (aAppVersion < *this); +} + +TBool TAppVersion::operator <=(const TAppVersion& aAppVersion) const +{ + return !(*this > aAppVersion); +} + +TBool TAppVersion::operator >=(const TAppVersion& aAppVersion) const +{ + return !(*this < aAppVersion); +} + +#endif // TAPPVERSIONINL_H + +//End of File diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/javaattribute.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/javaattribute.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,101 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + + +#ifndef JAVAATTRIBUTE_H +#define JAVAATTRIBUTE_H + + +#include +#include "mjavaattribute.h" + +/** + * This class is used to access Java application attributes. + * In case of MIDlets, these attributes are defined in + * Java Application Descriptor (JAD) and JAR manifest files. + */ +namespace Java +{ +class CJavaAttribute: public CBase, public MJavaAttribute +{ +public: + + IMPORT_C virtual ~CJavaAttribute(); + + /** + * Construct a new attribute using the given name, value and trusted + * + * @since S60 v5.0 + * @param aName is attribute name + * @param aValue is attribute value + * @param aTrusted is true if attribute can be trusted. + * @return a new CJavaAttribute object + */ + IMPORT_C static CJavaAttribute* NewL(const TDesC& aName, const TDesC& aValue, TBool aTrusted); + /** + * Construct a new attribute using the given name, value and trusted + * and leaves the object on the cleanup stack + * + * @since S60 v5.0 + * @param aName is attribute name + * @param aValue is attribute value + * @param aTrusted is true if attribute can be trusted + * @return a new CJavaAttribute object + */ + IMPORT_C static CJavaAttribute* NewLC(const TDesC& aName, const TDesC& aValue, TBool aTrusted); + + /** + * from MJavaAttribute + */ +public: + virtual const TDesC& Name() const; + virtual const TDesC& Value() const; + virtual TBool Trusted() const; + + +private: + /** + * ConstructL + * + * @since S60 v5.0 + * @param aName + * @param aValue + * @param aTrusted + */ + void ConstructL(const TDesC& aName, const TDesC& aValue, TBool aTrusted); + +private: + /** + * Attribute name + */ + HBufC* iName; + /** + * Attribute value + */ + HBufC* iValue; + /** + * this value indicate, if attribute is trusted (= signed JAR file + + * attribute present in JAR manifest) or not + */ + TBool iTrusted; +}; +} // namespace Java + +#endif // JAVAATTRIBUTE_H + + +// End of File diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/javaregistry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/javaregistry.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,193 @@ +/* +* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: The main class of Java Registy API. Java Registy API +* can be used to query the installed Java applications +* and their properties. +* +*/ + + + +// JAVAREGISTRY.H +#ifndef JAVAREGISTRY_H +#define JAVAREGISTRY_H + +#include +#include "javaregistryentrytype.h" + + +namespace Java +{ +namespace Manager +{ +namespace Registry +{ + +// FORWARD DECLARATION +class CWriteableJavaRegistry; + +}// namespace Registry +}// namespace Manager +}// namespace Java + +namespace Java +{ +class CJavaRegistryEntry; + +/** + * This class provides the Platform API for JavaRegistry. + * It allows for clients to retrieve properties of + * Java install packages, applications, services etc. + * + * @lib javaregistryclient.lib + * @since S60 v3.2 + */ +class CJavaRegistry : public CBase +{ + + // Constructors +public: + + /** + * Creates a CJavaRegistry object. + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @return A pointer to a CJavaRegistry object. + * Caller takes over the ownership of the object being + * transferred. + */ + IMPORT_C static CJavaRegistry* NewL(); + + /** + * Creates a CJavaRegistry object. + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @return A pointer to a CJavaRegistry object. + * Caller takes over the ownership of the object being + * transferred. + */ + IMPORT_C static CJavaRegistry* NewLC(); + + +public: + + // Generic methods + + /** + * Returns whether registry entry with the specified Uid exists. + * Registry entries representing entities installed on + * removable media which are currently not present in the device + * are considered as not existent. + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @param aUid The Uid to be checked. + * @return ETrue if the registry entry exists, EFalse otherwise. + */ + IMPORT_C TBool RegistryEntryExistsL(const TUid& aUid) const; + + /** + * Returns an array of Uids of the existing registry entries. + * Uids of registry entries representing entities installed on + * removable media which are currently not present in the device + * are not returned. + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @param aUids [out] Uids of the registry entries. + */ + IMPORT_C void GetRegistryEntryUidsL(RArray& aUids) const; + + /** + * Returns an array of Uids of the existing registry entries. + * Entries are searched by the specified type. + * Uids of registry entries representing entities installed on + * removable media which are currently not present in the device + * are not returned. + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @param aType Type of registry entries whose Uids are to be returned. + * @param aUids [out] Uids of the matching registry entries. + */ + IMPORT_C void GetRegistryEntryUidsL + (TJavaRegistryEntryType aType, RArray& aUids) const; + + /** + * Returns the corresponding registry entry for a given Uid. + * The returned entry can be casted to the appropriate subclass + * according to the type property. If type is in the package range + * ( EGeneralPackage <= entryType < EGeneralApplication ), it can + * be casted to CJavaRegistryPackageEntry, and if type is + * in the application range ( EGeneralApplication <= entryType ), + * it can be casted to CJavaRegistryApplicationEntry. + * Registry entries representing entities installed on + * removable media which are currently not present in the device + * are not returned. + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @param aUid The Uid of the entry to be retrieved + * @return The returned registry entry or null if registry entry + * not found. Caller takes over the ownership of the object + * being transferred. + */ + IMPORT_C CJavaRegistryEntry* RegistryEntryL(const TUid& aUid) const; + + // Destructor + /** + * CJavaRegistry::~CJavaRegistry destructor + * + * @since S60 v3.2 + */ + virtual ~CJavaRegistry(); + +private: + + // Constructor + + /** + * CJavaRegistry::CJavaRegistry constructor + * + * @since S60 v3.2 + */ + CJavaRegistry(); + + // 2nd phase constructor + + /** + * CJavaRegistry::ConstructL method + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + */ + void ConstructL(); + +private: // Data + + + /** + * CJavaRegistry::iJavaReg member + * Pointer Owned + * @since S60 v3.2 + */ + Java::Manager::Registry::CWriteableJavaRegistry* iJavaReg; + +}; + +}// namespace Java + +#endif // JAVAREGISTRY_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/javaregistryapplicationentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/javaregistryapplicationentry.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,137 @@ +/* +* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + + +#ifndef JAVAREGISTRYAPPLICATIONENTRY_H +#define JAVAREGISTRYAPPLICATIONENTRY_H + +#include +#include +#include +#include "javaregistryentry.h" +#include "javaregistryentrytype.h" + +namespace Java +{ +namespace Manager +{ +namespace Registry +{ + +// FORWARD DECLARATION +class CWriteableJavaRegistryApplicationEntry; + +}// namespace Registry +}// namespace Manager + +// FORWARD DECLARATION +class CJavaRegistryPackageEntry; + +/** + * This subclass of CJavaRegistryEntry supports attributes + * for single application, that can't contain embedded entries. + * + * @lib javaregistryclient.lib + * @since S60 v3.2 + */ +class CJavaRegistryApplicationEntry : public CJavaRegistryEntry +{ +public: + + + /** + * CJavaRegistryApplicationEntry::CJavaRegistryApplicationEntry + * constructor + * + * @since S60 v3.2 + * @param aWritableEntry Pointer to a writable entry, to delegate + * getter methods. Pointer ownership taken. + */ + CJavaRegistryApplicationEntry(Java::Manager::Registry:: + CWriteableJavaRegistryApplicationEntry* aWritableEntry); + + /** + * Tells if this application is startable. + * + * @since S60 v3.2 + * @return ETrue if the application is startable, EFalse otherwise. + * Default value if not set: ETrue. + */ + IMPORT_C TBool IsStartable() const; + + /** + * Tells if this application must be shown in Application Shell or + * it must rather be hidden. + * + * @since S60 v3.2 + * @return ETrue if the application is shown in Application Shell, + * EFalse otherwise. + * Default value if not set: ETrue. + */ + IMPORT_C TBool IsVisible() const; + + /** + * Tells if the end user can not uninstall this application. + * + * @since S60 v3.2 + * @return ETrue if the application is resident, EFalse otherwise. + * Default value if not set: EFalse. + */ + IMPORT_C TBool IsResident() const; + + /** + * Gets the group name of this application. This property tells in + * which folder the application icon shall appear. It can be a + * null-string: in that case the Installed folder will be hosting + * midlet icons. + * + * @since S60 v3.2 + * @return Group name of this application. + * Default value if not set: + */ + IMPORT_C const TDesC& GroupName() const; + + /** + * Gets a reference to the install package entry, which is the parent + * of this application. E.g. if this entry represents a MIDlet this + * method returns a reference to the corresponding MIDlet Suite entry. + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @return a CJavaRegistryEntry object. Caller takes over the + * ownership of the object being transferred. + */ + IMPORT_C CJavaRegistryPackageEntry* PackageEntryL() const; + +protected: + + /** + * CJavaRegistryApplicationEntry::WritableEntry method returns the member + * of the parent class, but first casts it to + * CWriteableJavaRegistryApplicationEntry. + * + * @since S60 v3.2 + * @return Returns the member of this class. + */ + Java::Manager::Registry:: + CWriteableJavaRegistryApplicationEntry* WritableEntry() const; + +}; + +} // namespace Java + +#endif // JAVAREGISTRYAPPLICATIONENTRY_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/javaregistryentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/javaregistryentry.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,206 @@ +/* +* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + + +#ifndef JAVAREGISTRYENTRY_H +#define JAVAREGISTRYENTRY_H + +#include +#include +#include +#include "javaregistryentrytype.h" +#include "javaattribute.h" + + +namespace Java +{ +namespace Manager +{ +namespace Registry +{ + +// FORWARD DECLARATION +class CWriteableJavaRegistryEntry; + +}// namespace Registry +}// namespace Manager + +/** + * This class provides the Domain API for entries in JavaRegistry. + * This class is intended for further derivation. + * It supports only those attributes which exist in all types of + * entries. + * + * @lib javaregistryclient.lib + * @since S60 v3.2 + */ +class CJavaRegistryEntry : public CBase +{ +public: + + /** + * Gets the Uid of this registry entry. + * + * @since S60 v3.2 + * @return A TUid object. + */ + IMPORT_C TUid Uid() const; + + /** + * Gets the type of this registry entry. + * Enumeration TJavaRegistryEntryType defines the currently possible + * options. Mandatory property. + * + * @since S60 v3.2 + * @return Type of this registry entry. + */ + IMPORT_C TJavaRegistryEntryType Type() const; + + /** + * Gets the drive letter where the content of the installation package + * has been installed. + * + * @since S60 v3.2 + * @return Drive letter where the content of the installation package + * has been installed. + * Default value if not set: EDriveC. + */ + IMPORT_C TDriveNumber Drive() const; + + /** + * Gets the name of the entity (midlet, suite, etc.) this entry + * represents. + * + * @since S60 v3.2 + * @return Name of the entity this entry represents. + * Default value if not set: KNullDesC. + */ + IMPORT_C const TDesC& Name() const; + + /** + * Returns the number of certificate chains belonging to the entity + * this entry represents. + * + * @since S60 v3.2 + * @return Number of certificate chains. + */ + IMPORT_C TInt NumberOfCertificateChains() const; + + /** + * Returns the n-th certificate chain of the entity this entry + * represents consisting of X.509 version 3 certificates + * in their DER encoded format concatenated together + * without any separators. + * All certificate chains are returned indifferent if they could be + * validated or not. + * This format is directly suitable to be used with + * function CX509CertChain::DecodeCertsL(). + * + * @since S60 v3.2 + * @param aChain Zero-based index of the certificate chain to be + * retrieved. + * @return N-th certificate chain + * Default value if not set: KNullDesC8. + */ + IMPORT_C const TDesC8& CertificateChain(TInt aChain) const; + + /** + * Returns the content id of the entity this entry represents. + * The content id can be used to check if a DRM protected entity + * has enough right to be launched or not. + * The method can also be used to check if the entity is DRM + * protected or not. + * + * @since S60 v3.2 + * @return Content id of the entity this entry represent or + * KNullDesC if the entity is not DRM protected. + */ + IMPORT_C const TDesC& DrmContentId() const; + + /** + * CJavaRegistryEntry::~CJavaRegistryEntry method + * Destructor + * + * @since S60 v3.2 + */ + IMPORT_C ~CJavaRegistryEntry(); + + /** + * CJavaRegistryEntry::Attribute method gets the + * additional attribute. + * + * @since S60 v5.0 + * @param aName The name the searched attribute. + * @return MJavaAttribute poiter to instance, which contain attribute. + * If attribute doesn't exist return NULL. + */ + IMPORT_C const MJavaAttribute* + CJavaRegistryEntry::AttributeL(const TDesC& aName) const; + + /** + * CJavaRegistryEntry::Attributes method gets the + * array of additional attributes. + * + * @since S60 v5.0 + * @return RPointerArray& with all additional attributes. + */ + IMPORT_C const RPointerArray& + CJavaRegistryEntry::AttributesL() const; + +protected: + + /** + * CJavaRegistryEntry::CJavaRegistryEntry constructor + * + * @since S60 v3.2 + * @param aWritableEntry Pointer to a writable entry, to delegate + * getter methods. Pointer ownership taken. + */ + CJavaRegistryEntry(Java::Manager::Registry:: + CWriteableJavaRegistryEntry* aWritableEntry); + + /** + * CJavaRegistryEntry::WritableEntry method returns the member + * of this class; + * + * @since S60 v3.2 + * @return Returns the member of this class. + */ + Java::Manager::Registry:: + CWriteableJavaRegistryEntry* WritableEntry() const; + +protected: // Data + + + /** + * CJavaRegistryEntry::iWritableEntry member + * Pointer Owned + * + * @since S60 v3.2 + */ + Java::Manager::Registry::CWriteableJavaRegistryEntry* iWritableEntry; + +private: // Data + + + RPointerArray iAttributes; + +}; + +} // namespace Java + +#endif // JAVAREGISTRYENTRY_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/javaregistryentrytype.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/javaregistryentrytype.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,49 @@ +/* +* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + + +#ifndef JAVAREGISTRYENTRYTYPE_H +#define JAVAREGISTRYENTRYTYPE_H + +namespace Java +{ + +/** + * This enumeration lists Java Registry Entry types. + */ +enum TJavaRegistryEntryType +{ + // EGeneralPackage defines the starting value of the range including + // the ids of entry types which are considered as package entries + EGeneralPackage = 100, + EMidp2MidletSuite = 101, + EDeploymentPackage = 102, // OSGi Deployment Package + EBundle = 103, + EOsgiAwareMidletSuite = 104, // OSGi Aware Midlet Suite + + // EGeneralApplication defines the starting value of the range including + // the ids of entry types which are considered as application entries + EGeneralApplication = 200, + EMidp2Midlet = 201, + EOsgiService = 202, + EOsgiAwareMidlet = 203, // OSGi Aware Midlet Application + EERCP = 204 // eRCP Application +}; + +} + +#endif // JAVAREGISTRYENTRYTYPE_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/javaregistryincludes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/javaregistryincludes.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,27 @@ +/* +* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + + +#ifndef JAVAREGISTRYINCLUDES_H +#define JAVAREGISTRYINCLUDES_H + +#include "javaregistry.h" +#include "javaregistryentry.h" +#include "javaregistrypackageentry.h" +#include "javaregistryapplicationentry.h" + +#endif // JAVAREGISTRYINCLUDES_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/javaregistrypackageentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/javaregistrypackageentry.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,200 @@ +/* +* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + + +#ifndef JAVAREGISTRYPACKAGEENTRY_H +#define JAVAREGISTRYPACKAGEENTRY_H + +#include +#include +#include +#include "javaregistryentry.h" +#include "javaregistryentrytype.h" + +// FORWARD DECLARATION +class TAppVersion; + +namespace Java +{ +namespace Manager +{ +namespace Registry +{ + +// FORWARD DECLARATION +class CWriteableJavaRegistryPackageEntry; + +}// namespace Registry +}// namespace Manager + + +/** + * This subclass of CJavaRegistryEntry supports attributes + * for packages, that can contain embedded entries. + * + * @lib javaregistryclient.lib + * @since S60 v3.2 + */ +class CJavaRegistryPackageEntry : public CJavaRegistryEntry +{ +public: + + + /** + * CJavaRegistryPackageEntry::CJavaRegistryPackageEntry constructor + * + * @since S60 v3.2 + * @param aWritableEntry Pointer to a writable entry, to delegate + * getter methods. Pointer ownership taken. + */ + CJavaRegistryPackageEntry(Java::Manager::Registry:: + CWriteableJavaRegistryPackageEntry* aWritableEntry); + + /** + * Gets the version of Java entity represented by this package entry. + * + * @since S60 v3.2 + * @return A TAppVersion object. + * Default value if not set: TAppVersion( 0, 0, 0 ). + */ + IMPORT_C TAppVersion Version() const; + + /** + * Gets the vendor name of the Java entity represented by this + * package entry. + * + * @since S60 v3.2 + * @return Vendor name of the Java entity. + * Default value if not set: KNullDesC. + */ + IMPORT_C const TDesC& Vendor() const; + + + /** + * Tells if the Java entity represented by this package entry + * is uninstallable. + * + * @since S60 v3.2 + * @return ETrue if the entity is uninstallable, EFalse otherwise. + * Default value if not set: ETrue. + */ + IMPORT_C TBool IsUninstallable() const; + + /** + * Returns an array of Uids associated with the Java entity + * represented by this package entry. + * E.g. if this entry represents a MIDlet suite this method returns + * an array of MIDlet Uids. + * + * @since S60 v3.2 + * @param aUids [out] Returns Uids of the embedded entries. + */ + IMPORT_C void GetEmbeddedEntries(RArray& aUids) const; + + /** + * Gets the number of embedded entries in Java entity represented + * by this package entry. + * + * @since S60 v3.2 + * @return the number of embedded entries + */ + IMPORT_C TInt NumberOfEmbeddedEntries() const; + + /** + * Returns the corresponding embedded entry for the given Uid. + * The returned entry can be casted to the appropriate subclass + * according to the type property. If type is in the package range + * ( EGeneralPackage <= entryType < EGeneralApplication ), it can + * be casted to CJavaRegistryPackageEntry, and if type is + * in the application range ( EGeneralApplication <= entryType ), + * it can be casted to CJavaRegistryApplicationEntry. + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @param aAppUid The Uid of the embedded entry to be retrieved + * @return The returned embedded entry or null if entry is not found. + * Caller takes over the ownership of the object being + * transferred. + */ + IMPORT_C CJavaRegistryEntry* + EmbeddedEntryByUidL(const TUid& aEntryUid) const; + + /** + * Returns an embedded entry specified by a zero-based index. + * There is not any guaranteed order for embedded entries inside this + * package entry. + * The returned entry can be casted to the appropriate subclass + * according to the type property. If type is in the package range + * ( EGeneralPackage <= entryType < EGeneralApplication ), it can + * be casted to CJavaRegistryPackageEntry, and if type is + * in the application range ( EGeneralApplication <= entryType ), + * it can be casted to CJavaRegistryApplicationEntry. + * + * The function may leave with one of the system-wide error codes. + * + * @since S60 v3.2 + * @param aAppNum Zero-based index of the embedded entry to be + * retrieved. + * @return The returned embedded entry or null if entry is not found. + * Caller takes over the ownership of the object being + * transferred. + */ + IMPORT_C CJavaRegistryEntry* + EmbeddedEntryByNumberL(TInt aEntryNum) const; + + /** + * Returns the amount of disk space taken by the installed application. + * + * @since S60 v5.1 + * @return Returns the size of used disk space in bytes. + */ + IMPORT_C TInt64 UsedUserDiskSpace() const; + + /** + * Tells if the application package is pre-installed. + * + * If a pre-installed application package is upgraded, + * it remains marked as pre-installed. + * + * If a pre-installed application package is uninstalled + * and later installed again, it is no more marked as + * pre-installed. + * + * @since S60 v5.1 + * @return ETrue if the application suite is pre-installed, + * EFalse otherwise. + */ + IMPORT_C TBool IsPreinstalled() const; + +protected: + + /** + * CJavaRegistryPackageEntry::WritableEntry method returns the member + * of the parent class, but first casts it to + * CWriteableJavaRegistrypackageEntry. + * + * @since S60 v3.2 + * @return Returns the member of this class. + */ + Java::Manager::Registry:: + CWriteableJavaRegistryPackageEntry* WritableEntry() const; + +}; + +} // namespace Java + +#endif // JAVAREGISTRYPACKAGEENTRY_H diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/inc/mjavaattribute.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/inc/mjavaattribute.h Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,65 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Java Registy API header file +* +*/ + + +#ifndef MJAVAATTRIBUTE_H +#define MJAVAATTRIBUTE_H + + +#include + +/** + * This interface is used to access Java application attributes. + * In case of MIDlets, these attributes are defined in + * Java Application Descriptor (JAD) and JAR manifest files. + */ +namespace Java +{ +class MJavaAttribute +{ +public: + /** + * This method returns name of attribute + * + * Since S60 v5.0 + */ + virtual const TDesC& Name() const = 0; + /** + * This method returns attribute's value + * + * Since S60 v5.0 + */ + virtual const TDesC& Value() const = 0; + /** + * This method returns if attribut is trusted or not (attribute is trusted if + * JAR file is signed and attribute is present in JAR manifest) + * + * Since S60 v5.0 + */ + virtual TBool Trusted() const = 0; + + virtual ~MJavaAttribute() {}; + + + +}; +} // namespace Registry + +#endif // MJAVAATTRIBUTE_H + + +// End of File diff -r 3fd91c96c86c -r 53c80e845d7c jrt_plat/java_registry_api/java_registry_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jrt_plat/java_registry_api/java_registry_api.metaxml Mon Jan 18 20:12:00 2010 +0200 @@ -0,0 +1,18 @@ + + + Java Registry API + Provides functionality to get information about installed Java applications and installation packages. + c++ + javamanager + + + + + + + + + no + no + + diff -r 3fd91c96c86c -r 53c80e845d7c layers.sysdef.xml --- a/layers.sysdef.xml Thu Jan 07 16:18:57 2010 +0200 +++ b/layers.sysdef.xml Mon Jan 18 20:12:00 2010 +0200 @@ -1,22 +1,22 @@ + ]> - + - - + + - - + + - - + + diff -r 3fd91c96c86c -r 53c80e845d7c package_definition.xml --- a/package_definition.xml Thu Jan 07 16:18:57 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -