# HG changeset patch # User kashif.sayed # Date 1269557221 -19800 # Node ID a3e98f9c292b2a42fc63db3b7b60bc1220fabc16 # Parent f9f9f96b1873285a9461304a219f9b650aecc1f1 added missing files user: kashif.sayed added dependencies/AknTaskList.h added dependencies/DRMEvent.h added dependencies/DRMEventObserver.h added dependencies/DRMNotifier.h added dependencies/SchemeDefs.hrh added dependencies/SchemeHandler.h added dependencies/SchemeHandler.inl added dependencies/aiwcommon.hrh added dependencies/aiwdialdata.h added dependencies/drmrightsinfo.h added dependencies/drmutilitytypes.h added dependencies/javaattribute.h added dependencies/javadomainpskeys.h added dependencies/javaregistry.h added dependencies/javaregistryapplicationentry.h added dependencies/javaregistryentry.h added dependencies/javaregistryentrytype.h added dependencies/javaregistrypackageentry.h added dependencies/mjavaattribute.h added dependencies/swi/bld.inf added dependencies/swi/sispackagetrust.h added dependencies/swi/sisregistryentry.h added dependencies/swi/sisregistrylog.h added dependencies/swi/sisregistrysession.h changed .cproject changed dependencies/S3libs/bld.inf changed dependencies/bld.inf diff -r f9f9f96b1873 -r a3e98f9c292b .cproject --- a/.cproject Fri Mar 26 03:06:02 2010 +0530 +++ b/.cproject Fri Mar 26 04:17:01 2010 +0530 @@ -26,7 +26,7 @@ - + diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/AknTaskList.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/AknTaskList.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2005 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: +* +* +*/ + + +#ifndef AKNTASKLIST_H +#define AKNTASKLIST_H + +// INCLUDES + +#include +#include + +// CLASS DECLARATION + +/** +* Class for finding out about running applications. +* This class specialises in locating and identifying root applications, +* those applications who do not have any parent window group. +* It can be used along-side TApaTaskList. +* +* @since Series 60 3.0 +*/ +class CAknTaskList : public CBase + { +public: + /** + * Factory function + * @param aWsSession an open session to the window server, often from CEikonEnv::WsSession() + * @return a new fully constructed instance of CAknTaskList + */ + IMPORT_C static CAknTaskList* NewL(RWsSession& aWsSession); + /** + * Factory function + * @param aWsSession an open session to the window server, often from CEikonEnv::WsSession() + * @return a new fully constructed instance of CAknTaskList, which is on the cleanup stack + */ + IMPORT_C static CAknTaskList* NewLC(RWsSession& aWsSession); + /** + * Destructor. + */ + IMPORT_C ~CAknTaskList(); + + /** + * Refresh the window group array + */ + IMPORT_C void UpdateListL(); + /** + * Accessor for the window group array + * @return an array containing the window groups of running applications. + */ + IMPORT_C const RArray& WgArray() const; + + /** + * Find an application with the requested UID 3, which is running as a root application + * @param aAppUid the UID 3 of the target application. + * @return a TApaTask which refers to the running instance of the application. + * if the application is not running, the TApaTask's Exists() function will return EFalse. + */ + IMPORT_C TApaTask FindRootApp(TUid aAppUid) const; + /** + * Query whether an application's window group is running as a root application. + * @param aWgId the window group identifier of the target application. + * @return ETrue if this window group is running as a root window group. + */ + IMPORT_C TBool IsRootWindowGroup(TInt aWgId) const; + + /** + * Find the parent window group. If there is no parent, 0 is returned. + * @param aWgId the window group id that you want to find the parent of. + * @return The window group id of the parent, or 0 if there is no parent. + */ + IMPORT_C TInt FindParentWgId(TInt aWgId) const; + /** + * Find the child window group. If there is no child, 0 is returned. + * @param aWgId the window group id that you want to find the child of. + * @return The window group id of the child, or 0 if there is no child. + */ + IMPORT_C TInt FindChildWgId(TInt aWgId) const; + +private: + CAknTaskList(RWsSession& aWsSession); + void ConstructL(); + +private: + RWsSession& iWs; + RArray iWgs; + }; + +#endif diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/DRMEvent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/DRMEvent.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2004 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: Notification Event object base class +* +*/ + + + +#ifndef MDRMEVENT_H +#define MDRMEVENT_H + +// INCLUDES +#include +#include + +// CONSTANTS + +// MACROS + +// DATA TYPES +typedef TUint32 TDRMEventType; + +const TDRMEventType KEventNone = 0; +const TDRMEventType KEventAddRemove = 1; +const TDRMEventType KEventModify = 2; +const TDRMEventType KEventTimeChange = 3; + +// FUNCTION PROTOTYPES + +// FORWARD DECLARATIONS + +// CLASS DECLARATION + +/** +* This class offers the base class for all DRM Notification events +* It can be used as it is, but it is meant that Other specific to an event +* classes are derived from it +* +* @lib DRMCommon.dll +* @since S60Rel2.6 +*/ + +class MDRMEvent +{ +public: // Constructors and destructor + /** + * Constructor + * + * @param aEvent The event type of the object to be created + */ + IMPORT_C MDRMEvent(const TDRMEventType& aEvent); + + /** + * Destructor + */ + IMPORT_C virtual ~MDRMEvent(); + +public: // new functions + /** + * ExternalizeL + * + * Writes the objects data into a stream + * + * @param aOutput : an output stream where to write + * @since S60Rel2.6 + */ + IMPORT_C virtual void ExternalizeL(RWriteStream& aOutput); + + /** + * InternalizeL + * + * Reads the objects data from a stream + * + * @param aInput : an input stream where to read from + * @since S60Rel2.6 + */ + IMPORT_C virtual void InternalizeL(RReadStream& aInput); + + /** + * GetEventType + * + * Returns the event type of the Event in aEventType + * + * @param aEventType : Out parameter for the event type + * @since S60Rel2.6 + */ + IMPORT_C void GetEventType(TDRMEventType& aEventType) const; + +protected: // Data + + TDRMEventType iType; + +private: + /** + * Default constructor - prevented + */ + MDRMEvent( void ); + + // Prohibit copy constructor + MDRMEvent( const MDRMEvent& ); + + // Prohibit assigment operator + MDRMEvent& operator=( const MDRMEvent& ); +}; + +#endif // MDRMEVENT_H + +// End of File diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/DRMEventObserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/DRMEventObserver.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2004-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 applications that want to use the notification service +* need to inherit from this class. +* +*/ + + + +#ifndef MDRMEVENTOBSERVER_H +#define MDRMEVENTOBSERVER_H + +// INCLUDES +#include + +// CONSTANTS + +// MACROS + +// DATA TYPES + +// FUNCTION PROTOTYPES + +// FORWARD DECLARATIONS + +// CLASS DECLARATION + +/** +* This class offers abstract interface to receive DRM notifications +* from DRM notifier. +* +* @lib DRMCommon.dll +* @since S60Rel2.6 +*/ +class MDRMEventObserver +{ +public: // New functions + /** + * HandleNotificationL + * + * Callback function for the event notifications + * The MDRMEvent object ownership stays with the notifier, + * do not delete it + * + * @param aEvent : an object of the type MDRMEvent + * @since S60Rel2.6 + */ + virtual void HandleEventL( MDRMEvent* aEvent ) = 0; +}; + +#endif // MDRMEVENTOBSERVER_H + +// End of File diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/DRMNotifier.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/DRMNotifier.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,160 @@ +/* +* Copyright (c) 2004-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: This class handles registering and unregistering of +* DRM event observers to DRM notifier, and sending +* DRM notifications to other registered observers. +* +*/ + + + +#ifndef CDRMNOTIFIER_H +#define CDRMNOTIFIER_H + +// INCLUDES +#include +#include +#include + +// CONSTANTS +// MACROS +// DATA TYPES +// FUNCTION PROTOTYPES +// FORWARD DECLARATIONS +class CDRMEventHandler; + +// CLASS DECLARATION + +/** + * With this class an application can register to receive DRM related + * notifications. + * + * @lib DRMCommon.dll + * @since S60Rel2.6 + */ +class CDRMNotifier : public CBase +{ +public: // Constructors and destructor + /** + * Two-phased constructor. + */ + IMPORT_C static CDRMNotifier* NewL( void ); + + /** + * Two-phased constructor. + */ + IMPORT_C static CDRMNotifier* NewLC( void ); + + /** + * Destructor. + */ + IMPORT_C virtual ~CDRMNotifier(); + +public: // New functions + /** + * RegisterEventObserverL + * + * Registers a new event observer to DRM Notifier. Listens to all events + * of the given type + * + * @since S60Rel2.6 + * @param aObserver Observer. + * @param aEvent the type of event to listen to + * @return none, leaves with Symbian OS error code if an error occurs + */ + IMPORT_C void RegisterEventObserverL( MDRMEventObserver& aObserver , + const TDRMEventType& aEvent); + /** + * UnRegisterEventObserverL + * + * Unregisters existing event observer from DRM Notifier. + * + * @since S60Rel2.6 + * @param aObserver Observer. + * @param aEvent the type of event to unregister + * @return none, leaves with Symbian OS error code if an error occurs + */ + IMPORT_C void UnRegisterEventObserverL( MDRMEventObserver& aObserver, + const TDRMEventType& aEvent); + /** + * RegisterEventObserverL + * + * Registers a new event observer to DRM Notifier. Only recieves + * notification when the rights accociated with the given content id + * are handled + * + * @since S60Rel2.6 + * @param aObserver Observer + * @param aEvent the type of event to listen to + * @param aContentID the specific content id to listen to + * @return none, leaves with Symbian OS error code if an error occurs + */ + IMPORT_C void RegisterEventObserverL( MDRMEventObserver& aObserver , + const TDRMEventType& aEvent, + const TDesC8& aContentID); + /** + * UnRegisterEventObserverL + * + * Unregisters existing event observer from DRM Notifier. + * + * @since S60Rel2.6 + * @param aObserver Observer. + * @param aEvent the type of event to listen to + * @param aContentID the specific content id to listen to + * @return none, leaves with Symbian OS error code if an error occurs + */ + IMPORT_C void UnRegisterEventObserverL( MDRMEventObserver& aObserver, + const TDRMEventType& aEvent, + const TDesC8& aContentID); + + /** + * SendEventL + * + * Sends a notification to registered observers + * + * @since S60Rel2.6 + * @param aEvent the event to be sent + * @param aStatus the request status for the event, will be updated when + * the event has been sent + * @return none + */ + IMPORT_C void SendEventL( MDRMEvent& aEvent, TRequestStatus& aStatus ); + +private: + + /** + * C++ default constructor. + */ + CDRMNotifier( void ); + + /** + * First Phase constructor + */ + void ConstructL(); + + // Prohibit copy constructor if not deriving from CBase. + CDRMNotifier( const CDRMNotifier& ); + + // Prohibit assigment operator if not deriving from CBase. + CDRMNotifier& operator=( const CDRMNotifier& ); + + private: // Data + // Event handler. + CDRMEventHandler* iEventHandler; +}; + +#endif // CDRMNOTIFIER_H + +// End of File + diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/S3libs/bld.inf --- a/dependencies/S3libs/bld.inf Fri Mar 26 03:06:02 2010 +0530 +++ b/dependencies/S3libs/bld.inf Fri Mar 26 04:17:01 2010 +0530 @@ -18,4 +18,10 @@ ssmcmn.lib \epoc32\release\winscw\udeb\ssmcmn.lib hspswrapper.lib \epoc32\release\winscw\udeb\hspswrapper.lib cpswrapper.lib \epoc32\release\winscw\udeb\cpswrapper.lib -hscontentcontrol.lib \epoc32\release\winscw\udeb\hscontentcontrol.lib \ No newline at end of file +hscontentcontrol.lib \epoc32\release\winscw\udeb\hscontentcontrol.lib +SatClient.lib \epoc32\release\winscw\udeb\SatClient.lib +sisregistryclient.lib \epoc32\release\winscw\udeb\sisregistryclient.lib +DrmServerInterfaces.lib \epoc32\release\winscw\udeb\DrmServerInterfaces.lib +javaregistryclient.lib \epoc32\release\winscw\udeb\javaregistryclient.lib +DrmRightsInfo.lib \epoc32\release\winscw\udeb\DrmRightsInfo.lib +SWInstCli.lib \epoc32\release\winscw\udeb\SWInstCli.lib \ No newline at end of file diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/SchemeDefs.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/SchemeDefs.hrh Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,61 @@ +/* +* Copyright (c) 2002 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" +* 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: +* Constants used both in code and resources of Scheme Handler. +* +* +*/ + + +#ifndef SCHEME_DEFS_HRH +#define SCHEME_DEFS_HRH + +// *************************************************************************** +// ** THIS FILE IS INCLUDED IN RESOURCES (.rss) AND PROJECT FILES (.mmp). ** +// ** ONLY MACROS ARE ALLOWED. ** +// *************************************************************************** + +// MACROS + +/// Scheme MIME type. +#define SCHEME_MIME_TYPE "text/x-scheme" + + +/// Scheme dispatcher UID value. +#define SCHEME_DISPATCHER_UID 0x101f8531 +#define SCHEME_DISPATCHER_UID_RSS_NAME 101f8531.rss + +/// Scheme App UID value. +#define SCHEME_APP_UID 0x101f8532 + +/// SCHEME Recognizer UID value. +#define SCHEME_RECOG_UID 0x101f8533 + +/// Scheme handler interface definition Uid +#define SCHEME_INTERFACE_DEF 0x101f8534 + +/// Scheme handler interface implementation Uids +#define SCHEME_WTAI_IMP 0x101f8546 +#define SCHEME_FILE_IMP 0x101f8535 +#define SCHEME_HTTP_IMP 0x101f8536 +#define SCHEME_HTTPS_IMP 0x101F8573 +#define SCHEME_RTSP_IMP 0x101f8537 +#define SCHEME_MAIL_TO_IMP 0x101f8538 +#define SCHEME_TEL_IMP 0x101F8574 +#define SCHEME_CTI_IMP 0x101F8575 +#define SCHEME_MMS_IMP 0x2000B05D + + + +#endif /* def SCHEME_DEFS_HRH */ diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/SchemeHandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/SchemeHandler.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,100 @@ +/* +* Copyright (c) 2002 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" +* 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: +* Declaration of class CSchemeHandler. +* +* +*/ + + +#ifndef SCHEME_HANDLER_H +#define SCHEME_HANDLER_H + +// INCLUDES + +#include +#include + +// FORWARD DECLARATION + +class MAknServerAppExitObserver; + +// CONSTS + +// CLASS DECLARATION + +/** +* Scheme Handler IF definition class +*/ +class CSchemeHandler : public CBase + { + + public: // Constructors and destructor + + /** + * Two phased constructor. Leaves on failure. + * @param aUrl Url + * @return The created object. + */ + inline static CSchemeHandler* NewL( const TDesC& aUrl ); + + /** + * Destructor. + */ + inline virtual ~CSchemeHandler(); + + public: // New functions + + /** + * Url Handler with embedding + * @param - + */ + virtual void HandleUrlEmbeddedL() = 0; + + /** + * Url Handler without embedding + * @param - + */ + virtual void HandleUrlStandaloneL() = 0; + + /** + * Observer + * @param - aSchemeDoc + */ + virtual void Observer( MAknServerAppExitObserver* aSchemeDoc ) = 0; + + /** + * Set Generic Parameters + * @param - aParamList + */ + inline void SetParameterList(CAiwGenericParamList* aParamList); // Takes ownership + + //reserved functions + virtual inline TInt Reserved_1( TAny* aAny ); + virtual inline TInt Reserved_2( TAny* aAny ); + + private: // Data + + /// Required attribute for the framework + /// (An identifier used during destruction) + TUid iDtor_ID_Key; + + protected: + + CAiwGenericParamList* iParamList; ///< OWNS + }; + +#include + +#endif /* def SCHEME_HANDLER_H */ diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/SchemeHandler.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/SchemeHandler.inl Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,97 @@ +/* +* Copyright (c) 2002 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" +* 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: +* Implementation of class Scheme Dispatcher. +* +* +*/ + + +// INCLUDE FILES + +#include +#include // For REComSession + +// ================= CONSTANTS ======================= + +// ================= MEMBER FUNCTIONS ======================= + +// --------------------------------------------------------- +// CSchemeHandler::NewL() +// --------------------------------------------------------- +// +CSchemeHandler* CSchemeHandler::NewL( const TDesC& aUrl ) +{ + // retreiving the scheme + const TUid KSchemeHandlerDefinitionUid = { SCHEME_INTERFACE_DEF }; + + TInt colonPos = aUrl.Locate( ':' ); + if ( colonPos <= 0 ) + { + // It should not happen since this char was found in DocumentHandler alredy + User::Leave( KErrArgument ); + } + + // Creating the right implementation + TEComResolverParams resolverParams; + + HBufC8* scheme = HBufC8::NewLC( colonPos ); + scheme->Des().Append( aUrl.Left( colonPos ) ); + scheme->Des().LowerCase(); + resolverParams.SetDataType( scheme->Des() ); + resolverParams.SetGenericMatch( ETrue ); //To enable default scheme handlers + + TAny* ptr = REComSession::CreateImplementationL(KSchemeHandlerDefinitionUid, + _FOFF( CSchemeHandler, iDtor_ID_Key ), + (TAny*)&aUrl, + resolverParams); + + CleanupStack::PopAndDestroy(); // urlCopy + + CSchemeHandler* schemeHandler = REINTERPRET_CAST( CSchemeHandler*, ptr ); + + return schemeHandler; + } + +// --------------------------------------------------------- +// CSchemeHandler::~CSchemeHandler() +// --------------------------------------------------------- +// +CSchemeHandler::~CSchemeHandler() + { + if( iParamList ) + { + delete iParamList; + } + REComSession::DestroyedImplementation( iDtor_ID_Key ); + } + +// --------------------------------------------------------- +// CSchemeHandler::SetParameterList() +// --------------------------------------------------------- +// +void CSchemeHandler::SetParameterList(CAiwGenericParamList* aParamList) // Takes ownership + { + iParamList = aParamList; + } + +// Reserved functions +TInt CSchemeHandler::Reserved_1( TAny* /*aAny*/ ) + { + return 0; + } +TInt CSchemeHandler::Reserved_2( TAny* /*aAny*/ ) + { + return 0; + } diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/aiwcommon.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/aiwcommon.hrh Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,419 @@ +/* +* Copyright (c) 2003-2005 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: Declares common constants to be used in both resources and +* C++ code of consumers and providers. +* +*/ + + + + + +#ifndef AIW_COMMON_HRH +#define AIW_COMMON_HRH + +// DATA TYPES + +// CONSTANTS + +/** +* Predefined service commands (UIDs). +*/ +enum TAiwServiceCommands + { + /** Null value. */ + KAiwCmdNone = 0, + + /** Create new content. */ + KAiwCmdNew = 0x101F864C, + + /** Edit existing content. */ + KAiwCmdEdit = 0x101F864D, + + /** Select content. */ + KAiwCmdSelect = 0x101F864E, + + /** View content. */ + KAiwCmdView = 0x101F864F, + + /** Create call. */ + KAiwCmdCall = 0x101F86B0, + + /** Send content. */ + KAiwCmdSend = 0x101F86B3, + + /** Print content. */ + KAiwCmdPrint = 0x101F8666, + + /** Assign content. */ + KAiwCmdAssign = 0x101F8716, + + /** Share content. */ + KAiwCmdShare = 0x101F871E, + + /** Synchronize content. */ + KAiwCmdSynchronize = 0x101F8724, + + /** Synchronize selected. */ + KAiwCmdSynchronizeSelected = 0x1020720C, + + /** Search content. */ + KAiwCmdSearch = 0x101F87DF, + + /** Copy content. */ + KAiwCmdCopy = 0x101F87DE, + + /** Show print preview. */ + KAiwCmdPrintPreview = 0x101FD656, + + /** Push to talk. */ + KAiwCmdPoC = 0x101FD657, + + /** View content in online store. */ + KAiwCmdViewOnline = 0x102072EA, + + /** Upload content. */ + KAiwCmdUpload = 0x102072EB, + + /** Transfer a range of media files to a remote storage device. */ + KAiwCmdXpressTransfer = 0x10207430, + + /** UPnP copy content. */ + KAiwCmdUPnPCopy = 0x10207431, + + /** UPnP move content. */ + KAiwCmdUPnPMove = 0x10207432, + + /** UPnP play content. */ + KAiwCmdUPnPPlay = 0x10207433, + + /** UPnP open content. */ + KAiwCmdUPnPOpen = 0x10207434, + + /** UPnP enable external. */ + KAiwCmdUPnPEnableExternal = 0x10207435, + + /** Show help content. */ + KAiwCmdHelp = 0x10275075, + + /** Add or remove items from intent. (Should be used as a menu service command). */ + KAiwCmdIntent = 0x10275114, + + /** Add items to intent. (Should be used as a base service command). */ + KAiwCmdAddToIntent = 0x10275115, + + /** Remove items from intent. (Should be used as a base service command). */ + KAiwCmdRemoveFromIntent = 0x10275116, + + /** Client can request that map should be displayed on screen. */ + KAiwCmdMnShowMap = 0x10206904, + + /** Allows to start navigation to desired destination. */ + KAiwCmdMnNavigateTo = 0x10206905, + + /** Starts reverse geocoding request: finding address for given coordinate. */ + KAiwCmdMnAddrByCoord = 0x10206906, + + /** Starts geocoding request: finding coordinate by given address. */ + KAiwCmdMnCoordByAddr = 0x10206907, + + /** Allows client to request that user shall select a location from map. */ + KAiwCmdMnSelectFromMap = 0x10206908, + + /** Send via Bluetooth. */ + KAiwCmdSendViaBT = 0x10281894, + + /** Send via Irda. */ + KAiwCmdSendViaIR = 0x10281895, + + /** Enterprise telephony. */ + KAiwCmdEnterpriseTel = 0x20001FC6, + + /** Rotate image etc. */ + KAiwCmdRotate = 0x10281F96, + + /** Rotate device screen. */ + KAiwCmdRotateScreen = 0x10281F97, + + /** Set call image. */ + KAiwCmdCallImage = 0x1028245E, + + /** Give different objects to another device using Near Field Communications. */ + KAiwCmdNFCGive = 0x1028245F, + + /** Start listening secondary bearer (e.g. Bluetooth) setup events via Near Field Communication. */ + KAiwCmdNFCEasySetup = 0x2001FE32, + + /** SettingWizard Email view activation. */ + KAiwCmdSettingWizardEmailView = 0x10281C95, + + /** In-device search. */ + KAiwCmdContentSearch = 0x10282844, + + /** A special service command enabling consumer to attach for all relevant + AIW services for a certain object. */ + KAiwCmdAnyCmdForObject = 0x102823F1, + + /** To support VoIP settings provisioning with plugins **/ + KAiwCmdEasyVoIPProvisioning = 0x10283099, + + /** Assign Screensaver*/ + KAiwCmdAssignScreenSaver = 0x1028309A, + + /*Location Trail*/ + KAiwCmdLocationTrail=0x10282845 +/* + +*/ +// BRANCH 08-04-18 : gronoff + , + /** Converged service plugin and UI extension plugin*/ + KAiwCmdCSCServicePlugins = 0x1020E56F, + KAiwCmdCSCUiExtensionPlugins = 0x10282EF7, + KAiwCmdSaveToCalendar = 0x2002A507 +// BRANCH_END 08-04-18 : gronoff + }; + + +// Service command strings. These strings are used in service provider's +// opaque data field to specify what service command(s) the provider implements. + +#define KAiwCmdNoneStr "00000000" +#define KAiwCmdNewStr "101F864C" +#define KAiwCmdEditStr "101F864D" +#define KAiwCmdSelectStr "101F864E" +#define KAiwCmdViewStr "101F864F" +#define KAiwCmdPrintStr "101F8666" +#define KAiwCmdCallStr "101F86B0" +#define KAiwCmdSendStr "101F86B3" +#define KAiwCmdAssignStr "101F8716" +#define KAiwCmdShareStr "101F871E" +#define KAiwCmdSynchronizeStr "101F8724" +#define KAiwCmdSearchStr "101F87DF" +#define KAiwCmdCopy "101F87DE" +#define KAiwCmdPrintPreviewStr "101FD656" +#define KAiwCmdPoCStr "101FD657" +#define KAiwCmdSynchronizeSelectedStr "1020720C" +#define KAiwCmdViewOnlineStr "102072EA" +#define KAiwCmdUploadStr "102072EB" +#define KAiwCmdXpressTransferStr "10207430" +#define KAiwCmdUPnPCopyStr "10207431" +#define KAiwCmdUPnPMoveStr "10207432" +#define KAiwCmdUPnPPlayStr "10207433" +#define KAiwCmdUPnPOpenStr "10207434" +#define KAiwCmdUPnPEnableExternalStr "10207435" +#define KAiwCmdHelpStr "10275075" +#define KAiwCmdIntentStr "10275114" +#define KAiwCmdAddToIntentStr "10275115" +#define KAiwCmdRemoveFromIntentStr "10275116" +#define KAiwCmdMnShowMapStr "10206904" +#define KAiwCmdMnNavigateToStr "10206905" +#define KAiwCmdMnAddrByCoordStr "10206906" +#define KAiwCmdMnCoordByAddrStr "10206907" +#define KAiwCmdMnSelectFromMapStr "10206908" +#define KAiwCmdSendViaBTStr "10281894" +#define KAiwCmdSendViaIRStr "10281895" +#define KAiwCmdEnterpriseTelStr "20001FC6" +#define KAiwCmdRotateStr "10281F96" +#define KAiwCmdRotateScreenStr "10281F97" +#define KAiwCmdCallImageStr "1028245E" +#define KAiwCmdNFCGiveStr "1028245F" +#define KAiwCmdNFCEasySetupStr "2001FE32" +#define KAiwCmdSettingWizardEmailViewStr "10281C95" +#define KAiwCmdContentSearchStr "10282844" +#define KAiwCmdAnyCmdForObjectStr "102823F1" +#define KAiwCmdEasyVoIPProvisioningStr "10283099" +#define KAiwCmdAssignScreenSaverStr "1028309A" +#define KAiwCmdLocationTrail "10282845" +/* + +*/ +// BRANCH 08-04-18 : gronoff +#define KAiwCmdCSCServicePluginsStr "1020E56F" +#define KAiwCmdCSCUiExtensionPluginsStr "10282EF7" +#define KAiwCmdSaveToCalendarStr "2002A507" +// BRANCH_END 08-04-18 : gronoff + +/** +* Service command options (bits) to alter command handling behaviour. +*/ +enum TAiwServiceCmdOptions + { + /** + * Consumer wants asynchronous command handling. + * The default is synchronous command handling. + * In asynchronous case consumer needs to pass a callback to provider. + */ + KAiwOptASyncronous = 0x0001, + + /** + * Consumer wants provider to make a callback to check coming output + * parameters prior returning from service command handling. + * Consumer needs to pass a callback to provider. + */ + KAiwOptOutParamCheck = 0x0002, + + /** + * Consumer tells provider that it is prepared to handle + * callback events for possibly incomplete/wrong parameter list. + */ + KAiwOptInParamCheck = 0x0004, + + /** + * Consumer wants to cancel an asynchronous AIW service. + * When a consumer wants to cancel the asynchronous service that a provider + * is executing, it should call ExecuteMenuCmdL() or ExecuteServiceCmdL() + * with the same parameters as when requesting the service, but set this + * cancel bit on. The cancel operation itself is synchronous, i.e. the + * provider must call the consumer's callback with KAiwEventCanceled before + * the Execute*CmdL() returns. + */ + KAiwOptCancel = 0x0008 + }; + + +/** +* Service classes (UID). Technically these are same as service interface UIDs. +*/ +enum TAiwServiceClass + { + /** + * None. + */ + KAiwClassNone = 0x0, + + /** + * Base service (no UI expected). + * Every other class must implement this always! + */ + KAiwClassBase = 0x101F8650, + + /** + * Filter service class. + */ + KAiwClassFilter = 0x101F8651, + + /** + * Menu service class (offers menu based services). + */ + KAiwClassMenu = 0x101F8652, + + /** + * Stub service class. + */ + KAiwClassStub = 0x101F8653, + + /** + * View service class (offers view based services). + */ + KAiwClassView = 0x101F8654, + + /** + * This class is for R&D purposes. + */ + KAiwClassDebug = 0x101F866B + }; + + +/** +* Event codes. To be used with HandleNotifyL method. +*/ +enum + { + /** + * Asynchronous service informs consumer to prepare itself for + * action. + */ + KAiwEventStarted = 1, + + /** + * Asynchronous service request completed. + */ + KAiwEventCompleted = 2, + + /** + * Asynchronous service request canceled. + */ + KAiwEventCanceled = 3, + + /** + * Error during asynchronous service request. + */ + KAiwEventError = 4, + + /** + * Relates to KAiwOptOutParamCheck. + */ + KAiwEventOutParamCheck = 5, + + /** + * Relates to KAiwOptInParamCheck. + */ + KAiwEventInParamCheck = 6, + + /** + * Provider informs consumer that service is no longer available or + * has stopped. + */ + KAiwEventStopped = 7, + + /** + * Provider asks consumer whether Exit can be done (needed at least in + * embedded use cases where server application offers Exit possibility + * to end user, but consumer can not allow Exit due to fact that for + * example network connections owned by consumer are open and they need + * to be kept alive). + */ + KAiwEventQueryExit = 8 + }; + +// ============================================================================ +// Menu item flags for AIW consumers. +// ============================================================================ +/** + * Always keep the provider menu items in a submenu. + */ +#define AIW_CASCADE_ID 0x01010001 + +/** + * Menu item is placed intelligently either to the main level or a submenu. + */ +#define AIW_INTELLIGENT_CASCADE_ID 0x01010010 + +/** + * Consumer defines the menu title. + */ +#define AIW_LOCK_SUBMENU_TITLE 0x00000020 + +// ============================================================================ +// Criteria item flags for AIW consumers. +// ============================================================================ +/** + * Criteria item loadOptions bit, only providers in ROM are accepted. + */ +#define AIW_OPTIONS_ROM_ONLY 0x01 + +// ============================================================================ +// Menu item flags for AIW providers. +// ============================================================================ +/** + * For providers only: Provider suggests the submenu title. + */ +#define AIW_SUBMENU_TITLE 0x0ff11012 + +#endif // AIW_COMMON_HRH + +// End of file + + diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/aiwdialdata.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/aiwdialdata.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,213 @@ +/* +* 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: Dial data used with AIW for making calls. +* +*/ + + +#ifndef CAIWDIALDATA_H +#define CAIWDIALDATA_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CAiwGenericParamList; +class CAiwInternalDialData; + +/** Constant used by aiwdialdata interface. */ +namespace AIWDialData + { + /** Maximum phone number length same as used by phone. */ + const TInt KMaximumPhoneNumberLength = 100; + + /** Default windowgroup value */ + const TInt KAiwGoToIdle(0); + } + +// CLASS DECLARATION + +/** +* Creating call using CAiwDialData API. +* +* @code +* +* - Client must be Service Handler client. For more information see +* service handler desing document. +* +* - Client creates intance of CAiwDialData: +* +* CAiwDialData* dialData = CAiwDialData::NewLC(); +* +* - Define call parameters(phone number is compulsory parameter ): +* +* dialData->SetCallType( CAiwDialData::EAIWVoice ); +* _LIT(phoneNumber, "050123456"); +* dialData->SetPhoneNumberL( phoneNumber ); +* dialData->SetWindowGroup( AIWDialData::KAiwGoToIdle ); +* +* - Client creates reference to CAiwGenericParamList and fills paramlist: +* +* CAiwGenericParamList& paramList = iServiceHandler->InParamListL(); +* dialData->FillInParamListL( paramList ); +* +* - Now client can give execute command to service handler. +* +* iServiceHandler->ExecuteServiceCmdL( KAiwCmdCall, paramList, +* iServiceHandler->OutParamListL(), +* 0, NULL ); +* @endcode +* +* Dial data for SDK applications. +* +* @lib aiwdialdata.lib +* @since S60 3.2 +*/ +NONSHARABLE_CLASS( CAiwDialData ): public CBase + { + public: // Enum. + + /** Different type of calls. */ + enum TCallType + { + /* Voice call. If there is a VoIP service that is registered and set as preferred, the + * call is created as VoIP call, otherwise CS call. */ + EAIWVoice = 0, + /** Video call. */ + EAIWVideo = 1, + /** Forced video call, creates video call directly without + * queries. */ + EAIWForcedVideo = 2, + /** Voip call. */ + EAIWVoiP = 3, + /* Forced voice call, creates always CS voice call. Use this value if the call type is + * not allowed to be changed */ + EAIWForcedCS = 4 + }; + + public: // Constructors and destructor + + /** + * Two-phased constructor for implementation class. + * Use this method for creating a instance with null items. + * + * @since S60 3.2 + * @return A pointer to the new object. + */ + IMPORT_C static CAiwDialData* NewL(); + + /** + * Two-phased constructor for implementation class. Leaves the + * pointer to the cleanup stack. + * Use this method for creating a instance with null items. + * + * @since S60 3.2 + * @return A pointer to the new object. + */ + IMPORT_C static CAiwDialData* NewLC(); + + /** + * Destructor. + */ + virtual ~CAiwDialData(); + + public: // New + + /** + * Composes data set package and inserts data to aInParamList. + * + * @since S60 3.2 + * @param aInParamList In parameter used with CAiwService. + */ + IMPORT_C void FillInParamListL( CAiwGenericParamList& aInParamList ); + + public: // Access - Setters + + /** + * Sets the phone number. + * + * @since S60 3.2 + * @param aPhoneNumber Phone number, which maximum length is + * KMaximumPhoneNumberLength. + * Default: empty. + * @leaves KErrArgument if aPhoneNumber length is over + * KMaximumPhoneNumberLength. + */ + IMPORT_C void SetPhoneNumberL( const TDesC& aPhoneNumber ); + + /** + * Sets call type. + * + * @since S60 3.2 + * @param aCallType defines the call type. + * Default: EAIWVoice. + */ + IMPORT_C void SetCallType( TCallType aCallType ); + + /** + * Sets the window group identifier. When call is ended, + * set window group is actived. + * + * @since S60 3.2 + * @param aWindowGroup Window group id. + * Default: KAiwGoToIdle. + */ + IMPORT_C void SetWindowGroup( TInt aWindowGroup ); + + public: // Access - Getters + + /** + * Phone number. + * + * @since S60 3.2 + * @return Phone number. + */ + IMPORT_C const TDesC& PhoneNumber() const; + + /** + * Call type. + * + * @since S60 3.2 + * @return Current call type. + */ + IMPORT_C TCallType CallType() const; + + /** + * Window group id. + * + * @since S60 3.2 + * @return Window group id. + */ + IMPORT_C TInt WindowGroup() const; + + private: + + /** + * C++ default constructor. + */ + CAiwDialData(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + private: + + CAiwInternalDialData* iInternalDialData; + }; + +#endif // CAIWDIALDATA_H + +// End of File diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/bld.inf --- a/dependencies/bld.inf Fri Mar 26 03:06:02 2010 +0530 +++ b/dependencies/bld.inf Fri Mar 26 04:17:01 2010 +0530 @@ -41,6 +41,28 @@ startupdomainpskeys.h startupdomainpskeys.h domaindefs.h domaindefs.h domainpolicy.h domainpolicy.h +DRMNotifier.h DRMNotifier.h +javaregistry.h javaregistry.h +javaregistryapplicationentry.h javaregistryapplicationentry.h +javaregistryentry.h javaregistryentry.h +javaregistryentrytype.h javaregistryentrytype.h +javaregistrypackageentry.h javaregistrypackageentry.h +AknTaskList.h AknTaskList.h +DRMEvent.h DRMEvent.h +DRMEventObserver.h DRMEventObserver.h +drmrightsinfo.h drmrightsinfo.h +javaattribute.h javaattribute.h +javadomainpskeys.h javadomainpskeys.h +mjavaattribute.h mjavaattribute.h +drmutilitytypes.h drmutilitytypes.h +SchemeDefs.hrh SchemeDefs.hrh +SchemeHandler.h SchemeHandler.h +SchemeHandler.inl SchemeHandler.inl +aiwcommon.hrh aiwcommon.hrh +aiwdialdata.h aiwdialdata.h + + + #include "S3libs/bld.inf" @@ -77,6 +99,7 @@ #include "Network_handling_engine/bld.inf" #include "transition_effect_utility/bld.inf" #include "ssm/bld.inf" +#include "swi/bld.inf" diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/drmrightsinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/drmrightsinfo.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,165 @@ +/* +* 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: Provides operations for rights information handling of DRM + * content + * +*/ + + +#ifndef CDRMRIGHTSINFO_H +#define CDRMRIGHTSINFO_H + +//*** system include files go here: +#include +#include +#include + +namespace DRM + { + + //*** forward declarations go here: + class CDrmUtility; + class CDrmRightsInfoImpl; + class MDrmAsyncObserver; + + /** + * Utility class for DRM related rights information handling + * + * @lib drmrightsinfo.lib + * @since S60 v5.0 + */ +NONSHARABLE_CLASS( CDrmRightsInfo ) : public CBase + { + +public: + + /** + * Creates a new CDrmRightsInfo object and returns a pointer to it + * + * @return A functional CDrmRightsInfo -object + * @leave System wide error code + */ + IMPORT_C static CDrmRightsInfo* NewL(); + + /** + * Creates a new CDrmRightsInfo object and returns a pointer to it + * Leaves the pointer to the cleanup stack + * + * @return A functional CDrmRightsInfo -object + * @leave System wide error code + */ + IMPORT_C static CDrmRightsInfo* NewLC(); + + /** + * Destructor + */ + virtual ~CDrmRightsInfo(); + + + /** + * Returns a reference to a CDrmUtility instance. The ownership + * of the instance stays with the CDrmRightsInfo -class + * + * @since S60 v5.0 + * + * @return A reference to a functional CDrmUtility instance + * + * @leave None + * + * @see CDrmUtility + */ + IMPORT_C CDrmUtility& GetUtility() const; + + + + /** + * Checks the rights and their status for a specific unique id + * + * @param[in] aUniqueId The unique identifier of the content + * @param[in] aIntent The intent for the rights to check + * @param[out] aDetails Details of the rights status + * @return none + * @leave System wide error code + * @see ContentAccess::TIntent + */ + IMPORT_C void CheckRightsL( + const TDesC& aUniqueId, + ContentAccess::TIntent aIntent, + TDrmRightsInfo& aDetails ); + + /** + * Checks the rights and their status for a specific unique id + * + * @param[in] aUniqueId The unique identifier of the content + * @param[in] aIntent The intent for the rights to check + * @param[out] aDetails Details of the rights status, the + * details are available via this + * parameter, once the async call completes + * successfully + * @param[in] aObserver reference to observer + * + * @return Operation Identifier for the async request + * required for cancelling an operation and + * identifying which request has been completed + * + * @leave System wide error code + * @see ContentAccess::TIntent + */ + IMPORT_C TInt CheckRightsAsyncL( + const TDesC& aUniqueId, + ContentAccess::TIntent aIntent, + TDrmRightsInfo& aDetails, + MDrmAsyncObserver& aObserver ); + + + /** + * Cancel an asyncronous operation + * + * @since S60 v5.0 + * @param[in] aOperationId identifier of the async operation + * to be cancelled + * @return KErrNotFound if the operation has already been executed + * or it does not exist + */ + IMPORT_C TInt CancelOperation( TInt aOperationId ); + +private: + + //*** private, non-derived functions go here, starting with the C++ + //*** constructor and the Symbian second-phase constructor + + CDrmRightsInfo(); + + void ConstructL(); + +private: // Data members + + /** + * Implementation class pointer + * Owned + */ + CDrmRightsInfoImpl* iImplementation; + + + /** + * CDrmUtility class pointer + * Owned + */ + CDrmUtility* iUtility; + + }; + } + + +#endif // CDRMRIGHTSINFO_H diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/drmutilitytypes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/drmutilitytypes.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,245 @@ +/* +* 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: Enumerations and constants used in the DRM Utility + * +*/ + + +#ifndef DRMUTILITYTYPES_H +#define DRMUTILITYTYPES_H + +namespace DRM + { + + /*** Names: + + EAU = Automated usage + EUH = UI handling + ERI = Rights Info + EU = Utility / Common + + ***/ + + + /** Automated usage types */ + enum TDrmAutomatedType + { + //This is a new type + EAUAutomatedTypeVideoRingingTone, + //These are from TDRMHelperAutomatedType + EAUAutomatedTypeRingingTone, + EAUAutomatedTypeMessageAlert, + EAUAutomatedTypeEmailAlert, + EAUAutomatedTypeIMAlert, + EAUAutomatedTypeCalendarAlarm, + EAUAutomatedTypeScreenSaver, + EAUAutomatedTypeWallpaper, + EAUAutomatedTypeTheme, + EAUAutomatedTypeClockAlarm, + EAUAutomatedTypeOther = KMaxTUint8 + }; + + + /** + * Automated service types + * EAUActive registering application listens to expiry notifications + * EAUPassive registering application does not listen to expiry + * notifications + */ + enum TDrmAutomatedServiceType + { + EAUPassive = 0, + EAUActive + }; + + + + /** Automated usage events */ + enum TAutomatedUsageEvent + { + EAUAutomatedContentSetOK = 0, // Content was successfully + // set as automated + EAUAutomatedContentExpired = 1, // Automated content was + // expired, remove from use + EAUAutomatedContentIdleAfterExpired = 2, // idle was activated, remove + // from automated usage. + EAUxxx = 3 + }; + + /** Return code to indicate how to proceed */ + enum TAutomatedUsageAction + { + EAUActionIgnore = KErrNotFound, // Nothing to be done. + EAUActionDefault = 0, // DRM Utility performs default + // handling + EAUActionRightsAquisition = 1, // Purchase new rights for the + // automated content + EAUActionClientHandles = 2 // client takes care of everything. + }; + + + /** + * Return code to indicate how to proceed when embedded preview is + * available + */ + enum TEmbeddedPreviewAction + { + EUEmbeddedPreviewActionDefault, // < DRM Utility asks if user wants + // to play preview or acquire new + // rights + EUEmbeddedPreviewActionDefaultAudio, // < DRM Utility asks if user wants + // to play preview or acquire new + // rights for audio + EUEmbeddedPreviewActionDefaultVideo, // < DRM Utility asks if user wants + // to play preview or acquire new + // rights for video + EUEmbeddedPreviewActionFetchRights, // < DRM Utility acquires new + // rights, no query shown + EUEmbeddedPreviewActionPlayPreview, // < Observer takes care of playing + // preview + EUEmbeddedPreviewActionIgnore // < Nothing to be done. + }; + + /** + * Return code to indicate how to proceed when preview rights are + * available + */ + enum TPreviewRightsAction + { + EUPreviewRightsActionDefault, // < DRM Utility asks if user wants + // to acquire preview rights or + // normal rights and acquires them + EUPreviewRightsActionDefaultAudio, // < DRM Utility asks if user wants + // to acquire preview rights or + // normal rights for audio and + // acquires them + EUPreviewRightsActionDefaultVideo, // < DRM Utility asks if user wants + // to acquire preview rights or + // normal rights for video and + // acquires them + EUPreviewRightsActionFetchRights, // < DRM Utility acquires normal + // rights, no query shown + EUPreviewRightsActionFetchPreviewRights, // < Observer acquires + // preview rights + EUPreviewRightsActionIgnore // < Nothing to be done + }; + + /** + * Return code to indicate how to proceed when silent rights are + * available + */ + enum TSilentRightsAction + { + EUSilentRightsActionDefault, // < DRM Utility performs the + // default silent rights + // handling + EUSilentRightsActionFetchRights, // < DRM Utility acquires normal + // rights + EUSilentRightsActionFetchSilentRights, // < Observer acquires silent + // rights + EUSilentRightsActionIgnore // < Nothing to be done + }; + + /** + * Return code to indicate how to proceed when rights are + * available + */ + enum TRightsAction + { + EURightsActionDefault, // < DRM Utility performs the default + // rights handling + EURightsActionFetchRights, // < DRM Utility acquires normal rights + EURightsActionIgnore // < Nothing to be done + }; + + /** + * Information about rights status + */ + enum TDrmRightsInfo + { + EURightsInfoValid = 0, + EURightsInfoExpired = 1, + EURightsInfoMissing = 2, + EURightsInfoFuture = 3, + }; + + + + /** Return code to indicate how to proceed */ + enum TCheckRightsAction + { + EUHCheckRightsActionDefault, // < DRM Utility performs the + // default handling + EUHCheckRightsActionOpenDetailsView, // < Details view is opened, no + // notes shown by DRM Utility + EUHCheckRightsActionAcquireNewRights, // < New rights are acquired, no + // notes shown by DRM Utility + EUHCheckRightsActionAcquirePreviewRights, // < Preview rights are + // acquired, no notes shown + // by DRM Utility + EUHCheckRightsActionIgnore // < DRM Utility does not do + // anything and stops the + // operation + }; + + /** Reason why rights are not valid */ + enum TCheckRightsStatus + { + EUHCheckRightsExpiredRights, // < Rights have been expired + EUHCheckRightsNoRights, // < No rights at all + EUHCheckRightsFutureRights // < Rights will become valid in future + }; + + + /** Url types for HandleUrl */ + enum TDrmUiUrlType + { + EUHRightsIssuerUrl = 0x00000001, + EUHPreviewRightsUrl = 0x00000002, + EUHSilentRightsUrl = 0x00000004, + EUHInfoUrl = 0x00000008, + EUHDomainRiUrl = 0x00000010 + }; + + /** Protection status of the drm content */ + enum TDrmProtectionStatus + { + EUUnknown = KErrUnknown, + EUUnprotected = 0, + EUProtected = 1 + }; + + + // Rejection reason + enum TRejectionType + { + EURejectionNone = 0x00000000, + EURejectionStartTime = 0x00000001, + EURejectionEndTime = 0x00000002, + EURejectionInterval = 0x00000004, + EURejectionCounter = 0x00000008, + EURejectionTopLevel = 0x00000010, + EURejectionTimedCounter = 0x00000020, + EURejectionAccumulated = 0x00000040, + EURejectionIndividual = 0x00000080, + EURejectionSystem = 0x00000100, + EURejectionVendor = 0x00000200, + EURejectionSoftware = 0x00000400, + EURejectionMetering = 0x00000800, + EURejectionDrmTime = 0x10000000 + }; + + } + +#endif // DRMUTILITYTYPES_H diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/javaattribute.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/javaattribute.h Fri Mar 26 04:17:01 2010 +0530 @@ -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 f9f9f96b1873 -r a3e98f9c292b dependencies/javadomainpskeys.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/javadomainpskeys.h Fri Mar 26 04:17:01 2010 +0530 @@ -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 f9f9f96b1873 -r a3e98f9c292b dependencies/javaregistry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/javaregistry.h Fri Mar 26 04:17:01 2010 +0530 @@ -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 f9f9f96b1873 -r a3e98f9c292b dependencies/javaregistryapplicationentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/javaregistryapplicationentry.h Fri Mar 26 04:17:01 2010 +0530 @@ -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 f9f9f96b1873 -r a3e98f9c292b dependencies/javaregistryentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/javaregistryentry.h Fri Mar 26 04:17:01 2010 +0530 @@ -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 f9f9f96b1873 -r a3e98f9c292b dependencies/javaregistryentrytype.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/javaregistryentrytype.h Fri Mar 26 04:17:01 2010 +0530 @@ -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 f9f9f96b1873 -r a3e98f9c292b dependencies/javaregistrypackageentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/javaregistrypackageentry.h Fri Mar 26 04:17:01 2010 +0530 @@ -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 f9f9f96b1873 -r a3e98f9c292b dependencies/mjavaattribute.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/mjavaattribute.h Fri Mar 26 04:17:01 2010 +0530 @@ -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 f9f9f96b1873 -r a3e98f9c292b dependencies/swi/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/swi/bld.inf Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,7 @@ +#include +PRJ_EXPORTS + +sispackagetrust.h swi\sispackagetrust.h +sisregistryentry.h swi\sisregistryentry.h +sisregistrylog.h swi\sisregistrylog.h +sisregistrysession.h swi\sisregistrysession.h diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/swi/sispackagetrust.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/swi/sispackagetrust.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,48 @@ +/* +* Copyright (c) 2004-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" +* 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: +* SisTrustStatus - Trust enumeration for SIS packages +* +*/ + + +/** + @file + @released + @internalComponent +*/ + +#ifndef __SISTRUSTSTATUS_H__ +#define __SISTRUSTSTATUS_H__ + +#include + +namespace Swi +{ +/** + * @internalComponent + * @released + */ +enum TSisPackageTrust + { + ESisPackageUnsignedOrSelfSigned = 0, ///< Untrusted - Application is unsigned or self-signed + ESisPackageValidationFailed = 50, ///< Untrusted - Application's Certificate chain validation failed + ESisPackageCertificateChainNoTrustAnchor = 100, ///< Untrusted - Application's Certificate chain validated but no matching issuer certificate could be found in the certstore. + ESisPackageCertificateChainValidatedToTrustAnchor = 200, ///< Trusted - Application's Certificate chain validated to an issuer certificate in the certstore + ESisPackageChainValidatedToTrustAnchorOCSPTransientError = 300, ///< Trusted - Application's Certificate chain validated and OCSP failed with a transient error + ESisPackageChainValidatedToTrustAnchorAndOCSPValid = 400, ///< Trusted - Application's Certificate chain validated and OCSP response was ok + ESisPackageBuiltIntoRom = 500 ///< Trusted - Application is built into device ROM + }; +} // namespace +#endif diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/swi/sisregistryentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/swi/sisregistryentry.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,495 @@ +/* +* Copyright (c) 2004-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" +* 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: +* SisRegistry - client registry entry(package) interface +* Clients use the defined interface to access and querry information +* specific to a single installed package. +* The access to specific functionality depends on the client capabilities +* and may be restricted. +* +*/ + + +/** + @file + @released + @publishedPartner +*/ + +#ifndef __SISREGISTRYENTRY_H__ +#define __SISREGISTRYENTRY_H__ + +#include +#include + +class CX509Certificate; + +namespace Swi +{ +class RSisRegistrySession; +class CSisRegistryPackage; +class CSisRegistryDependency; +class CHashContainer; +class TSisTrustStatus; + +/** + * Client registry entry interface + * + * @publishedPartner + * @released + */ +class RSisRegistryEntry : public RSubSessionBase + { +public: + + /** + * Opens the base package entry by specifying a UID. + * + * - A base package is a self-sufficient package which does + * not depend on other packages with the same UID. It is also completely removed + * together with all related augmentation packages. + * + * - An agmentation package shares a UID with a base package and 'augments' the base package. + * It can only be installed only when the related base package is installed + * It can be uninstalled separatelly (without removing base package) + * + * + * @param aSession The open RSisRegistrySession to use + * @param aUid The UID identifying the entry + * @return KErrNone if successful, otherwise an error code + */ + IMPORT_C TInt Open(RSisRegistrySession &aSession, TUid aUid); + + /** + * Open a registry entry (includes augmentations) by specifying a package + * + * @param aSession The open RSisRegistrySession to use + * @param aPackage The package to open + * + * @return KErrNone if successful, or an error code + */ + IMPORT_C TInt OpenL(RSisRegistrySession &aSession, const CSisRegistryPackage& aPackage); + + /** + * Open a registry entry (includes augmentations) by specifying a package + * and vendor name. + * + * @param aSession The open RSisRegistrySession to use + * @param aPackageName The name of the package + * @param aVendorName The name of the vendor + * @return KErrNone if successful, otherwise an error code + */ + IMPORT_C TInt Open(RSisRegistrySession &aSession, const TDesC& aPackageName, const TDesC& aVendorName); + + /** + * Closes the registry entry by closing the sub-session + */ + IMPORT_C void Close(); + + /** + * Indicates whether the package is currently on the device (i.e. not on + * removable media that is not inserted). + * + * @return ETrue if the package is on the device; + * EFalse otherwise + */ + IMPORT_C TBool IsPresentL(); + + /** + * Indicates whether the package is signed + * + * @return ETrue the package is signed; + * EFalse otherwise + */ + IMPORT_C TBool IsSignedL(); + + /** + * Indicates the level of trust associated with the package + * + * @return The level of trust + * @deprecated Will be replaced in the future by a more complete TrustStatusL method. + */ + IMPORT_C TSisPackageTrust TrustL() const; + + /** + * The time at which the trust level was established + * + * @return The time at which the trust level was established + * @deprecated Will be replaced in the future by a more complete TrustStatusL method. + */ + IMPORT_C TTime TrustTimeStampL() const; + + + /** + * The trust status object for the entry. This supercedes information + * provided by the deprecated TrustL and TrustTimeStampL methods. + * + * @return The trust status information associated with + * this entry. + */ + IMPORT_C TSisTrustStatus TrustStatusL(); + + /** + * Indicates whether or not the package is installed on read-only media + * + * + * @return ETrue if any drive used by this package is read-only; + * EFalse otherwise + */ +#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK + /** + * N.B. Using Usif::RSoftwareComponentRegistry::IsComponentOnReadOnlyDriveL + * will return different result when we have an empty ROM stub or when all + * the files of a ROM based package are eclipsed, since SCR only considers + * the current list of files registered with it. + */ +#endif + IMPORT_C TBool IsInRomL(); + + + + /** + * Indicates whether or not the package augments another package + * + * @return ETrue if the package is an augmentation; + * EFalse otherwise + */ + IMPORT_C TBool IsAugmentationL(); + + /** + * Gets the version of this package + * + * @return The version + */ + IMPORT_C TVersion VersionL(); + + /** + * Gets the installed language for this package + * + * @return The language + */ + IMPORT_C TLanguage LanguageL(); + + /** + * Gets the UID of this package + * + * @return The UID + */ + IMPORT_C TUid UidL(); + + /** + * Gets the name of a package + * + * @return The name of the package + */ + IMPORT_C HBufC* PackageNameL(); + + /** + * Gets the unique vendor name of this package + * + * @return The unique vendor name + */ + IMPORT_C HBufC* UniqueVendorNameL(); + + /** + * Gets the localised vendor name of a package + * + * @return The localised name of the vendor + */ + IMPORT_C HBufC* LocalizedVendorNameL(); + + /** + * Returns an array of Sids (executables). The array is supplied by the + * client which is then populated. + * + * @param aSids On return, the array object to be populated. + */ + IMPORT_C void SidsL(RArray& aSids); + + /** + * Provides a list of files installed by this package. This function may also return + * a file specification that contains wildcard characters ('?' and/or '*') if the + * package is a rom 'stub' sis file. Wildcard file specifications are NOT expanded and + * in this instance, the Count() member function on 'aFiles' cannot be used as an + * indicator of the number of files within the package. + * + * @param aFiles The array of files to be populated. + */ + IMPORT_C void FilesL(RPointerArray& aFiles); + + /** + * Returns the size of the installation excluding the size of + * other embedded packages + * + * @return A TInt64 value of the total installation size + */ + IMPORT_C TInt64 SizeL(); + + /** + * Provides the certificate chains associated with this package + * + * @param aCertificateChains The array of certificate chains + */ + IMPORT_C void CertificateChainsL(RPointerArray& aCertificateChains); + + /** + * Gets the value of a property within a package + * + * @param aKey The key to search for + * @return The value of this key if found; + KErrNotFound otherwise. + */ + IMPORT_C TInt PropertyL(TInt aKey); + + /** + * Returns all augmentations to this package. If no augmentations exist, + * the lists are empty + * + * @param aPackageNames On return, a list of PackageNames + * @param aVendorNames On return, the corresponding list of VendorNames + * + */ + IMPORT_C void AugmentationsL(RPointerArray& aPackageNames, RPointerArray& aVendorNames); + + /** + * Returns all augmentations to this package. If no augmentations exist, + * the list is empty + * + * @param aPackages The array of CSisRegistryPackages to be populated + */ + IMPORT_C void AugmentationsL(RPointerArray& aPackages); + + /** + * Gets the number of augmentations to this package. + * @return the number of augmentations to this package + */ + IMPORT_C TInt AugmentationsNumberL(); + + /** + * Returns the hash value of a selected file, identified by its name + * + * @param aFileName the full file path + * @return A new CHashContainer object + */ + IMPORT_C CHashContainer* HashL(const TDesC& aFileName); + + /** + * Returns the package of a current entry + * + * @return A new CSisRegistryPackage object + */ + IMPORT_C CSisRegistryPackage* PackageL(); + + /** + * Return the controllers associated with this package as raw binary data + * + * @param aControllers The array of controllers to be populated. + * + */ + IMPORT_C void ControllersL(RPointerArray& aControllers); + + /** + Returns what drive the user selected for files in the Sis file that + did not specify drive.It returns KNoDriveSelected if user is not prompted for drive selection. + For ROM stub packages it returns zero instead of KNoDriveSelected + To determine the set of drives that files were installed to for this registry entry @see RSisRegistryEntry::InstalledDrivesL(). + @return TChar The drive selected + @see KNoDriveSelected + */ + IMPORT_C TChar SelectedDriveL(); + + /** + Determines whether the base package or any of the partial upgrades + require all applications within this package to be to be shutdown before + uninstalling the package. + + @return Whether to shutdown all applications at un-install. + */ + IMPORT_C TBool ShutdownAllAppsL(); + + /** + The function is used to re-verify the signature and certificate of the + SIS Controller associated to the RSisRegistryEntry object. + + aX509CertArray parameter is used to give set of trusted root certificates + that are used for validation of the SIS Controller certificate. If the + set given as parameter is empty, Symbian implementation can fetch the + set of trusted root certificates from Certificate Management. If the set + is not empty, then root certificates should not be fetched from + Certificate Mgmt, but only the root certificates from the set given as + parameter should be used for SIS Controller certificate validation. + + @param Array of trusted root certificates. + @return Returns ETrue if the registry entry is validated against the + trusted certificates provided. + */ + IMPORT_C TBool VerifyControllerSignatureL(RPointerArray& aX509CertArray); + + /** + The function is used to re-verify the signature and certificate of the + SIS Controller associated to the RSisRegistryEntry object. + + aX509CertArray parameter is used to give set of trusted root certificates + that are used for validation of the SIS Controller certificate. If the + set given as parameter is empty, Symbian implementation can fetch the + set of trusted root certificates from Certificate Management. If the set + is not empty, then root certificates should not be fetched from + Certificate Mgmt, but only the root certificates from the set given as + parameter should be used for SIS Controller certificate validation. + + @param aX509CertArray Array of trusted root certificates. + @param aCheckDateAndTime Indicates if the certificate validity period should be checked against the current date and time. + @return Returns ETrue if the registry entry is validated against the + trusted certificates provided. + */ + IMPORT_C TBool VerifyControllerSignatureL(RPointerArray& aX509CertArray, TBool aCheckDateAndTime); + + /** + Indicates whether or not the package will be removed by uninstalling the last dependant + */ + IMPORT_C TInt RemoveWithLastDependentL(); + + /** + This function is used to indicate the embedding package has been uninstalled but + this package remained because of dependency. + */ + IMPORT_C void SetRemoveWithLastDependentL(TUid uid); + + /** + * @return true if the 'non-removable' flag is NOT set in the SisInfo object + * belonging to this package. + */ + IMPORT_C TBool RemovableL(); + + /** + Returns set of drives to which files were installed in SIS file + @return Returns The bitmask of drives is as follows: + Bit 0 -> A drive + Bit 1 -> B drive + so on and so forth. + */ + IMPORT_C TUint InstalledDrivesL(); + + /** + * Returns whether or not the package was pre-installed + * + * @return ETrue if the package was pre-installed + * EFalse otherwise + */ + IMPORT_C TBool PreInstalledL(); + + /** + * Returns whether or not the package was pre-installed and files should + * be deleted on uninstall. This will have been set true if and only if + * the swipolicy indicates that preinstalled files can be deleted, and the + * stub sis file used to install the package was writable at install time. + * + * @return ETrue if the package was pre-installed and files should be + * deleted on uninstall. + * EFalse otherwise + */ + IMPORT_C TBool IsDeletablePreInstalledL(); + + + /** + * Returns the array of packages which are either dependent on this package or are + * augmentations of this package. + * + * @note + * A is a "Dependent" of B if B is in A's dependency list + * A is a "dependency" of B if A is in B's dependency list + * For example consider a package Shared_library_B which is used by a package App_A. + * Shared_Library_B will be listed as a dependency in the sis file which installs App_A + * App_A cannot be installed successfully without Shared_Library_B being present. + * If Shared_Library_B is un-installed App_A may not function correctly. + * App_A is a "dependent" of Shared_library_B + * Shared_library_B is a "dependency" of App_A + * + * @param aDependents The array of packages which are either dependent on this package + * or are augmentations of this package (i.e. its dependents) + * + */ + IMPORT_C void DependentPackagesL(RPointerArray& aDependents); + + /** + * Returns the dependency array for this package (ie the packages, denoted + * by UID and the version ranges it depends on). + * + * @note + * A is a "Dependent" of B if B is in A's dependency list + * A is a "dependency" of B if A is in B's dependency list + * For example consider a package Shared_library_B which is used by a package App_A. + * Shared_Library_B will be listed as a dependency in the sis file which installs App_A + * App_A cannot be installed successfully without Shared_Library_B being present. + * If Shared_Library_B is un-installed App_A may not function correctly. + * In this scenario + * App_A is a "dependent" of Shared_library_B + * Shared_library_B is a "dependency" of App_A + * + * @param aDependencies The array of packages that this package depends on (i.e. its dependencies) + * + */ + IMPORT_C void DependenciesL(RPointerArray& aDependencies); + + /** + * For a given package entry, return a array of packages that were + * embedded within this package. + * + * @param aEmbedded The array of embedded packages + * + */ + IMPORT_C void EmbeddedPackagesL(RPointerArray& aEmbedded); + + /** + * For a given package entry, return a array of packages that + * embed it. + * Note: This is possible when package A embeds D and the subsequently installed packages + * B and C each in turn embed D. As there will be a single copy and a single + * registration for D, it is imperative this back information is retained + * and it is accessible. + * + * @param aEmbedding The array of embedding packages + * + */ + IMPORT_C void EmbeddingPackagesL(RPointerArray& aEmbedding); + + /** + * Returns ETrue if the SIS package is signed by a certificate trusted by the device (SU) + * for eclipsing of files on the Z drive + * + */ + IMPORT_C TBool IsSignedBySuCertL(); + + /** + * Returns the list of files that were created internally by registry. This function + * is to be used to determine the list of internal files that are not to be removed for + * an NR package during an RFS(Restore Factory Settings). + * + * @param aRegistryFiles The array of filenames with complete path + */ + IMPORT_C void RegistryFilesL(RPointerArray& aRegistryFiles); + +protected: + /** + * @internalComponent + */ + HBufC8* SendReceiveBufferLC(TInt aMessage); + /** + * @internalComponent + */ + HBufC8* SendReceiveBufferLC(TInt aMessage, const TDesC& aInputDescriptor); + }; + +} // namespace +#endif diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/swi/sisregistrylog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/swi/sisregistrylog.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,214 @@ +/* +* Copyright (c) 2007-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" +* 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 access to a specific functionality depends on the client capabilities +* and may be restricted. +* +*/ + + +/** + @file + @publishedPartner + @released +*/ + +#ifndef __SISREGISTRYLOGGING_H__ +#define __SISREGISTRYLOGGING_H__ + +#include +#include +#include + +class RReadStream; +class RWriteStream; +#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK +namespace Usif + { + class RSoftwareComponentRegistry; + } +#endif + + +namespace Swi +{ +class CSisRegistryObject; + +enum TSwiLogTypes + { + ESwiLogInstall =0, + ESwiLogUnInstall, + ESwiLogUpgrade, + ESwiLogRestore + }; + +namespace +{ + const TInt KLogFileMajorVersion = 4; + const TInt KLogFileMinorVersion = 0; +} + +#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK +namespace ScrHelperUtil + { + HBufC8* GetLogInfoLC(const Usif::RSoftwareComponentRegistry& aScrSession, TInt aMaxLogEntries); + } +#endif + +class CLogEntry : public CBase +{ +#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK +friend HBufC8* ScrHelperUtil::GetLogInfoLC(const Usif::RSoftwareComponentRegistry& aScrSession, TInt aMaxLogEntries); +#endif +public: + static CLogEntry* NewL(const CSisRegistryObject& aObject,TSwiLogTypes InstallInfo); + static CLogEntry* NewLC(const CSisRegistryObject& aObject,TSwiLogTypes InstallInfo); + + /** + * Constructs a entry from a given existing stream. + */ + static CLogEntry* NewL(RReadStream& aStream); + static CLogEntry* NewLC(RReadStream& aStream); + + /** + * Default Constructor + */ + CLogEntry(){}; + + /** + * Write the object to a stream + * + * @param aStream The stream to write to + */ + void ExternalizeL(RWriteStream& aStream) const; + + /** + * Read the object from a stream + * + * @param aStream The stream to read from. + */ + void InternalizeL(RReadStream& aStream) ; + + /** + * Destructor + */ + ~CLogEntry(); + + void ConstructL(RReadStream& aStream); + void ConstructL(const CSisRegistryObject& aObject,TSwiLogTypes InstallInfo); + + /** + * Returns the Time + * + * @return HBufC8 descriptor containing text. + */ + IMPORT_C const TTime GetTime() const; + + /** + * The package name. + * @return the name of this package as reference to TDesC. + */ + IMPORT_C const TDesC& GetPkgName() const; + + /** + * The Major Version + * @return he major version number of the package + */ + IMPORT_C TInt32 GetMajorVersion() const; + + /** + * The Minor Version. + * @return the minor version number of the package. + */ + IMPORT_C TInt32 GetMinorVersion() const; + + /** + * The Build Version. + * @return the Build Version of the package. + */ + IMPORT_C TInt32 GetBuildVersion() const; + + /** + * The UID. + * @return the Uid of the package. + */ + IMPORT_C const TUid GetUid() const; + + /** + * Returns the install type for this package + * @return The install type + */ + IMPORT_C TSwiLogTypes GetInstallType() const; + +private: + + HBufC* iPackageName ; + TInt32 iMajorVersion; + TInt32 iMinorVersion; + TInt32 iBuildVersion; + TSwiLogTypes iInstallType ; + TTime iEvent ; + TUid iUid; +}; + +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS +/** + * @internalComponent + * @released + */ +class CLogFileVersion : public CBase + { +public: + CLogFileVersion() + { + iLogFileMajorVersion = KLogFileMajorVersion; + iLogFileMinorVersion = KLogFileMinorVersion; + } + + static CLogFileVersion* NewL(RReadStream& aStream); + static CLogFileVersion* NewLC(RReadStream& aStream); + + /** + * Write the object to a stream + * + * @param aStream The stream to write to + */ + void ExternalizeL(RWriteStream& aStream) const; + + /** + * Read the object from a stream + * + * @param aStream The stream to read from. + */ + void InternalizeL(RReadStream& aStream) ; + + void ConstructL(); + void ConstructL(RReadStream& aStream); + + /** + * Copy Constructor + */ + CLogFileVersion(const CLogFileVersion& aObject1); + +private: + TUint8 iLogFileMajorVersion; + TUint8 iLogFileMinorVersion; + + }; +#endif //SYMBIAN_ENABLE_SPLIT_HEADERS +} //namespace + +#endif + + diff -r f9f9f96b1873 -r a3e98f9c292b dependencies/swi/sisregistrysession.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dependencies/swi/sisregistrysession.h Fri Mar 26 04:17:01 2010 +0530 @@ -0,0 +1,218 @@ +/* +* Copyright (c) 2004-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" +* 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: +* RSisRegistrySession - external client registry session interface +* The defined fuctionality is used by clients to access the registry as a whole +* and to perform registry global searches. +* The access to a specific functionality is depends on the client capabilities +* and may be restricted. +* +*/ + + +/** + @file + @publishedPartner + @released +*/ + +#ifndef __SISREGISTRYSESSION_H__ +#define __SISREGISTRYSESSION_H__ + +#include +#include +#include + +#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK +#include +#endif + +// Use Char 0xFF to indicate no drive is selected +const TInt KNoDriveSelected = 0xFF; + +namespace Swi +{ +class CHashContainer; +class CSisRegistryPackage; + +/** + * External client registry session interface + * + * @publishedPartner + * @released + */ +class RSisRegistrySession : public RSessionBase + { +public: + + /** + * Connect to the server, attempt to start it if it is not yet running + * + * @return KErrNone if successful or an error code + */ + IMPORT_C TInt Connect(); + + /** + * Returns an array of installed uids (excludes augmentations). + * The array is supplied by the client which is then populated. + * There should be no assumption about the order in which the uids are put + * in it as it is implementation dependent. + * + * @param aUids The array object to be populated. + * @capability ReadUserData + * + */ + IMPORT_C void InstalledUidsL(RArray& aUids); + + /** + * Returns an array of the curently installed packages (including augmentations). + * + * + * @param aPackages The array of installed packages + * @capability ReadUserData + * + */ + IMPORT_C void InstalledPackagesL(RPointerArray& aPackages); + + /** + * Checks whether or not the package identified by this UID is installed. + * + * @param aUid The uid to search for + * + * @return ETrue if the Uid is installed + * EFalse otherwise + */ + IMPORT_C TBool IsInstalledL(TUid aUid); + + /** + * Checks whether or not the package, identified by this controller is installed. + * + * @param aController The controller (as raw binary representation) to search for + * + * @return ETrue if the controller is installed + * EFalse otherwise + */ + IMPORT_C TBool IsInstalledL(TDesC8& aController); + + /** + * Query whether or not a file is tagged as modifiable. + * @note The hash value for non-modifiable content should stay the same. + * + * @param aFileName The filename (incl full path) to be used to search the entries + * + * @return ETrue if it can be modified + * EFalse otherwise + */ + IMPORT_C TBool ModifiableL(const TDesC& aFileName); + + /** + * Returns a pointer to the hash for this file + * + * @param aFileName The filename (incl full path) to be searched for + * + * @return A new CHashContainer object representing the hash. + */ + IMPORT_C CHashContainer* HashL(const TDesC& aFileName); + + /** + * Returns a pointer to package containing this Sid + * + * @param aSid The Sid of an application for which the package is requested + * + * @return A new CSisRegistryPackage object associated with the Sid. + */ + IMPORT_C CSisRegistryPackage* SidToPackageL(TUid aSid); + + /** + * Queries the registry for an installed filename relating to a specific sid + * + * @param aSid the sid of a file that was installed + * @param aFileName on return the filename found + */ + IMPORT_C void SidToFileNameL(TUid aSid,TDes& aFileName); + + /** + * Queries the registry for an installed filename relating to a specific sid + * This function will return only a sid that is associated to a specific drive. + * This function leaves with KErrNotFound if not exact macth is found ( Sid associated to drive) + * + * @param aSid the sid of a file that was installed + * @param aFileName on return the filename found + * @param aDrive specifies on which drive the sid is expected to be found. + */ + IMPORT_C void SidToFileNameL(TUid aSid,TDes& aFileName, TDriveUnit aDrive); + + IMPORT_C TBool IsSidPresentL(TUid aSid); + + /** + * Retrieve the enteries in log file + * + * @capability ReadUserData + * @param aLogFile The caller supplies an empty array of CLogEntry which is loaded + * with a enteries in log file. If Log file is not present then array count will be + * zero. The caller is responsible for deleting all memory. + */ + IMPORT_C void RetrieveLogFileL(RPointerArray& aLogFile); + + /** + * Returns an array of the currently installed packages which can be removed + * (including augmentations). + * + * @capability ReadUserData + * @param aPackages The array of installed packages which are removable + */ + IMPORT_C void RemovablePackagesL(RPointerArray& aPackages); + + + /** + * Checks to see if a recovery needs to take place. If so, failed + * transactions are rolled back, and the cache regenerated. + */ + IMPORT_C void RecoverL(); + +#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK + /** + @internalComponent + * Verifies whether a file is registered to any existing component. Please note that this function does not support wildcards - both in the file name, and in the list of owned files in the registry. + */ + IMPORT_C TBool IsFileRegisteredL(const TDesC& aFileName); + + /** + @internalAll + * Returns the SCR component id for the base component (i.e. not an SP package/augmentation) with the given UID. + */ + IMPORT_C Usif::TComponentId GetComponentIdForUidL(const TUid& aUid); +#endif + +protected: + /** + * @internalComponent + */ + HBufC8* SendReceiveBufferLC(TInt aMessage); + /** + * @internalComponent + */ + HBufC8* SendReceiveBufferLC(TInt aMessage, TPtrC8 aInputBuffer); + /** + * @internalComponent + */ + HBufC8* SendReceiveBufferLC(TInt aMessage, const TDesC& aInputDescriptor); + /** + * @internalComponent + */ + HBufC8* SendReceiveBufferLC(TInt aMessage, TPtrC8 aInputBuffer, TInt aThirdArgument); + }; + +} // namespace +#endif