--- a/classicui_plat/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ b/classicui_plat/group/bld.inf Tue Jul 06 23:03:17 2010 +0800
@@ -31,7 +31,6 @@
#include "../extended_lists_api/group/bld.inf"
#include "../input_block_api/group/bld.inf"
#include "../avkon_ui_server_api/group/bld.inf"
-#include "../number_grouping_api/group/bld.inf"
#include "../extended_status_pane_api/group/bld.inf"
#include "../extended_notifiers_api/group/bld.inf"
#include "../task_list_api/group/bld.inf"
--- a/classicui_plat/number_grouping_api/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2006-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: File that exports the files belonging to
-: Number Grouping API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/NumberGrouping.h MW_LAYER_PLATFORM_EXPORT_PATH(NumberGrouping.h)
-../inc/AknPhoneNumberGrouping.h MW_LAYER_PLATFORM_EXPORT_PATH(AknPhoneNumberGrouping.h)
-../inc/NumberGroupingStd.h MW_LAYER_PLATFORM_EXPORT_PATH(NumberGroupingStd.h)
-../inc/NumberGroupingCRKeys.h MW_LAYER_PLATFORM_EXPORT_PATH(NumberGroupingCRKeys.h)
--- a/classicui_plat/number_grouping_api/inc/AknPhoneNumberGrouping.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-/*
-* Copyright (c) 2002-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:
-*
-* This class gives feature variant - independent access to Series 60 number grouping
-* and provides digit type conversion.
-*
-*
-*/
-
-
-#ifndef AKNPHONENUMBERGROUPING_H
-#define AKNPHONENUMBERGROUPING_H
-
-// INCLUDES
-
-#include <e32std.h>
-#include <gdi.h>
-
-// CONSTANTS
-
-
-// CLASS DECLARATION
-
-class CPNGNumberGrouping;
-
-
-/**
-* This class acts as a wrapper for the Number Grouping engine (NumberGrouping.dll).
-* It exposes non-static API to the engine so that it can be used without the client code dealing with the
-* issues of
-* - build switches for calling numbergrouping API
-* - build switches for linking to NumberGrouping.lib
-* - checks on Feature Manager.
-*
-* It deals with these internally. In the case of __SERIES60_PHONE_NUMBER_GROUPING being #undef-ed, this
-* object acts as if there is a "null" phone number grouping.
-*
-* Static methods are included for those who are doing a small number of individual groupings of phone numbers,
-* say, when a view or popup is constructed, or a title pane is refreshed. These construct the object
-* internally within the static call.
-*
-* The class also deals with the conversion of numbers to potentially locale or setting-
-* specific number symbols, using the Series 60 platform policy.
-*
-* For repeated, frequent operations, the non-static API is recommended. Only a limited number of methods
-* from NumberGrouping.h are exposed, but these suffice in the main use cases.
-*
-* @lib Avkon.dll
-* @since 2.6
-*/
-NONSHARABLE_CLASS(CAknPhoneNumberGrouping) : public CBase
- {
- public:
- // 2 stage constructors
- IMPORT_C static CAknPhoneNumberGrouping* NewLC(TInt aUnformattedLength);
- IMPORT_C static CAknPhoneNumberGrouping* NewL(TInt aUnformattedLength);
-
- // Destructor
- ~CAknPhoneNumberGrouping();
-
- public: // non-static methods for using phone number grouping engine in the simplest cases
-
- /**
- * Load an ungrouped number into the phone number grouping engine
- * This calls the CPNGNumberGrouping::Set within the engine
- *
- * @since 2.6
- * @param aUngroupedNumber input ungrouped phone number
- * @return KErrNone if there was no error
- */
- IMPORT_C TInt Set( const TDesC& aUngroupedNumber );
-
- /**
- * Returns a reference to the formatted number stored within the number grouping engine
- *
- * NOTE: This api does not convert to current digit type. This requires a method that takes
- * a modifiable descriptor, so use CopyFormattedNumber( TDes& ) const
- *
- * This method is particularly useful for obtaining the size of the required buffer to copy
- * the grouped phone number to by calling FormattedNumber.Length()
- *
- * @since 2.6
- * @return reference to internally held formatted (grouped) phone number
- */
- IMPORT_C const TDesC& FormattedNumber() const;
-
- /**
- * Copies the grouped phone number stored in the object to the supplied output buffer,
- * performing any current digit type conversion required.
- *
- * The length required for the supplied output descriptor must be greater or equal to the text waiting
- * to be copied out of the instance. This can be determined before the call with no loss of
- * performance with FormattedNumber().Length();
- *
- * The application will be Panicked (USER 11) if the output descriptor is too short.
- *
- * @since 2.6
- * @param aGroupedNumber Output (grouped) descriptor to be written to. To avoid a panic, this
- * must be at least as big as the formatted number currently stored.
- */
- IMPORT_C void CopyFormattedNumber( TDes& aGroupedNumber ) const;
-
- public: // Static utility methods for doing the one-off grouping of phone numbers
-
- /**
- * Static utility method for doing one-off grouping of a phone number according to the current
- * configuration.
- *
- * The method Leaves if the number grouping engine could not be allocated, or the output heap memory
- * could not be allocated.
- *
- * @since 2.6
- * @param aUngroupedNumber Input descriptor to be grouped
- * @return Pointer to heap descriptor containing the grouped number
- * Ownership is transferred to the caller
- */
- IMPORT_C static HBufC* CreateGroupedPhoneNumberL( const TDesC& aUngroupedNumber );
-
- /**
- * Static utility method for doing one-off grouping of a phone number according to the current
- * configuration.
- *
- * The operations are internally trapped so as not to leave. The grouped number must fit into output
- * descriptor, or else no grouping will take place and the input will just be copied to the output.
- * A negative return value will indicate that the output did not fit, and by how much.
- *
- * The application will be Panicked (USER 11) if the output descriptor is too short even for an exact
- * copy of the input.
- *
- * @since 2.6
- * @param aUngroupedNumber Input descriptor to be grouped
- * @param aGroupedNumber Output (grouped) descriptor to be written to
- * @return If the entire grouped number could be copied to the output, then the
- * returned number is zero or positive. This number represents the number
- * of further characters in the grouped number that could have been accomodated.
- * A negative return value indicates that the grouped number could not be
- * copied, and that the ungrouped number had to be copied. The magnitude
- * of the return value in this case is how many more characters would have
- * been needed.
- */
- IMPORT_C static TInt GroupPhoneNumber( const TDesC& aUngroupedNumber, TDes& aGroupedNumber );
-
- /**
- * Static utility method for doing one-off grouping of a phone number according to the current
- * configuration.
- *
- * The operations are internally trapped so as not to leave. The grouped number must fit into the one,
- * input/output descriptor, or else no grouping will take place. A negative return value indicates that the
- * grouped number did not fit.
- *
- * @since 2.6
- * @param aUngroupedNumber Input descriptor to be grouped
- * @return If the entire grouped number could be copied to the output, then the
- * returned number is zero or positive. This number represents the number
- * of further characters in the grouped number that could have been accomodated.
- * A negative return value indicates that the grouped number could not be
- * copied, and that the ungrouped number had to be copied. The magnitude
- * of the return value in this case is how many more characters would have
- * been needed.
- */
- IMPORT_C static TInt GroupPhoneNumber( TDes& aPhoneNumber );
-
- private:
- /**
- * C++ constructor.
- */
- CAknPhoneNumberGrouping();
-
- /**
- * 2nd phase constructor is private.
- */
- void ConstructL( TInt aUnformattedLength );
-
- /**
- * Internal method for creating a phone number grouping engine and copying out the result to an
- * output buffer.
- *
- * The creation of the engine may leave, in which case nothing else happens. But if it does not
- * leave, an attempt will be made to copy the grouped phone number to aGroupedPhoneNumber.
- * If there is enough space, it is copied and the amount of space in characters left over in
- * the target buffer is returned. If it does not fit, then there is no copy made and the
- * aExtraSpace contains a negative value, the additional length required.
- *
- * @param aUngroupedNumber Input descriptor containing a phone number
- * @param aGroupedNumber Output descriptor for the grouped phone number
- * @param aExtraSpace How much extra space there was in the output descriptor
- * @return EFalse iff the grouped phone number was not copied.
- */
- static TBool DoFormatPhoneNumberL(
- const TDesC& aUngroupedNumber,
- TDes& aGroupedNumber,
- TInt& aExtraSpace);
-
- private:
- // Owned number grouping engine
- CPNGNumberGrouping* iNumberGroupingEngine;
- };
-
-#endif
-
-// End of File
--- a/classicui_plat/number_grouping_api/inc/NumberGrouping.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,351 +0,0 @@
-/*
-* Copyright (c) 2002-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: Provides formatting (grouping) for plain phone numbers
-*
-*
-*/
-
-
-#ifndef C_NUMBER_GROUPING_H
-#define C_NUMBER_GROUPING_H
-
-// #define __TEST_AS_EXE__ // put this in if you want all the test code to run and swap the mmps...
-
-#include "NumberGroupingStd.h"
-
-class TResourceReader;
-class CRegularExpression;
-class CPNGNumberGroupingExtension;
-
-/**
-* Engine class to format plain phone numbers by inserting grouping separators.
-* Both unformatted and formatted buffers are maintained by this class.
-* A reversed formatted buffer is also available to assist the client in performing wrapping.
-*
-* @lib NumberGrouping.lib
-*/
-NONSHARABLE_CLASS(CPNGNumberGrouping) : public CBase
-{
-
-/**
-* Central Repository key values for KNumberGrouping key in NumberGroupingCRKeys.h
-*/
-public:
- enum TNumberGroupingCRValues
- {
- /** Number grouping disabled */
- ENumberGroupingDisabled = 0,
- /** Number grouping enabled (USA) */
- ENumberGroupingEnabled = 1
- };
-
-public:
- IMPORT_C static CPNGNumberGrouping* NewL(TInt aMaxLength = 0, TBool aReversed = EFalse);
- IMPORT_C static CPNGNumberGrouping* NewLC(TInt aMaxLength = 0, TBool aReversed = EFalse);
- IMPORT_C ~CPNGNumberGrouping();
-
- IMPORT_C TInt Insert(TInt aIndex, TText aChar);
- IMPORT_C TInt Delete(TInt aIndex);
- IMPORT_C TInt Append(TText aChar);
-
- /**
- * Sets the new unformatted phone number.
- *
- * Formatting does not actually occur until an API is called that accesses in some way the formatted buffer
- * or one of its characteristics
- *
- * @param aNumber Ungrouped phone number to be copied into the NumberGrouping engine's unformatted buffer
- * @return KErrOverflow if the number is too long for the length of the unformatted buffer
- */
- IMPORT_C TInt Set(const TDesC& aNumber);
-
- /**
- * @return Length of the currently formatted (grouped) buffer
- */
- IMPORT_C TInt Length() const;
-
- /**
- * @return Length of the currently unformatted buffer
- */
- IMPORT_C TInt UnFormattedLength() const;
-
- /**
- * This returns the maximum size of the unformatted buffer. This is the value that was provided during
- * construction.
- *
- * Descriptors provided to Set() must be shorter than this length.
- *
- * @return maximum length of the unformatted buffer.
- */
- IMPORT_C TInt MaxDisplayLength() const;
-
- /**
- * Routine to determine if the character at a given position in the formatted phone number
- * is a space character derived from the number grouping. That is, not part of the supplied phone number
- * proper, but a space character from the number grouping.
- *
- * A client can check the descriptor returned by FormattedNumber() directly to perform a simple test
- * of whether the character is a Space or not (whether or not derived from number grouping formatting)
- *
- * Note also that this returns EFalse if the character is some other formatting character besides
- * space. To determine that, use IsCharacterInsertedByNumberGrouping().
- *
- * @param aPos The index of the character of interest
- * @return EFalse iff the characer at aPos in the formatted buffer is a space coming from grouping
- */
- IMPORT_C TBool IsSpace(TInt aPos) const;
-
- /**
- * Access to section of the formatted buffer.
- * This routine returns a descriptor for the indicated range in the formatted (grouped) internal
- * buffer. If there are spaces at either end of the indicated section of the formatted buffer, then
- * the returned descriptor is adjusted to point to the trimmed buffer in order to avoid the spaces.
- *
- * @param aFrom Inclusive starting index
- * @param aTo Inclusive end index
- * @return reference to const non-modifiable descriptor for the indicated, trimmed text
- */
- IMPORT_C const TDesC& FormattedNumber(TInt aFrom, TInt aTo) const;
-
- IMPORT_C const TDesC& FormattedNumber() const;
-
- /**
- * Access to part of the reverse formatted number. If there are spaces at either end of the indicated
- * section of the formatted buffer, then the returned descriptor is adjusted to point to the trimmed
- * buffer in order to avoid the spaces.
- *
- * Returns KNullDesC if the feature has not been enabled by passing ETrue to the
- * parameter aReversed during construction
- *
- * @param aFrom lower (inclusive) limit of the text to look at
- * @param aTo upper (inclusive) limit of the text to look at
- * @return Reference to descriptor containing the selected text
- */
- IMPORT_C const TDesC& ReverseFormattedNumber(TInt aFrom, TInt aTo) const;
-
- /**
- * Access to the reverse formatted number
- *
- * Returns KNullDesC if the feature has not been enabled by passing ETrue to the
- * parameter aReversed during construction
- *
- * @return Reference to descriptor containing the reverse formatted text
- */
- IMPORT_C const TDesC& ReverseFormattedNumber() const;
- IMPORT_C const TDesC& Selection(TInt aFrom, TInt aTo) const;
-
- IMPORT_C const TDesC& UnFormattedNumber(TInt aFrom, TInt aTo) const;
- IMPORT_C const TDesC& UnFormattedNumber() const;
-
- /**
- * This method allows the client to determine if the indexed character is a number grouping supplied
- * character. Specifically, this means that this character originates in the number grouping formatting
- * and not from the supplied unformatted phone number.
- *
- * Where the number has not been grouped (e.g. because there is an invalid phone number character in the
- * supplied descriptor), this method returns EFalse, even if the character pointed to may be of the nature
- * of a number grouping character. Use IsChangedByGrouping() to see if the number has been changed by
- * grouping at all.
- *
- * Where a client is interested purely in the nature of the characters rather than whether they come from
- * grouping or not, he may examine the examine the text via the descriptor reference returned by
- * FormattedNumber().
- *
- * @since Series 60 2.6
- * @param aPos The index provided is for the formatted number.
- * @return EFalse iff the character at the supplied index is part of the supplied phone number
- */
- IMPORT_C TBool IsCharacterInsertedByNumberGrouping(TInt aPos) const;
-
- /**
- * Method to determine if the current number has been changed by number grouping.
- * If this returns EFalse, then FormattedNumber() and UnFormattedNumber() refer to descriptors of with identical
- * content.
- * If this method returns ETrue, then the descriptors that would be returned by the two accessor APIs refer
- * to descriptors with different content.
- *
- * @since Series 60 2.6
- * @return ETrue iff formatting of the number has made an effective difference.
- */
- IMPORT_C TBool IsChangedByGrouping() const;
-
- /**
- * @return return iLanguage.
- */
- inline TLanguage Language() const;
-
-
-public:
-
- TLanguage iForceLanguage;
-
-private: // private classes and enums
-
- class TPNGSeparator
- {
- public:
- TPNGSeparator();
- TPNGSeparator( TInt aPos, TText aSeparatorCharacter );
- public:
- TInt iPosition;
- TText iSeparatorCharacter;
- };
-
- class TPNGGroupingInfo
- {
- public:
- TPNGGroupingInfo();
- public:
- TInt iMinNumberOfDigits;
- TInt iMaxNumberOfDigits;
- RArray<TPNGSeparator> iAfterPositions; // Positions of separators "after" the beginning
- TPNGSeparator iBeforePosition; // Positions of separators "before" the end
- };
-
- // Constant for no pattern in use:
- enum
- {
- ENoMatchedPattern = -1
- };
-
-private: // Constructors
- CPNGNumberGrouping( TInt aMaxLength, TBool aReserved);
- void ConstructL();
-
-private:
- TLanguage doReadLanguageFromSharedData() const;
-
- void doReadFormatInfoFromResourceFileL();
- void doClearGroupingItemsList();
- void doClearFormattedNumbers();
-
- void doNumberGroupingL() const;
- void doNumberSquashing() const;
-
- /**
- * Read and process a single NUMBER_GROUPING_ITEM resource structure
- */
- void ReadGroupingSchemeL(
- TResourceReader& aResourceReader,
- RPointerArray<TDesC>& aGroupingPatternsList,
- TInt& aMaxExtraCharacters );
-
- /**
- * Read and skip a single NUMBER_GROUPING_ITEM resource structure
- */
- void SkipGroupingSchemeL( TResourceReader& aResourceReader ) const;
-
- /**
- * Process the format pattern for "after positions"
- */
- void ParseForAfterPositions(
- const TDesC& aFormatPattern,
- TPNGGroupingInfo* aGroupingInfo,
- const TDesC& aWildcardedMatchingPattern,
- TInt& aMaxExtraCharacters,
- TBool& trailingPossible ) const;
-
- /**
- * Process the format pattern for a before positions
- */
- void ParseForBeforePosition(
- const TDesC& aFormatPattern,
- CPNGNumberGrouping::TPNGGroupingInfo* aGroupingInfo,
- TInt& aMaxExtraCharacters
- ) const;
-
- /**
- * This routine is used to find a wildcarded version of the matching pattern
- * provided in the "initialDigits" element for a grouping scheme read from resource.
- * It uses the services of the CRegularExpression class, an instance of which is constructed
- * with the provided aMatchString pattern only.
- *
- * The client must supply a modifiable descriptor long enough to hold the wildcarded version
- * of the pattern.
- *
- * For each character index, if there is only one possible valid character, this puts in that
- * character. If there are more than one, then the supplied aWildcardChar is inserted. The
- * initialDigits element uses a full stop as a numeric wildcard; this is replaced with the nominated
- * wildcard.
- *
- * Rules: (where 'n, has been passed is used as the wildcard)
- * "<a numeric digit>" -> "<a numeric digit>"
- * ( e.g. "1" -> "1" )
- * "+" -> "+"
- * "." -> "n"
- * "[0-3]" -> "n"
- *
- * @param aMatchString Regular expression to provide example of
- * @param aWildcardChar The character to put in the example pattern if there is no single
- * valid character at that point
- * @param aWildcardMatchString Descriptor to write the wildcarded match pattern into
- */
- void GetWildcardVersionOfMatchStringL(
- const TDesC& aMatchString,
- TText aWildcard,
- TDes& aWildcardMatchString ) const;
-
- /**
- * This method expresses the policy of what characters may form part of a phone number
- * Note that this method is valid even it there is no formatting going on. It is an intrinsic
- * test on the character itself
- */
- TBool IsValidPhoneNumberCharacter(TText aCharacter) const;
-
- /**
- * Examines the unformatted number, counting how many digits are found before non-digit
- * characters or the end is encountered.
- * Returns 0 if Set() has not been called.
- */
- TInt LengthToGroup() const;
-
- /**
- * Perform number grouping using pattern at given index. Grouping is only applied to the leading
- * aLengthToGroup characters.
- */
- void doNumberGroupingForPatternL( TInt aMatchedPattern, TInt aLengthToGroup ) const;
-
-private: // private data
-
- HBufC* iUnformattedNumber;
- mutable TPtrC iUnformattedNumberPtr;
-
- mutable HBufC* iFormattedNumber;
- mutable TPtrC iFormattedNumberPtr;
-
- mutable HBufC* iReverseFormattedNumber;
- mutable TPtrC iReverseFormattedNumberPtr;
-
- mutable TPtrC iSelectionPtr;
-
- mutable TLanguage iLanguage; // the system language
- TInt iMaxUnformattedLength;
- TBool iReversed;
-
- CRegularExpression* iRegExp; // the patterns for matching
- RPointerArray<TPNGGroupingInfo> iGroupingItemsList; // the formatting info
-
- mutable TInt iMatchedPatternIndex; // keep track of what pattern is matched
- CPNGNumberGroupingExtension* iExtension;
-};
-
-inline TLanguage CPNGNumberGrouping::Language() const
- {
- return iLanguage;
- }
-
-
-#endif // C_NUMBER_GROUPING_H
-
-// End of File
--- a/classicui_plat/number_grouping_api/inc/NumberGroupingCRKeys.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2004-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: Central Repository keys.
- *
- *
-*/
-
-
-#ifndef NUMBERGROUPING_CR_KEYS_H
-#define NUMBERGROUPING_CR_KEYS_H
-
-const TUid KCRUidNumberGrouping = { 0x101F8775 };
-
-/**
- * Number Grouping
- *
- * Possible values are:
- * 0 (none)
- * 1 (USA)
- *
- * Default value: 0
- */
-const TUint32 KNumberGrouping = 0x00000001;
-
-#endif
-
-// End of file
--- a/classicui_plat/number_grouping_api/inc/NumberGroupingStd.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* 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 "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 NUMBERGROUPING_STD_H
-#define NUMBERGROUPING_STD_H
-
-// standard includes
-
-#include <e32std.h>
-#include <e32base.h>
-#include <s32mem.h>
-
-// number grouping constants
-
-const TInt KSingleCharacter = 1;
-
-const TInt KErrInvalidChar = -45;
-const TInt KErrIndexOutOfRange = -46;
-const TInt KErrSyntaxError = -47;
-
-const TInt KStateMatched = -1;
-const TInt KStateNoMatch = 0;
-
-const TInt KCharacterDot = 11;
-const TInt KCharacterPlus = 12;
-
-// Panic Enumeration
-
-enum TNumberGroupingPanic
- {
- ENumberGroupingInvalidSeparatorCharacterInFormat,
- ENumberGroupingMatchingPatternVersusFormatPatternMismatch,
- ENumberGroupingNoInitialDigitsInResource,
- ENumberGroupingBadMinMaxDigitRangeInResource,
- ENumberGroupingFormattedNumberAlreadyExists,
- ENumberGroupingNoSuchStateMachine,
- ENumberGroupingBadLengthToGroup
- };
-
-
-#endif // NUMBERGROUPING_STD_H
-
-// End of File
--- a/classicui_plat/number_grouping_api/number_grouping_api.metaxml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-<?xml version="1.0" ?>
-<api id="d1f905c1e22cf34fd4fccb18c048f91c" dataversion="1.0">
- <name>Number Grouping API</name>
- <description>Provides a number grouping feature.</description>
- <type>c++</type>
- <subsystem>uiutils</subsystem>
- <libs>
- <lib name="avkon.lib" />
- <lib name="numbergrouping.lib" />
- </libs>
- <release category="domain"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>yes</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/classicui_plat/number_grouping_api/tsrc/bwins/testdomnumbergroupingu.def Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
-
--- a/classicui_plat/number_grouping_api/tsrc/conf/tctestnumbergroupingnumgrping.cfg Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-[Test]
-title TestNUMGRPINGNewLL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 1
-[Endtest]
-
-[Test]
-title TestNUMGRPINGNewLCL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 2
-[Endtest]
-
-[Test]
-title TestNUMGRPINGDestructorL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 3
-[Endtest]
-
-[Test]
-title TestNUMGRPINGInsertL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 4
-[Endtest]
-
-[Test]
-title TestNUMGRPINGDeleteL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 5
-[Endtest]
-
-[Test]
-title TestNUMGRPINGAppendL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 6
-[Endtest]
-
-[Test]
-title TestNUMGRPINGSetL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 7
-[Endtest]
-
-[Test]
-title TestNUMGRPINGLengthL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 8
-[Endtest]
-
-[Test]
-title TestNUMGRPINGUnFormattedLengthL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 9
-[Endtest]
-
-[Test]
-title TestNUMGRPINGMaxDisplayLengthL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 10
-[Endtest]
-
-[Test]
-title TestNUMGRPINGIsSpaceL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 11
-[Endtest]
-
-[Test]
-title TestNUMGRPINGFormattedNumberL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 12
-[Endtest]
-
-[Test]
-title TestNUMGRPINGFormattedNumberNullL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 13
-[Endtest]
-
-[Test]
-title TestNUMGRPINGReverseFormattedNumberL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 14
-[Endtest]
-
-[Test]
-title TestNUMGRPINGReverseFormattedNumberNullL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 15
-[Endtest]
-
-[Test]
-title TestNUMGRPINGSelectionL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 16
-[Endtest]
-
-[Test]
-title TestNUMGRPINGUnFormattedNumberL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 17
-[Endtest]
-
-[Test]
-title TestNUMGRPINGUnFormattedNumberNullL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 18
-[Endtest]
-
-[Test]
-title TestNUMGRPINGIsCharacterInsertedByNumberGroupingL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 19
-[Endtest]
-
-[Test]
-title TestNUMGRPINGIsChangedByGroupingL
-run testscripter c:\testframework\ui_testnumbergroupingnumgrping.cfg 20
-[Endtest]
\ No newline at end of file
--- a/classicui_plat/number_grouping_api/tsrc/conf/tctestnumbergroupingphonenumgrping.cfg Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-[Test]
-title TestPHONENUMGRPINGNewLCL
-run testscripter c:\testframework\ui_testnumbergroupingphonenumgrping.cfg 1
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGNewLL
-run testscripter c:\testframework\ui_testnumbergroupingphonenumgrping.cfg 2
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGSetL
-run testscripter c:\testframework\ui_testnumbergroupingphonenumgrping.cfg 3
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGFormattedNumberL
-run testscripter c:\testframework\ui_testnumbergroupingphonenumgrping.cfg 4
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGCopyFormattedNumberL
-run testscripter c:\testframework\ui_testnumbergroupingphonenumgrping.cfg 5
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGCreateGroupedPhoneNumberL
-run testscripter c:\testframework\ui_testnumbergroupingphonenumgrping.cfg 6
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGGroupPhoneNumberGroupL
-run testscripter c:\testframework\ui_testnumbergroupingphonenumgrping.cfg 7
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGGroupPhoneNumberPhoneL
-run testscripter c:\testframework\ui_testnumbergroupingphonenumgrping.cfg 8
-[Endtest]
--- a/classicui_plat/number_grouping_api/tsrc/conf/ui_testnumbergroupingnumgrping.cfg Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-[Test]
-title TestNUMGRPINGNewLL
-create testdomnumbergrouping test
-test TestNUMGRPINGNewLL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGNewLCL
-create testdomnumbergrouping test
-test TestNUMGRPINGNewLCL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGDestructorL
-create testdomnumbergrouping test
-test TestNUMGRPINGDestructorL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGInsertL
-create testdomnumbergrouping test
-test TestNUMGRPINGInsertL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGDeleteL
-create testdomnumbergrouping test
-test TestNUMGRPINGDeleteL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGAppendL
-create testdomnumbergrouping test
-test TestNUMGRPINGAppendL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGSetL
-create testdomnumbergrouping test
-test TestNUMGRPINGSetL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGLengthL
-create testdomnumbergrouping test
-test TestNUMGRPINGLengthL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGUnFormattedLengthL
-create testdomnumbergrouping test
-test TestNUMGRPINGUnFormattedLengthL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGMaxDisplayLengthL
-create testdomnumbergrouping test
-test TestNUMGRPINGMaxDisplayLengthL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGIsSpaceL
-create testdomnumbergrouping test
-test TestNUMGRPINGIsSpaceL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGFormattedNumberL
-create testdomnumbergrouping test
-test TestNUMGRPINGFormattedNumberL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGFormattedNumberNullL
-create testdomnumbergrouping test
-test TestNUMGRPINGFormattedNumberNullL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGReverseFormattedNumberL
-create testdomnumbergrouping test
-test TestNUMGRPINGReverseFormattedNumberL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGReverseFormattedNumberNullL
-create testdomnumbergrouping test
-test TestNUMGRPINGReverseFormattedNumberNullL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGSelectionL
-create testdomnumbergrouping test
-test TestNUMGRPINGSelectionL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGUnFormattedNumberL
-create testdomnumbergrouping test
-test TestNUMGRPINGUnFormattedNumberL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGUnFormattedNumberNullL
-create testdomnumbergrouping test
-test TestNUMGRPINGUnFormattedNumberNullL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGIsCharacterInsertedByNumberGroupingL
-create testdomnumbergrouping test
-test TestNUMGRPINGIsCharacterInsertedByNumberGroupingL
-delete test
-[Endtest]
-
-[Test]
-title TestNUMGRPINGIsChangedByGroupingL
-create testdomnumbergrouping test
-test TestNUMGRPINGIsChangedByGroupingL
-delete test
-[Endtest]
\ No newline at end of file
--- a/classicui_plat/number_grouping_api/tsrc/conf/ui_testnumbergroupingphonenumgrping.cfg Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-[Test]
-title TestPHONENUMGRPINGNewLCL
-create testdomnumbergrouping test
-test TestPHONENUMGRPINGNewLCL
-delete test
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGNewLL
-create testdomnumbergrouping test
-test TestPHONENUMGRPINGNewLL
-delete test
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGSetL
-create testdomnumbergrouping test
-test TestPHONENUMGRPINGSetL
-delete test
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGFormattedNumberL
-create testdomnumbergrouping test
-test TestPHONENUMGRPINGFormattedNumberL
-delete test
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGCopyFormattedNumberL
-create testdomnumbergrouping test
-test TestPHONENUMGRPINGCopyFormattedNumberL
-delete test
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGCreateGroupedPhoneNumberL
-create testdomnumbergrouping test
-test TestPHONENUMGRPINGCreateGroupedPhoneNumberL
-delete test
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGGroupPhoneNumberGroupL
-create testdomnumbergrouping test
-test TestPHONENUMGRPINGGroupPhoneNumberGroupL
-delete test
-[Endtest]
-
-[Test]
-title TestPHONENUMGRPINGGroupPhoneNumberPhoneL
-create testdomnumbergrouping test
-test TestPHONENUMGRPINGGroupPhoneNumberPhoneL
-delete test
-[Endtest]
--- a/classicui_plat/number_grouping_api/tsrc/eabi/testdomnumbergroupingu.def Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
--- a/classicui_plat/number_grouping_api/tsrc/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test number_grouping_api
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-
-PRJ_EXPORTS
-
-
-PRJ_TESTMMPFILES
-testdomnumbergrouping.mmp
-
-PRJ_MMPFILES
-
-// End of File
--- a/classicui_plat/number_grouping_api/tsrc/group/testdomnumbergrouping.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*TYPE TESTCLASS*//*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test number_grouping_api
-*
-*/
-
-#include <data_caging_paths.hrh>
-#ifdef SBSV2
-#include <platform_paths.hrh>
-#else
-#include <platform_paths.hrh>
-#endif
-
-TARGET testdomnumbergrouping.dll
-TARGETTYPE dll
-UID 0x1000008D 0x2001CB80
-
-CAPABILITY ALL -TCB
-
-DEFFILE testdomnumbergrouping.def
-
-SMPSAFE
-
-#ifdef SBSV2
-USERINCLUDE ../inc
-
- MW_LAYER_SYSTEMINCLUDE
-
-#else // SBSV2 not defined
-USERINCLUDE ../inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH ../src
-#endif // SBSV2
-
-SOURCE testdomnumbergrouping.cpp
-SOURCE testdomnumbergroupingblocks.cpp
-SOURCE testdomnumbergroupingblocksphonenumgrping.cpp
-SOURCE testdomnumbergroupingblocksnumgrping.cpp
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY AVKON.LIB
-LIBRARY NumberGrouping.lib
-
-LANG SC
-
-// End of File
--- a/classicui_plat/number_grouping_api/tsrc/group/testdomnumbergrouping.pkg Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-; Languages
-&EN
-
-; Provide value for uid
-#{"testdomnumbergrouping"},(0x2001CB80),1,0,0,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-"..\init\testdomnumbergrouping.ini"-"c:\Testframework\testdomnumbergrouping.ini", FF ; FF stands for Normal file
-
-"..\conf\tctestnumbergroupingnumgrping.cfg"-"c:\Testframework\tctestnumbergroupingnumgrping.cfg", FF ; FF stands for Normal file
-"..\conf\ui_testnumbergroupingnumgrping.cfg"-"c:\Testframework\ui_testnumbergroupingnumgrping.cfg", FF ; FF stands for Normal file
-
-"..\conf\tctestnumbergroupingphonenumgrping.cfg"-"c:\Testframework\tctestnumbergroupingphonenumgrping.cfg", FF ; FF stands for Normal file
-"..\conf\ui_testnumbergroupingphonenumgrping.cfg"-"c:\Testframework\ui_testnumbergroupingphonenumgrping.cfg", FF ; FF stands for Normal file
-
-"\epoc32\RELEASE\ARMV5\urel\testdomnumbergrouping.dll"-"c:\sys\bin\testdomnumbergrouping.dll", FF
-
--- a/classicui_plat/number_grouping_api/tsrc/inc/testdomnumbergrouping.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,330 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test number_grouping_api
-*
-*/
-
-
-
-#ifndef C_TESTDOMNUMBERGROUPING_H
-#define C_TESTDOMNUMBERGROUPING_H
-
-/*
- * INCLUDES
- */
-#include <stiflogger.h>
-#include <testscripterinternal.h>
-#include <stiftestmodule.h>
-#include <testclassassert.h>
-
-/*
- * Declare class
- */
-class CAknPhoneNumberGrouping;
-class CPNGNumberGrouping;
-// MACROS
-#define TEST_CLASS_VERSION_MAJOR 0
-#define TEST_CLASS_VERSION_MINOR 0
-#define TEST_CLASS_VERSION_BUILD 0
-
-/*
- * Logging path
- */
-_LIT( KtestdomnumbergroupingLogPath, "\\logs\\testframework\\testdomnumbergrouping\\" );
-/*
- * Log file
- */
-_LIT( KtestdomnumbergroupingLogFile, "testdomnumbergrouping.txt" );
-_LIT( KtestdomnumbergroupingLogFileWithTitle, "testdomnumbergrouping_[%S].txt" );
-
-/**
-* CTestDOMNUMBERGROUPING test class for STIF Test Framework TestScripter.
-* @since S60 5.0
-*/
-NONSHARABLE_CLASS(CTestDOMNUMBERGROUPING) : public CScriptBase
- {
-public:
-
- /**
- * Two-phased constructor.
- */
- static CTestDOMNUMBERGROUPING* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CTestDOMNUMBERGROUPING();
-
-public:
-
- /**
- * From CScriptBase Runs a script line.
- * @since S60 5.0
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
-private:
-
- /**
- * C++ default constructor.
- */
- CTestDOMNUMBERGROUPING( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- * @since S60 5.0
- */
- void Delete();
- /**
- * TestPHONENUMGRPINGNewLCL test function for testing the NewLC function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestPHONENUMGRPINGNewLCL( CStifItemParser& /*aItem*/ );
- /**
- * TestPHONENUMGRPINGNewLL test function for testing the NewL function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestPHONENUMGRPINGNewLL( CStifItemParser& /*aItem*/ );
- /**
- * TestPHONENUMGRPINGSetL test function for testing the Set function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestPHONENUMGRPINGSetL( CStifItemParser& /*aItem*/ );
- /**
- * TestPHONENUMGRPINGFormattedNumberL test function for testing the
- * FormattedNumber function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestPHONENUMGRPINGFormattedNumberL( CStifItemParser& /*aItem*/ );
- /**
- * TestPHONENUMGRPINGCopyFormattedNumberL test function for testing the
- * FormattedNumber function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestPHONENUMGRPINGCopyFormattedNumberL( CStifItemParser& /*aItem*/ );
- /**
- * TestPHONENUMGRPINGCreateGroupedPhoneNumberL test function for testing the
- * CreateGroupedPhoneNumber function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestPHONENUMGRPINGCreateGroupedPhoneNumberL( CStifItemParser& /*aItem*/ );
- /**
- * TestPHONENUMGRPINGGroupPhoneNumberGroupL test function for testing the
- * GroupPhoneNumberGroup function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestPHONENUMGRPINGGroupPhoneNumberGroupL( CStifItemParser& /*aItem*/ );
- /**
- * TestPHONENUMGRPINGGroupPhoneNumberPhoneL test function for testing the
- * GroupPhoneNumberPhone function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestPHONENUMGRPINGGroupPhoneNumberPhoneL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGNewLL test function for testing the NewL function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGNewLL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGNewLCL test function for testing the NewLC function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGNewLCL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGDestructorL test function for testing the Destructor function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGDestructorL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGInsertL test function for testing the Insert function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGInsertL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGDeleteL test function for testing the Delete function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGDeleteL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGAppendL test function for testing the Append function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGAppendL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGSetL test function for testing the Set function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGSetL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGLengthL test function for testing the Length function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGLengthL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGUnFormattedLengthL test function for testing the
- * UnFormattedLength function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGUnFormattedLengthL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGMaxDisplayLengthL test function for testing the
- * MaxDisplayLength function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGMaxDisplayLengthL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGIsSpaceL test function for testing the IsSpace function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGIsSpaceL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGFormattedNumberL test function for testing the
- * FormattedNumber function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGFormattedNumberL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGFormattedNumberNullL test function for testing the
- * FormattedNumber function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGFormattedNumberNullL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGReverseFormattedNumberL test function for testing the
- * ReverseFormattedNumber function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGReverseFormattedNumberL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGReverseFormattedNumberNullL test function for testing the
- * ReverseFormattedNumber function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGReverseFormattedNumberNullL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGSelectionL test function for testing the Selection function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGSelectionL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGUnFormattedNumberL test function for testing the UnFormattedNumber
- * function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGUnFormattedNumberL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGUnFormattedNumberNullL test function for testing the
- * UnFormattedNumber function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGUnFormattedNumberNullL( CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGIsCharacterInsertedByNumberGroupingL test function for testing
- * the IsCharacterInsertedByNumberGrouping function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGIsCharacterInsertedByNumberGroupingL(
- CStifItemParser& /*aItem*/ );
- /**
- * TestNUMGRPINGIsChangedByGroupingL test function for testing the
- * IsChangedByGrouping function
- * @since S60 5.0
- * @param aItem never used
- * @return Symbian OS error code.
- */
- virtual TInt TestNUMGRPINGIsChangedByGroupingL( CStifItemParser& /*aItem*/ );
-
- /**
- * Method used to log version of test class
- */
- void SendTestClassVersion();
-
-private:
-
- /**
- * ScreenSaver Property
- */
- TInt iOldScreenSaverProperty;
-
-
-
- };
-
-#endif
-
-/*
- *
- * End of File
- */
--- a/classicui_plat/number_grouping_api/tsrc/init/testdomnumbergrouping.ini Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-#
-# This is STIFTestFramework initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-# - Set Test Reporting mode. TestReportMode's possible values are:
-# + 'Summary': Summary of the tested test cases.
-# + 'Environment': Hardware and software info.
-# + 'TestCases': Test case report.
-# + 'FullReport': Set of all above ones.
-# + Example 'TestReportMode= Summary TestCases'
-#
-# - CreateTestReport setting controls report creation mode
-# + YES, Test report will created.
-# + NO, No Test report.
-#
-# - File path indicates the base path of the test report.
-# - File name indicates the name of the test report.
-#
-# - File format indicates the type of the test report.
-# + TXT, Test report file will be txt type, for example 'TestReport.txt'.
-# + HTML, Test report will be html type, for example 'TestReport.html'.
-#
-# - File output indicates output source of the test report.
-# + FILE, Test report logging to file.
-# + RDEBUG, Test report logging to using rdebug.
-#
-# - File Creation Mode indicates test report overwriting if file exist.
-# + OVERWRITE, Overwrites if the Test report file exist.
-# + APPEND, Continue logging after the old Test report information if
-# report exist.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are:
- # 'Summary', 'Environment', 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-UITestingSupport= Yes
-SeparateProcesses= YES
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= testdomnumbergroupingtestdomnumbergroupingtestdomnumbergrouping
-# Modules might have initialisation file, specified as
-# IniFile= YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= NormalCases.txt
-# TestCaseFile= SmokeCases.txt
-# TestCaseFile= ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-[New_Module]
-ModuleName= testcombiner
-TestCaseFile= c:\testframework\tctestnumbergroupingphonenumgrping.cfg
-TestCaseFile= c:\testframework\tctestnumbergroupingnumgrping.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-#Load testmoduletestdomnumbergrouping, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
-
-#TestModuletestdomnumbergrouping used initialization file
-#IniFile= init.txt
-
-#TestModuletestdomnumbergrouping used configuration file(s)
-#TestCaseFile= testcases1.cfg
-#TestCaseFile= testcases2.cfg
-#TestCaseFile= manualtestcases.cfg
-
-#[End_Module]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# Hardware and emulator environment logging path and styles can
-# be configured from here to overwrite the Logger's implemented values.
-#
-# Settings description:
-# - Indicates option for creation log directory/directories. If log directory/directories
-# is/are not created by user they will make by software.
-# + YES, Create log directory/directories if not allready exist.
-# + NO, Log directory/directories not created. Only created one is used.
-#
-# - Overwrite emulator path setting.
-# + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
-# Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-# will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-# - Overwrite emulator's logging format.
-# + TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-# + HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-# - Overwrited emulator logging output source.
-# + FILE, Logging to file(s).
-# + RDEBUG, Logging to using rdebug(s).
-#
-# - Overwrite hardware path setting (Same description as above in emulator path).
-# - Overwrite hardware's logging format(Same description as above in emulator format).
-# - Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-# - File Creation Mode indicates file overwriting if file exist.
-# + OVERWRITE, Overwrites if file(s) exist.
-# + APPEND, Continue logging after the old logging information if file(s) exist.
-#
-# - Will thread id include to the log filename.
-# + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-# + NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-# - Will time stamps include the to log file.
-# + YES, Time stamp added to each line in log file(s). Time stamp is
-# for example'12.Nov.2003 115958 LOGGING INFO'
-# + NO, No time stamp(s).
-#
-# - Will line breaks include to the log file.
-# + YES, Each logging event includes line break and next log event is in own line.
-# + NO, No line break(s).
-#
-# - Will event ranking include to the log file.
-# + YES, Event ranking number added to each line in log file(s). Ranking number
-# depends on environment's tics, for example(includes time stamp also)
-# '012 12.Nov.2003 115958 LOGGING INFO'
-# + NO, No event ranking.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-EmulatorBasePath= C:\LOGS\TestFramework\
-EmulatorFormat= HTML # Possible values: TXT or HTML
-EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- a/classicui_plat/number_grouping_api/tsrc/src/testdomnumbergrouping.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test number_grouping_api
-*
-*/
-
-
-
-/*
- * INCLUDE FILES
- */
-#include <stiftestinterface.h>
-#include <settingserverclient.h>
-#include <e32property.h>
-
-#include "testdomnumbergrouping.h"
-
-_LIT( KModuleName, "testdomnumbergrouping.dll" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::CTestDOMNUMBERGROUPING
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CTestDOMNUMBERGROUPING::CTestDOMNUMBERGROUPING( CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CTestDOMNUMBERGROUPING::ConstructL()
- {
- RSettingServer settingServer;
- CleanupClosePushL( settingServer );
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- TLoggerSettings loggerSettings;
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- settingServer.Close();
- CleanupStack::PopAndDestroy( &settingServer );
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KtestdomnumbergroupingLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KtestdomnumbergroupingLogFile);
- }
-
- iLog = CStifLogger::NewL( KtestdomnumbergroupingLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- SendTestClassVersion();
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CTestDOMNUMBERGROUPING* CTestDOMNUMBERGROUPING::NewL( CTestModuleIf& aTestModuleIf )
- {
- CTestDOMNUMBERGROUPING* self = new( ELeave ) CTestDOMNUMBERGROUPING( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CTestDOMNUMBERGROUPING::~CTestDOMNUMBERGROUPING()
- {
-
- Delete();
-
- delete iLog;
-
- }
-
-//-----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::SendTestClassVersion
-// Method used to send version of test class
-//-----------------------------------------------------------------------------
-//
-void CTestDOMNUMBERGROUPING::SendTestClassVersion()
- {
- TVersion moduleVersion;
- moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
- moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
- moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
-
- TFileName moduleName;
- moduleName = KModuleName;
-
- TBool newVersionOfMethod = ETrue;
- TestModuleIf().SendTestModuleVersion( moduleVersion, moduleName,
- newVersionOfMethod );
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf )
- {
- return ( CScriptBase* ) CTestDOMNUMBERGROUPING::NewL( aTestModuleIf );
- }
-// End of File
--- a/classicui_plat/number_grouping_api/tsrc/src/testdomnumbergroupingblocks.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test number_grouping_api
-*
-*/
-
-
-
-/*
- * [INCLUDE FILES]
- */
-#include <e32svr.h>
-#include <stifparser.h>
-#include <stiftestinterface.h>
-
-#include "testdomnumbergrouping.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CTestDOMNUMBERGROUPING::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::RunMethodL(
- CStifItemParser& aItem )
- {
-
- static TStifFunctionInfo const KFunctions[] =
- {
- ENTRY( "TestPHONENUMGRPINGNewLCL", CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGNewLCL ),
- ENTRY( "TestPHONENUMGRPINGNewLL", CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGNewLL ),
- ENTRY( "TestPHONENUMGRPINGSetL", CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGSetL ),
- ENTRY( "TestPHONENUMGRPINGFormattedNumberL", CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGFormattedNumberL ),
- ENTRY( "TestPHONENUMGRPINGCopyFormattedNumberL", CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGCopyFormattedNumberL ),
- ENTRY( "TestPHONENUMGRPINGCreateGroupedPhoneNumberL", CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGCreateGroupedPhoneNumberL ),
- ENTRY( "TestPHONENUMGRPINGGroupPhoneNumberGroupL", CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGGroupPhoneNumberGroupL ),
- ENTRY( "TestPHONENUMGRPINGGroupPhoneNumberPhoneL", CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGGroupPhoneNumberPhoneL ),
-
- ENTRY( "TestNUMGRPINGNewLL", CTestDOMNUMBERGROUPING::TestNUMGRPINGNewLL ),
- ENTRY( "TestNUMGRPINGNewLCL", CTestDOMNUMBERGROUPING::TestNUMGRPINGNewLCL ),
- ENTRY( "TestNUMGRPINGDestructorL", CTestDOMNUMBERGROUPING::TestNUMGRPINGDestructorL ),
- ENTRY( "TestNUMGRPINGInsertL", CTestDOMNUMBERGROUPING::TestNUMGRPINGInsertL ),
- ENTRY( "TestNUMGRPINGDeleteL", CTestDOMNUMBERGROUPING::TestNUMGRPINGDeleteL ),
- ENTRY( "TestNUMGRPINGAppendL", CTestDOMNUMBERGROUPING::TestNUMGRPINGAppendL ),
- ENTRY( "TestNUMGRPINGSetL", CTestDOMNUMBERGROUPING::TestNUMGRPINGSetL ),
- ENTRY( "TestNUMGRPINGLengthL", CTestDOMNUMBERGROUPING::TestNUMGRPINGLengthL ),
- ENTRY( "TestNUMGRPINGUnFormattedLengthL", CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedLengthL ),
- ENTRY( "TestNUMGRPINGMaxDisplayLengthL", CTestDOMNUMBERGROUPING::TestNUMGRPINGMaxDisplayLengthL ),
- ENTRY( "TestNUMGRPINGIsSpaceL", CTestDOMNUMBERGROUPING::TestNUMGRPINGIsSpaceL ),
- ENTRY( "TestNUMGRPINGFormattedNumberL", CTestDOMNUMBERGROUPING::TestNUMGRPINGFormattedNumberL ),
- ENTRY( "TestNUMGRPINGFormattedNumberNullL", CTestDOMNUMBERGROUPING::TestNUMGRPINGFormattedNumberNullL ),
- ENTRY( "TestNUMGRPINGReverseFormattedNumberL", CTestDOMNUMBERGROUPING::TestNUMGRPINGReverseFormattedNumberL ),
- ENTRY( "TestNUMGRPINGReverseFormattedNumberNullL", CTestDOMNUMBERGROUPING::TestNUMGRPINGReverseFormattedNumberNullL ),
- ENTRY( "TestNUMGRPINGSelectionL", CTestDOMNUMBERGROUPING::TestNUMGRPINGSelectionL ),
- ENTRY( "TestNUMGRPINGUnFormattedNumberL", CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedNumberL ),
- ENTRY( "TestNUMGRPINGUnFormattedNumberNullL", CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedNumberNullL ),
- ENTRY( "TestNUMGRPINGIsCharacterInsertedByNumberGroupingL", CTestDOMNUMBERGROUPING::TestNUMGRPINGIsCharacterInsertedByNumberGroupingL ),
- ENTRY( "TestNUMGRPINGIsChangedByGroupingL", CTestDOMNUMBERGROUPING::TestNUMGRPINGIsChangedByGroupingL ),
-
-
-
- };
-
- const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-/*
- * [End of File]
- */
--- a/classicui_plat/number_grouping_api/tsrc/src/testdomnumbergroupingblocksnumgrping.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,670 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test number_grouping_api
-*
-*/
-
-
-/*
- * Include files
- */
-#include <numbergrouping.h>
-
-#include "testdomnumbergrouping.h"
-
-/*
- * Descriptor declare
- */
-_LIT( KNormalNumber, "13548130726" );
-_LIT( KMoreLengthNumber, "1354813072688" );
-_LIT( KLessLengthNumber, "135481307" );
-_LIT( KNormalNumberSpace, " " );
-_LIT( KNormalNumberChar, "abcdefghijk" );
-_LIT( KNoStandardNumber, "12 43 32" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGNewLL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGNewLL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewL( maxlength,
- reserved );
- CleanupStack::PushL( numbergrouping );
- STIF_ASSERT_NOT_NULL( numbergrouping );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGNewLCL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGNewLCL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- STIF_ASSERT_NOT_NULL( numbergrouping );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGDestructorL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGDestructorL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewL( maxlength,
- reserved );
- CleanupStack::PushL( numbergrouping );
- STIF_ASSERT_NOT_NULL( numbergrouping );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGInsertL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGInsertL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC testlesslengthnumber( KLessLengthNumber );
- numbergrouping->Set( KLessLengthNumber );
-
- TInt einsertposition( 13 );
- TInt err( KErrNone );
- TText value( 1 );
-
- err = numbergrouping->Insert( einsertposition, value );
- STIF_ASSERT_EQUALS( KErrIndexOutOfRange, err );
-
- einsertposition = 9;
- err = numbergrouping->Insert( 9 , value );
- STIF_ASSERT_EQUALS( KErrNone, err );
-
- einsertposition = -8;
- err = numbergrouping->Insert( -8, value );
- STIF_ASSERT_EQUALS( KErrIndexOutOfRange, err );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGDeleteL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGDeleteL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
- TInt einsertposition( 13 );
- TInt err( KErrNone );
-
- err = numbergrouping->Delete( einsertposition );
- STIF_ASSERT_EQUALS( KErrIndexOutOfRange, err );
-
- einsertposition = 7;
- err = numbergrouping->Delete( einsertposition );
- STIF_ASSERT_EQUALS( KErrNone, err );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGAppendL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGAppendL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
-
- TText value( 1 );
- TInt err( KErrNone );
-
- err = numbergrouping->Append( value );
- STIF_ASSERT_EQUALS( KErrOverflow, err );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- CPNGNumberGrouping* numbergroup = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC testlesslengthnumber( KLessLengthNumber );
- numbergroup->Set( testlesslengthnumber );
-
- err = numbergrouping->Append( value );
- STIF_ASSERT_EQUALS( KErrNone, err );
- CleanupStack::PopAndDestroy( numbergroup );
-
- return err;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGSetL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGSetL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC testmorelengthnumber( KMoreLengthNumber );
- TDesC testnormalnumber( KNormalNumber );
- TDesC testlesslengthnumber( KLessLengthNumber );
- TInt err( KErrNone );
-
- err = numbergrouping->Set( testmorelengthnumber );
- STIF_ASSERT_EQUALS( KErrOverflow, err );
-
- err = numbergrouping->Set( testnormalnumber );
- STIF_ASSERT_EQUALS( KErrNone, err );
-
- err = numbergrouping->Set( testlesslengthnumber );
- STIF_ASSERT_EQUALS( KErrNone, err );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGLengthL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGLengthL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
-
- TInt beginposition( 2 );
- TInt endposition( 10 );
- TInt length( 0 );
-
- numbergrouping->FormattedNumber( beginposition, endposition );
- length = numbergrouping->Length();
- STIF_ASSERT_NOT_EQUALS( 0, length );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- CPNGNumberGrouping* numbergroup = CPNGNumberGrouping::NewLC( 0, reserved );
- numbergroup->Set( testnormalnumber );
-
- length = 0;
- length = numbergroup->Length();
- STIF_ASSERT_EQUALS( 0, length );
- CleanupStack::PopAndDestroy( numbergroup );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedLengthL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedLengthL( CStifItemParser&
- /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
-
- TInt length( 0 );
- length = numbergrouping->UnFormattedLength();
- STIF_ASSERT_NOT_EQUALS( 0, length );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- CPNGNumberGrouping* numbergroup = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- length = 0;
- length = numbergroup->UnFormattedLength();
- STIF_ASSERT_EQUALS( 0, length );
- CleanupStack::PopAndDestroy( numbergroup );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGMaxDisplayLengthL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGMaxDisplayLengthL( CStifItemParser&
- /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- TInt length( 0 );
- length = numbergrouping->MaxDisplayLength();
- STIF_ASSERT_EQUALS( maxlength, length );
-
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
- length = 0;
- length = numbergrouping->MaxDisplayLength();
- STIF_ASSERT_EQUALS( maxlength, length );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGIsSpaceL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGIsSpaceL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TInt checkposition( 3 );
- TBool flag = numbergrouping->IsSpace( checkposition );
- STIF_ASSERT_FALSE( flag );
-
- TDesC testnormalnumberspace( KNormalNumberSpace );
- numbergrouping->Set( testnormalnumberspace );
-
- flag = ETrue;
- flag = numbergrouping->IsSpace( checkposition );
- STIF_ASSERT_FALSE( flag );
-
- flag = ETrue;
- numbergrouping->FormattedNumber( 0, 11 );
- flag = numbergrouping->IsSpace( checkposition );
- STIF_ASSERT_FALSE( flag );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGFormattedNumberL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGFormattedNumberL( CStifItemParser&
- /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( 0, reserved );
-
- TDesC nulldesc( KNullDesC );
- TDesC returndesc( KNullDesC );
- TInt beginposition( 0 );
- TInt endposition( 4 );
-
- returndesc = numbergrouping->FormattedNumber( beginposition, endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- CPNGNumberGrouping* numbergroup = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- TDesC testnormalnumber( KNormalNumber );
- numbergroup->Set( testnormalnumber );
- returndesc = numbergroup->FormattedNumber( beginposition, endposition );
- STIF_ASSERT_NOT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergroup );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGFormattedNumberNullL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGFormattedNumberNullL( CStifItemParser&
- /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
- TDesC nulldesc( KNullDesC );
- TDesC returndesc( KNullDesC );
- returndesc = numbergrouping->FormattedNumber();
- STIF_ASSERT_NOT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGReverseFormattedNumberL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGReverseFormattedNumberL(
- CStifItemParser& /*aItem*/ )
- {
- TBool reserved( EFalse );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC nulldesc( KNullDesC );
- TDesC returndesc( KNullDesC );
- TInt beginposition( 3 );
- TInt endposition( 8 );
-
- returndesc = numbergrouping->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
- returndesc = numbergrouping->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- beginposition = -3;
- returndesc = numbergrouping->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- beginposition = 3;
- endposition = 15;
- returndesc = numbergrouping->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- endposition = -8;
- returndesc = numbergrouping->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- reserved = ETrue;
- CPNGNumberGrouping* numbergroup = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- beginposition = 3;
- endposition = 8;
- returndesc = numbergroup->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- numbergroup->Set( testnormalnumber );
- returndesc = numbergroup->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_NOT_EQUALS( nulldesc, returndesc );
-
- beginposition = -3;
- returndesc = numbergroup->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- beginposition = 3;
- endposition = 15;
- returndesc = numbergroup->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- endposition = -8;
- returndesc = numbergroup->ReverseFormattedNumber( beginposition,
- endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergroup );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGReverseFormattedNumberNullL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGReverseFormattedNumberNullL(
- CStifItemParser& /*aItem*/ )
- {
- TBool reserved( EFalse );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC nulldesc( KNullDesC );
- TDesC returndesc( KNullDesC );
- returndesc = numbergrouping->ReverseFormattedNumber();
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
- returndesc = numbergrouping->ReverseFormattedNumber();
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- reserved = ETrue;
- CPNGNumberGrouping* numbergroup = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- returndesc = numbergroup->ReverseFormattedNumber();
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- numbergroup->Set( testnormalnumber );
- returndesc = numbergroup->ReverseFormattedNumber();
- CleanupStack::PopAndDestroy( numbergroup );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGSelectionL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGSelectionL( CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC nulldesc( KNullDesC );
- TDesC returndesc( KNullDesC );
- TInt beginposition( 0 );
- TInt endposition( 7 );
- returndesc = numbergrouping->Selection( beginposition, endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- returndesc = numbergrouping->Selection( endposition, beginposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- beginposition = 20;
- returndesc = numbergrouping->Selection( beginposition, endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
- beginposition = 0;
- returndesc = numbergrouping->Selection( beginposition, endposition );
- STIF_ASSERT_NOT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedNumberL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedNumberL( CStifItemParser&
- /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC nulldesc( KNullDesC );
- TDesC returndesc( KNullDesC );
- TInt beginposition( 0 );
- TInt endposition( 7 );
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testnormalnumber );
- returndesc = numbergrouping->UnFormattedNumber( beginposition, endposition );
- STIF_ASSERT_NOT_EQUALS( nulldesc, returndesc );
-
- beginposition = -10;
- returndesc = KNullDesC;
- returndesc = numbergrouping->UnFormattedNumber( beginposition, endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- beginposition = 10;
- returndesc = numbergrouping->UnFormattedNumber( beginposition, endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- beginposition = 0;
- endposition = 20;
- returndesc = numbergrouping->UnFormattedNumber( beginposition, endposition );
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedNumberNullL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGUnFormattedNumberNullL(
- CStifItemParser& /*aItem*/ )
- {
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- TDesC nulldesc( KNullDesC );
- TDesC returndesc( KNullDesC );
- returndesc = numbergrouping->UnFormattedNumber();
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- TDesC testmorelengthnumber( KMoreLengthNumber );
- TDesC testnormalnumber( KNormalNumber );
- numbergrouping->Set( testmorelengthnumber );
- returndesc = numbergrouping->UnFormattedNumber();
- STIF_ASSERT_EQUALS( nulldesc, returndesc );
-
- numbergrouping->Set( testnormalnumber );
- returndesc = numbergrouping->UnFormattedNumber();
- STIF_ASSERT_NOT_EQUALS( nulldesc, returndesc );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGIsCharacterInsertedByNumberGroupingL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGIsCharacterInsertedByNumberGroupingL(
- CStifItemParser& /*aItem*/ )
- {
- TDesC normalnumberchar( KNormalNumberChar );
- TDesC testnormalnumber( KNormalNumber );
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
-
- numbergrouping->Set( testnormalnumber );
- numbergrouping->FormattedNumber();
- TBool flag( EFalse );
- TInt position( 3 );
- flag = numbergrouping->IsCharacterInsertedByNumberGrouping( position );
- STIF_ASSERT_FALSE( flag );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- CPNGNumberGrouping* numbergroup = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- numbergroup->Set( normalnumberchar );
- flag = numbergroup->IsCharacterInsertedByNumberGrouping( position );
- STIF_ASSERT_FALSE( flag );
- CleanupStack::PopAndDestroy( numbergroup );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestNUMGRPINGIsChangedByGroupingL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestNUMGRPINGIsChangedByGroupingL( CStifItemParser&
- /*aItem*/ )
- {
- TDesC nostandardnumber( KNoStandardNumber );
- TDesC testnormalnumber( KNormalNumber );
- TBool reserved( ETrue );
- TInt maxlength( 11 );
- CPNGNumberGrouping* numbergrouping = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- numbergrouping->Set( testnormalnumber );
- numbergrouping->FormattedNumber();
- TBool flag( EFalse );
- flag = numbergrouping->IsChangedByGrouping();
- STIF_ASSERT_FALSE( flag );
- CleanupStack::PopAndDestroy( numbergrouping );
-
- CPNGNumberGrouping* numbergroup = CPNGNumberGrouping::NewLC( maxlength,
- reserved );
- numbergroup->Set( nostandardnumber );
- flag = ETrue;
- flag = numbergroup->IsChangedByGrouping();
- STIF_ASSERT_FALSE( flag );
- CleanupStack::PopAndDestroy( numbergroup );
-
- return KErrNone;
- }
-
-/*
- * [End of File]
- */
--- a/classicui_plat/number_grouping_api/tsrc/src/testdomnumbergroupingblocksphonenumgrping.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test number_grouping_api
-*
-*/
-
-
-/*
- * Include files
- */
-#include <aknphonenumbergrouping.h>
-#include <e32cmn.h>
-
-#include "testdomnumbergrouping.h"
-
-const TInt KTwo = 2;
-
-/*
- * Descriptor declare
- */
-_LIT( KNormalNumber, "13548130726" );
-_LIT( KMoreLengthNumber, "1354813072688" );
-_LIT( KLessLengthNumber, "135481307" );
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGNewLCL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGNewLCL( CStifItemParser& /*aItem*/ )
- {
- TInt unformattedLength( 11 );
- CAknPhoneNumberGrouping* phonenumbergrouping =
- CAknPhoneNumberGrouping::NewLC( unformattedLength );
- STIF_ASSERT_NOT_NULL( phonenumbergrouping );
- CleanupStack::PopAndDestroy( phonenumbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGNewLL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGNewLL( CStifItemParser& /*aItem*/ )
- {
- TInt unformattedLength( 11 );
- CAknPhoneNumberGrouping* phonenumbergrouping =
- CAknPhoneNumberGrouping::NewL( unformattedLength );
- CleanupStack::PushL( phonenumbergrouping );
- STIF_ASSERT_NOT_NULL( phonenumbergrouping );
- CleanupStack::PopAndDestroy( phonenumbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGSetL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGSetL( CStifItemParser& /*aItem*/ )
- {
- TInt unformattedLength( 11 );
- CAknPhoneNumberGrouping* phonenumbergrouping =
- CAknPhoneNumberGrouping::NewLC( unformattedLength );
-
- TInt err( KErrNone );
- TDesC testmorelengthnumber( KMoreLengthNumber );
- TDesC testnormalnumber( KNormalNumber );
- TDesC testlesslengthnumber( KLessLengthNumber );
-
- err = phonenumbergrouping->Set( testnormalnumber );
- STIF_ASSERT_EQUALS( KErrNone, err );
-
- err = phonenumbergrouping->Set( testmorelengthnumber );
- STIF_ASSERT_EQUALS( KErrOverflow, err );
-
- err = phonenumbergrouping->Set( testlesslengthnumber );
- STIF_ASSERT_EQUALS( KErrNone, err );
-
- CleanupStack::PopAndDestroy( phonenumbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGFormattedNumberL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGFormattedNumberL(
- CStifItemParser& /*aItem*/ )
- {
- TInt unformattedLength( 11 );
- CAknPhoneNumberGrouping* phonenumbergrouping =
- CAknPhoneNumberGrouping::NewLC( unformattedLength );
-
- TDesC testmorelengthnumber( KMoreLengthNumber );
- TDesC testnormalnumber( KNormalNumber );
- TDesC testlesslengthnumber( KLessLengthNumber );
- TDesC nulldesc( KNullDesC );
- TDesC returnvalue( KNullDesC );
-
- returnvalue = phonenumbergrouping->FormattedNumber();
- STIF_ASSERT_EQUALS( nulldesc, returnvalue );
-
- phonenumbergrouping->Set( testnormalnumber );
- returnvalue = phonenumbergrouping->FormattedNumber();
- STIF_ASSERT_NOT_EQUALS( nulldesc, returnvalue );
- CleanupStack::PopAndDestroy( phonenumbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGCopyFormattedNumberL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGCopyFormattedNumberL(
- CStifItemParser& /*aItem*/ )
- {
- TInt unformattedLength( 11 );
- CAknPhoneNumberGrouping* phonenumbergrouping =
- CAknPhoneNumberGrouping::NewLC( unformattedLength );
-
- TDesC testnormalnumber( KNormalNumber );
- phonenumbergrouping->Set( testnormalnumber );
-
- HBufC* buf = HBufC::NewL( 12 );
- CleanupStack::PushL( buf );
- TPtr16 tmp( buf->Des() );
-
- phonenumbergrouping->CopyFormattedNumber( tmp );
- CleanupStack::PopAndDestroy( KTwo );
-
- return KErrNone;;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGCreateGroupedPhoneNumberL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGCreateGroupedPhoneNumberL(
- CStifItemParser& /*aItem*/ )
- {
- TInt unformattedLength( 11 );
- CAknPhoneNumberGrouping* phonenumbergrouping =
- CAknPhoneNumberGrouping::NewLC( unformattedLength );
-
- TDesC testnormalnumber( KNormalNumber );
- HBufC* returnvalue( NULL );
- returnvalue = phonenumbergrouping->CreateGroupedPhoneNumberL( testnormalnumber );
- STIF_ASSERT_NOT_NULL( returnvalue );
- CleanupStack::PopAndDestroy( phonenumbergrouping );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGGroupPhoneNumberGroupL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGGroupPhoneNumberGroupL(
- CStifItemParser& /*aItem*/ )
- {
- TInt unformattedLength( 11 );
- CAknPhoneNumberGrouping* phonenumbergrouping =
- CAknPhoneNumberGrouping::NewLC( unformattedLength );
-
- TDesC testnormalnumber( KNormalNumber );
- HBufC* buf = HBufC::NewL( 12 );
- CleanupStack::PushL( buf );
- TPtr16 tmp( buf->Des() );
- TInt returnvalue( 0 );
-
- returnvalue = phonenumbergrouping->GroupPhoneNumber(
- testnormalnumber, tmp );
- STIF_ASSERT_NOT_EQUALS( 0 , returnvalue );
- CleanupStack::PopAndDestroy( KTwo );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGGroupPhoneNumberPhoneL
-// -----------------------------------------------------------------------------
-//
-TInt CTestDOMNUMBERGROUPING::TestPHONENUMGRPINGGroupPhoneNumberPhoneL(
- CStifItemParser& /*aItem*/ )
- {
- TInt unformattedLength( 11 );
- CAknPhoneNumberGrouping* phonenumbergrouping =
- CAknPhoneNumberGrouping::NewLC( unformattedLength );
-
- HBufC* buf = HBufC::NewL( 12 );
- CleanupStack::PushL( buf );
- *buf = _L( "324345" );
- TPtr16 tmp( buf->Des() );
- TInt returnvalue( 0 );
-
- returnvalue = phonenumbergrouping->GroupPhoneNumber( tmp, tmp );
- STIF_ASSERT_NOT_EQUALS( 0, returnvalue );
-
- CleanupStack::PopAndDestroy( KTwo );
- return KErrNone;
- }
-
-/*
- * [End of File]
- */
--- a/classicui_plat/personalisation_application_api/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 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: File that exports the files belonging to
-: Personalisation Application API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/Psln.hrh MW_LAYER_PLATFORM_EXPORT_PATH(psln.hrh)
--- a/classicui_plat/personalisation_application_api/inc/Psln.hrh Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2002-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: Command definitions for Psln application.
-*
-*/
-
-
-#ifndef PSLN_HRH
-#define PSLN_HRH
-
-// PslnUi's commands
-
-enum TPslnMenuCommands
- {
- // Skin preview command for softkey.
- EPslnCmdAppPreview = 1,
- // Skin activation command for softkey.
- EPslnCmdAppActivate,
- // Skin activation from preview command for softkey.
- EPslnCmdAppPreviewActivate,
- // Download command for softkey.
- EPslnCmdAppDownload,
- // Activate screensaver command for softkey.
- EPslnCmdAppSetScreenSaver,
- // Help command for softkey.
- EPslnCmdAppHelp,
- // Launch settings for screensaver command for softkey.
- EPslnCmdAppSettings,
- // Open command for softkey.
- EPslnCmdAppOpen,
- // Preview screensaver command for softkey.
- EPslnCmdPreviewScreenSaver,
- // Activate selected wallpaper.
- EPslnCmdAppSetWallpaper,
- // Reconfigures active screensaver.
- EPslnCmdAppChangeScreenSaver,
- // No command defined.
- EPslnCmdEmptyCommand,
- // Reconfigure active wallpaper.
- EPslnCmdAppChangeWallpaper,
- // Open cascade menu.
- EPslnCmdTransitionEffectsSubMenuOpen,
- // Activate Transition Effects.
- EPslnCmdTransitionEffectsActivate,
- // Deactivate Transition Effects.
- EPslnCmdTransitionEffectsDeactivate,
- // Configure wallpaper slide set.
- EPslnCmdWallpaperConfigure,
- // Open cascade menu.
- EPslnCmdAnimBackgroundSubMenuOpen,
- // Activate Anim Background.
- EPslnCmdAnimBackgroundActivate,
- // Deactivate Anim Background.
- EPslnCmdAnimBackgroundDeactivate
- };
-
-enum TPslnNotes
- {
- // Id for Psln wait note.
- EPslnGeneralWaitNote = 1
- };
-
-enum TPslnSoftKeys
- {
- // Id for Activate softkey.
- EPslnSoftkeyActivate = 1
- };
-
-#endif // PSLN_HRH
-
-// End of File
--- a/classicui_plat/personalisation_application_api/personalisation_application_api.metaxml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" ?>
-<api id="4d4ce1a5bfabffc75a6fa2e575b254cc" dataversion="1.0">
- <name>Personalisation Application API</name>
- <description>Definitions for the personalisation application.</description>
- <type>c++</type>
- <subsystem>Psln</subsystem>
- <libs>
- </libs>
- <release category="domain"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>yes</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/classicui_plat/personalisation_framework_api/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 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: File that exports the files belonging to
-: Personalisation Framework API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/MPslnFWAppThemeObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mpslnfwappthemeobserver.h)
-../inc/PslnFWAppThemeHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwappthemehandler.h)
-../inc/PslnFWViewUIDs.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwviewuids.h)
-../inc/PslnFWPluginHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwpluginhandler.h)
-../inc/MPslnFWMSKLabelObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mpslnfwmsklabelobserver.h)
-../inc/PslnFWBaseView.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwbaseview.h)
-../inc/PslnFWBaseContainer.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwbasecontainer.h)
-../inc/PslnFWIconHelper.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwiconhelper.h)
--- a/classicui_plat/personalisation_framework_api/inc/MPslnFWAppThemeObserver.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Observer interface for application specific theme events.
-*
-*/
-
-
-#ifndef MPSLNFWAPPTHEMEOBSERVER_H
-#define MPSLNFWAPPTHEMEOBSERVER_H
-
-#include <e32base.h>
-#include <XnThemeManagement.h>
-
-class CXnODT;
-
-/**
- * Observer interface for application specific theme events.
- *
- * PslnFramework passes events from XUIKON through this observer.
- *
- * @lib PslnFramework.lib
- * @since S60 3.1
- */
-class MPslnFWAppThemeObserver
- {
-
-public:
-
- /**
- * New indication of application's theme list. Implementation of this
- * MUST NOT leave.
- *
- * @param aMessage indication message. Can be one of the following:
- *
- * EXnGetListHeadersEmpty - no themes currently available, please destroy
- * existing list of themes (if given previously)
- * EXnGetListHeadersFailed - theme retrieval failed, updates are not working.
- * EXnServiceRequestCanceled - theme retrieval has been cancelled.
- * EXnServiceRequestError - an error occured while retrieving latest theme,
- * theme updation is still ongoing.
- */
- virtual void HandleMessage( TXnServiceCompletedMessage aMessage ) = 0;
-
- /**
- * New indication of application's theme list. Implementation of this
- * MUST NOT leave.
- *
- * @param aMessage indication message. Can be one of the following:
- *
- * EXnGetListHeadersUpdate - either a new skin has appeared, or framework
- * has received all applicable skins from server.
- * EXnGetListHeadersRestart - old application theme list is not
- * valid anymore, please use the new one.
- * @param aAppThemeList list of themes
- */
- virtual void HandleMessage(
- const TXnServiceCompletedMessage aMessage,
- CArrayPtrFlat<CXnODT>& aAppThemeList ) = 0;
- };
-
-
-#endif // MPSLNFWAPPTHEMEOBSERVER_H
--- a/classicui_plat/personalisation_framework_api/inc/MPslnFWMSKLabelObserver.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 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: Indicates that MSK label might be in need of update.
-*
-*/
-
-
-#ifndef M_PSLNFWMSKLABELOBSERVER_H
-#define M_PSLNFWMSKLABELOBSERVER_H
-
-/**
- * Observer interface to enable observer to verify currently displayed
- * middle softkey label. The inherited method should be called when
- * the middle softkey label is in need of updating after a navigation
- * event has been detected.
- *
- * @lib PslnFramework.lib
- * @since S60 v3.1
- */
-class MPslnFWMSKObserver
- {
-
-public:
-
- /**
- * Observer interface to verify currently displayed middle softkey label.
- */
- IMPORT_C virtual void CheckMiddleSoftkeyLabelL() = 0;
-
- };
-
-
-#endif // M_PSLNFWMSKLABELOBSERVER_H
--- a/classicui_plat/personalisation_framework_api/inc/PslnFWAppThemeHandler.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles interface towards XUIKON, sets and gets theme information.
-*
-*/
-
-
-#ifndef C_PSLNFWAPPTHEMEHANDLER_H
-#define C_PSLNFWAPPTHEMEHANDLER_H
-
-
-#include <e32base.h>
-#include <XnThemeManagement.h>
-
-class CXnODT;
-class MPslnFWAppThemeObserver;
-class CPslnXNClientLoader;
-
-/**
- * Handles interface towards XUIKON, sets and gets theme information.
- *
- * @lib PslnFramework.lib
- * @since S60 v3.1
- */
-NONSHARABLE_CLASS( CPslnFWAppThemeHandler ) :
- public CBase,
- public MXnThemeManagementServiceObserver
- {
-
-public:
-
- /**
- * Two-phased constructor.
- * @param aObserver observer for theme changes.
- * @param aApplicationSkinList plugin owned array, to be filled with
- * application specific themes.
- * @return new instance of CPslnFWAppThemeHandler.
- */
- EXPORT_C static CPslnFWAppThemeHandler* NewL(
- MPslnFWAppThemeObserver& aObserver,
- CArrayPtrFlat<CXnODT>& aApplicationSkinList );
-
- /**
- * Destructor.
- */
- EXPORT_C virtual ~CPslnFWAppThemeHandler();
-
- /**
- * Gets application specific themes. Framework starts automatically listen
- * for changes in application themes. These are given to the client using
- * MPslnFWAppThemeObserver interface.
- *
- * @param aUid UID of application whose themes are needed.
- * @return Xuikon specific error code for setting active skin.
- */
- IMPORT_C TXnServiceCompletedMessage GetApplicationSkinsL( TUid aUid );
-
- /**
- * Activates application specific theme.
- * @param aThemeODT ODT of theme to be active (includes theme UID).
- * @return Xuikon specific error code for setting active skin.
- */
- IMPORT_C TXnServiceCompletedMessage SetApplicationSkinL( CXnODT& aThemeODT );
-
- /**
- * Client informs that is not interested in anymore getting notifications
- * through MPslnFWAppThemeObserver.
- */
- IMPORT_C void CancelGetApplicationSkins();
-
- /**
- * Activates application specific theme and exits calling application.
- *
- * @since S60 V3.2
- *
- * @param aThemeODT ODT of theme to be active (includes theme UID).
- * @return Xuikon specific error code for setting active skin.
- */
- IMPORT_C TXnServiceCompletedMessage SetApplicationSkinAndExitL(
- CXnODT& aThemeODT );
-
-private:
-
- /**
- * From MXnThemeManagementServiceObserver.
- * Handles theme management events.
- * @param aMessage contains a service completion message returned from
- * the XnInstallationHandler and XnMaintenanceHandler to their
- * observer.
- */
- void HandleXnClientMessage( TXnServiceCompletedMessage aMessage );
-
- /**
- * C++ default constructor.
- */
- CPslnFWAppThemeHandler(
- MPslnFWAppThemeObserver& aObserver,
- CArrayPtrFlat<CXnODT>& aApplicationSkinList );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Creates and pushes new ODT to stack.
- * Created ODT is based on Application Uid.
- */
- CXnODT* CreateODTFromAppUidLC( TUid aUid );
-
- /**
- * Creates XUIKON client when needed.
- */
- void CreateXnClientL();
-
-private: // data
-
- /**
- * Observer for framework's application theme changes.
- */
- MPslnFWAppThemeObserver& iObserver;
-
- /**
- * List of themes. Each theme is described within an ODT.
- * Now own.
- */
- CArrayPtrFlat<CXnODT>* iAppThemeList;
-
- /**
- * ETrue if there is outstanding application skin retrieval ongoing.
- */
- TBool iFetchOngoing;
-
- /*
- * Has the XUIKON client DLL already been loaded.
- */
- TBool iXnClientDllLoaded;
-
- /*
- * A handle to a dynamically loadable DLL.
- */
- RLibrary iXnClientDll;
-
- /*
- * Loads XUIKON Client library and acts as wrapper around the DLL.
- * Own.
- */
- CPslnXNClientLoader* iXnClientLoader;
-
- };
-
-#endif // C_PSLNFWAPPTHEMEHANDLER_H
-
-// End of File
--- a/classicui_plat/personalisation_framework_api/inc/PslnFWBaseContainer.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class for Psln plugin containers.
-*
-*/
-
-
-#ifndef C_PSLNFWBASECONTAINER_H
-#define C_PSLNFWBASECONTAINER_H
-
-#include <coeccntx.h>
-#include <eikclb.h>
-#include <mpslnfwmsklabelobserver.h>
-
-/**
- * Base class for Psln view containers.
- *
- * @lib PslnFramework.lib
- * @since S60 3.1
- */
-class CPslnFWBaseContainer : public CCoeControl
- {
-
-public:
-
- /**
- * Symbian OS default constructor.
- */
- IMPORT_C virtual void ConstructL( const TRect& aRect ) = 0;
-
- /**
- * Constructs all common parts of the container.
- *
- * @param aRect Listbox control's rect.
- * @param aResTitleId Resource id for title.
- * @param aResLbxId Resource id for listbox.
- */
- IMPORT_C void BaseConstructL( const TRect& aRect,
- TInt aResTitleId,
- TInt aResLbxId );
-
- /**
- * Constructor.
- */
- IMPORT_C CPslnFWBaseContainer();
-
- /**
- * Destructor.
- */
- IMPORT_C virtual ~CPslnFWBaseContainer();
-
- /**
- * Sets the middle softkey label observer.
- * @param aObserver observer for msk label updations.
- * @since S60 v3.1
- */
- IMPORT_C void CPslnFWBaseContainer::SetMiddleSoftkeyObserver(
- MPslnFWMSKObserver* aObserver );
-
-protected:
-
- /**
- * Constructs listbox.
- * @param aResLbxId Resource id for listbox.
- */
- virtual void ConstructListBoxL( TInt aResLbxId );
-
-private:
-
- /**
- * From CCoeControl.
- * Handles a change to the control's resources.
- * @param aType type of change.
- */
- IMPORT_C void HandleResourceChange( TInt aType );
-
- /**
- * From CCoeControl.
- * Responds to changes to the size and position of the contents
- * of this control.
- */
- IMPORT_C void SizeChanged();
-
- /**
- * From CCoeControl.
- * Gets the number of controls contained in a compound control.
- * @return the number of controls this component contains.
- */
- IMPORT_C TInt CountComponentControls() const;
-
- /**
- * From CCoeControl.
- * Gets an indexed component of a compound control.
- */
- IMPORT_C CCoeControl* ComponentControl( TInt /*aIndex*/ ) const;
-
- /**
- * From CCoeControl.
- * Handles key events.
- * @param aKeyEvent key event.
- * @param aType type of key event.
- */
- IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode aType );
-
- /**
- * From CCoeControl.
- * Responds to a change in focus.
- * @param aDrawNow Contains the value that was passed to it by SetFocus().
- */
- IMPORT_C void FocusChanged( TDrawNow aDrawNow );
-
-public: // data
-
- /**
- * Pointer to newly created list box.
- * Owned.
- */
- CEikTextListBox* iListBox;
-
- /**
- * Observer for middle softkey label changes.
- * Owned.
- */
- MPslnFWMSKObserver* iMSKObserver;
-
- };
-
-#endif // C_PSLNFWBASECONTAINER_H
-
-// End of File
--- a/classicui_plat/personalisation_framework_api/inc/PslnFWBaseView.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class for application specific skin views.
-*
-*/
-
-
-#ifndef C_PSLNFWBASEVIEW_H
-#define C_PSLNFWBASEVIEW_H
-
-#include "pslnfwplugininterface.h"
-#include <ConeResLoader.h>
-#include <eikclb.h>
-
-class CPslnFWBaseContainer;
-class CAknNavigationDecorator;
-class CAknNavigationControlContainer;
-
-/**
-* CPslnFWBaseView view class.
-* Base class for Psln plugin views.
-*
-* @lib PslnFramework.lib
-* @since S60 v3.1
-*/
-class CPslnFWBaseView : public CPslnFWPluginInterface, public MEikListBoxObserver
- {
-
-public:
-
- /**
- * C++ default constructor
- */
- IMPORT_C CPslnFWBaseView();
-
- /**
- * Symbian OS default constructor.
- */
- IMPORT_C virtual void ConstructL() = 0;
-
- /**
- * Destructor.
- */
- IMPORT_C ~CPslnFWBaseView();
-
- /**
- * This function is used to set the current item in the listbox.
- * @param aIndex Current item.
- */
- IMPORT_C virtual void SetCurrentItem( TInt aIndex );
-
- /**
- * Returns the container this view has.
- * @return pointer to container, does not transfer ownership.
- */
- IMPORT_C CPslnFWBaseContainer* Container();
-
- /**
- * Opens the nearest localized resourcefile using aResourceLoader.
- * aResourceLoader should be opened only once before closing it.
- * Otherwise it will raise a panic. Therefore it is better to have
- * multiple resource loaders. Uses KDC_RESOURCE_FILES_DIR.
- *
- * @param aResourceFileName Drive and name of resource file in format
- * <path>:<rsc_file_name>
- * @param aResourceLoader Resource loader for the resource. The loader
- * must not be opened allready or it will raise
- * a panic. It is caller's responsibility to
- * close the resource loader after using the
- * resource.
- */
- IMPORT_C void OpenLocalizedResourceFileL(
- const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader );
-
- /**
- * Sames as above, except API user can defined path where to look for
- * resource file.
- *
- * @param aResourceFileName Drive and name of resource file in format
- * <path>:<rsc_file_name>
- * @param aResourceLoader Resource loader for the resource. The loader
- * must not be opened allready or it will raise
- * a panic. It is caller's responsibility to
- * close the resource loader after using the
- * resource.
- * @param aPath Path to the resource file. Preferably use
- * data caging literals.
- */
- IMPORT_C void OpenLocalizedResourceFileL(
- const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader,
- const TDesC* aPath );
-
- /**
- * Overrides default navi pane decorator with given one.
- * @param aDecorator navi pane decorator to use.
- */
- IMPORT_C virtual void SetNaviPaneDecorator(
- CAknNavigationDecorator* aDecorator );
-
- /**
- * From CAknView.
- * Called when view is activated.
- * @param aPrevViewId previous view id.
- * @param aCustomMessageId custom message id.
- * @param aCustomMessage custom message content.
- */
- IMPORT_C void DoActivateL( const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * From CAknView.
- * Called when view is deactivated.
- */
- IMPORT_C void DoDeactivate();
-
- /**
- * Sets tab index for the view. Since application might insert
- * the view into a tab group with different location than the
- * plugin wants. It is necessary that the application informs
- * plugin the real location. Negative index or index that
- * are greater than tabgroup's last position are ignored.
- *
- * @param aMyTabIndex real tab index of the plugin in the tab group.
- *
- */
- IMPORT_C void SetTabIndex( TInt aMyTabIndex );
-
- /**
- * Returns the real tab index for the plugin. See API SetTabIndex
- * for details, when using this API might be necessary.
- * It is recommended that this API is used instead of hardcoded
- * constants for tab index, since Psln Framework might assign the
- * plugin to some other location than the plugin prefers.
- *
- * @return the real tab index for the plugin. KErrNotFound is returned,
- * if the tab index has not been set.
- */
- IMPORT_C TInt GetTabIndex() const;
-
-protected:
-
- /**
- * Sets the correct navi pane for the view (eg. tabs, string etc.).
- * Use when tab group is not to be shown, or plugin handles the tab group
- * itself.
- */
- IMPORT_C virtual void SetNaviPaneL();
-
- /**
- * Deprecated.
- */
- IMPORT_C virtual void CreateNaviPaneContextL( TInt aResourceId );
-
- /**
- * Creates container,
- */
- IMPORT_C virtual void CreateContainerL();
-
- /**
- * Create new container. Called by DoActivateL().
- * Implemented by sub-class.
- */
- IMPORT_C virtual void NewContainerL() = 0;
-
- /**
- * Sets the correct navi pane for the view (eg. tabs, string etc.).
- * @param aTabLocation indicates the location of view within the Appui
- * owned tabgroup.
- */
- IMPORT_C virtual void SetNaviPaneL( const TInt aTabLocation );
-
- /**
- * From MEikListBoxObserver.
- * Handles listbox events.
- * @param aListBox listbox pointer.
- * @param aEventType event type.
- */
- void HandleListBoxEventL( CEikListBox* aListBox,
- TListBoxEvent aEventType );
-
- /**
- * Adds given resource text as MSK to CBA.
- *
- * @param aResourceId middle softkey label.
- * @param aCommandId command that should be performed when MSK
- * is pressed.
- * @since S60 v3.1
- */
- IMPORT_C virtual void SetMiddleSoftKeyLabelL(
- const TInt aResourceId,
- const TInt aCommandId );
-
- /**
- * Handles Download and Help commands.
- * Unknown commands are forwarded to appUi.
- * @param aCommand command ID - it should match commands given in the psln.hrh.
- */
- IMPORT_C virtual void HandleCommandL( TInt aCommand );
-
- /**
- * Plugins should implement this virtual method. It allows that the plugin provides a resource
- * ID that the framework should use as title text for the view.
- * @param aResourceId resource ID of title text to use.
- *
- * @since 5.0
- * NOTE that the resource file should be loaded and open.
- */
- IMPORT_C virtual void SetTitlePaneL( TInt& aResourceId );
-
-private:
-
- /**
- * Handles listbox selection. Called by HandleListBoxEventL.
- * Implement by sub-class.
- */
- virtual void HandleListBoxSelectionL() = 0;
-
- /**
- * Checks if the tab group is not one of the static views' locations.
- */
- TBool IsValidLocation( const TInt& aLoc ) const;
-
-protected: // data
-
- /**
- * View UID that was previously active before this view was activated.
- */
- TVwsViewId iPrevViewId;
-
- /**
- * Pointer to the container
- * Own.
- */
- CPslnFWBaseContainer* iContainer;
-
- /**
- * Navi pane.
- * Not own.
- */
- CAknNavigationDecorator* iNaviPaneContext;
-
- /**
- * Pointer to the navi control container
- * Not own.
- */
- CAknNavigationControlContainer* iNaviControlContainer;
-
- /**
- * Currently selected listbox item.
- */
- TInt iCurrentItem;
-
- /**
- * First item in the listbox.
- */
- TInt iTopItemIndex;
-
- /**
- * Resource loader.
- */
- RConeResourceLoader iResourceLoader;
-
- /**
- * Real tab group index for the view.
- */
- TInt iMyTabIndex;
- };
-
-#endif // C_PSLNFWBASEVIEW_H
-
-// End of File
--- a/classicui_plat/personalisation_framework_api/inc/PslnFWIconHelper.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility class to get icons to setting lists and
-* help with loc strings.
-*
-*/
-
-
-#ifndef C_PSLNFWICONHELPER_H
-#define C_PSLNFWICONHELPER_H
-
-#include <e32base.h>
-
-class CCoeEnv;
-class CEikTextListBox;
-class CAknIconArray;
-class TAknsItemID;
-
-// Icons in list views.
-_LIT( KPslnFWNonActiveListItemFormat, "0\t" );
-_LIT( KPslnFWActiveListItemFormat, "1\t" );
-_LIT( KPslnFWEmbeddedLinkListItemFormat, "2\t" );
-_LIT( KPslnFWListItemFormatMMCSuffix, "\t3" );
-_LIT( KPslnFWListItemFormatDRMProtectedSuffix, "\t4" );
-_LIT( KPslnFWListItemFormatDRMExpiredSuffix, "\t5" );
-_LIT( KPslnFWListItemFormatMassDriveSuffix, "\t6" );
-
-/**
- * Utility class to get icons to setting lists and help with loc strings.
- *
- * @lib PslnFramework.lib
- * @since S60 v3.1
- */
-NONSHARABLE_CLASS( CPslnFWIconHelper ) : public CBase
- {
-
-public:
-
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CPslnFWIconHelper* NewL();
-
- /**
- * Destructor.
- */
- IMPORT_C virtual ~CPslnFWIconHelper();
-
- /**
- * Adds icon array to a given listbox.
- *
- * @param aAll ETrue if adding all the available icons.
- * @param aMaxIndexToAdd if aAll is EFalse, indicates the max index
- * of icon to add to the icon array.
- * @param aListBox listbox that the icon array is added.
- */
- IMPORT_C void AddIconsToSettingItemsL(
- TBool aAll,
- TInt aMaxIndexToAdd,
- CEikTextListBox* aListBox );
-
- /**
- * Gets localized string from given loc-file.
- *
- * @param aPath path and filename of the loc-file.
- * @param aResourceID resource ID of the string to load.
- * @param aCoeEnv control environment.
- * @return localized version of given resource.
- */
- IMPORT_C HBufC* GetLocalizedStringLC(
- const TDesC& aPath,
- TInt aResourceID,
- CCoeEnv* aCoeEnv );
-
-private:
-
- /**
- * C++ default constructor.
- */
- CPslnFWIconHelper();
-
- /**
- * Adds new icon to icon array.
- */
- void AddIconL(
- CAknIconArray* aIcons,
- const TAknsItemID& aSkinId,
- const TDesC& aFileName,
- TInt aBitmapId,
- TInt aMaskId,
- TBool aColorIcon = EFalse );
-
- /**
- * Returns path to file containing icons.
- */
- void GetIconFilePath( TDes& aPath );
-
- };
-
-#endif // C_PSLNFWICONHELPER_H
-
-// End of File
--- a/classicui_plat/personalisation_framework_api/inc/PslnFWPluginHandler.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Loads plugins into plugin array.
-*
-*/
-
-
-#ifndef C_PSLNFWPLUGINHANDLER_H
-#define C_PSLNFWPLUGINHANDLER_H
-
-#include <e32base.h>
-
-#include "pslnfwplugininterface.h"
-
-class CAknViewAppUi;
-
-/**
- * Loads all found ECOM plugins into plugin array.
- *
- * @lib PslnFramework.lib
- * @since S60 3.1
- */
-NONSHARABLE_CLASS( CPslnFWPluginHandler ) : public CBase
- {
-
-public:
-
- /**
- * Creates plugin handler.
- * @param aAppUi pointer to application UI owning the plugin views.
- * @param aPluginArray array into which client expects to get the ECOM views.
- * @return new instance of CPslnFWPluginHandler.
- */
- IMPORT_C static CPslnFWPluginHandler* NewL(
- CAknViewAppUi* aAppUi,
- CArrayPtrFlat<CPslnFWPluginInterface>* aPluginArray );
-
- /**
- * Destructor.
- */
- IMPORT_C ~CPslnFWPluginHandler();
-
- /**
- * Loads all applicable plugins.
- * @param aPluginArray array into which the plugins should be loaded.
- */
- IMPORT_C void LoadPluginsL(
- CArrayPtrFlat<CPslnFWPluginInterface>* aPluginArray );
-
- /**
- * Loads single plugin.
- * @param aPluginId UID of plugin to load.
- * @return plugin interface, or NULL if the plugin is not found.
- */
- IMPORT_C CPslnFWPluginInterface* LoadPluginL( const TUid aPluginId );
-
- /**
- * Creates plugin handler with no array for plugins.
- * @param aAppUi pointer to application UI owning the plugin views.
- * @return new instance of CPslnFWPluginHandler.
- */
- IMPORT_C static CPslnFWPluginHandler* NewL( CAknViewAppUi* aAppUi );
-
-private:
-
- /* Default constructor. */
- CPslnFWPluginHandler(
- CAknViewAppUi* aAppUi,
- CArrayPtrFlat<CPslnFWPluginInterface>* aPluginArray );
-
- /**
- * Starts loading next plugin.
- */
- void LoadNextPlugin();
-
- /**
- * Creates the plugin interface and appends it to the plugin array.
- */
- void AppendPluginL( const TUid& aImplUid );
-
- /**
- * Checks that the plugin location is valid.
- * Invalid locations are those claimed by static views in Psln main view.
- */
- TBool IsInvalidLocation( const TInt& aLoc ) const;
-
-private: // data
-
- /**
- * Pointer application UI.
- * Not own.
- */
- CAknViewAppUi* iAppUi;
-
- /**
- * Personalisation application specific skinning plugins found.
- * Not own.
- */
- CArrayPtrFlat<CPslnFWPluginInterface>* iPluginArray;
-
- /**
- * Pluginloader goes through this array and loads the plugins into
- * iPluginArray if they fulfill the criterias.
- */
- RImplInfoPtrArray iImplInfoArray;
-
- /**
- * Used as an iterator to maintain location in iImplInfoArray.
- */
- TInt iImplInfoArrayIterator;
-
- };
-
-#endif // C_PSLNFWPLUGINHANDLER_H
-
-// End of File
--- a/classicui_plat/personalisation_framework_api/inc/PslnFWViewUIDs.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: View UIDs for Psln Framework
-*
-*/
-
-
-#ifndef PSLNFWVIEWUIDS_H
-#define PSLNFWVIEWUIDS_H
-
-// Use this UID if plugin belongs to Main view:
-const TUid KPslnMainViewUid = { 0x102750AA };
-
-#endif // PSLNFWVIEWUIDS_H
--- a/classicui_plat/personalisation_framework_api/personalisation_framework_api.metaxml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<api id="30e9d71db6c094d780a5361c1bf0eee4" dataversion="1.0">
- <name>Personalisation Framework API</name>
- <description>Personalisation framework interfaces.</description>
- <type>c++</type>
- <subsystem>Psln</subsystem>
- <libs>
- <lib name="pslnframework.lib" />
- </libs>
- <release category="domain"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>yes</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/classicui_plat/personalisation_localised_texts_api/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: File that exports the files belonging to
-: Personalisation Localised Texts API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../loc/psln.loc MW_LAYER_LOC_EXPORT_PATH(psln.loc)
--- a/classicui_plat/personalisation_localised_texts_api/loc/psln.loc Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,475 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Localized strings for Personalisation application
-*
-*/
-
-
-// LOCALISATION STRINGS
-
-// **CAPTIONS
-
-// d:Application title for aif caption file
-// d:Long string
-// l:list_single_large_graphic_pane_1
-// w:
-// r:2.0
-//
-#define qtn_apps_skins_list "Personalisation"
-
-// d:Application title for aif caption file
-// d:Short string
-// l:cell_app_pane_1
-// w:
-// r:2.0
-//
-#define qtn_apps_skins_grid "Psln"
-
-// **OPTIONS MENU
-
-// d:Command in Options list
-// d:Previews the highlighted item (either screen saver or theme)
-// l:list_single_popup_menu_pane_1
-// w:
-// r:2.0
-//
-#define qtn_skins_option_preview "Preview"
-
-// d:Command in Options list
-// d:Activate the highlighted skin item
-// l:list_single_popup_menu_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_option_activate "Apply"
-
-// d:Command in Options list
-// d:Sets the highlighted item
-// l:list_single_popup_menu_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_option_set "Apply"
-
-// **COMMON TITLES
-
-// d:Name of the skin in title pane
-// d:Name of the original appearance
-// l:title_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_title_s60 "Default theme"
-
-// d:Name of the skin in title pane
-// d:Name of Skin 1
-// l:title_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_title_skin1 "Theme 1"
-
-// d:Name of the skin in title pane
-// d:Name of Skin 2
-// l:title_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_title_skin2 "Theme 2"
-
-// d:Name of the skin in title pane
-// d:Name of Skin 3
-// l:title_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_title_skin3 "Theme 3"
-
-// **MAIN VIEW
-
-// d:Text in title pane
-// d:Main view
-// l:title_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_title "Themes"
-
-// d:Text of a list item in main view's folder list
-// d:Item opens original appearance
-// l:list_single_graphic_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_list_namenoktheme "Default theme"
-
-// d:Text of a list item in main view's folder list
-// d:Item opens Skin1
-// l:list_single_graphic_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_list_nameskin1 "Theme 1"
-
-// d:Text of a list item in main view's folder list
-// d:Item opens Skin2
-// l:list_single_graphic_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_list_nameskin2 "Theme 2"
-
-// d:Text of a list item in main view's folder list
-// d:Item opens Skin3
-// l:list_single_graphic_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_list_nameskin3 "Theme 3"
-
-// **SCREEN SAVER SETTING PAGE
-
-// d:Text in setting list item's current value field
-// d:Item in Screen saver view's list.
-// d:Setting value S60 Date&Time screen saver
-// l:list_setting_pane_2
-// w:
-// r:3.2
-//
-#define qtn_sanim_object_date "Date"
-
-// d:Text in setting list item's current value field
-// d:Item in Screen saver view's list.
-// d:Setting value S60 Text screen saver
-// l:list_setting_pane_2
-// w:
-// r:3.2
-//
-#define qtn_sanim_object_text "Text"
-
-// **BACKGROUND IMAGE SETTING PAGE
-
-// d:Text in setting list item's current value field
-// d:Item in Background image both in idle state and the favouriate folder setting page's list
-// d:Setting value "None" means no background image
-// l:list_setting_pane_2
-// w:
-// r:2.0
-//
-#define qtn_skins_settings_none "None"
-
-// **PREVIEW VIEW
-
-// d:Command text associated to a softkey in the control pane.
-// d:Activates the preview skin.
-// l:control_pane_1
-// w:
-// r:2.0
-//
-#define text_softkey_activate "Activate"
-
-// ** NOTES
-
-// **SKIN ACTIVATING CONFIRMATION NOTE
-// d: Confirmation for Activate a skin item in main list operation.
-// d: %U is the name of selected skin.
-// l: popup_note_window_1
-// w:
-// r:3.1
-//
-#define qtn_skins_theme_act_note "Selected theme %U"
-
-// **IMAGE LOADING WAIT NOTE
-
-// d:Text for image loading wait note
-// d:Shown when welcome note image or background image has been selected from image list
-// l:popup_note_wait_window_1
-// w:
-// r:3.1
-//
-#define qtn_skins_loading_image "Loading image"
-
-// **IMAGE ERROR INFORMATION NOTES
-
-// d:Text for image corrupted information note
-// d:Shown when selected background or welcome note image is corrupted or in wrong format.
-// l:popup_note_window_1
-// w:
-// r:3.1
-//
-#define qtn_skins_image_format_wrong "Image is corrupted or in wrong format"
-
-// d:Text for image too large information note
-// d:Shown when selected background or welcome note image is too large to be opened in memory
-// l:popup_note_window_1
-// w:
-// r:3.1
-//
-#define qtn_skins_image_too_large "The image consumes too much memory"
-
-// **EMBEDDED LINKS
-
-// d:List item that initiates skin downloading when selected.
-// d:Shown as the first element in main state if enhanced embedded links are supported.
-// l:list_single_graphic_pane_1
-// w:
-// r:2.0
-//
-#define qtn_skins_download_skins "Download themes"
-
-// d:Download command in options menu.
-// d:Shown in options menu when Download themes -item is currently selected.
-// l:list_single_popup_menu_pane_1
-// w:
-// r:2.0
-//
-#define qtn_skins_option_dltheme "Download"
-
-// **SKIN CORRUPTED NOTE
-
-// d:Text for corrupted skin error note.
-// d:Shown when selected skin can not be activated.
-// l:popup_note_window_1
-// w:
-// r:2.0
-//
-#define qtn_skins_error_corrupted "Theme is corrupted and can not be used"
-
-// **SOUNDS IN SKINS
-
-// d:Confirmation query shown to ask the user whether he wants to activate
-// d:the sound file associated with the theme (singular form).
-// l:popup_note_window_1
-// w:
-// r:2.8
-//
-#define qtn_skins_query_activate_tone "Activate received sound file?"
-
-// d:Confirmation query shown to ask the user whether he wants to activate
-// d:the sound files associated with the theme (plural form).
-// l:popup_note_window_1
-// w:
-// r:2.8
-//
-#define qtn_skins_query_activate_tones "Activate received sound files?"
-
-// d:Confirmation note shown to indicate that the sound file associated with
-// d:the theme has been activated (singular form).
-// l:popup_note_window_1
-// w:
-// r:2.8
-//
-#define qtn_skins_note_tone_activated "Sound activated"
-
-// d:Confirmation note shown to indicate that the sound files associated with
-// d:the theme has been activated (plural form).
-// l:popup_note_window_1
-// w:
-// r:2.8
-//
-#define qtn_skins_note_tones_activated "Sounds activated"
-
-// **SCREENSAVER SETTINGS
-
-// d:Screensaver settings command in options menu.
-// d:Opens settings view for the currently selected screensaver
-// l:list_single_popup_menu_pane_1
-// w:
-// r:3.2
-//
-#define qtn_skins_options_ss_settings "Screen saver settings"
-
-// ** APPLICATION SPECIFIC SKINNING
-
-// d:Text of a list item in Main state's folder list.
-// d:Item opens General Theme folder.
-// l:list_single_large_graphic_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_title_general "General theme"
-
-// d:Text of a list item in Main state's folder list.
-// d:Item opens Wallpaper folder.
-// l:list_single_large_graphic_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_title_wallpaper "Wallpaper"
-
-// d:Text of a list item in Main state's folder list.
-// d:Item opens Screen Saver folder.
-// l:list_single_large_graphic_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_title_screensaver "Screen saver"
-
-// d:Text of a tab group item General in Personalisation app's tab group.
-// d:Shown in tabgroup when a folder has been activated from Main state.
-// l:navi_tabs_3_long_pane
-// w:
-// r:3.1
-//
-#define qtn_skins_tabs_general "General theme"
-
-// d:Text of a tab group item Wallpaper in Personalisation app's tab group.
-// d:Shown in tabgroup when a folder has been activated from Main state.
-// l:navi_tabs_3_long_pane
-// w:
-// r:3.1
-//
-#define qtn_skins_tabs_wallpaper "Wallpaper"
-
-// d:Text of a tab group item Screen Saver in Personalisation app's tab group.
-// d:Shown in tabgroup when a folder has been activated from Main state.
-// l:navi_tabs_3_long_pane
-// w:
-// r:3.1
-//
-#define qtn_skins_tabs_screensaver "Screen saver"
-
-// d:List item that skins specific application using main application skin.
-// d:Shown as second element of application specific skin views' list.
-// l:list_single_graphic_pane_1
-// w:
-// r:3.1
-//
-#define qtn_skins_list_general_theme "General theme"
-
-// d:Text in Wallpaper setting view's selection listbox
-// d:User defined wallpaper image
-// l:list_setting_pane_2
-// w:
-// r:3.1
-//
-#define qtn_skins_settings_wp_image "Image"
-
-// ** SLIDESET SCREENSAVER AND WALLPAPER
-
-// d:Command in Options list
-// d:Opens slide set setting dialog.
-// l:list_single_pane_t1_cp2
-// w:
-// r:3.2
-//
-#define qtn_skins_option_wp_settings "Slide set settings"
-
-// d:List item in Wallpaper view list. Shown as third item in the list.
-// d:Selects slide set as used wallpaper.
-// l:list_setting_pane_2
-// w:
-// r:3.2
-//
-#define qtn_skins_wp_slide_set "Slide set"
-
-// d:Confirmation note shown to indicate that the wallpaper has been changed.
-// l:popup_note_window_1
-// w:
-// r:3.2
-//
-#define qtn_skins_note_image_changed "Image changed to idle"
-
-// ** TRANSITION EFFECTS
-
-// d:Command in Options list (opens cascading menu)
-// l:list_single_pane_t1_cp2/opt3
-// w:
-// r:3.2
-//
-#define qtn_skins_option_effects "Theme effects"
-
-// d:Cascade menu command in Options list
-// l:list_single_popup_submenu_pane_t1/opt1
-// w:
-// r:3.2
-//
-#define qtn_skins_option_effects_on "On"
-
-// d:Cascade menu command in Options list
-// l:list_single_popup_submenu_pane_t1/opt1
-// w:
-// r:3.2
-//
-#define qtn_skins_option_effects_off "Off"
-
-// ** CONTROL PANEL CHANGES
-
-// d:Title pane text in General theme view.
-// l:title_pane_t2/opt9
-// w:
-// r:5.0
-//
-#define qtn_skins_title_pane_general "General theme"
-
-// d:Title pane text in Wallpaper view.
-// l:title_pane_t2/opt9
-// w:
-// r:5.0
-//
-#define qtn_skins_title_pane_wallpaper "Wallpaper"
-
-// d:Title pane text in Screensaver view.
-// l:title_pane_t2/opt9
-// w:
-// r:5.0
-//
-#define qtn_skins_title_pane_screensaver "Screensaver"
-
-// d:Text in Wallpaper setting view's selection listbox
-// d:Default wallpaper image
-// l:list_single_graphic_pane_t1
-// w:
-// r:5.0
-//
-#define qtn_skins_settings_default "Default"
-
-// d:Text in setting list item's current value field
-// d:Item in Screen saver view's list.
-// d:Setting value for no screensaver.
-// l:list_set_graphic_pane_t1
-// w:
-// r:5.0
-//
-#define qtn_sanim_object_none "None"
-
-// d:Error note shown when editing is blocked because of power save mode
-// l:popup_note_window
-// w:
-// r:5.1
-//
-#define qtn_power_saving_protected_settings_infonote "Power saving is active. Unable to edit."
-
-// d:Command in Options list (opens cascading menu)
-// l:list_single_pane_t1_cp2/opt3
-// w:
-// r:9.2
-//
-#define qtn_skins_option_anim_bg "Animation Background"
-
-// d:Cascade menu command in Options list
-// l:list_single_popup_submenu_pane_t1/opt1
-// w:
-// r:9.2
-//
-#define qtn_skins_option_anim_bg_on "On"
-
-// d:Cascade menu command in Options list
-// l:list_single_popup_submenu_pane_t1/opt1
-// w:
-// r:9.2
-//
-#define qtn_skins_option_anim_bg_off "Off"
-
-// End of File
--- a/classicui_plat/personalisation_localised_texts_api/personalisation_localised_texts_api.metaxml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" ?>
-<api id="6b5383999dba666b5256646a8b4430fb" dataversion="1.0">
- <name>Personalisation Localised Texts API</name>
- <description>Localised text strings used in personalisation.</description>
- <type>c++</type>
- <subsystem>Psln</subsystem>
- <libs>
- </libs>
- <release category="domain"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>yes</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/classicui_plat/personalisation_plugin_api/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 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: File that exports the files belonging to
-: Personalisation Plugin API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/PslnFWPluginInterface.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwplugininterface.h)
-../inc/PslnFWPluginInterface.inl MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwplugininterface.inl)
-../inc/PslnFWPluginInterfaceNoBaseView.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnfwplugininterfacenobaseview.h)
--- a/classicui_plat/personalisation_plugin_api/inc/PslnFWPluginInterface.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines interface for application skinning framework's ECOM
-* plugin.
-*
-*/
-
-
-#ifndef C_PSLNFWPLUGININTERFACE_H
-#ifndef C_PSLNFWPLUGININTERFACENOBASEVIEW_H
-#define C_PSLNFWPLUGININTERFACE_H
-
-#include <aknview.h>
-#include <gulicon.h>
-#include <AknsUtils.h>
-#include <aknViewAppUi.h>
-#include <data_caging_path_literals.hrh>
-
-// Constants used in ECOM implementation
-const TUid KPslnFWPluginInterfaceUid = { 0x102750A9 };
-
-/**
-* Interface class for Psln plugin. All Psln plugins will implement this class.
-*
-* The main functionality Psln framework will use from CAknView is:
-* -DoActivate()
-* -DoDeactivate()
-* -Id()
-* functions.
-*
-* Id() function must return the value of the plugin implementation UID. This
-* means that the main view of the plugin will have the same UID as the plugin
-* implementation. This will prevent multiple plugins from having same view
-* UIDs as their main view. If plugin has more views, it is plugin's
-* responsibility to ensure that the UIDs of the other views are unique.
-*
-* This class is mutually exclusive with CPslnFWPluginInterface as defined in the
-* PslnPluginInterfaceNoBaseView.h.
-*
-* @lib PslnFramework.lib
-* @since S60 v3.1
-*/
-class CPslnFWPluginInterface: public CAknView
- {
-public:
-
- /**
- * Specifies the location of the plugin in the Personalization application.
- * By default the plugins are appended to the end of the main view.
- */
- enum TPslnFWLocationType
- {
- // Personalization application decides plugins location (recommended)
- EPslnFWNotSpecified = 0,
- // Location is specified in aIndex parameter. Note that if the location
- // is already taken by some other plugin (or static view), then plugin
- // view is appended to the end, just like it had EPslnFWNotSpecified set.
- EPslnFWSpecified
- };
-
- /**
- * Creates new Psln plugin having the given UID.
- * Uses Leave code KErrNotFound if implementation is not found.
- *
- * @param aImplementationUid Implementation UID of the plugin to be
- * created.
- * @param aAppUi Pointer to the Psln application UI that can be used to
- * switch to another view.
- */
- static CPslnFWPluginInterface* NewL(
- const TUid aImplementationUid,
- CAknViewAppUi* aAppUi );
-
- /**
- * Destructor
- */
- inline ~CPslnFWPluginInterface();
-
- /**
- * Method for getting caption of this plugin. This should be the
- * localized name of the plugin view to be shown in main view.
- *
- * @param aCaption pointer to Caption variable
- */
- virtual void GetCaptionL( TDes& aCaption ) const = 0;
-
- /**
- * Method for getting tab text for this plugin. This should be the
- * localized name of the plugin view to be shown in tab group.
- *
- * @param aCaption pointer to Caption variable
- */
- virtual void GetTabTextL( TDes& aCaption ) const = 0;
-
- /**
- * Creates a new icon. This icon is shown in Personalization app's main view.
- * Ownership of the created icon is transferred to the caller.
- *
- * @return Pointer of the icon.
- * NOTE: Ownership of this icon is transferred to the caller.
- */
- virtual CGulIcon* CreateIconL() = 0;
-
- /**
- * Method for getting the plugin view's location within Psln application.
- * Do not override, unless plugin view should be in certain location.
- * By default the plugins are appended to the end of the main view.
- * @param aType type of location: specified / not specified
- * @param aIndex proposed location of plugin.
- */
- virtual inline void GetLocationTypeAndIndex(
- TPslnFWLocationType& aType,
- TInt& aIndex ) const;
-
- /**
- * Reserved for future use/plugin's custom functionality. This can be
- * overwritten if plugin needs to have custom functionality which cannot
- * be fulfilled otherwise.
- */
- virtual inline TAny* CustomOperationL( TAny* aParam1, TAny* aParam2 );
-
-protected: // data
-
- /**
- * Pointer to application UI. This is protected, so that classes
- * implementing the interface inherit pointer to AppUi.
- * Not own.
- */
- CAknViewAppUi* iAppUi;
-
-
-private: // data
-
- /**
- * ECOM plugin instance UID.
- */
- TUid iDtor_ID_Key;
-
- };
-
-#include "pslnfwplugininterface.inl"
-
-
-#endif // C_PSLNFWPLUGININTERFACENOBASEVIEW_H
-#endif // C_PSLNFWPLUGININTERFACE_H
-
-//End of file
--- a/classicui_plat/personalisation_plugin_api/inc/PslnFWPluginInterface.inl Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* 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: Inline functions for CPslnFWPluginInteface.
-*
-*/
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-inline CPslnFWPluginInterface::~CPslnFWPluginInterface()
- {
- REComSession::DestroyedImplementation( iDtor_ID_Key );
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-inline CPslnFWPluginInterface* CPslnFWPluginInterface::NewL(
- TUid aImplementationUid,
- CAknViewAppUi* aAppUi )
- {
- TAny* ptr;
- TInt32 keyOffset = _FOFF( CPslnFWPluginInterface, iDtor_ID_Key );
- ptr = REComSession::CreateImplementationL(
- aImplementationUid,
- keyOffset,
- aAppUi );
-
- CPslnFWPluginInterface* plugin =
- reinterpret_cast <CPslnFWPluginInterface*> (ptr);
- plugin->iAppUi = aAppUi;
- return plugin;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnFWPluginInterface::CustomOperationL()
-// -----------------------------------------------------------------------------
-//
-inline TAny* CPslnFWPluginInterface::CustomOperationL(
- TAny* /*aParam1*/,
- TAny* /*aParam2*/ )
- {
- return NULL;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnFWPluginInterface::GetLocationTypeAndIndex()
-// -----------------------------------------------------------------------------
-//
-inline void CPslnFWPluginInterface::GetLocationTypeAndIndex(
- TPslnFWLocationType& aType,
- TInt& aIndex ) const
- {
- aType = EPslnFWNotSpecified;
- aIndex = KErrNotFound;
- }
-
-// End of File
--- a/classicui_plat/personalisation_plugin_api/inc/PslnFWPluginInterfaceNoBaseView.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
-* Copyright (c) 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: Defines interface for application skinning framework's ECOM
-* plugin.
-*
-*/
-
-
-#ifndef C_PSLNFWPLUGININTERFACENOBASEVIEW_H
-#ifndef C_PSLNFWPLUGININTERFACE_H
-
-#define C_PSLNFWPLUGININTERFACENOBASEVIEW_H
-
-#include <gulicon.h>
-#include <AknsUtils.h>
-#include <AknViewAppUi.h>
-#include <data_caging_path_literals.hrh>
-
-// Constants used in ECOM implementation
-const TUid KPslnFWPluginInterfaceUid = { 0x102750A9 };
-
-/**
-* Interface class for Psln plugin. All Psln plugins that inherit CBase from
-* other means will implement this class. This is alternative to
-* PslnFwPluginInterface. The only difference is that there is no CBase-inheritance
-* in this class.
-*
-* Note that classes implementing this interface NEED to inherit
-* CAknView by some other means.
-*
-* Also note that class cannot implement both this and PslnFwPluginInterface (as
-* defined in the PslnPluginInterface.h).
-*
-* For details how to implement a Psln ECOM view,
-* see header file PslnFwPluginInterface.h.
-*
-* @lib PslnFramework.lib
-* @since S60 v3.1
-*/
-class CPslnFWPluginInterface: public CBase
- {
-public:
-
- /**
- * Specifies the location of the plugin in the Personalization application.
- * By default the plugins are appended to the end of the main view.
- */
- enum TPslnFWLocationType
- {
- // Personalization application decides plugins location (recommended)
- EPslnFWNotSpecified = 0,
- // Location is specified in aIndex parameter. Note that if the location
- // is already taken by some other plugin (or static view), then plugin
- // view is appended to the end, just like it had EPslnFWNotSpecified set.
- EPslnFWSpecified
- };
-
- /**
- * Creates new Psln plugin having the given UID.
- * Uses Leave code KErrNotFound if implementation is not found.
- *
- * @param aImplementationUid Implementation UID of the plugin to be
- * created.
- * @param aAppUi Pointer to the Psln application UI that can be used to
- * switch to another view.
- */
- static CPslnFWPluginInterface* NewL(
- const TUid aImplementationUid,
- CAknViewAppUi* aAppUi );
-
- /**
- * Destructor
- */
- inline ~CPslnFWPluginInterface();
-
- /**
- * Method for getting caption of this plugin. This should be the
- * localized name of the plugin view to be shown in main view.
- *
- * @param aCaption pointer to Caption variable
- */
- virtual void GetCaptionL( TDes& aCaption ) const = 0;
-
- /**
- * Method for getting tab text for this plugin. This should be the
- * localized name of the plugin view to be shown in tab group.
- *
- * @param aCaption pointer to Caption variable
- */
- virtual void GetTabTextL( TDes& aCaption ) const = 0;
-
- /**
- * Creates a new icon. This icon is shown in Personalization app's main view.
- * Ownership of the created icon is transferred to the caller.
- *
- * @return Pointer of the icon.
- * NOTE: Ownership of this icon is transferred to the caller.
- */
- virtual CGulIcon* CreateIconL() = 0;
-
- /**
- * Method for getting the plugin view's location within Psln application.
- * Do not override, unless plugin view should be in certain location.
- * By default the plugins are appended to the end of the main view.
- * @param aType type of location: specified / not specified
- * @param aIndex proposed location of plugin.
- */
- virtual inline void GetLocationTypeAndIndex(
- TPslnFWLocationType& aType,
- TInt& aIndex ) const;
-
- /**
- * Reserved for future use/plugin's custom functionality. This can be
- * overwritten if plugin needs to have custom functionality which cannot
- * be fulfilled otherwise.
- */
- virtual inline TAny* CustomOperationL( TAny* aParam1, TAny* aParam2 );
-
-protected: // data
-
- /**
- * Pointer to application UI. This is protected, so that classes
- * implementing the interface inherit pointer to AppUi.
- * Not own.
- */
- CAknViewAppUi* iAppUi;
-
-
-private: // data
-
- /**
- * ECOM plugin instance UID.
- */
- TUid iDtor_ID_Key;
-
- };
-
-#include "PslnFWPluginInterface.inl"
-
-#endif // C_PSLNFWPLUGININTERFACE_H
-#endif // C_PSLNFWPLUGININTERFACENOBASEVIEW_H
-
-//End of file
--- a/classicui_plat/personalisation_plugin_api/personalisation_plugin_api.metaxml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<api id="50aa5195881cae3f8000d1a3fd60b8e0" dataversion="1.0">
- <name>Personalisation Plugin API</name>
- <description>Personalisation plug-in interface.</description>
- <type>c++</type>
- <subsystem>Psln</subsystem>
- <libs>
- <lib name="pslnframework.lib" />
- </libs>
- <release category="domain"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>yes</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/classicui_plat/personalisation_slide_show_dialog_api/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 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: File that exports the files belonging to
-: Personalisation Slide Show Dialog API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/pslnslidesetdialoginterface.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnslidesetdialoginterface.h)
-../inc/pslnslidesetwallpaperdialog.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnslidesetwallpaperdialog.h)
-../inc/pslnslidesetscreensaverdialog.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnslidesetscreensaverdialog.h)
-../inc/pslnslidesetdialog.h MW_LAYER_PLATFORM_EXPORT_PATH(pslnslidesetdialog.h)
-../inc/pslnslidesetdialoginterface.inl MW_LAYER_PLATFORM_EXPORT_PATH(pslnslidesetdialoginterface.inl)
--- a/classicui_plat/personalisation_slide_show_dialog_api/inc/pslnslidesetdialog.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base slideset settings dialog.
-*
-*/
-
-
-#ifndef C_PSLNSLIDESETDIALOG_H
-#define C_PSLNSLIDESETDIALOG_H
-
-#include <pslnslidesetdialoginterface.h>
-#include <aknsettingpage.h>
-#include <ConeResLoader.h>
-#include <eikclb.h>
-
-class CPslnSlideSetDialogContainer;
-class CEikTextListBox;
-class CPslnSlideSetModel;
-
-/**
- * Provides the base dialog functionality for defining Slide Set Settings
- * for wallpapers and screensavers.
- *
- * To use this from code, instantiate the ECOM plugin, then call ExecuteLD.
- * See details from pslnslidesetwallpaperdialog.h and
- * pslnslidesetscreensaverdialog.h.
- *
- * @lib pslnslidesetdialog.dll
- * @since S60 3.2
- */
-class CPslnSlidesetDialog:
- public CPslnSlidesetDialogInterface,
- public MEikListBoxObserver,
- public MAknSettingPageObserver
- {
-public:
-
- /**
- * Constructs all common parts of the dialog.
- * @param aType type of slide set (wallpaper or screen saver).
- *
- * See CPslnSlidesetDialogInterface::TPslnSlideSetDialogType for valid values.
- */
- void BaseConstructL( const TInt aType );
-
- /**
- * Symbian two-phase constructor.
- */
- virtual void ConstructL() = 0;
-
- /**
- * Creates listbox items.
- */
- virtual void CreateListBoxItemsL() = 0;
-
- /**
- * Destructor
- */
- virtual ~CPslnSlidesetDialog();
-
- /**
- * Returns listbox's current item index.
- * @return current item index.
- */
- TInt CurrentItemIndex() const;
-
- /**
- * Sets current item index for listbox and re-draws screen.
- * @param aNewIndex new index.
- */
- void SetCurrentItemIndexAndDraw( TInt aNewIndex );
-
- /**
- * Checks if feature is supported.
- * @param aFeatureID feature ID.
- * @return ETrue if feature is supported, EFalse otherwise.
- */
- TBool IsFeatureSupported( TInt aFeatureID );
-
-protected:
-
- /**
- * C++ default constructor.
- */
- CPslnSlidesetDialog();
-
- /**
- * Sets title pane text.
- * @param aResourceId resource ID of title text to use.
- */
- void SetTitlePaneL( const TInt aResourceId );
-
- /**
- * Makes one specific folder name item.
- * @param aIndex item index to create.
- */
- void MakeItemL( const TInt aIndex );
-
- /**
- * Sets middle softkey label.
- * @param aResourceId resource ID of label text to use.
- * @param aCommandId command to place to middle softkey.
- */
- void SetMiddleSoftKeyLabelL(
- const TInt aResourceId,
- const TInt aCommandId );
-
- /**
- * From CEikDialog. Prelayouts the dialog.
- */
- void PreLayoutDynInitL();
-
- /**
- * From CAknDialog.
- * Called by framework to process commands invoked by the user.
- */
- void ProcessCommandL( TInt aCommandId );
-
- /**
- * From CEikDialog. Checks if it is okay to exit the dialog.
- */
- TBool OkToExitL( TInt aButtonId );
-
-private:
-
- /**
- * From CAknDialog.
- * Called by framework to dynamically manipulate the menu
- * for the dialog.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- /**
- * From CAknDialog.
- * Called by framework to notify resize of dialog.
- */
- void SizeChanged();
-
- /**
- * From CCoeControl.
- * Key Handling Method for control.
- */
- TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode aType );
-
- /**
- * From MAknSettingPageObserver.
- */
- void HandleSettingPageEventL(
- CAknSettingPage* aSettingPage,
- TAknSettingPageEvent aEventType );
-
- /**
- * From CCoeControl.
- * Handles resource changes.
- */
- void HandleResourceChange( TInt aType );
-
- /**
- * From CCoeControl
- * Handles list focus changes.
- */
- void FocusChanged( TDrawNow aDrawNow );
-
- /**
- * From CCoeControl.
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl.
- */
- CCoeControl* ComponentControl( TInt aIndex ) const;
-
- /*
- * From MEikListBoxObserver. Handle listbox events.
- */
- void HandleListBoxEventL(
- CEikListBox* aListBox,
- TListBoxEvent aEventType );
-
- /*
- * Creates listbox items.
- */
- void CreateSettingsListL();
-
- /*
- * Handles list box selection based on active index
- */
- void HandleListBoxSelectionL();
-
- /**
- * Show slide set type setting page.
- */
- virtual void ShowSlideSetTypeSelectionL();
-
- /**
- * Show backlight period setting page. Empty implementation.
- */
- virtual void ShowBacklightSliderL();
-
- /**
- * Show slide set duration setting page. Empty implementation.
- */
- virtual void ShowDurationSliderL();
-
- /**
- * Show slide set image interval peridod setting page. Empty implementation.
- */
- virtual void ShowIntervalListL();
-
- /**
- * Show slide set image list.
- */
- TBool ShowSlideSetImageListL();
-
- /**
- * Removes caller's navi pane and replaces it with default navi pane.
- * When dialog is closed, previous navi pane is reapplied.
- */
- void ToggleDefaultNaviPaneL( const TBool aNaviPaneVisible );
-
- /**
- * Updates dialog with new value.
- */
- void UpdateDialogL( const TInt aSettingId );
-
- /**
- * Sets current value of setting page to listbox.
- */
- void SetSettingPageValueToListL(
- const CDesCArrayFlat& aArray,
- const TInt aCurrentIndex,
- const TInt aCurrentValue,
- const TBool aNumericConversionNeeded );
-
- /**
- * Sets current value of slider page to listbox.
- */
- void SetSliderValueToListL(
- const TInt aCurrentIndex,
- const TInt aCurrentValue,
- const TInt aResourceID );
-
- /**
- * Selects correct resource string to use with setting item.
- */
- TInt SelectResourceStringForImages( TInt aCurrentValue );
-
- /**
- * Starts MGFetch.
- */
- void HandleLaunchMGFetchL();
-
-protected: // data
-
- /**
- * List of setting items.
- * Own.
- */
- CDesCArrayFlat* iItems;
-
- /**
- * Listbox.
- * Own.
- */
- CEikTextListBox* iListBox;
-
- /**
- * Setting items for slide set interval setting page.
- * Own.
- */
- CDesCArrayFlat* iIntervalItems;
-
- /**
- * Slide set model.
- * Own.
- */
- CPslnSlideSetModel* iModel;
-
- /**
- * Is the dialog launched for activation and configuration,
- * or configuration only?
- */
- TInt iLaunchMode;
-
- /**
- * Setting items for slide set type setting page.
- * Own.
- */
- CDesCArrayFlat* iSlideSetTypeItems;
-
-
-private:
-
- /**
- * List of items in listbox.
- * Not own (owned by listbox).
- */
- CDesCArray* iItemArray;
-
- /**
- * Type of dialog.
- * Values according to TPslnSlideSetDialogType.
- */
- TInt iType;
-
- /**
- * Offset of resource file.
- */
- TInt iResourceOffset;
-
- /**
- * Defines which features are supported.
- */
- TBitFlags iFeaturesSupport;
-
- /**
- *
- * Own.
- */
- const HBufC* iPreviousTitleTxt;
-
- /**
- * ETrue, when MGFetch has been started.
- */
- TBool iMGFetchRunning;
- };
-
-
-#endif // C_PSLNSLIDESETDIALOG_H
--- a/classicui_plat/personalisation_slide_show_dialog_api/inc/pslnslidesetdialoginterface.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines ECOM interface for Slide set setting dialog.
-*
-*/
-
-
-#ifndef C_PSLNSLIDESETDIALOGINTERFACE_H
-#define C_PSLNSLIDESETDIALOGINTERFACE_H
-
-#include <ecom/ecom.h>
-#include <AknDialog.h>
-
-// Constants used in ECOM implementation
-const TUid KPslnSlideSetPluginInterfaceUid = { 0x102823AD };
-// Defines Wallpaper setting dialog entry in implementation table
-const TInt KPslnWallpaperSlideSettingDialog = 0;
-// Defines Screen Saver setting dialog entry in implementation table
-const TInt KPslnScreenSaverSlideSettingDialog = 1;
-
-// Defines type of slide set setting dialog.
-enum TPslnSlideSetDialogType
- {
- EPslnScreensaverDialog,
- EPslnWallpaperDialog
- };
-
-/**
- * ECOM interface definition for setting dialog.
- *
- * This interface defines interface for slide setting dialog base.
- *
- * @lib pslnslidesetdialog.dll
- * @since S60 3.2
- */
-
-class CPslnSlidesetDialogInterface : public CAknDialog
- {
-public:
-
- // Defines dialog launch mode.
- enum TPslnSlideSetLaunchMode
- {
- // Dialog is launched normally and
- // user made selections are immediately activated
- EPslnNormal,
- // Dialog is launched for configuration only.
- // Settings need to be separately activated.
- EPslnConfigureOnly
- };
-
- // Defines dialog configurability state.
- enum TPslnSlideSetConfigurability
- {
- // State is unknown. Settings need to be defined.
- EPslnUnknown,
- // Dialog settings need to be configured before activation.
- EPslnNeedsToBeConfigured,
- // Slide set can directly activate - no need to define settings.
- EPslnDirectActivationPossible
- };
-
- // Defines dialog flags.
- enum TPslnSlideSetDialogFlags
- {
- // Type of dialog.
- EPslnDialogType,
- // For what purpose the dialog is launched.
- EPslnLaunchMode,
- // Can the slide set be directly activated.
- EPslnConfigurability
- };
-
- /**
- * Creates new Psln ECOM plugin for slideset dialog having the given UID.
- * Uses Leave code KErrNotFound if implementation is not found.
- *
- * @param aImplementationUid Implementation UID of the plugin to be
- * created.
- */
- static CPslnSlidesetDialogInterface* NewL( const TUid aImplementationUid );
-
- /**
- * Destructor.
- */
- inline ~CPslnSlidesetDialogInterface();
-
- /**
- * Reserved for future use/plugin's custom functionality. This can be
- * overwritten if plugin needs to have custom functionality which cannot
- * be fulfilled otherwise.
- */
- virtual inline TAny* CustomOperationL( TAny* aParam1, TAny* aParam2 );
-
- /*
- * Executes dialog.
- *
- */
- virtual TInt ExecuteDialogLD() = 0;
-
- /*
- * Defines dialog flag. Currently supported flags are defined in
- * TPslnSlideSetDialogFlags.
- * @param aFlag which flag to set new state to.
- * @param aValue new value of flag.
- */
- virtual void SetDialogFlag( const TInt aFlag, const TInt aValue ) = 0;
-
- /*
- * Inqueries for dialog flags. Currently supported flags are defined in
- * TPslnSlideSetDialogFlags.
- * @param aFlag which flag to retrieve status for
- * (see TPslnSlideSetDialogFlags for details)
- * @return current value of the flag.
- *
- */
- virtual TInt GetDialogFlag( const TInt aFlag ) = 0;
-
-private: // data
-
- /**
- * ECOM plugin instance UID.
- */
- TUid iDtor_ID_Key;
-
- };
-
-
-#include "pslnslidesetdialoginterface.inl"
-
-
-#endif // C_PSLNSLIDESETDIALOGINTERFACE_H
--- a/classicui_plat/personalisation_slide_show_dialog_api/inc/pslnslidesetdialoginterface.inl Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 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: Inline methods for the Psln slide set settings dialog interface.
-*
-*/
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-inline CPslnSlidesetDialogInterface::~CPslnSlidesetDialogInterface()
- {
- REComSession::DestroyedImplementation( iDtor_ID_Key );
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-inline CPslnSlidesetDialogInterface* CPslnSlidesetDialogInterface::NewL(
- TUid aImplementationUid )
- {
- TAny* ptr;
- TInt32 keyOffset = _FOFF( CPslnSlidesetDialogInterface, iDtor_ID_Key );
- ptr = REComSession::CreateImplementationL(
- aImplementationUid,
- keyOffset );
-
- return reinterpret_cast<CPslnSlidesetDialogInterface*>(ptr);
- }
-
-// -----------------------------------------------------------------------------
-// Reserved for future use.
-// -----------------------------------------------------------------------------
-//
-inline TAny* CPslnSlidesetDialogInterface::CustomOperationL(
- TAny* /*aParam1*/,
- TAny* /*aParam2*/ )
- {
- return NULL;
- }
-
-// End of File
-
--- a/classicui_plat/personalisation_slide_show_dialog_api/inc/pslnslidesetscreensaverdialog.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 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: Screensaver slideset setting dialog implementation header.
-*
-*/
-
-
-#ifndef C_PSLNSLIDESETSCREENSAVERDIALOG_H
-#define C_PSLNSLIDESETSCREENSAVERDIALOG_H
-
-#include <pslnslidesetdialog.h>
-
-/**
- * Provides the dialog functionality for defining Slide Set Settings
- * for screensavers.
- *
- * To use this from code, instantiate the ECOM plugin.
- * Then call ExecuteLD.
- * Example:
- *
- * // List all implementations.
- * REComSession::ListImplementationsL(
- * KPslnSlideSetDialogUidInterface,
- * array );
- * CleanupResetAndDestroyPushL( array );
- *
- * // Load screensaver implementation.
- * CImplementationInformation* info =
- * array[ KPslnScreenSaverSlideSettingDialog ];
- * TUid implUid = info->ImplementationUid();
- *
- * // Instantiate plugin.
- * CPslnSlidesetScreensaverDialogInterface* plugin =
- * CPslnSlidesetDialogInterface::NewL( implUid );
- * CleanupStack::PushL ( plugin );
- *
- * // Finally execute.
- * plugin->ExecuteLD();
- * CleanupStack::Pop( plugin );
- * CleanupStack::PopAndDestroy(); // array
- *
- * @lib pslnslidesetdialog.dll
- * @since S60 3.2
- */
-NONSHARABLE_CLASS( CPslnSlidesetScreensaverDialog ):
- public CPslnSlidesetDialog
- {
-public:
-
- /**
- * Symbian OS two-phased constructor
- * @return Psln Slide Set Setting dialog instance.
- */
- static CPslnSlidesetScreensaverDialog* NewL();
-
- /**
- * Symbian OS two-phased constructor
- * @return Psln Slide Set Setting dialog instance.
- */
- static CPslnSlidesetScreensaverDialog* NewLC();
-
- /**
- * Destructor.
- */
- ~CPslnSlidesetScreensaverDialog();
-
- /**
- * From TPslnSlidesetDialogInterface - executes dialog.
- */
- TInt ExecuteDialogLD();
-
- /**
- * From TPslnSlidesetDialogInterface - sets dialog flags.
- */
- void SetDialogFlag( const TInt aFlag, const TInt aValue );
-
- /**
- * From TPslnSlidesetDialogInterface - gets dialog flags.
- */
- TInt GetDialogFlag( const TInt aFlag );
-
- /**
- * From CEikDialog - prelayouts dialog.
- */
- void PreLayoutDynInitL();
-
-private:
-
- /**
- * From CAknDialog.
- * Framework method to determine if it OK to exit the dialog.
- */
- TBool OkToExitL( TInt aButtonId );
-
- /**
- * From CPslnSlidesetDialog.
- * Creates setting page items.
- */
- void CreateListBoxItemsL();
-
- /**
- * From CCoeControl. Gets Help context.
- */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- /**
- * Shows slide set duration setting page.
- */
- void ShowDurationSliderL();
-
- /**
- * Shows slide set backlight period setting page.
- */
- void ShowBacklightSliderL();
-
- /**
- * C++ constructor.
- */
- CPslnSlidesetScreensaverDialog();
-
- /**
- * Symbian 2nd phase constructor.
- */
- void ConstructL();
-
- };
-
-#endif // C_PSLNSLIDESETSCREENSAVERDIALOG_H
--- a/classicui_plat/personalisation_slide_show_dialog_api/inc/pslnslidesetwallpaperdialog.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wallpaper slideset setting dialog implementation header.
-*
-*/
-
-
-#ifndef C_PSLNSLIDESETWALLPAPERDIALOG_H
-#define C_PSLNSLIDESETWALLPAPERDIALOG_H
-
-#include <pslnslidesetdialog.h>
-
-/**
- * Provides the dialog functionality for defining Slide Set Settings
- * for wallpapers and screensavers.
- *
- * To use this from code, instantiate the ECOM plugin.
- * Then call ExecuteLD.
- * Example:
- *
- * // List all implementations.
- * REComSession::ListImplementationsL(
- * KPslnSlideSetDialogUidInterface,
- * array );
- * CleanupResetAndDestroyPushL( array );
- *
- * // Load wallpaper implementation.
- * CImplementationInformation* info =
- * array[ KPslnWallpaperSlideSettingDialog ];
- * TUid implUid = info->ImplementationUid();
- *
- * // Instantiate plugin.
- * CPslnWallpaperSlidesetDialogInterface* plugin =
- * CPslnSlidesetDialogInterface::NewL( implUid );
- * CleanupStack::PushL ( plugin );
- * // Finally execute.
- * plugin->ExecuteLD();
- * CleanupStack::Pop( plugin );
- * CleanupStack::PopAndDestroy(); // array
- *
- * To configure the slide set without activating it,
- * call SetDialogFlag prior to calling ExecuteLD.
- * Use parameters
- * PslnSlidesetDialogInterface::EPslnLaunchMode and
- * PslnSlidesetDialogInterface::EPslnConfigureOnly.
- *
- * @lib pslnslidesetdialog.dll
- * @since S60 3.2
- */
-NONSHARABLE_CLASS( CPslnWallpaperSlidesetDialog ):
- public CPslnSlidesetDialog
- {
-public:
-
- /**
- * Symbian OS two-phased constructor
- * @return Psln Slide Set Setting dialog instance.
- */
- static CPslnWallpaperSlidesetDialog* NewL();
-
- /**
- * Symbian OS two-phased constructor
- * @return Psln Slide Set Setting dialog instance.
- */
- static CPslnWallpaperSlidesetDialog* NewLC();
-
- /**
- * Destructor.
- */
- ~CPslnWallpaperSlidesetDialog();
-
- /**
- * From TPslnSlidesetDialogInterface - executes dialog.
- */
- TInt ExecuteDialogLD();
-
- /**
- * From TPslnSlidesetDialogInterface - sets dialog flags.
- */
- void SetDialogFlag( const TInt aFlag, const TInt aValue );
-
- /**
- * From TPslnSlidesetDialogInterface - gets dialog flags.
- */
- TInt GetDialogFlag( const TInt aFlag );
-
- /**
- * From CEikDialog - prelayouts dialog.
- */
- void PreLayoutDynInitL();
-
- /**
- * From CAknDialog.
- * Called by framework to process commands invoked by the user.
- */
- void ProcessCommandL( TInt aCommandId );
-
-private:
-
- /**
- * From CAknDialog.
- * Framework method to determine if it OK to exit the dialog.
- */
- TBool OkToExitL( TInt aButtonId );
-
- /**
- * From CPslnSlidesetDialog.
- * Creates setting page items.
- */
- void CreateListBoxItemsL();
-
- /**
- * From CCoeControl. Gets Help context.
- */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- /**
- * Shows interval period setting page.
- */
- void ShowIntervalListL();
-
- /*
- * Deduce if the slide set can activate directly (i.e.
- * no need to set settings).
- */
- TInt DeduceActivationModeL();
-
- /*
- * Append one interval value to list. Makes also language
- * dependant conversion for the text.
- */
- void AppendIntervalItemL( TInt aResourceText );
-
- /**
- * C++ constructor.
- */
- CPslnWallpaperSlidesetDialog();
-
- /**
- * Symbian 2nd phase constructor.
- */
- void ConstructL();
- };
-
-
-#endif // C_PSLNSLIDESETWALLPAPERDIALOG_H
--- a/classicui_plat/personalisation_slide_show_dialog_api/personalisation_slide_show_dialog_api.metaxml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<api id="54e9c3c6122885dea94b7972a8dbe22d" dataversion="1.0">
- <name>Personalisation Slide Show Dialog API</name>
- <description>Provides slide set dialog interfaces.</description>
- <type>c++</type>
- <subsystem>Psln</subsystem>
- <libs>
- <lib name="pslnslidesetdialog.lib" />
- </libs>
- <release category="domain"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>yes</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/psln/BWINS/PslnFrameworkU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-EXPORTS
- ?DoDeactivate@CPslnFWBaseView@@UAEXXZ @ 1 NONAME ; void CPslnFWBaseView::DoDeactivate(void)
- ?OfferKeyEventL@CPslnFWBaseContainer@@EAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 2 NONAME ; enum TKeyResponse CPslnFWBaseContainer::OfferKeyEventL(struct TKeyEvent const &, enum TEventCode)
- ??0CPslnFWBaseView@@QAE@XZ @ 3 NONAME ; CPslnFWBaseView::CPslnFWBaseView(void)
- ?Container@CPslnFWBaseView@@QAEPAVCPslnFWBaseContainer@@XZ @ 4 NONAME ; class CPslnFWBaseContainer * CPslnFWBaseView::Container(void)
- ?DoActivateL@CPslnFWBaseView@@UAEXABVTVwsViewId@@VTUid@@ABVTDesC8@@@Z @ 5 NONAME ; void CPslnFWBaseView::DoActivateL(class TVwsViewId const &, class TUid, class TDesC8 const &)
- ?OpenLocalizedResourceFileL@CPslnFWBaseView@@QAEXABVTDesC16@@AAVRConeResourceLoader@@@Z @ 6 NONAME ; void CPslnFWBaseView::OpenLocalizedResourceFileL(class TDesC16 const &, class RConeResourceLoader &)
- ?SetTitlePaneL@CPslnFWBaseView@@MAEXAAH@Z @ 7 NONAME ; void CPslnFWBaseView::SetTitlePaneL(int &)
- ?GetTabIndex@CPslnFWBaseView@@QBEHXZ @ 8 NONAME ; int CPslnFWBaseView::GetTabIndex(void) const
- ?SizeChanged@CPslnFWBaseContainer@@EAEXXZ @ 9 NONAME ; void CPslnFWBaseContainer::SizeChanged(void)
- ?SetMiddleSoftkeyObserver@CPslnFWBaseContainer@@QAEXPAVMPslnFWMSKObserver@@@Z @ 10 NONAME ; void CPslnFWBaseContainer::SetMiddleSoftkeyObserver(class MPslnFWMSKObserver *)
- ?CreateNaviPaneContextL@CPslnFWBaseView@@MAEXH@Z @ 11 NONAME ; void CPslnFWBaseView::CreateNaviPaneContextL(int)
- ?GetLocalizedStringLC@CPslnFWIconHelper@@QAEPAVHBufC16@@ABVTDesC16@@HPAVCCoeEnv@@@Z @ 12 NONAME ; class HBufC16 * CPslnFWIconHelper::GetLocalizedStringLC(class TDesC16 const &, int, class CCoeEnv *)
- ?CreateContainerL@CPslnFWBaseView@@MAEXXZ @ 13 NONAME ; void CPslnFWBaseView::CreateContainerL(void)
- ?BaseConstructL@CPslnFWBaseContainer@@QAEXABVTRect@@HH@Z @ 14 NONAME ; void CPslnFWBaseContainer::BaseConstructL(class TRect const &, int, int)
- ?SetMiddleSoftKeyLabelL@CPslnFWBaseView@@MAEXHH@Z @ 15 NONAME ; void CPslnFWBaseView::SetMiddleSoftKeyLabelL(int, int)
- ?OpenLocalizedResourceFileL@CPslnFWBaseView@@QAEXABVTDesC16@@AAVRConeResourceLoader@@PBV2@@Z @ 16 NONAME ; void CPslnFWBaseView::OpenLocalizedResourceFileL(class TDesC16 const &, class RConeResourceLoader &, class TDesC16 const *)
- ??1CPslnFWPluginHandler@@UAE@XZ @ 17 NONAME ; CPslnFWPluginHandler::~CPslnFWPluginHandler(void)
- ?SetTabIndex@CPslnFWBaseView@@QAEXH@Z @ 18 NONAME ; void CPslnFWBaseView::SetTabIndex(int)
- ??1CPslnFWIconHelper@@UAE@XZ @ 19 NONAME ; CPslnFWIconHelper::~CPslnFWIconHelper(void)
- ?NewL@CPslnFWIconHelper@@SAPAV1@XZ @ 20 NONAME ; class CPslnFWIconHelper * CPslnFWIconHelper::NewL(void)
- ?SetCurrentItem@CPslnFWBaseView@@UAEXH@Z @ 21 NONAME ; void CPslnFWBaseView::SetCurrentItem(int)
- ?ComponentControl@CPslnFWBaseContainer@@EBEPAVCCoeControl@@H@Z @ 22 NONAME ; class CCoeControl * CPslnFWBaseContainer::ComponentControl(int) const
- ??1CPslnFWBaseContainer@@UAE@XZ @ 23 NONAME ; CPslnFWBaseContainer::~CPslnFWBaseContainer(void)
- ?SetNaviPaneL@CPslnFWBaseView@@MAEXH@Z @ 24 NONAME ; void CPslnFWBaseView::SetNaviPaneL(int)
- ?FocusChanged@CPslnFWBaseContainer@@EAEXW4TDrawNow@@@Z @ 25 NONAME ; void CPslnFWBaseContainer::FocusChanged(enum TDrawNow)
- ?CountComponentControls@CPslnFWBaseContainer@@EBEHXZ @ 26 NONAME ; int CPslnFWBaseContainer::CountComponentControls(void) const
- ?HandleResourceChange@CPslnFWBaseContainer@@EAEXH@Z @ 27 NONAME ; void CPslnFWBaseContainer::HandleResourceChange(int)
- ??1CPslnFWBaseView@@UAE@XZ @ 28 NONAME ; CPslnFWBaseView::~CPslnFWBaseView(void)
- ?LoadPluginsL@CPslnFWPluginHandler@@QAEXPAV?$CArrayPtrFlat@VCPslnFWPluginInterface@@@@@Z @ 29 NONAME ; void CPslnFWPluginHandler::LoadPluginsL(class CArrayPtrFlat<class CPslnFWPluginInterface> *)
- ?HandleCommandL@CPslnFWBaseView@@MAEXH@Z @ 30 NONAME ; void CPslnFWBaseView::HandleCommandL(int)
- ??0CPslnFWBaseContainer@@QAE@XZ @ 31 NONAME ; CPslnFWBaseContainer::CPslnFWBaseContainer(void)
- ?LoadPluginL@CPslnFWPluginHandler@@QAEPAVCPslnFWPluginInterface@@VTUid@@@Z @ 32 NONAME ; class CPslnFWPluginInterface * CPslnFWPluginHandler::LoadPluginL(class TUid)
- ?AddIconsToSettingItemsL@CPslnFWIconHelper@@QAEXHHPAVCEikTextListBox@@@Z @ 33 NONAME ; void CPslnFWIconHelper::AddIconsToSettingItemsL(int, int, class CEikTextListBox *)
- ?SetNaviPaneDecorator@CPslnFWBaseView@@UAEXPAVCAknNavigationDecorator@@@Z @ 34 NONAME ; void CPslnFWBaseView::SetNaviPaneDecorator(class CAknNavigationDecorator *)
- ?HandleListBoxEventL@CPslnFWBaseView@@MAEXPAVCEikListBox@@W4TListBoxEvent@MEikListBoxObserver@@@Z @ 35 NONAME ; void CPslnFWBaseView::HandleListBoxEventL(class CEikListBox *, enum MEikListBoxObserver::TListBoxEvent)
- ?NewL@CPslnFWPluginHandler@@SAPAV1@PAVCAknViewAppUi@@@Z @ 36 NONAME ; class CPslnFWPluginHandler * CPslnFWPluginHandler::NewL(class CAknViewAppUi *)
- ?SetNaviPaneL@CPslnFWBaseView@@MAEXXZ @ 37 NONAME ; void CPslnFWBaseView::SetNaviPaneL(void)
- ?NewL@CPslnFWPluginHandler@@SAPAV1@PAVCAknViewAppUi@@PAV?$CArrayPtrFlat@VCPslnFWPluginInterface@@@@@Z @ 38 NONAME ; class CPslnFWPluginHandler * CPslnFWPluginHandler::NewL(class CAknViewAppUi *, class CArrayPtrFlat<class CPslnFWPluginInterface> *)
-
--- a/psln/EABI/PslnFrameworkU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-EXPORTS
- _ZN15CPslnFWBaseView11DoActivateLERK10TVwsViewId4TUidRK6TDesC8 @ 1 NONAME
- _ZN15CPslnFWBaseView11SetTabIndexEi @ 2 NONAME
- _ZN15CPslnFWBaseView12DoDeactivateEv @ 3 NONAME
- _ZN15CPslnFWBaseView12SetNaviPaneLEi @ 4 NONAME
- _ZN15CPslnFWBaseView12SetNaviPaneLEv @ 5 NONAME
- _ZN15CPslnFWBaseView13SetTitlePaneLERi @ 6 NONAME
- _ZN15CPslnFWBaseView14HandleCommandLEi @ 7 NONAME
- _ZN15CPslnFWBaseView14SetCurrentItemEi @ 8 NONAME
- _ZN15CPslnFWBaseView16CreateContainerLEv @ 9 NONAME
- _ZN15CPslnFWBaseView19HandleListBoxEventLEP11CEikListBoxN19MEikListBoxObserver13TListBoxEventE @ 10 NONAME
- _ZN15CPslnFWBaseView20SetNaviPaneDecoratorEP23CAknNavigationDecorator @ 11 NONAME
- _ZN15CPslnFWBaseView22CreateNaviPaneContextLEi @ 12 NONAME
- _ZN15CPslnFWBaseView22SetMiddleSoftKeyLabelLEii @ 13 NONAME
- _ZN15CPslnFWBaseView26OpenLocalizedResourceFileLERK7TDesC16R19RConeResourceLoader @ 14 NONAME
- _ZN15CPslnFWBaseView26OpenLocalizedResourceFileLERK7TDesC16R19RConeResourceLoaderPS1_ @ 15 NONAME
- _ZN15CPslnFWBaseView9ContainerEv @ 16 NONAME
- _ZN15CPslnFWBaseViewC2Ev @ 17 NONAME
- _ZN15CPslnFWBaseViewD0Ev @ 18 NONAME
- _ZN15CPslnFWBaseViewD1Ev @ 19 NONAME
- _ZN15CPslnFWBaseViewD2Ev @ 20 NONAME
- _ZN17CPslnFWIconHelper20GetLocalizedStringLCERK7TDesC16iP7CCoeEnv @ 21 NONAME
- _ZN17CPslnFWIconHelper23AddIconsToSettingItemsLEiiP15CEikTextListBox @ 22 NONAME
- _ZN17CPslnFWIconHelper4NewLEv @ 23 NONAME
- _ZN17CPslnFWIconHelperD0Ev @ 24 NONAME
- _ZN17CPslnFWIconHelperD1Ev @ 25 NONAME
- _ZN17CPslnFWIconHelperD2Ev @ 26 NONAME
- _ZN20CPslnFWBaseContainer11SizeChangedEv @ 27 NONAME
- _ZN20CPslnFWBaseContainer12FocusChangedE8TDrawNow @ 28 NONAME
- _ZN20CPslnFWBaseContainer14BaseConstructLERK5TRectii @ 29 NONAME
- _ZN20CPslnFWBaseContainer14OfferKeyEventLERK9TKeyEvent10TEventCode @ 30 NONAME
- _ZN20CPslnFWBaseContainer20HandleResourceChangeEi @ 31 NONAME
- _ZN20CPslnFWBaseContainer24SetMiddleSoftkeyObserverEP18MPslnFWMSKObserver @ 32 NONAME
- _ZN20CPslnFWBaseContainerC2Ev @ 33 NONAME
- _ZN20CPslnFWBaseContainerD0Ev @ 34 NONAME
- _ZN20CPslnFWBaseContainerD1Ev @ 35 NONAME
- _ZN20CPslnFWBaseContainerD2Ev @ 36 NONAME
- _ZN20CPslnFWPluginHandler11LoadPluginLE4TUid @ 37 NONAME
- _ZN20CPslnFWPluginHandler12LoadPluginsLEP13CArrayPtrFlatI22CPslnFWPluginInterfaceE @ 38 NONAME
- _ZN20CPslnFWPluginHandler4NewLEP13CAknViewAppUi @ 39 NONAME
- _ZN20CPslnFWPluginHandler4NewLEP13CAknViewAppUiP13CArrayPtrFlatI22CPslnFWPluginInterfaceE @ 40 NONAME
- _ZN20CPslnFWPluginHandlerD0Ev @ 41 NONAME
- _ZN20CPslnFWPluginHandlerD1Ev @ 42 NONAME
- _ZN20CPslnFWPluginHandlerD2Ev @ 43 NONAME
- _ZNK15CPslnFWBaseView11GetTabIndexEv @ 44 NONAME
- _ZNK20CPslnFWBaseContainer16ComponentControlEi @ 45 NONAME
- _ZNK20CPslnFWBaseContainer22CountComponentControlsEv @ 46 NONAME
- _ZTI15CPslnFWBaseView @ 47 NONAME ; #<TI>#
- _ZTI20CPslnFWBaseContainer @ 48 NONAME ; #<TI>#
- _ZTV15CPslnFWBaseView @ 49 NONAME ; #<VT>#
- _ZTV20CPslnFWBaseContainer @ 50 NONAME ; #<VT>#
- _ZThn88_N15CPslnFWBaseView19HandleListBoxEventLEP11CEikListBoxN19MEikListBoxObserver13TListBoxEventE @ 51 NONAME ; #<thunk>#
-
--- a/psln/Group/101F8770.xml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<!--
-To change screensaver type to default - date/time screensaver
--->
-
-<PowerSaveModeConfig>
- <Setting mode="1"><!-- PSM mode Full PSM -->
- <SetItem key="2" type="0" value="1"></SetItem>
- </Setting>
- <Setting mode="2"><!-- PSM mode Partial PSM-->
- <SetItem key="2" type="0" value="1"></SetItem>
- </Setting>
-</PowerSaveModeConfig>
--- a/psln/Group/102818E8.xml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-<!--
-To disable theme related transition effects
-Repository : KCRUidThemes
-Key : KThemesTransitionEffects
-Value : The largest possible value for a TInt (KMaxTInt=0x7fffffff defined in e32const.h)
-Definition in file pslninternalcreys.h
--->
-
-<PowerSaveModeConfig>
- <Setting mode="1"><!-- PSM mode Full PSM -->
- <SetItem key="9" type="0" value="2147483647"></SetItem>
- </Setting>
- <Setting mode="2"><!-- PSM mode Partial PSM-->
- <SetItem key="9" type="0" value="2147483647"></SetItem>
- </Setting>
-</PowerSaveModeConfig>
--- a/psln/Group/Psln.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project psln
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET psln.exe
-TARGETTYPE exe
-UID 0x100039CE 0x10005A32
-
-// Increase stack size, otherwise the default 0x2000 is used
-// and it causes mgfetch and plugin screensaver to run out of stack
-EPOCSTACKSIZE 0x6000
-EPOCHEAPSIZE 0x7FFF 0xF4FFFF
-
-CAPABILITY CAP_APPLICATION
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../Src
-SOURCE PslnApplication.cpp
-SOURCE PslnDocument.cpp
-SOURCE PslnUi.cpp
-SOURCE PslnBaseContainer.cpp
-SOURCE PslnBaseView.cpp
-SOURCE PslnDRMImplementation.cpp
-SOURCE PslnSoundActivator.cpp
-SOURCE PslnPropertySubscriber.cpp
-SOURCE PslnPluginHandler.cpp
-SOURCE pslntaskgenericupdate.cpp
-SOURCE pslntaskactivatesounds.cpp
-SOURCE pslnidletaskcreateviews.cpp
-
-// Views
-SOURCE PslnMainView.cpp
-SOURCE PslnScreenSaverView.cpp
-SOURCE PslnGeneralThemeView.cpp
-SOURCE PslnWallpaperView.cpp
-
-// Containers
-SOURCE PslnMainViewContainer.cpp
-SOURCE PslnScreenSaverContainer.cpp
-SOURCE PslnGeneralThemeContainer.cpp
-SOURCE PslnWallpaperContainer.cpp
-
-START RESOURCE ../Rss/PslnCommon.rss
-HEADER
-TARGETPATH APP_RESOURCE_DIR
-LANGUAGE_IDS
-END // RESOURCE
-
-START RESOURCE ../Rss/Psln.rss
-DEPENDS pslncommon.rsg
-HEADER
-TARGETPATH APP_RESOURCE_DIR
-LANGUAGE_IDS
-END // RESOURCE
-
-START RESOURCE ../Rss/PslnSkinNames.rss
-HEADER
-TARGETPATH APP_RESOURCE_DIR
-LANGUAGE_IDS
-END // RESOURCE
-
-USERINCLUDE ../Group
-USERINCLUDE ../Inc
-USERINCLUDE ../pslnengine/inc
-USERINCLUDE ../PslnLibraryLoaders/inc
-
-// This is a SYSTEMINCLUDE macro containing the application
-// layer specific include directories
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY apparc.lib
-LIBRARY avkon.lib
-LIBRARY bafl.lib
-LIBRARY cone.lib
-LIBRARY eikcoctl.lib
-LIBRARY eikcore.lib
-LIBRARY eikctl.lib
-LIBRARY euser.lib
-LIBRARY efsrv.lib
-LIBRARY fbscli.lib
-LIBRARY egul.lib
-LIBRARY mgfetch.lib
-LIBRARY aknskinsrv.lib
-LIBRARY aknskins.lib
-LIBRARY commonengine.lib
-LIBRARY aknnotify.lib
-LIBRARY hlplch.lib
-LIBRARY drmhelper.lib
-LIBRARY pslnengine.lib
-LIBRARY pslnframework.lib
-LIBRARY cdlengine.lib
-LIBRARY aknicon.lib
-LIBRARY ecom.lib
-LIBRARY centralrepository.lib
-LIBRARY cenrepnotifhandler.lib
-LIBRARY platformenv.lib
-LIBRARY ws32.lib
-LIBRARY apgrfx.lib
-LIBRARY featmgr.lib
-LIBRARY eikdlg.lib
-LIBRARY hal.lib
-
-LIBRARY aknlocalskinlib.lib
-LIBRARY aknlistloadertfx.lib
-LIBRARY psmclient.lib
-
-// ============================================================================
-// AIF
-// ============================================================================
-
-START RESOURCE ../Rss/Psln_reg.rss
-DEPENDS psln.rsg
-// Do not change the UID below.
-TARGETPATH /private/10003a3f/apps
-END
-
-// End of file
--- a/psln/Group/backup_registration.xml Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration>
- <proxy_data_manager sid = "0x10202BE9" />
- <restore requires_reboot = "no"/>
-</backup_registration>
-
\ No newline at end of file
--- a/psln/Group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file provides the information required for building
-* Personalisation application, including application specific
-* skinning framework.
-*
-*/
-
-
-#include <platform_paths.hrh>
-#include "../help/group/bld.inf"
-
-PRJ_PLATFORMS
-
-DEFAULT
-
-PRJ_EXPORTS
-
-// Backup registration
-backup_registration.xml /epoc32/data/z/private/10005A32/backup_registration.xml
-backup_registration.xml /epoc32/release/winscw/udeb/z/private/10005A32/backup_registration.xml
-backup_registration.xml /epoc32/release/winscw/urel/z/private/10005A32/backup_registration.xml
-
-102818E8.xml /epoc32/data/z/private/2000B187/cenrep/102818E8.xml
-102818E8.xml /epoc32/release/winscw/udeb/z/private/2000B187/cenrep/102818E8.xml
-102818E8.xml /epoc32/release/winscw/urel/z/private/2000B187/cenrep/102818E8.xml
-
-101F8770.xml /epoc32/data/z/private/2000B187/cenrep/101F8770.xml
-101F8770.xml /epoc32/release/winscw/udeb/z/private/2000B187/cenrep/101F8770.xml
-101F8770.xml /epoc32/release/winscw/urel/z/private/2000B187/cenrep/101F8770.xml
-
-// IBY-files
-../rom/psln.iby CORE_MW_LAYER_IBY_EXPORT_PATH(psln.iby)
-../rom/PslnResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(pslnresources.iby)
-
-// Loc-file exports
-../pslnslidesetdialog/loc/pslnslidesetdialog.loc MW_LAYER_LOC_EXPORT_PATH(pslnslidesetdialog.loc)
-
-// Generic configuration interface for component cenrep settings
-../conf/themes.confml APP_LAYER_CONFML(themes.confml)
-../conf/themes_102818E8.crml APP_LAYER_CRML(themes_102818E8.crml)
-../conf/themes_102818EB.crml APP_LAYER_CRML(themes_102818EB.crml)
-
-PRJ_MMPFILES
-
-#ifndef TOOLS
-
-// Application specific skinning framework
-../PslnFramework/PslnFramework.mmp
-
-// Dynamic library loaders
-../PslnLibraryLoaders/group/pslnprofilesettingsloader.mmp
-//../pslnlibraryloaders/group/pslnxnclientloader.mmp
-../PslnLibraryLoaders/group/pslnwallpaperutilsloader.mmp
-../PslnLibraryLoaders/group/pslnbrowserlaunchloader.mmp
-
-// Slide set setting dialogs.
-../pslnslidesetdialog/group/pslnslidesetdialog.mmp
-
-#endif // TOOLS
-
-PRJ_TESTMMPFILES
-
-PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-OPTION TARGETFILE psln_aif.mif
-OPTION SOURCES -c8,8 qgn_menu_psln.svg
-END
-
-// Application icons
-START EXTENSION s60/mifconv
-OPTION TARGETFILE pslnicon.mif
-OPTION HEADERFILE pslnicon.mbg
-OPTION SOURCEFILE iconlist.txt
-END
--- a/psln/Group/iconlist.txt Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
--c16,8 qgn_prop_psln_active.bmp
--1,8 qgn_indi_mmc_add.bmp
--1,8 qgn_indi_drm_rights_add.bmp
--1,8 qgn_indi_drm_rights_exp_add.bmp
--c8,8 qgn_prop_psln_general_sub.svg
--c8,8 qgn_prop_psln_ssaver_sub.svg
--c8,8 qgn_prop_psln_wpaper_sub.svg
--1,8 qgn_indi_fmgr_ms_add.bmp
--- a/psln/Inc/PslnApplication.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2002-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: App class for Psln application.
-*
-*/
-
-
-#ifndef C_PSLNAPPLICATION_H
-#define C_PSLNAPPLICATION_H
-
-#include <aknapp.h>
-
-/**
- * Psln Application class.
- * This class is created by the Symbian OS framework by a call to NewApplication()
- * function when the application is started. The main purpose of the
- * application class is to create the application-specific document object
- * (PslnDocument in this case) via a call to virtual CreateDocumentL().
- *
- * @see NewApplication
- */
-class CPslnApplication : public CAknApplication
- {
- private: // from CApaApplication
-
- /**
- * Creates the Psln document object (PslnDocument).
- * Called by the application framework.
- *
- * @return New Psln document object (PslnDocument).
- */
- CApaDocument* CreateDocumentL();
-
- /**
- * Returns application UID.
- * @return KUidPsln.
- */
- TUid AppDllUid() const;
- };
-
-#endif // C_PSLNAPPLICATION_H
-
-// End of File
--- a/psln/Inc/PslnBaseContainer.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class for Psln's view containers.
-*
-*/
-
-
-#ifndef C_PSLNBASECONTAINER_H
-#define C_PSLNBASECONTAINER_H
-
-#include <coeccntx.h>
-#include <eikclb.h>
-
-class CPslnModel;
-class MPslnFWMSKObserver;
-
-/**
-* Base class for Psln's view containers.
-*
-*/
-class CPslnBaseContainer : public CCoeControl
- {
- public:
-
- /**
- * Symbian default constructor.
- */
- CPslnBaseContainer();
-
- /**
- * Symbian two-phase constructor.
- * @param aRect Listbox's rect.
- */
- virtual void ConstructL( const TRect& aRect ) = 0;
-
- /**
- * Constructs all common parts of the container.
- * @param aRect Listbox control's rect.
- * @param aResLbxId Resource id for listbox.
- */
- void BaseConstructL( const TRect& aRect, TInt aResLbxId );
-
- /**
- * Constructs all common parts of the container.
- * @param aRect Listbox control's rect.
- * @param aResTitleId Resource id for title.
- * @param aResLbxId Resource id for listbox.
- */
- void BaseConstructL(
- const TRect& aRect,
- TInt aResTitleId,
- TInt aResLbxId );
-
- /**
- * Destructor.
- */
- ~CPslnBaseContainer();
-
- /**
- * Sets listbox observer.
- * @param aObserver observer object.
- */
- void SetListBoxObserver( MEikListBoxObserver* aObserver );
-
- /**
- * Returns currently selected item index.
- * @return currently selected item index.
- */
- virtual TInt CurrentItemIndex() const;
-
- /**
- * Sets current item index and draws container. If index is invalid,
- * it is set to zero (=first item).
- * @param aNewIndex new current index.
- */
- virtual void SetCurrentItemIndexAndDraw( TInt aNewIndex );
-
- /**
- * Sets current item index. If index is invalid,
- * it is set to zero (=first item).
- * @param aNewIndex new current index.
- */
- virtual void SetCurrentItemIndex( TInt aNewIndex );
-
- /**
- * Defines observer for the middle softkey label changes.
- * Can only be set once. Further attempts are ignored.
- * @since S60 v3.1
- */
- virtual void SetMiddleSoftkeyObserver( MPslnFWMSKObserver* aObserver );
-
- /**
- * Returns MSK Observer, if any.
- * @return observer for MSK label changes, or NULL if it is not defined.
- * @since S60 v3.2
- */
- MPslnFWMSKObserver* GetMiddleSoftkeyObserver();
-
- protected:
-
- /**
- * Updates listbox or specific one item.
- */
- virtual void UpdateListBoxL();
-
- /**
- * Constructs listbox.
- * @param aResLbxId Resource id for listbox.
- */
- virtual void ConstructListBoxL( TInt aResLbxId ) = 0;
-
- /**
- * Processes key events.
- * @param aKeyEvent
- * @param aType
- * @return response
- */
- TKeyResponse OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType );
-
- /**
- * Creates list box items.
- */
- virtual void CreateListBoxItemsL() = 0;
-
- private:
-
- /* From CCoeControl. */
- void SizeChanged();
-
- /* From CCoeControl. */
- TInt CountComponentControls() const;
-
- /* From CCoeControl. */
- CCoeControl* ComponentControl( TInt aIndex ) const;
-
- /* From CCoeControl. */
- virtual void HandleResourceChange( TInt aType );
-
- /* Handles focus change events in list item. */
- void FocusChanged( TDrawNow aDrawNow );
-
- protected:
-
- /**
- * Model reference.
- * Not own.
- */
- CPslnModel* iModel;
-
- /**
- * Listbox.
- * Own.
- */
- CEikTextListBox* iListBox;
-
- /**
- * List of items in listbox.
- * Not own (owned by listbox).
- */
- CDesCArray* iItemArray;
-
- /**
- * Middle softkey label observer.
- * Own.
- */
- MPslnFWMSKObserver* iMSKObserver;
- };
-
-#endif // C_PSLNBASECONTAINER_H
-
-// End of File
--- a/psln/Inc/PslnBaseView.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
-* Copyright (c) 2004-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: Psln application base view class.
-*
-*/
-
-
-#ifndef C_PSLNBASEVIEW_H
-#define C_PSLNBASEVIEW_H
-
-#include <aknview.h>
-#include <eikclb.h>
-
-#include "psln.hrh"
-#include "PslnConst.h"
-
-class CPslnBaseContainer;
-class CPslnUi;
-class CPslnModel;
-class CAknNavigationDecorator;
-
-/**
-* CPslnBaseView base view class.
-*
-*/
-class CPslnBaseView : public CAknView, public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor
- */
- CPslnBaseView();
-
- /**
- * Destructor.
- */
- ~CPslnBaseView();
-
- protected:
-
- /**
- * From MEikListBoxObserver.
- * Handles listbox events.
- * @param aListBox Listbox where the event occurred.
- * @param aEventType Event type.
- */
- void HandleListBoxEventL( CEikListBox* aListBox,
- TListBoxEvent aEventType );
-
- /**
- * From CAknView.
- * Called when view is activated.
- * @param aPrevViewId previous view id.
- * @param aCustomMessageId custom message id.
- * @param aCustomMessage custom message content.
- */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * From CAknView.
- * Called when view is deactivated.
- */
- void DoDeactivate();
-
- /**
- * Creates container for this view.
- */
- virtual void CreateContainerL();
-
- /**
- * Creates a new container for this view.
- * Sub-class should implement this, as this is called by this
- * base class from DoActivateL.
- */
- virtual void NewContainerL() = 0;
-
- /**
- * Sets navi pane for the view.
- */
- virtual void SetNaviPaneL();
-
- /**
- * Called by HandleListBoxEventL.
- * Handles list box selections.
- */
- virtual void HandleListBoxSelectionL() = 0;
-
- /**
- * Called by HandleListBoxEventL.
- * Handles list box item highlight events.
- */
- virtual void HandleListBoxItemHighlightL() = 0;
-
- /**
- * Adds given resource text as MSK to CBA.
- *
- * @param aResourceId middle softkey label.
- * @param aCommandId command that should be performed when MSK
- * is pressed.
- * @since S60 v3.1
- */
- virtual void SetMiddleSoftKeyLabelL(
- const TInt aResourceId,
- const TInt aCommandId );
-
- /**
- * From MEikMenuObserver.
- * Changes MenuPane dynamically.
- */
- virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- /**
- * Sets title pane to a view.
- * @since 5.0
- */
- virtual void SetTitlePaneL( TInt& aResourceId ) = 0;
-
- /**
- *Get the resorce id for CBA, The derived view change the CBA resource by overriding
- *this function.
- * @since 5.0
- */
- virtual TInt CbaResourceId( const TVwsViewId& aPrevViewId,TUid aCustomMessageId );
-
- /**
- * Called by HandleListBoxEventL.
- * Handles list box stylus down event.
- */
- virtual void HandleListBoxStylusDown();
-
- /**
- * Called by HandleListBoxEventL.
- * Handles list box stylus move event.
- */
- virtual void HandleListBoxStylusDrag();
-
- private:
-
- /* Remove container. */
- void RemoveContainer();
-
- protected: // Data
-
- /**
- * Container.
- * Not own.
- */
- CPslnBaseContainer* iContainer;
-
- /**
- * Application UI.
- * Not own.
- */
- CPslnUi* iPslnUi;
-
- /**
- * Model.
- * Not own.
- */
- CPslnModel* iModel;
-
- /**
- * Currently selected item.
- */
- TInt iCurrentItem;
-
- /**
- * Navi pane.
- * Own.
- */
- CAknNavigationDecorator* iNaviPaneContext;
- };
-
-#endif // C_PSLNBASEVIEW_H
-
-// End of File
--- a/psln/Inc/PslnConst.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Personalisation constants.
-*
-*/
-
-#ifndef PSLNCONST_H
-#define PSLNCONST_H
-
-#include <e32std.h>
-
-#include <AknsSkinUID.h>
-#include <AknsItemID.h>
-#include <AknsUtils.h>
-
-#include "psln.hrh"
-#include "PslnVariant.hrh"
-
-// CONSTANTS
-
-// UID of Personlisation application
-const TUid KUidPsln = { 0x10005A32 };
-
-// Screen saver none type.
-_LIT( KPslnScreenSaverTypeNone, "None" );
-// Screen saver date type.
-_LIT( KPslnScreenSaverTypeDateTime, "DateTime" );
-// Screen saver text type.
-_LIT( KPslnScreenSaverTypeText, "Text" );
-
-// View ID's - STATIC ONES
-// General theme view Id.
-const TUid KPslnGeneralView = {0};
-// Wallpaper view Id.
-const TUid KPslnWallpaperView = {3};
-// Screen saver view Id.
-const TUid KPslnScreenSaverView = {4};
-// Main view Id.
-const TUid KPslnMainView2 = { 0x102750AA };
-
-// Properties view setting ID's
-// Wallpaper setting id.
-const TInt KPslnBgIdleSettingId = 0;
-// Screen saver id.
-const TInt KPslnScreenSettingId = 1;
-
-// Default skin index.
-const TInt KPslnSeries60SkinIndex = 0;
-
-// Maximum number of characters in Screen saver txt.
-const TInt KPslnMaxNumberOfScreenSaverText = 15;
-
-// No resource specified.
-const TInt KPslnNoResource = 0;
-
-// Middle Softkey control ID.
-const TInt KPslnMSKControlID = 3;
-
-// Tags for ini-file.
-// Screen saver tag for ini-file.
-_LIT( KPslnSSaver, "ScreenSaver" );
-// Wallpaper tag for ini-file.
-_LIT( KPslnIdleBgImage, "IdleImg" );
-// Wallpaper path tag for ini-file.
-_LIT( KPslnIdleBgImagePath, "IdlePath" );
-// Screen saver text tag for ini-file.
-_LIT( KPslnScreenSaverText, "ScreenText" );
-
-// Path separator.
-_LIT( KPslnPathSeparator, "\\" );
-
-// Memory card drive letter.
-#ifndef RD_MULTIPLE_DRIVE
-_LIT( KPslnMMCDriveLetter, "E" );
-#endif // RD_MULTIPLE_DRIVE
-
-// Default Plugin UIDs.
-// Application Shell Plugin UID.
-#ifdef FF_HITCHCOCK_APP_SHELL
-const TUid KPslnASPluginUid = { 0x10283151 };
-#else
-const TUid KPslnASPluginUid = { 0x102750A5 };
-#endif // FF_HITCHCOCK_APP_SHELL
-// Active Idle Plugin UID.
-const TUid KPslnAIPluginUid = { 0x102750A7 };
-
-// Max lenght of container setting text.
-const TInt KPslnItemLength = 128;
-
-// Space for icon.
-const TInt KPslnIconSize = 4;
-
-// Sound file types.
-static const TAknsItemID KPslnSoundItems[] =
- {
- // Ringing tone.
- { EAknsMajorSound, EAknsMinorSoundRingingTone },
- // Message alert tone.
- { EAknsMajorSound, EAknsMinorSoundMessageAlert },
- // None.
- { EAknsMajorNone, EAknsMinorNone } // End of list
- };
-
-// Entry point for dynamically loaded dlls.
-const TInt KPslnDllEntryPoint = 1;
-
-// Transition Effects setting values.
-enum TPslnTransitionEffects
- {
- // All effects are enabled.
- EPslnEnableAllEffects = 0,
- // All effects are disabled.
- EPslnDisableAllEffects = KMaxTInt
- };
-
-// Minimum memary size for change skin
-const TInt KPslnMinMemSize = 2000000;
-
-// Delay time for updateing skin
-const TInt KPslnUpdateSkinDelay = 10000;//10ms
-
-#endif // PSLNCONST_H
-
-// End of File
--- a/psln/Inc/PslnDRMImplementation.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* 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: Implementation for DRM functionality.
-*
-*/
-
-
-#ifndef PSLNDRMIMPLEMENTATION_H
-#define PSLNDRMIMPLEMENTATION_H
-
-#include <e32base.h>
-#include <MMGFetchVerifier.h>
-
-class CDRMHelper;
-
-/**
-* Implementation for DRM functionality.
-*
-* @since 2.6
-*/
-class CPslnDRMImplementation : public CBase, public MMGFetchVerifier
- {
- public:
-
- /**
- * Two-phased constructor.
- */
- static CPslnDRMImplementation* NewL();
-
- /**
- * Destructor.
- */
- ~CPslnDRMImplementation();
-
- /**
- * From MFLDFileObserver.
- */
- TBool VerifySelectionL( const MDesCArray* aSelectedFiles );
-
- /* Shows error note. */
- static void ShowErrorNoteL( TInt aResourceId );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CPslnDRMImplementation();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
-
-
- private: // Data
-
- /**
- * DRM helper.
- * Own.
- */
- CDRMHelper* iDRMHelper;
-
- };
-
-#endif // PSLNDRMIMPLEMENTATION_H
-
-// End of File
--- a/psln/Inc/PslnDebug.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 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: Debug macros for Psln.
-*
-*/
-
-
-#ifndef PSLNDEBUG_H
-#define PSLNDEBUG_H
-
-// MACROS
-
-// If PSLN_TRACING_ENABLED is defined, tracing will be enabled (all levels)
-//
-// Alternatively, the following macros can be used to enable traces:
-// PSLN_TRACING_ENABLED_INFO Informative traces
-// PSLN_TRACING_ENABLED_NORMAL Normal traces
-// PSLN_TRACING_ENABLED_ERROR Error traces
-// Default for debug builds is NORMAL and ERROR
-
-#if defined(_DEBUG)
- #define PSLN_TRACING_ENABLED_NORMAL
- #define PSLN_TRACING_ENABLED_ERROR
-#endif // _DEBUG
-
-#if defined(PSLN_TRACING_ENABLED)
- #undef PSLN_TRACING_ENABLED_INFO
- #define PSLN_TRACING_ENABLED_INFO
- #undef PSLN_TRACING_ENABLED_NORMAL
- #define PSLN_TRACING_ENABLED_NORMAL
- #undef PSLN_TRACING_ENABLED_ERROR
- #define PSLN_TRACING_ENABLED_ERROR
-#endif // PSLN_TRACING_ENABLED
-
-#if defined(PSLN_TRACING_ENABLED_INFO) || defined(PSLN_TRACING_ENABLED_NORMAL) || defined(PSLN_TRACING_ENABLED_ERROR)
- #if !defined(__E32SVR_H__)
- #include <e32svr.h>
- #endif // __E32SVR_H__
-
- #define PSLN_TRACECMDPFX RDebug::Print
- #define PSLN_TRACECMDSFX
- #define PSLN_TRACE_ADDPREFIX(aText) (TPtrC((const TText *)L"PSLN: \"" L##aText L"\""))
-#endif // PSLN_TRACING_ENABLED_INFO || PSLN_TRACING_ENABLED_NORMAL || PSLN_TRACING_ENABLED_ERROR
-
-#if defined(PSLN_TRACING_ENABLED_INFO)
-#pragma message("PslnDebug: Info-mode tracing is enabled, performance will be degraded!")
- #define PSLN_TRACE_ADDPREFIX_INFO(aText) (TPtrC((const TText *)L"PSLN: (Info) \"" L##aText L"\""))
- #define PSLN_TRACE_INFO(aMsg) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX_INFO(aMsg) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_INFO1(aFormat,aP1) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX_INFO(aFormat),(aP1) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_INFO2(aFormat,aP1,aP2) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX_INFO(aFormat),(aP1),(aP2) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_INFO3(aFormat,aP1,aP2,aP3) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX_INFO(aFormat),(aP1),(aP2),(aP3) ) PSLN_TRACECMDSFX
-#else
- #define PSLN_TRACE_INFO(aMsg)
- #define PSLN_TRACE_INFO1(aFormat,aP1)
- #define PSLN_TRACE_INFO2(aFormat,aP1,aP2)
- #define PSLN_TRACE_INFO3(aFormat,aP1,aP2,aP3)
-#endif // PSLN_TRACING_ENABLED_INFO
-
-#if defined(PSLN_TRACING_ENABLED_NORMAL)
- #define PSLN_TRACE_DEBUG(aMsg) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX(aMsg) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_DEBUG1(aFormat,aP1) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX(aFormat),(aP1) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_DEBUG2(aFormat,aP1,aP2) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX(aFormat),(aP1),(aP2) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_DEBUG3(aFormat,aP1,aP2,aP3) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX(aFormat),(aP1),(aP2),(aP3) ) PSLN_TRACECMDSFX
-#else
- #define PSLN_TRACE_DEBUG(aMsg)
- #define PSLN_TRACE_DEBUG1(aFormat,aP1)
- #define PSLN_TRACE_DEBUG2(aFormat,aP1,aP2)
- #define PSLN_TRACE_DEBUG3(aFormat,aP1,aP2,aP3)
-#endif // PSLN_TRACING_ENABLED_NORMAL
-
-#if defined(PSLN_TRACING_ENABLED_ERROR)
- #define PSLN_TRACE_ADDPREFIX_ERROR(aText) (TPtrC((const TText *)L"PSLN: (Error) \"" L##aText L"\""))
- #define PSLN_TRACE_ERROR(aMsg) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX_ERROR(aMsg) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_ERROR1(aFormat,aP1) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX_ERROR(aFormat),(aP1) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_ERROR2(aFormat,aP1,aP2) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX_ERROR(aFormat),(aP1),(aP2) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_ERROR3(aFormat,aP1,aP2,aP3) PSLN_TRACECMDPFX ( PSLN_TRACE_ADDPREFIX_ERROR(aFormat),(aP1),(aP2),(aP3) ) PSLN_TRACECMDSFX
- #define PSLN_TRACE_OBSOLETE(aFunc) PSLN_TRACECMDPFX ( _L("PSLN: (Error) Obsolete function %s used"), _S(aFunc) ) PSLN_TRACECMDSFX
-#else
- #define PSLN_TRACE_ERROR(aMsg)
- #define PSLN_TRACE_ERROR1(aFormat,aP1)
- #define PSLN_TRACE_ERROR2(aFormat,aP1,aP2)
- #define PSLN_TRACE_ERROR3(aFormat,aP1,aP2,aP3)
- #define PSLN_TRACE_OBSOLETE(aFunc)
-#endif // PSLN_TRACING_ENABLED_ERROR
-
-//lint -e960 Disable null statement note
-//lint -esym(755,PSLN_TRACE*) Used in debug only
-
-#endif // PSLNDEBUG_H
-
-// End of File
--- a/psln/Inc/PslnDocument.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2002-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: Psln document class definition.
-*
-*/
-
-
-#ifndef C_PSLNDOCUMENT_H
-#define C_PSLNDOCUMENT_H
-
-#include <AknDoc.h>
-
-class CEikAppUi;
-
-/**
- * CPslnDocument class.
- *
- * Psln document class definition.
- *
- * @since S60 v2.0
- */
-class CPslnDocument : public CAknDocument
- {
-
-public:
-
- /**
- * Two-phased constructor.
- * @param aApp Application.
- * @return new instance of CPslnDocument.
- */
- static CPslnDocument* NewL( CEikApplication& aApp );
-
- /**
- * Destructor.
- */
- virtual ~CPslnDocument();
-
-private:
-
- /**
- * C++ constructor
- */
- CPslnDocument( CEikApplication& aApp );
-
- /**
- * From CEikDocument. Create Psln AppUi object.
- *
- * @return Eikon application UI.
- */
- CEikAppUi* CreateAppUiL();
- };
-
-#endif // C_PSLNDOCUMENT_H
-
-// End of File
--- a/psln/Inc/PslnGeneralThemeContainer.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,254 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: General theme container.
-*
-*/
-
-
-
-#ifndef PSLNGENERALTHEMECONTAINER_H
-#define PSLNGENERALTHEMECONTAINER_H
-
-#include "PslnBaseContainer.h"
-
-class CAknLocalSkinInstance;
-
-/**
-* Observer interface for theme preview state changes.
-* aPreviewMode new mode for theme preview - ETrue preview is active
-* EFalse preview is now ready
-*
-* @since S60 v5.0
-*/
-class MPslnThemePreviewObserver
- {
- public:
- virtual void HandlePreviewStateChange( const TBool& aPreviewMode ) = 0;
- };
-
-/**
-* General theme container.
-* Contains available skins.
-*
-* @since S60 v3.1
-*/
-class CPslnGeneralThemeContainer : public CPslnBaseContainer
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- CPslnGeneralThemeContainer();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- * @param aRect client rect.
- */
- void ConstructL( const TRect& aRect );
-
- /**
- * Destructor.
- */
- virtual ~CPslnGeneralThemeContainer();
-
- public: // New methods
-
- /**
- * Is embedded link visible.
- * @return ETrue if link should be shown.
- */
- TBool IsEmbeddedLinkVisible() const;
-
- /**
- * Updates skin list.
- */
- void UpdateSkinListItemsL( const TInt& aNewIndex );
-
- /**
- * From CPslnBaseContainer.
- * Constructs list box and items.
- * @param aResLbxId used resource ID.
- */
- void ConstructListBoxL( TInt aResLbxId );
-
- /**
- * From CPslnBaseContainer.
- * Creates listbox items.
- */
- void CreateListBoxItemsL();
-
- /**
- * Updates D column icons when skin preview activates.
- *
- * @since 5.0
- */
- void UpdateSkinListItemsDColumnOnlyL();
-
- /**
- * Starts theme preview.
- *
- * @since 5.0
- */
- void StartThemePreviewL( TBool aTouch = ETrue );
-
-
- /**
- * Cancel theme preview.
- *
- * @since 5.0
- */
- void CancelThemePreviewL();
-
-
- /**
- * Sets theme preview change observer (MPslnThemePreviewObserver).
- * aObserver observer for theme preview changes.
- *
- * @since 5.0
- */
- void SetThemePreviewObserver( MPslnThemePreviewObserver* aObserver );
-
- /**
- * Locks/enables up and down key events to this container.
- *
- * @since 5.0
- */
- void LockUpAndDownKeys( const TBool& aLocked );
-
- /**
- * Restart Quick Preview
- */
- void RestartQuickPreviewL();
-
- /**
- * Set theme preview state active.
- */
- void SetPreviewStateActive();
-
- /**
- * Is current focus theme in preview state.
- * @return ETrue if theme is in preview state.
- */
- TBool CurrentThemeInPreviewState();
-
-
- private:
-
- // Gets Help context.
- void GetHelpContext( TCoeHelpContext& aContext ) const;
- // From CPslnBaseContainer
- TKeyResponse OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType );
- // From CCoeControl
- void HandlePointerEventL( const TPointerEvent &aPointerEvent );
-
- /* Creates (&initializes) a locally skinnable item list.*/
- void CreateSkinItemList();
-
- /* Adds skin item to locally skinnable item list. */
- TInt AddItemToList( const TAknsItemID& aSkinID );
-
- /* Callback interface for idle time. */
- static TInt DoHandleIdleTimeL( TAny* aAny );
-
- /* Callback interface for theme effect ending. */
- static TInt DoHandleEffectEndL( TAny* aAny );
-
- /* Handle idle time. */
- void HandleIdleTimeL();
-
- /* Handle theme effect ending. */
- void HandleEffectEndL();
-
- /*
- * Get Preview Skin Index.
- */
- TInt PreviewSkinIndex();
-
- /* Initialize theme preview delay time settings. */
- void InitPreviewTime();
-
- /* Show Error Note. */
- void ShowErrorNoteL( TInt aResourceId );
-
- private: // data
-
- /*
- * List of skin items to skin locally.
- */
- RArray<TAknsItemID> iSkinItemList;
-
- /*
- * Timer for delay.
- * Own.
- */
- CPeriodic* iPreviewIdle;
-
- /*
- * Skin preview library instance.
- * Own.
- */
- CAknLocalSkinInstance* iLocalSkinInstance;
-
- /*
- * Theme preview state change observer.
- * Not own.
- */
- MPslnThemePreviewObserver* iObserver;
-
- /*
- * To be used index in highlight when container is updated.
- * This is used when skin is activated and user has already
- * highlighted some other theme.
- */
- TInt iToBeUsedIndex;
-
- /*
- * Up and down key events are ignored while a skin is activating.
- * This is to avoid drawing of container when the skin items might
- * not be valid.
- */
- TBool iLockedKeys;
-
- /*
- * Current preview theme index in listbox.
- */
- TInt iActiveSkinItemIndex;
-
- /*
- * Theme preview delay time.
- */
- TInt iPreviewDelayTime;
-
- /*
- * Theme preview delay time, arisen by navigation key.
- */
- TInt iPreviewDelayTimeOnHardKey;
-
- /*
- * Theme preview interval time.
- */
- TInt iPreviewIntervalTime;
-
- /*
- * Old Skin Num.
- */
- TInt iOldSkinNum;
- };
-
-#endif // PSLNGENERALTHEMECONTAINER_H
-
-// End of File
--- a/psln/Inc/PslnGeneralThemeView.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: View class for general themes.
-*
-*/
-
-
-
-#ifndef C_PSLNGENERALTHEMEVIEW_H
-#define C_PSLNGENERALTHEMEVIEW_H
-
-#include "PslnBaseView.h"
-#include <mpslnfwmsklabelobserver.h>
-#include "PslnGeneralThemeContainer.h"
-#include <ConeResLoader.h>
-
-/**
-* View class for general themes.
-*
-* @since S60 v3.1
-*/
-class CPslnGeneralThemeView : public CPslnBaseView,
- public MPslnFWMSKObserver,
- public MPslnThemePreviewObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- * @return new instance of CPslnGeneralThemeView.
- */
- static CPslnGeneralThemeView* NewLC();
-
- /**
- * Destructor.
- */
- virtual ~CPslnGeneralThemeView();
-
- /**
- * From CAknView.
- * Returns view id.
- * @return An unsigned integer (view id).
- */
- TUid Id() const;
-
- /**
- * From MEikCommandObserver.
- * Handles commands.
- * @param aCommand Command to be handled.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Requests container to update skin data.
- * @param aCurrentIndex Current item index. If -1, remain old index.
- */
- void UpdateSkinListItemsL( TInt aCurrentIndex = KErrNotFound );
-
- /**
- * hightlight default skin.
- */
- void HightlightDefaultSkin();
-
- /**
- * From MPslnFWMSKObserver.
- * Checks if the MSK label needs to be adjusted.
- */
- void CheckMiddleSoftkeyLabelL();
-
- /**
- * Requests container to update skin data.
- */
- void UpdateSkinListItemsDColumnOnlyL();
-
- /**
- * From MPslnThemePreviewObserver.
- * New theme preview state available.
- */
- void HandlePreviewStateChange( const TBool& aPreviewMode );
-
- /**
- * Restart Quick Preview
- */
- void RestartQuickPreviewL();
-
- /**
- * Remove local skin items.
- */
- void RemoveLocalSkinItems();
-
- private:
-
- /**
- * From CAknView.
- */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * From CAknView.
- */
- void DoDeactivate();
-
- /**
- * From MEikMenuObserver.
- * Changes MenuPane dynamically.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- /**
- * From CPslnBaseView.
- */
- void HandleListBoxSelectionL();
-
- /**
- * From CPslnBaseView.
- */
- void HandleListBoxItemHighlightL();
-
- /**
- * From CPslnBaseView.
- */
- void NewContainerL();
-
- /**
- * From CPslnBaseView.
- */
- void SetTitlePaneL( TInt& aResourceId );
-
- /* Remove command and label from MSK */
- void RemoveCommandFromMSK();
-
- /**
- * C++ default constructor.
- */
- CPslnGeneralThemeView();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * From CPslnBaseView.
- */
- void HandleListBoxStylusDown();
-
- /**
- * From CPslnBaseView.
- */
- void HandleListBoxStylusDrag();
-
-
- private: // Data
-
- /**
- * Resource loader for common psln resources.
- */
- RConeResourceLoader iResourceLoaderCommon;
-
- /**
- * Download item index.
- */
- TInt iDownloadItemIndex;
-
- /**
- * What is current skin preview mode.
- * ETrue - preview is occuring.
- * EFalse - preview is ready / no skin preview active.
- */
- TBool iPreviewMode;
-
- /**
- * Is delayed skin activation ongoing.
- * If user highlights a skin and immediately activates it,
- * preview is first done completely AND then skin activation
- * is handled.
- */
- TBool iDelayedSkinActivation;
-
- /**
- * Index to be used when skin is activated AFTER skin preview.
- * This is needed due to that user might highlight some other skin
- * after having selected previous skin for activation.
- */
- TInt iToBeActivatedSkinIndex;
-
- };
-
-#endif // C_PSLNGENERALTHEMEVIEW_H
-
-// End of File
--- a/psln/Inc/PslnMainView.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Main state view for Psln application.
-*
-*/
-
-
-#ifndef CPSLNMAINVIEW_H
-#define CPSLNMAINVIEW_H
-
-// INCLUDES
-#include "PslnBaseView.h"
-
-// FORWARD DECLARATIONS
-class CPslnFWPluginHandler;
-class CPslnFWPluginInterface;
-
-// CLASS DECLARATION
-
-/**
-* Main state view for Psln application.
-* This view contains folders for other views.
-*
-* @since S60 v3.1
-*/
-class CPslnMainView : public CPslnBaseView
- {
- public:
-
- /**
- * Two-phased constructor.
- * @return new instance of CPslnMainView.
- */
- static CPslnMainView* NewLC();
-
- /**
- * Destructor.
- */
- virtual ~CPslnMainView();
-
- /**
- * From CAknView.
- * Returns view id.
- * @return An unsigned integer (view id).
- */
- TUid Id() const;
-
- /**
- * From MEikCommandObserver.
- * Handles commands.
- * @param aCommand Command to be handled.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Returns active view index.
- * @return active view index.
- */
- TInt ActiveView() const;
-
- /**
- * Sets active folder.
- * @param aIndex new active folder index.
- */
- void SetActiveFolder( TInt aIndex );
-
- /**
- * Returns Uid of currently selected folder.
- * @return Uid of currently selected folder.
- */
- TInt ActiveFolderUid();
-
- /**
- * Sets active folder.
- * @param aUid new active folder uid.
- */
- void SetActiveFolder( TUid aUid );
-
- private:
-
- /**
- * From CAknView.
- */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * From MEikMenuObserver.
- * Changes MenuPane dynamically
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- /**
- * From CPslnBaseView.
- */
- void HandleListBoxSelectionL();
-
- /**
- * From CPslnBaseView.
- */
- void HandleListBoxItemHighlightL();
-
- /**
- * From CPslnBaseView.
- */
- void NewContainerL();
-
- /**
- * From CPslnBaseView.
- * Empty implementation of virtual method.
- */
- void SetTitlePaneL( TInt& /*aResourceId*/ ) {};
-
- /**
- * From CPslnBaseView.
- */
- void ConstructViewArrayL();
-
- /**
- * From CPslnBaseView
- */
- TInt CbaResourceId( const TVwsViewId& aPrevViewId,TUid aCustomMessageId );
-
- /**
- * C++ default constructor.
- */
- CPslnMainView();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /* Tries to launch local view from UI class. */
- void DoActivateLocalViewL();
-
- /**
- * Locate the specific view's position in list via view id.
- * @param aViewId The specific view's id
- * @return Specific view's postion in list
- */
- TInt GetListboxItemIndexByViewId(const TVwsViewId& aViewId) const;
-
- private: // Data
-
- // View id's for Psln views.
- RArray<TUid> iViewIds;
-
- };
-
-#endif // CPSLNMAINVIEW_H
-
-// End of File
--- a/psln/Inc/PslnMainViewContainer.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Main view container.
-*
-*/
-
-
-#ifndef C_PSLNMAINVIEWCONTAINER_H
-#define C_PSLNMAINVIEWCONTAINER_H
-
-#include "PslnBaseContainer.h"
-
-class CPslnFWPluginInterface;
-class CPslnUi;
-class CAknIconArray;
-class TAknsItemID;
-
-/**
-* Main view container.
-* Contains items to navigate to sub-views and application specfic theme views.
-*
-* @since S60 3.1
-*/
-class CPslnMainViewContainer : public CPslnBaseContainer
- {
- public:
-
- /**
- * C++ constructor.
- * @param aPslnUi pointer to UI-class.
- */
- CPslnMainViewContainer( CPslnUi* aPslnUi );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- * @param aRect client rect.
- */
- void ConstructL( const TRect& aRect );
-
- /**
- * Destructor.
- */
- virtual ~CPslnMainViewContainer();
-
- private:
-
- /**
- * From CPslnBaseContainer.
- * Constructs list box and items.
- * @param aResLbxId used resource ID.
- */
- void ConstructListBoxL( TInt aResLbxId );
-
- /**
- * From CPslnBaseContainer.
- * Creates listbox items.
- */
- void CreateListBoxItemsL();
-
- // Makes one specific folder name item.
- void MakeItemL( const TInt aIndex, const TInt aOffset = KErrNotFound );
-
- // Gets Help context.
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- // Makes one plugin folder.
- TInt MakePluginItemL(
- CPslnFWPluginInterface& aPlugin,
- CAknIconArray& aIconList,
- TPtr& aBufPtr,
- TPtr& aItemPtr );
-
- // Adds icon to icon array.
- void AddIconL(
- CAknIconArray* aIcons,
- const TAknsItemID& aSkinId,
- const TDesC& aFileName,
- TInt aBitmapId,
- TInt aMaskId );
-
- // Parses icon file path to given parameter.
- void GetIconFilePath( TDes& aPath );
-
- private: // Data
-
- // List of folder names.
- CDesCArrayFlat* iItems;
-
- // Array of loaded plugins.
- CArrayPtrFlat<CPslnFWPluginInterface>* iPluginArray;
-
- // Reference to Ui. Owned by Main view.
- CPslnUi* iPslnUi;
-
- // Has AS plugin been added.
- TBool iASAdded;
-
- // Has AI plugin been added.
- TBool iAIAdded;
- };
-
-#endif // C_PSLNMAINVIEWCONTAINER_H
-
-// End of File
--- a/psln/Inc/PslnPluginHandler.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles application specific ECOM plugins.
-*
-*/
-
-
-
-#ifndef C_PSLNPLUGINHANDLER_H
-#define C_PSLNPLUGINHANDLER_H
-
-#include <e32base.h>
-
-class CPslnFWPluginInterface;
-class CPslnFWPluginHandler;
-class CPslnUi;
-
-/**
-* Handles application specific ECOM plugins.
-* Owns the plugins in Psln Application.
-*
-* @since S60 v3.1
-*/
-class CPslnPluginHandler : public CBase
- {
- public:
-
- /**
- * Two-phased constructor.
- * @param aPslnUi pointer to UI class.
- * @return new instance of CPslnPluginHandler.
- */
- static CPslnPluginHandler* NewL( CPslnUi* aPslnUi );
-
- /**
- * Destructor.
- */
- virtual ~CPslnPluginHandler();
-
- /**
- * Gets array of loaded plugins.
- * Plugin array ownership is not transferred.
- * @return array of AknView ECOM plugins.
- */
- CArrayPtrFlat<CPslnFWPluginInterface>* GetPluginArray() const;
-
- /**
- * Retrieves a plugin that matches Uid.
- * Plugin ownership is not transferred.
- * @param aUid plugin to retrieve.
- * @return pointer to the matching plugin interface.
- */
- CPslnFWPluginInterface* GetPlugin( const TUid& aUid );
-
- private:
-
- /**
- * C++ constructor.
- */
- CPslnPluginHandler( CPslnUi* aPslnUi );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private: // Data
-
- /**
- * Array of loaded plugins.
- * Own.
- */
- CArrayPtrFlat<CPslnFWPluginInterface>* iPluginArray;
-
- /**
- * Reference to Ui.
- * Not own. Owned by Main view.
- */
- CPslnUi* iPslnUi;
-
- };
-
-#endif // C_PSLNPLUGINHANDLER_H
-
-// End of File
--- a/psln/Inc/PslnPropertySubscriber.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Property subscriber.
-*
-*/
-
-
-
-#ifndef C_PSLNPROPERTYSUBSCRIBER_H
-#define C_PSLNPROPERTYSUBSCRIBER_H
-
-#include <e32base.h>
-#include <e32property.h>
-
-/**
-* Property subscriber wrapper class.
-* Implements callback when property's value changes.
-*
-* @since S60 v3.1
-*/
-class CPslnPropertySubscriber : public CActive
- {
- public:
-
- /**
- * C++ constructor.
- *
- * NOTE that callback method is NOT allowed to leave. If it leaves,
- * subscription is not activated after the leave.
- *
- * @param aCallBack callback method to handle notification of a change
- * to client.
- * @param aProperty property to subscribe.
- */
- CPslnPropertySubscriber( TCallBack aCallBack, RProperty& aProperty );
-
- /**
- * Destructor.
- */
- virtual ~CPslnPropertySubscriber();
-
- /**
- * Subscribe property.
- * To stop subscription, just call Cancel.
- */
- void Subscribe();
-
- /**
- * From CActive.
- * Called when Active Object is ready.
- */
- void RunL();
-
- /**
- * From CActive.
- * Called when Active Object has been cancelled.
- */
- void DoCancel();
-
- private: // Data
- /**
- * Callback harness.
- */
- TCallBack iCallBack;
-
- /**
- * Publish & Subsribe property.
- */
- RProperty& iProperty;
-
- };
-
-#endif // C_PSLNPROPERTYSUBSCRIBER_H
-
-// End of File
--- a/psln/Inc/PslnScreenSaverContainer.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Container for screen saver view.
-*
-*/
-
-
-
-#ifndef C_PSLNSCREENSAVERCONTAINER_H
-#define C_PSLNSCREENSAVERCONTAINER_H
-
-#include "PslnBaseContainer.h"
-
-/**
-* Container for screen saver view.
-* Creates setting items for different types of screen savers.
-*
-* @since S60 v3.1
-*/
-class CPslnScreenSaverContainer : public CPslnBaseContainer
- {
- public:
-
- /**
- * C++ default constructor.
- */
- CPslnScreenSaverContainer();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- * @param aRect Client rect.
- */
- void ConstructL( const TRect& aRect );
-
- /**
- * Destructor.
- */
- virtual ~CPslnScreenSaverContainer();
-
- /**
- * Updates the whole container.
- */
- void UpdateListBoxL();
-
- private:
-
- /**
- * From CPslnBaseContainer.
- * Creates listbox.
- */
- void ConstructListBoxL( TInt aResLbxId );
-
- /**
- * From CPslnBaseContainer.
- * Creates listbox items.
- */
- void CreateListBoxItemsL();
-
- /* Gets Help context. */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- };
-
-#endif // C_PSLNSCREENSAVERCONTAINER_H
-
-// End of File
--- a/psln/Inc/PslnScreenSaverView.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Provides Psln Application Screensaver view.
-*
-*/
-
-
-
-#ifndef CPSLNSCREENSAVERVIEW_H
-#define CPSLNSCREENSAVERVIEW_H
-
-// INCLUDES
-#include "PslnPropertySubscriber.h"
-
-// Base classes
-#include "PslnBaseView.h"
-#include "mpslnscreensaverecomobserver.h"
-#include <mpslnfwmsklabelobserver.h>
-#include <cenrepnotifyhandler.h>
-
-#include <psmclient.h>
-#include <psmclientobserver.h>
-
-class CAknWaitDialog;
-
-/**
-* CPslnBaseView view class.
-* Provides Psln Application Screensaver view.
-*
-* @since S60 v3.1
-*/
-class CPslnScreenSaverView : public CPslnBaseView,
- public MPslnScreenSaverECOMObserver,
- public MPslnFWMSKObserver,
- public MCenRepNotifyHandlerCallback,
- public MPsmClientObserver
- {
- public:
-
- /**
- * Two-phased constructor.
- */
- static CPslnScreenSaverView* NewLC();
-
- /**
- * Destructor.
- */
- virtual ~CPslnScreenSaverView();
-
- /**
- * From CAknView.
- * Returns view id.
- * @return An unsigned integer (view id).
- */
- TUid Id() const;
-
- /**
- * From MEikCommandObserver .
- * Handles commands.
- * @param aCommand Command to be handled.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * From MPslnScreenSaverECOMObserver.
- * Called when there is a change in ECOM plugins.
- */
- void HandlePluginListChangeL();
-
- /**
- * From MPslnFWMSKObserver.
- * Checks if the MSK label needs to be adjusted.
- */
- void CheckMiddleSoftkeyLabelL();
-
- /**
- * From MPsmClientObserver.
- * Notify when the power save mode is changed.
- */
- void PowerSaveModeChanged( const TPsmsrvMode aMode );
-
- /**
- * From MPsmClientObserver.
- * Notify when some wrong with the power save mode change.
- */
- void PowerSaveModeChangeError( const TInt aError );
-
- private:
-
- /**
- * Callback for exiting Screensaver preview mode.
- * @param aPtr pointer to get reference to self.
- * @return error code.
- */
- static TInt HandlePreviewModeChanged( TAny* aPtr );
-
- /**
- * Callback for changes in Screensaver preview state.
- * @param aPtr pointer to get reference to self.
- * @return error code.
- */
- static TInt HandlePreviewStateChanged( TAny* aPtr );
-
- /**
- * From CAknView.
- * Called when view is about to activate.
- */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * From CAknView.
- * Called when view is deactivated.
- */
- void DoDeactivate();
-
- /**
- * From MEikMenuObserver.
- * Changes MenuPane dynamically.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- /**
- * From MProgressDialogCallback.
- * Called when wait note is removed.
- */
- void DialogDismissedL( TInt aButtonId );
-
- /**
- * From CPslnBaseView.
- * Handles listbox selection.
- */
- void HandleListBoxSelectionL();
-
- /**
- * From CPslnBaseView.
- */
- void HandleListBoxItemHighlightL();
-
- /**
- * From CPslnBaseView.
- * Creates new container.
- */
- void NewContainerL();
-
- /**
- * From CPslnBaseView.
- */
- void SetTitlePaneL( TInt& aResourceId );
-
- /* From MCenRepNotifyHandlerCallback. */
- void HandleNotifyInt( TUint32 aId, TInt /*aNewValue*/ );
-
- /* From MCenRepNotifyHandlerCallback. */
- void HandleNotifyGeneric( TUint32 aId );
-
- /* From MCenRepNotifyHandlerCallback. */
- void HandleNotifyError(
- TUint32 aId,
- TInt aError,
- CCenRepNotifyHandler* aHandler );
-
- /**
- * Handles screensaver activation command.
- */
- void HandleScreenSaverActivationL( TInt aCurrentItem );
-
- /**
- * Handles screensaver preview command.
- */
- void HandleScreenSaverPreviewL( TInt aCurrentItem );
-
- /**
- * Handles screensaver settings command.
- */
- void HandleScreenSaverSettingsL( TInt aCurrentItem );
-
- /**
- * Launches opening note.
- */
- void LaunchNote();
-
- /**
- * Same as above, but might leave.
- */
- void LaunchNoteL();
-
- /**
- * Removes opening note and stops listening for screensaver preview
- * state changes.
- */
- void RemoveNote();
-
- /**
- * Same as above, but might leave.
- */
- void RemoveNoteL();
-
- /**
- * Checks if screensaver function can be called, and if so makes
- * the call through PslnEngine.
- */
- void DoInvokeScreenSaverFunctionL(
- const TInt aCurrentItem,
- const TScPluginCaps aType );
-
- /**
- * Creates preview mode subscriber.
- */
- void CreatePreviewModeSubscriberL();
-
- /**
- * Creates preview state subscriber.
- */
- void CreatePreviewStateSubscriberL();
-
- /**
- * Remove command and label from MSK.
- */
- void RemoveCommandFromMSK();
-
- /**
- * Is 'Change' command visible.
- */
- TBool IsChangeCommandVisibleL() const;
-
- /**
- * Is 'Apply' command visible.
- */
- TBool IsApplyCommandVisibleL() const;
-
- /**
- * C++ default constructor.
- */
- CPslnScreenSaverView();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private:
-
- /**
- * Publish & Subscribe item for setting Preview mode.
- */
- RProperty iPreviewModeProperty;
-
- /**
- * Publish & Subscribe item for setting Preview state.
- */
- RProperty iPreviewStateProperty;
-
- /**
- * Publish & Subscribe listener for Preview mode.
- * Own.
- */
- CPslnPropertySubscriber* iPreviewModeSubscriber;
-
- /**
- * Publish & Subscribe listener for Preview state.
- * Own.
- */
- CPslnPropertySubscriber* iPreviewStateSubscriber;
-
- /**
- * Wait note wrapper.
- * Own.
- */
- CAknWaitDialog* iWaitDlg;
-
- /**
- * Index of plugin screensaver that is previewed.
- */
- TInt iScreenSaverPreviewIndex;
-
- /**
- * Repository for active screensaver.
- * Own.
- */
- CRepository* iScreenSaverRepository;
-
- /**
- * Notifier for changes in the screensaver repository.
- * Own.
- */
- CCenRepNotifyHandler* iScreenSaverNotifier;
- CPsmClient *iPsmClient;
-
- };
-
-#endif // CPSLNSCREENSAVERVIEW_H
-
-// End of File
--- a/psln/Inc/PslnSkinNames.rh Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* 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: Resource headers for project psln
-*
-*/
-
-
-#ifndef PSLNSKINNAMES_RH
-#define PSLNSKINNAMES_RH
-
-// ---------------------------------------------------------------------------
-// Skin name entry.
-// ---------------------------------------------------------------------------
-//
-STRUCT PSLN_SKINNAME
- {
- LONG pid1; // Timestamp part of the skin package ID or UID
- LONG pid2; // Random number part of the skin package ID (or zero if pid1 was a UID)
- LTEXT listname; // Skin name to be used in lists
- LTEXT titlename; // Skin name to be used in titles and queries
- }
-
-// ---------------------------------------------------------------------------
-// List of Skin names.
-// ---------------------------------------------------------------------------
-//
-STRUCT PSLN_SKINNAME_LIST
- {
- STRUCT items[]; // PSLN_SKINNAME items
- }
-
-
-#endif // PSLNSKINNAMES_RH
--- a/psln/Inc/PslnSoundActivator.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
-* Copyright (c) 2004-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: Handles activation of sound files linked to skins.
-*
-*/
-
-
-#ifndef PSLNSOUNDACTIVATOR_H
-#define PSLNSOUNDACTIVATOR_H
-
-#include <e32base.h>
-#include <e32std.h>
-#include <AknsItemID.h>
-
-class CPslnProfileSettingsLoader;
-
-// TYPE DEFINITIONS
-
-// Struct containing sound activation data.
-struct TPslnSoundActivatorEntry
- {
- // Filename for the audio file.
- TFileName iFullName;
- // Skin instance id.
- TAknsItemID iID;
- };
-
-/**
-* Class that handles the activation of sound files linked to skins.
-*
-* @since 2.5
-*/
-class CPslnSoundActivator : public CBase
- {
- public:
-
- /**
- * Two-phased constructor.
- * @return new instance of CPslnSoundActivator.
- */
- static CPslnSoundActivator* NewLC();
-
- /**
- * Destructor.
- */
- virtual ~CPslnSoundActivator();
-
- /**
- * Collects sound files of the current. Call to this method
- * must precede any other calls (except construction).
- * @param aSkinPath path to collect from.
- * @param number of sound files found.
- */
- void CollectSoundsL( const TDesC& aSkinPath, TInt& aCount );
-
- /**
- * Activates sound files into profiles.
- */
- void ActivateToProfilesL();
-
- private:
-
- /**
- * Symbian 2nd phase constructor can leave.
- */
- void ConstructL();
-
- /**
- * Find the complete filename of the given sound file.
- */
- void FindSoundFile(
- TDes& aFullName,
- const TDesC& aSoundFile,
- const TDesC& aSkinPath );
-
- /**
- * Moves the sound files possibly in the skin directory.
- */
- void MoveSoundFilesL();
-
- /**
- * C++ default constructor.
- */
- CPslnSoundActivator();
-
- private: // Data
-
- /*
- * Array of sound activation entries.
- */
- RArray<TPslnSoundActivatorEntry> iSoundArray;
-
- /*
- * Has the Profiles Tone Settings DLL already been loaded.
- */
- TBool iProfilesDllLoaded;
-
- /*
- * A handle to a dynamically loadable DLL.
- */
- RLibrary iProfilesDll;
-
- /*
- * Loads Profiles Tone Settings DLL dynamically to memory.
- * Allows use of the DLL through this pointer, but only for
- * methods implemented within.
- * Own.
- */
- CPslnProfileSettingsLoader* iProfilesSetter;
- };
-
-#endif // PSLNSOUNDACTIVATOR_H
-
-// End of File
--- a/psln/Inc/PslnUi.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,555 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Personalisation application UI class.
-*
-*/
-
-
-#ifndef C_PSLNUI_H
-#define C_PSLNUI_H
-
-#include <aknViewAppUi.h>
-#ifndef RD_CONTROL_PANEL
-#include <akntabgrp.h>
-#include <akntabobserver.h>
-#endif //RD_CONTROL_PANEL
-#include <AknsSrvClient.h>
-#include <e32property.h>
-
-class CAknNavigationControlContainer;
-class CAknNavigationDecorator;
-class MAknBackgroundProcess;
-#ifndef RD_CONTROL_PANEL
-class CAknTabGroup;
-#endif //RD_CONTROL_PANEL
-class CPslnMainView;
-class CPslnPluginHandler;
-class CPslnFWPluginInterface;
-class CPslnIdleTaskCreateViews;
-class CPslnModel;
-class CPslnPropertySubscriber;
-class CPslnGeneralThemeView;
-
-
-/**
- * 'AppUi' class.
- *
- * @since S60 v2.0
- */
-class CPslnUi : public CAknViewAppUi,
- public MAknsSkinChangeObserver
-#ifndef RD_CONTROL_PANEL
- ,public MAknTabObserver
-#endif //RD_CONTROL_PANEL
- {
-
-public:
-
- /**
- * C++ default constructor
- */
- CPslnUi();
-
- /**
- * Symbian default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CPslnUi();
-
- /**
- * From CEikAppUi.
- * Takes care of command handling.
- * @param aCommand command to be handled
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * From CEikAppUi.
- * Handles a change to the application's resources
- * which are shared across the environment.
- * @param aType type of resources that have changed.
- */
- void HandleResourceChangeL( TInt aType );
-
- /**
- * From CAknViewAppUi.
- * Activates a specified application view, without passing any message.
- * The function leaves if activation of the view fails.
- * @param aViewId Identifier of the view to activate.
- */
- void ActivateLocalViewL( TUid aViewId );
-
- /**
- * From MAknsSkinChangeObserver.
- * Called by the skin server when skin content is changed and the
- * connected client wants to be informed.
- *
- * @since 2.0
- */
- void SkinContentChanged();
-
- /**
- * From MAknsSkinChangeObserver.
- * Called by the skin server to indicate that the current skin
- * configuration has changed.
- *
- * @param aReason Reason code.
- *
- * @since 2.5
- */
- void SkinConfigurationChanged(
- const TAknsSkinStatusConfigurationChangeReason aReason );
-
- /**
- * From MAknsSkinChangeObserver.
- * Called by the skin server to indicate that the available
- * skin packages have changed.
- *
- * @param aReason Reason code.
- *
- * @since 2.5
- */
- void SkinPackageChanged(
- const TAknsSkinStatusPackageChangeReason aReason );
-
- /**
- * Returns pointer to Psln model which is owned by the AppUi.
- *
- * @return Psln model.
- */
- CPslnModel* Model() const;
-
- /**
- * Updates Tab index. If the parameters are not given, tab is set
- * according to active selection in Main View.
- *
- * @param aMyId Uid of the active view.
- * @param aMyTabIndex Index of the active tab.
- * @since 3.1
- */
- void UpdateTabIndex( const TInt aMyId = KErrNotFound,
- const TInt aMyTabIndex = KErrNotFound );
-
- /**
- * Creates the given view.
- * @since 3.1
- * @param aViewUid Uid of view to be created.
- */
- void CreateViewL( TUid aViewUid );
-
- /**
- * Returns application's CAknNavigationControlContainer.
- * @since 3.1
- * @return CAknNavigationControlContainer.
- */
- CAknNavigationControlContainer* NaviContainer() const;
-
- /**
- * Returns tab group.
- * @since 3.1
- * @return CAknNavigationDecorator.
- */
- CAknNavigationDecorator* PslnTabGroup();
-
- /**
- * Returns pointer to ECOM plugin handler which is owned by the AppUi.
- * @since 3.1
- * @return ECOM plugin handler.
- */
- CPslnPluginHandler* PluginHandler() const;
-
- /**
- * Add new view to Ui Class.
- * @since 3.1
- * @param aNewView new view to add to Ui class.
- */
- void AddNewViewL( CAknView* aNewView );
-
- /**
- * Indicate from caller class that Ui-class has now all the applicable views.
- * @since 3.1
- */
- void AllViewsDone();
-
- /**
- * Handles errors when settings wallpapers.
- * @param aError error code received from WallpaperUtils API.
- */
- void HandleImageErrorsL( TInt aError );
-
-#ifndef RD_CONTROL_PANEL
- /**
- * From MAknTabObserver.
- * Takes care of tab handling.
- * @since 3.1
- * @param aIndex tab to be handled
- */
- void TabChangedL( TInt aIndex );
-#endif //RD_CONTROL_PANEL
-
- /**
- * Create views when application is idle.
- * @since 3.1
- */
- void LoadViewsWhenIdleL();
-
- /**
- * Constructs tab group, containing all static views and
- * ECOM plugin views.
- * @since 3.1
- */
- void ConstructTabGroupL();
-
- /**
- * Toggles screen blanker on/off.
- * @param aToggleValue ETrue activates screen blanker; EFalse removes it.
- * @param aStatusPaneVisible indicates if the blanker should cover the
- * statuspane as well. This is irrelevant, when removing the blanker.
- * @since 3.1
- */
- void ToggleScreenBlankerL(
- const TBool& aToggleValue,
- const TBool& aStatusPaneVisible,
- const TBool& aRealAct = ETrue );
-
- /**
- * Indicates if the UI class has deployed the skin already and is ready to
- * receive further skin activation related commands.
- * @return ETrue when UI class can handle a new skin activation related
- * command, otherwise EFalse,
- */
- TBool IsReadyToHandleCommands();
-
- /**
- * Handles exit command correctly when leave occurs in application exit.
- */
- void HandleCmdExitLeave();
-
- /**
- * Sets title back to default (application name).
- */
- void SetTitleToDefaultL();
-
- /**
- * Binary flags to indicate if view is going to be created.
- * Statuses are valid irregardless if view has, or has not
- * been already created. These values cannot change dynamically.
- *
- */
- enum TPslnViewSupport
- {
- EPslnScreensaverView = 0x00000001,
- EPslnWallpaperView = 0x00000002
- };
-
- /**
- * Gets view creation statuses as a bitmask.
- * See TPslnViewSupport for optional views whose statuses
- * can be inquiried.
- * To check if a view is supported, check flag value.
- * E.g. TBitflags views = ViewSupport();
- * if ( views.IsSet( EPslnScreensaverView ) )
- * {
- * // Screensaver view is supported
- * ...
- *
- * @return bitmask containing view support status.
- */
- TBitFlags ViewSupport();
-
- void SetDRMProtectedSkinInSkinList(
- const TBool& aProtectedSkinInList );
-
- /**
- * USB Callback.
- */
- static TInt USBCallBackL(TAny* aPtr);
-
- /**
- * USB Attach State.
- * @return ETrue when USB already attached, otherwise EFalse,
- */
- TBool USBAttachState();
-
-private:
-
- /**
- * From CCoeAppUi.
- * Handles events sent to the application by the window server.
- * @param The event that occurred.
- * @param The control that the event occurred in.
- * (For key events this is the applications window group.)
- */
- void HandleWsEventL(
- const TWsEvent& aEvent,
- CCoeControl* aDestination );
-
- /**
- * From CEikAppUi.
- * Key event handler.
- */
- virtual TKeyResponse HandleKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType );
-
- /**
- * @see SkinConfigurationChanged, same functionality, but
- * leaving internal method.
- */
- void SkinConfigurationChangedL(
- const TAknsSkinStatusConfigurationChangeReason aReason );
-
- /* Activates skin. */
- void ActivateSkinL();
-
- /* Activates sounds in skin. */
- void ActivateSoundsL();
-
- /* Downloads skin. */
- void DownloadSkinL();
-
- /* Creates wait dialog and shows it */
- void CreateAndShowWaitWrapperL(
- MAknBackgroundProcess& aTask,
- const TInt aResourceID, const TDesC& aString,
- const TBool aShowImmediately = ETrue );
-
-#ifndef RD_CONTROL_PANEL
- /* Adds given view plugin to TabGrp */
- void AddPluginToTabL( CPslnFWPluginInterface& aPlugin );
-#endif //!RD_CONTROL_PANEL
-
- /* Handles exit command. */
- void HandleCmdExitL();
-
- /* Shows error note. */
- void ShowErrorNoteL( HBufC& aErrorBuf ) const;
-
- /**
- * Callback when idle time occurs.
- */
- static TInt DoCreateWaitNoteL( TAny* aAny );
-
- /* Creates and shows wait note. */
- void DoCreateWaitNoteL();
-
- /* Activates skin, cannot leave. */
- TInt ActivateSkin( const TInt aPslnStatus );
-
-#ifndef RD_CONTROL_PANEL
- /* Non-leaving version of AddPluginToTabL. */
- TInt AddPluginToTab( CPslnFWPluginInterface& aPlugin );
-#endif //!RD_CONTROL_PANEL
-
- /* Set internal state to post-skin-deployment.*/
- void SkinDeployedL();
-
- /**
- * Creates model instance.
- * @since 3.1
- */
- void CreateModelL();
-
- /**
- * Callback when idle time occurs for skin activation.
- */
- static TInt DoActivateSkinL( TAny* aAny );
-
- /**
- * Activates skin
- */
- void DoActivateSkinL();
-
-// INLINE METHODS
-
- /* Checks if internal state is on or off. */
- inline TBool GetStatus( TInt aInternalState ) const;
-
- /* Sets internal state on. Includes check that state is now off. */
- inline void SetStateOn( TInt aInternalState );
-
- /* Sets internal state off. Includes check that state is now on. */
- inline void SetStateOff( TInt aInternalState );
-
- /**
- * Handle USB Callback.
- */
- void HandleUSBCallBackL();
-
-private: // data
-
- /**
- * Psln Model.
- * Own.
- */
- CPslnModel* iModel;
-
- /**
- * Navigation Pane.
- * Not own.
- */
- CAknNavigationControlContainer* iNaviPane;
-
- /**
- * Frame for tabgroup.
- * Own.
- */
- CAknNavigationDecorator* iDecoratedTabGroup;
-
- /**
- * Main view.
- * Not own (application framework 'owns' this).
- */
- CPslnMainView* iMainView;
-
- /**
- * ECOM view plugin handler.
- * Own.
- */
- CPslnPluginHandler* iPluginHandler;
-
- /**
- * Internal status of Psln. The specific states are:
- *
- * EPslnCreated
- * Psln has this status when default constructor
- * has been called. It's set off, once all views
- * have been added.
- * EPslnSoundActivationPending
- * Psln has this status when skin server about to activate
- * sounds included in skin package. It is set off when
- * activation is finished.
- * EPslnListUpdateNeeded
- * Psln has this status when skin list needs updating.
- * EPslnWallpaperViewCreated
- * This state is active when wallpaper view has been created.
- * It is initially off and set on when either view is loaded
- * due to idle activity, or when needed.
- * EPslnScreenSaverViewCreated
- * This state is active when screensaver view has been created.
- * It is initially off and set on when either view is loaded
- * due to idle activity, or when needed.
- * EPslnGeneralViewCreated
- * This state is active when general theme view has been created.
- * It is initially off and set on when either view is loaded
- * due to idle activity, or when needed.
- * EPslnSkinActivated
- * User has opted to activate a skin. This state prevails until
- * skin server indicates that skin changes has been deployed.
- * EPslnTabGroupCreated
- * This state is active when tab group has been created.
- * It is initially off and set on when either any other view is
- * activated (other than main) or with time due to idle activity.
- * EPslnModelCreated
- * This state is active when model has been created.
- * It is initially off and set on when either any other view is
- * activated (other than main) or with time due to idle activity.
- * EPslnSkinChangeRequested
- * This state is active when user has indicated that he/she would
- * would like to change the active skin (i.e. preview or actual
- * activation). It is initially off and is set on when user selects
- * Apply for the skin from General Theme view.
- * It is again set off when skin server indicates that skin was
- * either activated, or there was an error.
- * This differs from EPslnSkinActivated in that this is purely tied
- * to user activity.
- * EPslnViewSupportChecked
- * This state indicates that the view support has been checked.
- * It is set active once, the view support status has been checked
- * for the first time.
- * EPslnNoScreenSaverView
- * This state indicates that there is no Screensaver view in the
- * application. View statuses are set when ViewSupport is called.
- * EPslnNoWallpaperView
- * This state indicates that there is no Wallpaper view in the
- * application. View statuses are set when ViewSupport is called.
- */
- enum TPslnStatus {
- EPslnCreated = 0x00000001,
- EPslnProtectedSkinInList = 0x00000002,
- //Not used = 0x00000004,
- EPslnSoundActivationPending = 0x00000008,
- EPslnListUpdateNeeded = 0x00000010,
- EPslnWallpaperViewCreated = 0x00000020,
- EPslnScreenSaverViewCreated = 0x00000040,
- EPslnGeneralViewCreated = 0x00000080,
- EPslnSkinActivated = 0x00000200,
- EPslnTabGroupCreated = 0x00000400,
- EPslnModelCreated = 0x00000800,
- EPslnSkinChangeRequested = 0x00001000,
- EPslnViewSupportChecked = 0x00002000,
- EPslnNoScreenSaverView = 0x00004000,
- EPslnNoWallpaperView = 0x00008000
- };
- TInt iPslnUiStatus;
-
-#ifndef RD_CONTROL_PANEL
- /**
- * Tab group.
- * Not own - owned by iDecoratedTabGroup.
- */
- CAknTabGroup* iTabGroup;
-#endif //RD_CONTROL_PANEL
-
- /**
- * Creates views when application is idle.
- * Own.
- */
- CPslnIdleTaskCreateViews* iIdleTask;
- /**
- *
- */
- CIdle* iIdleActivateSkin;
-
- /**
- *
- */
- CIdle* iIdleUpdateSkin;
-
- /**
- * USB Watch Property.
- */
- RProperty iEnableUSBWatchProperty;
-
-
- /**
- * USB Watch Property Subscriber.
- * Own.
- */
- CPslnPropertySubscriber* iUSBWatchSubscriber;
-
- /**
- * USB Attached.
- */
- TBool iUSBAttached;
-
- /**
- * General Theme view.
- * Not own (application framework 'owns' this).
- */
- CPslnGeneralThemeView* iGeneralThemeView;
-
- };
-
-// Inline methods.
-#include "pslnui.inl"
-
-#endif // C_PSLNUI_H
-
-// End of File
-
--- a/psln/Inc/PslnVariant.hrh Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2004-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: Local variation for Personalisation application
-*
-*/
-
-
-#ifndef PSLNVARIANT_HRH
-#define PSLNVARIANT_HRH
-
-/**
-*******************************************************************************
-* Locally variated features of Psln application.
-*******************************************************************************
-*/
-
-// Enable enhanced embedded links. Bitmask value in decimals: 1.
-#define KPslnEnhancedEmbeddedLinks 0x00000001
-
-// Enable sounds in skins. Bitmask value in decimals: 2.
-#define KPslnSoundsInSkins 0x00000002
-
-// No setting for this value. Bitmask value in decimals: 4.
-
-// Enable screensaver slide set setting dialog. Bitmask value in decimals: 8.
-#define KPslnScreenSaverSlideSetDialog 0x00000008
-
-// Enable wallpaper slide set setting dialog. Bitmask value in decimals: 16.
-#define KPslnWallpaperSlideSetDialog 0x00000010
-
-// Enable random slide set selections. Bitmask value in decimals: 32.
-// Requires that either KPslnScreenSaverSlideSetDialog or
-// KPslnWallpaperSlideSetDialog is set.
-#define KPslnRandomSlideSets 0x00000020
-
-// Removes screensaver view from Psln application.
-// Bitmask value in decimals: 64.
-#define KPslnRemoveScreensaver 0x00000040
-
-// Removes wallpaper view from Psln application.
-// Bitmask value in decimals: 128.
-#define KPslnRemoveWallpaper 0x00000080
-
-// Removes screensaver slideset's timeout setting.
-// Bitmask value in decimals: 256.
-#define KPslnRemoveSlideSetTimeout 0x00000100
-
-//Add "None" option to screensaver list
-//Bitmask value in decimals: 512.
-#define KPslnSupportScreenSaverSupportNoneOption 0x00000200
-
-// Removes general theme's theme preview performence improvement.
-// Bitmask value in decimals: 1024.
-#define KPslnSupportFastPreviewTheme 0x00000400
-
-// Enable animated background setting.
-// Bitmask value in decimals: 2048.
-#define KPslnSupportAnimBackground 0x00000800
-
-#endif // PSLNVARIANT_HRH
-
-// End of File
--- a/psln/Inc/PslnVariationPrivateCRKeys.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 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: Private Central Repository keys for Personalisation app.
-*
-*/
-
-
-#ifndef PSLNVARIATIONPRIVATECRKEYS_H
-#define PSLNVARIATIONPRIVATECRKEYS_H
-
-/**
-*******************************************************************************
-* Themes variation repository.
-*******************************************************************************
-*/
-const TUid KCRUidThemesVariation = { 0x102818EB };
-
-/**
-* Specifies the bitmask for Themes applications locally variated features.
-*
-* Possible values are defined in PslnVariant.hrh.
-*/
-const TUint32 KThemesLocalVariation = 0x00000001;
-
-#endif // PSLNVARIATIONPRIVATECRKEYS_H
--- a/psln/Inc/PslnWallpaperContainer.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wallpaper view's container.
-*
-*/
-
-
-
-#ifndef PSLNWALLPAPERCONTAINER_H
-#define PSLNWALLPAPERCONTAINER_H
-
-// INCLUDES
-#include "PslnBaseContainer.h"
-
-// CLASS DECLARATION
-
-/**
-* Wallpaper container.
-* Contains wallpaper setting items.
-*
-* @since S60 v3.1
-*/
-class CPslnWallpaperContainer : public CPslnBaseContainer
- {
- public:
-
- /**
- * C++ default constructor.
- */
- CPslnWallpaperContainer();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- * @param aRect client rect.
- */
- void ConstructL( const TRect& aRect );
-
- /**
- * Destructor.
- */
- virtual ~CPslnWallpaperContainer();
-
- /**
- * From CPslnBaseContainer.
- * Updates the whole container.
- */
- void UpdateListBoxL();
-
- private:
-
- /**
- * From CPslnBaseContainer.
- * Constructs list box and items.
- * @param aResLbxId used resource ID.
- */
- void ConstructListBoxL( TInt aResLbxId );
-
- /**
- * From CPslnBaseContainer.
- * Creates listbox items.
- */
- void CreateListBoxItemsL();
-
- /**
- * From CCoeControl. Gets help context.
- */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- private: // Data
-
- /**
- * List of setting items.
- * Own.
- */
- CDesCArrayFlat* iItems;
- };
-
-#endif // PSLNWALLPAPERCONTAINER_H
-
-// End of File
--- a/psln/Inc/PslnWallpaperView.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wallpaper view.
-*
-*/
-
-
-
-#ifndef CPSLNWALLPAPERVIEW_H
-#define CPSLNWALLPAPERVIEW_H
-
-// INCLUDES
-#include "PslnBaseView.h"
-#include <cenrepnotifyhandler.h>
-#include <mpslnfwmsklabelobserver.h>
-
-class CRepository;
-
-// CLASS DECLARATION
-
-/**
-* Wallpaper view within personalization application.
-* Possible to define current Idle background image.
-*
-* @since S60 v3.1
-*/
-class CPslnWallpaperView : public CPslnBaseView,
- public MCenRepNotifyHandlerCallback,
- public MPslnFWMSKObserver
- {
- public:
-
- /**
- * Two-phased constructor.
- * @return new instance of CPslnWallpaperView.
- */
- static CPslnWallpaperView* NewLC();
-
- /**
- * Destructor.
- */
- virtual ~CPslnWallpaperView();
-
- /**
- * From CAknView.
- * Returns view id.
- * @return An unsigned integer (view id).
- */
- TUid Id() const;
-
- /**
- * From MEikCommandObserver.
- * Handles commands.
- * @param aCommand Command to be handled.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * From MPslnFWMSKObserver.
- * Checks if the MSK label needs to be adjusted.
- */
- void CheckMiddleSoftkeyLabelL();
-
- private:
-
- /* From MCenRepNotifyHandlerCallback. */
- void HandleNotifyInt( TUint32 aId, TInt aNewValue );
-
- /* From MCenRepNotifyHandlerCallback. */
- void HandleNotifyGeneric( TUint32 aId );
-
- /* From MCenRepNotifyHandlerCallback. */
- void HandleNotifyError(
- TUint32 aId,
- TInt aError,
- CCenRepNotifyHandler* aHandler );
-
- /* From CAknView. */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * From MEikMenuObserver.
- * Changes MenuPane dynamically.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- /* From CPslnBaseView. */
- void HandleListBoxSelectionL();
-
- /**
- * From CPslnBaseView.
- */
- void HandleListBoxItemHighlightL();
-
- /* From CPslnBaseView. */
- void NewContainerL();
-
- /* From CPslnBaseView. */
- void SetTitlePaneL( TInt& aResourceId );
-
- /* From CPslnBaseView. */
- TInt CbaResourceId( const TVwsViewId& aPrevViewId,TUid aCustomMessageId );
-
- /**
- * C++ default constructor.
- */
- CPslnWallpaperView();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /* Shows MGFetch query */
- TBool ShowBackgroundImageListL();
-
- /* Request container to update itself. */
- void UpdateContainer();
-
- /* Remove command and label from MSK */
- void RemoveCommandFromMSK();
-
- /* Updates current item. */
- TInt UpdateCurrentItem();
-
- private: // data
-
- /**
- * Personalization repository that contains wallpaper image path.
- * Own.
- */
- CRepository* iWallpaperRepository;
-
- /**
- * Notifier for changes in the above repository.
- * Own.
- */
- CCenRepNotifyHandler* iWallpaperNotifier;
-
- // Currently active wallpaper type.
- TInt iActiveWallpaper;
-
- /**
- * Ture if Wallpaper Setting Dialog is Running.
- */
- TBool iWpDlgRunnig;
- };
-
-#endif // CPSLNWALLPAPERVIEW_H
-
-// End of File
--- a/psln/Inc/pslnidletaskcreateviews.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* 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: Background task for creating views.
-*
-*/
-
-
-#ifndef C_PSLNIDLETASKCREATEVIEWS_H
-#define C_PSLNIDLETASKCREATEVIEWS_H
-
-#include <e32base.h>
-
-class CPslnUi;
-
-/**
- * Creates Themes application views in the background when application
- * is idle.
- * @since S60 v3.1
- */
-class CPslnIdleTaskCreateViews : public CBase
- {
-public:
-
- /**
- * Two-phased constructor.
- * @param aPslnUi pointer to UI class.
- * @return new instance of CPslnIdleTaskCreateViews.
- */
- static CPslnIdleTaskCreateViews* NewL( CPslnUi* aPslnUi );
-
- /**
- * Destructor.
- */
- virtual ~CPslnIdleTaskCreateViews();
-
- /**
- * From MAknBackgroundProcess.
- * Return ETrue when the process is done.
- * @return ETrue if process is ready.
- */
- TBool IsFinished() const;
-
-private:
-
- /**
- * Callback when idle time occurs.
- */
- static TInt DoHandleIdleTimeL( TAny* aAny );
-
- /**
- * When idle time occurs, creates a new view, until all views
- * have been created.
- */
- void HandleIdleTimeL();
-
- /**
- * C++ constructor.
- */
- CPslnIdleTaskCreateViews( CPslnUi* aPslnUi );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
-private: // data
-
- /**
- * Reference to Psln UI class.
- * Not own.
- */
- CPslnUi* iPslnUi;
-
- /**
- * Has the task been done.
- */
- TBool iDone;
-
- /**
- * Internal state.
- */
- TInt iIdleStep;
-
- /**
- * Idle task that creates views in the background.
- * Own.
- */
- CIdle* iIdleTask;
- };
-
-#endif // C_PSLNIDLETASKCREATEVIEWS_H
--- a/psln/Inc/pslntaskactivatesounds.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* 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: Background task for activating sounds in skin package.
-*
-*/
-
-
-#ifndef C_PSLNTASKACTIVATESOUNDS_H
-#define C_PSLNTASKACTIVATESOUNDS_H
-
-#include <e32base.h>
-#include <e32std.h>
-#include <AknWaitNoteWrapper.h>
-
-class CPslnSoundActivator;
-
-/**
- * Background task activator for activating sounds in skin package.
- *
- * @since S60 v2.6
- */
-class CPslnTaskActivateSounds : public CBase, public MAknBackgroundProcess
- {
-public:
-
- /**
- * C++ constructor.
- * @param aActivator reference to sound activator.
- */
- CPslnTaskActivateSounds( CPslnSoundActivator& aActivator );
-
- /**
- * From MAknBackgroundProcess.
- * Return ETrue when the process is done.
- * @return ETrue if process is ready.
- */
- TBool IsProcessDone() const;
-
- /**
- * From MAknBackgroundProcess.
- * Completes one cycle of the process.
- */
- void StepL();
-
-private: // data
-
- /**
- * Has the task been done.
- */
- TBool iDone;
-
- /**
- * Reference to sound activator.
- */
- CPslnSoundActivator& iActivator;
-
-public: // public data
-
- /**
- * Has an error occured.
- */
- TInt iActivationErr;
- };
-
-#endif // C_PSLNTASKACTIVATESOUNDS_H
--- a/psln/Inc/pslntaskgenericupdate.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2003-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: Background task for generic tasks.
-*
-*/
-
-
-#ifndef C_PSLNTASKGENERICUPDATE_H
-#define C_PSLNTASKGENERICUPDATE_H
-
-#include <e32base.h>
-#include <e32std.h>
-#include <AknWaitNoteWrapper.h>
-
-class CPslnUi;
-class CPslnModel;
-
-/** Model funtion pointer. */
-typedef void ( CPslnModel::* TPslnModelFunctionPtr )();
-
-/**
- * Background task for generic tasks.
- *
- *
- * @since S60 v2.0
- */
-class CPslnTaskGenericUpdate : public CBase, public MAknBackgroundProcess
- {
-public:
- /**
- * C++ constructor.
- * @param aUi reference to UI-class.
- * @param aModelFunc model function pointer.
- * @param aUpdateList ETrue is skin list is needed to update.
- */
- CPslnTaskGenericUpdate(
- CPslnUi& aUi,
- TPslnModelFunctionPtr aModelFunc,
- TBool aUpdateList = ETrue );
-
- /**
- * From MAknBackgroundProcess.
- * Return ETrue when the process is done.
- * @return ETrue if process is ready.
- */
- TBool IsProcessDone() const;
-
- /**
- * From MAknBackgroundProcess.
- * Completes one cycle of the process.
- */
- void StepL();
-
-private: // data
-
-
- /**
- * Reference to Psln UI-class.
- */
- CPslnUi& iUi;
-
- /**
- * Psln model function to call.
- */
- TPslnModelFunctionPtr iModelFunc;
-
- /**
- * Should the skin list be updated.
- */
- TBool iUpdateList;
-
- /**
- * Has the task been done.
- */
- TBool iDone;
-
-public: // Public data
-
- /**
- * Error code for the task, if any.
- */
- TInt iCallErr;
-
- };
-
-#endif // C_PSLNTASKGENERICUPDATE_H
--- a/psln/Inc/pslnui.inl Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 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: Inline methods from PslnUi.
-*
-*/
-
-
-// -----------------------------------------------------------------------------
-// Returns current status of given state.
-// -----------------------------------------------------------------------------
-//
-inline TBool CPslnUi::GetStatus( TInt aInternalState ) const
- {
- return ( iPslnUiStatus & aInternalState );
- }
-
-// -----------------------------------------------------------------------------
-// Checks if state is off and then sets it on.
-// -----------------------------------------------------------------------------
-//
-inline void CPslnUi::SetStateOn( TInt aInternalState )
- {
- if ( !( iPslnUiStatus & aInternalState ) )
- {
- iPslnUiStatus += aInternalState;
- }
- }
-
-// -----------------------------------------------------------------------------
-// Checks if state is on and then sets it off.
-// -----------------------------------------------------------------------------
-//
-inline void CPslnUi::SetStateOff( TInt aInternalState )
- {
- if ( iPslnUiStatus & aInternalState )
- {
- iPslnUiStatus &= ~aInternalState;
- }
- }
--- a/psln/PslnFramework/PslnFramework.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This is project specification file for Psln framework.
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-TARGET PslnFramework.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x102750A8
-
-// Source files
-SOURCEPATH src
-SOURCE PslnFWBaseContainer.cpp
-SOURCE PslnFWBaseView.cpp
-SOURCE PslnFWPluginHandler.cpp
-SOURCE PslnFWIconHelper.cpp
-//SOURCE PslnFWAppThemeHandler.cpp
-
-// User include paths
-USERINCLUDE inc
-USERINCLUDE ../Inc
-USERINCLUDE ../PslnLibraryLoaders/inc
-
-// System include paths
-
-// This is a SYSTEMINCLUDE macro containing the application
-// layer specific include directories
-APP_LAYER_SYSTEMINCLUDE
-
-// Libraries required by framework
-LIBRARY aknskins.lib // for enhanced skinning
-LIBRARY apgrfx.lib // for RApaLsSession
-LIBRARY apparc.lib
-LIBRARY avkon.lib
-LIBRARY bafl.lib
-LIBRARY commonengine.lib // for RConeResourceLoader
-LIBRARY cone.lib
-LIBRARY ecom.lib
-LIBRARY efsrv.lib
-LIBRARY egul.lib // CGulIcon
-LIBRARY eikcoctl.lib
-LIBRARY eikcore.lib
-LIBRARY eikctl.lib // CEikColumnListBox
-LIBRARY euser.lib
-LIBRARY fbscli.lib // for CFbsBitmap
-LIBRARY hlplch.lib // for "Help" options menu
-LIBRARY ws32.lib
-//LIBRARY XnODT.lib
-
-//End of File
--- a/psln/PslnFramework/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file provides the information required for building framework.
-*
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-PslnFramework.mmp
-
-PRJ_TESTMMPFILES
-
-// End of File
--- a/psln/PslnFramework/src/PslnFWAppThemeHandler.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles interface towards XUIKON, sets and gets theme information.
-*
-*/
-
-
-
-// INCLUDE FILES
-
-// Psln Framework
-#include <PslnFWAppThemeHandler.h>
-#include <MPslnFWAppThemeObserver.h>
-#include "PslnXNClientLoader.h"
-
-// Constants
-#include "PslnConst.h"
-#include "PslnDebug.h"
-
-// Xuikon
-#include <XnODT.h>
-
-#include <AknEnv.h>
-
-// CONTANTS
-// Path to wrapper dll for XnClient.
-_LIT( KPslnXuikonClientLoaderName,
- "\\system\\libs\\PslnXNClientLoader.dll");
-
-// TYPE DEFINITIONS
-// Xuikon client loader.
-typedef TAny* (*NewXuikonClientL)();
-
-// -----------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnFWAppThemeHandler::CPslnFWAppThemeHandler(
- MPslnFWAppThemeObserver& aObserver,
- CArrayPtrFlat<CXnODT>& aApplicationSkinList ) :
- iObserver( aObserver ), iAppThemeList( &aApplicationSkinList )
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnFWAppThemeHandler::ConstructL()
- {
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::ConstructL BEGIN");
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::ConstructL END");
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnFWAppThemeHandler* CPslnFWAppThemeHandler::NewL
- ( MPslnFWAppThemeObserver& aObserver,
- CArrayPtrFlat<CXnODT>& aApplicationSkinList )
- {
- CPslnFWAppThemeHandler* self =
- new( ELeave ) CPslnFWAppThemeHandler( aObserver, aApplicationSkinList );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
-
-
-// Destructor
-CPslnFWAppThemeHandler::~CPslnFWAppThemeHandler()
- {
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler destructor BEGIN");
- // deleting iXnClientLoader automatically cancels all existing fetches.
- delete iXnClientLoader;
- if( iXnClientDllLoaded )
- {
- iXnClientDll.Close();
- }
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler destructor END");
- // do not destroy iAppThemeList - it is owned by application.
- }
-
-// -----------------------------------------------------------------------------
-// Collect application specific themes from server.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TXnServiceCompletedMessage CPslnFWAppThemeHandler::GetApplicationSkinsL(
- TUid aUid )
- {
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::GetApplicationSkinsL BEGIN");
- if ( !iXnClientLoader )
- {
- CreateXnClientL();
- }
- // Remember to cancel first. CPslnFWAppThemeHandler only supports one
- // active request per application.
- if ( iFetchOngoing )
- {
- return EXnServiceRequestError;
- }
-
- // Clear previous fetch first.
- iFetchOngoing = ETrue;
- if ( iAppThemeList )
- {
- iAppThemeList->ResetAndDestroy();
- }
-
- // Start looking for application skins.
- CXnODT* odt = CreateODTFromAppUidLC( aUid );
- TXnServiceCompletedMessage ret =
- iXnClientLoader->GetListHeaders( *odt, *iAppThemeList );
-
- if ( ret == EXnGetListHeadersSuccess )
- {
- // There are existing application specific skins.
- // Let's start looking for these.
- iXnClientLoader->GetNextHeader();
- }
- else if ( ret == EXnGetListHeadersEmpty )
- {
- // There are no application specific skins now, but
- // let's start to wait if some would appear later.
- iXnClientLoader->GetNextHeader();
- }
- else if ( ret == EXnGetListHeadersFailed || ret == EXnServiceRequestError )
- {
- // Error.
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::GetApplicationSkinsL Error");
- }
- else
- {
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::GetApplicationSkinsL Empty else");
- }
-
- CleanupStack::PopAndDestroy( odt );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// Sets application specific theme.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TXnServiceCompletedMessage CPslnFWAppThemeHandler::SetApplicationSkinL(
- CXnODT& aThemeODT )
- {
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::SetApplicationSkinL BEGIN");
- if ( !iXnClientLoader )
- {
- CreateXnClientL();
- }
-
- CXnODT* odt = CXnODT::NewL();
- CleanupStack::PushL( odt );
-
- TXnServiceCompletedMessage ret =
- iXnClientLoader->SetActiveTheme( aThemeODT, *odt );
-
- CleanupStack::PopAndDestroy( odt );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnFWAppThemeHandler::CancelGetApplicationSkins
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWAppThemeHandler::CancelGetApplicationSkins()
- {
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::CancelGetApplicationSkins BEGIN");
- iFetchOngoing = EFalse;
- if ( iXnClientLoader )
- {
- iXnClientLoader->CancelGetListHeaders();
- }
- }
-
-EXPORT_C TXnServiceCompletedMessage CPslnFWAppThemeHandler::SetApplicationSkinAndExitL(
- CXnODT& aThemeODT )
- {
- TXnServiceCompletedMessage ret = SetApplicationSkinL( aThemeODT );
- if ( ret == EXnSetActiveThemeSuccess )
- {
- CAknEnv::RunAppShutter();
- }
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// Xuikon theme manager callback.
-// -----------------------------------------------------------------------------
-//
-void CPslnFWAppThemeHandler::HandleXnClientMessage(
- TXnServiceCompletedMessage aMessage )
- {
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::HandleXnClientMessage BEGIN");
- switch ( aMessage )
- {
- case EXnGetListHeadersEmpty:
- // notify client that there are no themes available.
- // Destroy possible previously available skins
- iObserver.HandleMessage( aMessage );
- if ( iAppThemeList )
- {
- iAppThemeList->ResetAndDestroy();
- }
- break;
- case EXnGetListHeadersFailed:
- // notify client that observation has been stopped
- iObserver.HandleMessage( aMessage );
- CancelGetApplicationSkins();
- break;
- case EXnServiceRequestCanceled:
- case EXnServiceRequestError:
- // notify client about possible error cause.
- iObserver.HandleMessage( aMessage );
- break;
- case EXnGetListHeadersUpdate:
- // give the client the new list.
- // Fall through
- case EXnGetListHeadersRestart:
- // notify client that old list is now not valid, and the new list needs to
- // be used.
- // Fall through
- default:
- iObserver.HandleMessage( aMessage, *iAppThemeList );
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// Creates ODT based on application UID.
-//
-// -----------------------------------------------------------------------------
-//
-CXnODT* CPslnFWAppThemeHandler::CreateODTFromAppUidLC( TUid aUid )
- {
- PSLN_TRACE_DEBUG("CPslnFWAppThemeHandler::CreateODTFromAppUidLC BEGIN");
- CXnODT* odt = CXnODT::NewL();
- CleanupStack::PushL( odt );
- odt->SetAppUid( aUid.iUid ); // the UID of the application
- odt->SetProviderUid( Nokia_VID ); // all provided by Nokia
- return odt;
- }
-
-// -----------------------------------------------------------------------------
-// Creates XUIKON Client interface.
-//
-// -----------------------------------------------------------------------------
-//
-void CPslnFWAppThemeHandler::CreateXnClientL()
- {
- // Xuikon Client dll loading.
- if( !iXnClientDllLoaded )
- {
- if( iXnClientDll.Load( KPslnXuikonClientLoaderName ) == KErrNone )
- {
- iXnClientDllLoaded = ETrue;
- // Request the entry function
- NewXuikonClientL xuikonClient =
- (NewXuikonClientL) iXnClientDll.Lookup( KPslnDllEntryPoint );
- if( xuikonClient )
- {
- // Create the class
- iXnClientLoader =
- (CPslnXNClientLoader*) (*xuikonClient)();
- }
- }
- }
- // The wrapper failed to load.
- if ( !iXnClientLoader )
- {
- User::Leave( KErrNotFound );
- }
- iXnClientLoader->CreateClientL( *this );
- }
-// End of File
--- a/psln/PslnFramework/src/PslnFWBaseContainer.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base container for Psln some views.
-*
-*/
-
-
-// INCLUDE FILES
-#include "pslnfwbasecontainer.h"
-
-// Title and status pane.
-#include <akntitle.h>
-#include <eikspane.h>
-
-// AVKON App Ui.
-#include <aknappui.h>
-#include <AknUtils.h>
-
-// Resource reader.
-#include <barsread.h>
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-// Base constructor.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseContainer::BaseConstructL( const TRect& aRect,
- TInt aResTitleId,
- TInt aResLbxId )
- {
- // Create title if needed.
- if ( aResTitleId != 0 )
- {
- CEikStatusPane* sp = iAvkonAppUi->StatusPane();
-
- CAknTitlePane* title =
- static_cast<CAknTitlePane*> (
- sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-
- TResourceReader rReader;
- iCoeEnv->CreateResourceReaderLC( rReader, aResTitleId );
- title->SetFromResourceL( rReader );
- CleanupStack::PopAndDestroy(); // rReader
- }
-
- CreateWindowL(); // Makes the control a window-owning control
-
- // Set iListBox to be contained in this container:
- iListBox->SetContainerWindowL( *this );
-
- ConstructListBoxL( aResLbxId );
-
- iListBox->CreateScrollBarFrameL( ETrue );
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
-
- SetRect( aRect );
- ActivateL();
- }
-
-// ---------------------------------------------------------------------------
-// C++ default constructor.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPslnFWBaseContainer::CPslnFWBaseContainer()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPslnFWBaseContainer::~CPslnFWBaseContainer()
- {
- delete iListBox;
- }
-
-// ---------------------------------------------------------------------------
-// Sets observer for MSK label updations.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseContainer::SetMiddleSoftkeyObserver(
- MPslnFWMSKObserver* aObserver )
- {
- if ( !iMSKObserver && aObserver )
- {
- iMSKObserver = aObserver;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Construct's ListBox from Resource ID
-// ---------------------------------------------------------------------------
-//
-void CPslnFWBaseContainer::ConstructListBoxL( TInt aResLbxId )
- {
- TResourceReader rReader;
- iCoeEnv->CreateResourceReaderLC( rReader, aResLbxId );
- iListBox->ConstructFromResourceL( rReader );
- CleanupStack::PopAndDestroy(); // rReader
- }
-
-// ---------------------------------------------------------------------------
-// Handles system changes (skin change and layout changes).
-// ---------------------------------------------------------------------------
-EXPORT_C void CPslnFWBaseContainer::HandleResourceChange( TInt aType )
- {
- CCoeControl::HandleResourceChange( aType );
- if ( aType == KEikDynamicLayoutVariantSwitch )
- {
- TRect mainPaneRect;
- AknLayoutUtils::LayoutMetricsRect(
- AknLayoutUtils::EMainPane,
- mainPaneRect );
- SetRect( mainPaneRect );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Called by framework when the view size is changed.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Count component controls.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnFWBaseContainer::CountComponentControls() const
- {
- return 1;
- }
-
-// ---------------------------------------------------------------------------
-// Returns mathcing component.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCoeControl* CPslnFWBaseContainer::ComponentControl( TInt /*aIndex*/ )
- const
- {
- return iListBox;
- }
-
-// ---------------------------------------------------------------------------
-// Called when a key is pressed.
-// ---------------------------------------------------------------------------
-EXPORT_C TKeyResponse CPslnFWBaseContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- switch ( aKeyEvent.iCode )
- {
- case EKeyNext:
- case EKeyPrevious:
- case EKeyUpArrow:
- case EKeyDownArrow:
- {
- TKeyResponse listboxResp =
- iListBox->OfferKeyEventL( aKeyEvent, aType );
- if ( iMSKObserver )
- {
- iMSKObserver->CheckMiddleSoftkeyLabelL();
- }
- return listboxResp;
- }
- case EKeyLeftArrow:
- case EKeyRightArrow:
- // Listbox takes all events even if it doesn't use them
- return EKeyWasNotConsumed;
- default:
- break;
- }
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
-
-// ---------------------------------------------------------------------------
-// Handles focus change events.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseContainer::FocusChanged( TDrawNow aDrawNow )
- {
- // Pass focus changed event to listbox.
- if ( iListBox )
- {
- iListBox->SetFocus( IsFocused(), aDrawNow );
- }
- }
-
-// End of File
--- a/psln/PslnFramework/src/PslnFWBaseView.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,423 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base view for all plugin views.
-*
-*/
-
-
-// INCLUDE FILES
-#include "pslnfwbaseview.h"
-#include "pslnfwbasecontainer.h"
-#include "PslnConst.h"
-#include "PslnDebug.h"
-
-// For Download and Help command handling
-#include <psln.hrh>
-#include <hlplch.h>
-
-// AVKON utilities
-#include <aknnavide.h>
-#include <akntitle.h>
-#include <aknViewAppUi.h>
-#include <akntabgrp.h>
-
-// General Utilities
-#include <barsread.h>
-#include <bautils.h>
-#include <data_caging_path_literals.hrh>
-#include <StringLoader.h>
-
-// Static view locations.
-const TInt KPslnFWGeneralThemeViewLocation = 0;
-
-// ========================= MEMBER FUNCTIONS ================================
-// ---------------------------------------------------------------------------
-// C++ constructor
-// ---------------------------------------------------------------------------
-EXPORT_C CPslnFWBaseView::CPslnFWBaseView() : iResourceLoader( *iCoeEnv ),
- iMyTabIndex ( KErrNotFound )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-EXPORT_C CPslnFWBaseView::~CPslnFWBaseView()
- {
- iResourceLoader.Close();
- if ( iContainer )
- {
- CAknViewAppUi* appUi = AppUi();
- if ( appUi )
- {
- appUi->RemoveFromStack( iContainer );
- }
- delete iContainer;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnFWBaseView::Container
-// ---------------------------------------------------------------------------
-EXPORT_C CPslnFWBaseContainer* CPslnFWBaseView::Container()
- {
- return iContainer;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnFWBaseView::SetCurrentItem
-// ---------------------------------------------------------------------------
-EXPORT_C void CPslnFWBaseView::SetCurrentItem( TInt aIndex )
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::SetCurrentItem");
- if ( aIndex > 0 )
- {
- iCurrentItem = aIndex;
- }
- else
- {
- // If invalid index, set to first.
- iCurrentItem = 0;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnFWBaseView::HandleListBoxEventL
-// ---------------------------------------------------------------------------
-EXPORT_C void CPslnFWBaseView::HandleListBoxEventL( CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType )
- {
- switch ( aEventType )
- {
- case EEventItemClicked:
- if ( iContainer && iContainer->iMSKObserver )
- {
- iContainer->iMSKObserver->CheckMiddleSoftkeyLabelL();
- }
- break;
- case EEventEnterKeyPressed:
- case EEventItemDoubleClicked:
- case EEventItemSingleClicked:
- HandleListBoxSelectionL();
- break;
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Sets navi_pane.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::SetNaviPaneL()
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::SetNaviPaneL BEGIN");
- if ( !iNaviControlContainer )
- {
- CAknViewAppUi* appUi = AppUi();
- if ( appUi )
- {
- CEikStatusPane* sp = appUi->StatusPane();
- iNaviControlContainer = static_cast<CAknNavigationControlContainer*>
- ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
- }
- }
-
- _LIT( KPanicText, "CPslnFWBaseView" );
- __ASSERT_DEBUG( iNaviControlContainer, User::Panic( KPanicText, KErrGeneral ) );
-
- if ( iNaviPaneContext )
- {
- iNaviControlContainer->PushL( *iNaviPaneContext );
- }
- else
- {
- iNaviControlContainer->PushDefaultL();
- }
- PSLN_TRACE_DEBUG("CPslnFWBaseView::SetNaviPaneL END");
- }
-
-// ---------------------------------------------------------------------------
-// CPslnFWBaseView::CreateNaviPaneContextL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::CreateNaviPaneContextL( TInt /*aResourceId*/ )
- {
- // Deprecated.
- }
-
-// ---------------------------------------------------------------------------
-// Sets navi_pane decorator.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::SetNaviPaneDecorator(
- CAknNavigationDecorator* aDecorator )
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::SetNaviPaneDecorator");
- iNaviPaneContext = aDecorator;
- }
-
-// ---------------------------------------------------------------------------
-// Sets navi_pane and activates a tab.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::SetNaviPaneL( const TInt aTabLocation )
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::SetNaviPaneL w/ param BEGIN");
- if ( !iNaviControlContainer )
- {
- CAknViewAppUi* appUi = AppUi();
- if ( appUi )
- {
- CEikStatusPane* sp = appUi->StatusPane();
- iNaviControlContainer = static_cast<CAknNavigationControlContainer*>
- ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
- }
- }
- if ( iNaviPaneContext && ( aTabLocation > 0 ) )
- {
- CAknTabGroup* tabGrp = static_cast <CAknTabGroup*>
- ( iNaviPaneContext->DecoratedControl() );
- tabGrp->SetActiveTabByIndex( aTabLocation );
- iNaviControlContainer->PushL( *iNaviPaneContext );
- }
- else
- {
- iNaviControlContainer->PushDefaultL();
- }
- PSLN_TRACE_DEBUG("CPslnFWBaseView::SetNaviPaneL w/ param END");
- }
-
-// ---------------------------------------------------------------------------
-// Activates the view.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::DoActivateL( const TVwsViewId& aPrevViewId,
- TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/ )
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::DoActivateL END");
- iPrevViewId = aPrevViewId;
- CAknViewAppUi* appUi = AppUi();
- if ( !iContainer )
- {
- CreateContainerL();
- if ( appUi )
- {
- AppUi()->AddToStackL( *this, iContainer );
- }
- iContainer->iListBox->SetListBoxObserver( this );
- }
-
-#ifdef RD_CONTROL_PANEL
- TInt titlePaneResID = KErrNotFound;
- SetTitlePaneL( titlePaneResID );
- // Retrieve title pane and set it.
- CEikStatusPane* sp = iAvkonAppUi->StatusPane();
- if ( sp )
- {
- CAknTitlePane* titlePane = static_cast<CAknTitlePane*>(
- sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
- if ( ( titlePaneResID > KErrNone ) && titlePane )
- {
- HBufC* titlePaneText = NULL;
- titlePaneText = StringLoader::LoadLC( titlePaneResID );
- titlePane->SetTextL( titlePaneText->Des() );
- CleanupStack::PopAndDestroy( titlePaneText );
- }
- }
-#endif //RD_CONTROL_PANEL
-
- PSLN_TRACE_DEBUG("CPslnFWBaseView::DoActivateL END");
- }
-
-// ---------------------------------------------------------------------------
-// Deactivates view.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::DoDeactivate()
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::DoDeactivate BEGIN");
- if ( iContainer )
- {
- CAknViewAppUi* appUi = AppUi();
- if ( appUi )
- {
- appUi->RemoveFromStack( iContainer );
- }
- delete iContainer;
- iContainer = NULL;
- }
- PSLN_TRACE_DEBUG("CPslnFWBaseView::DoDeactivate END");
- }
-
-// ---------------------------------------------------------------------------
-// Sets the real tab location of the view.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::SetTabIndex( TInt aMyTabIndex )
- {
- if ( iNaviPaneContext &&
- IsValidLocation( aMyTabIndex ) )
- {
- CAknTabGroup* tabGrp = static_cast <CAknTabGroup*>
- ( iNaviPaneContext->DecoratedControl() );
- if ( tabGrp && ( tabGrp->TabCount() > aMyTabIndex ) )
- {
- iMyTabIndex = aMyTabIndex;
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Gets the real tab location of the view.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnFWBaseView::GetTabIndex() const
- {
- return iMyTabIndex;
- }
-
-// ---------------------------------------------------------------------------
-// Creates container.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::CreateContainerL()
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::CreateContainerL BEGIN");
- NewContainerL();
- iContainer->SetMopParent( this );
-
- CPslnFWBaseContainer* container = iContainer;
- iContainer = NULL;
- CleanupStack::PushL( container );
- container->ConstructL( ClientRect() );
- CleanupStack::Pop( container );
- iContainer = container;
- PSLN_TRACE_DEBUG("CPslnFWBaseView::CreateContainerL END");
- }
-
-// ---------------------------------------------------------------------------
-// Opens localized resource file from static path.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::OpenLocalizedResourceFileL(
- const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader )
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::OpenLocalizedResourceFileL BEGIN");
- // Find the resource file:
- OpenLocalizedResourceFileL(
- aResourceFileName,
- aResourceLoader,
- &KDC_RESOURCE_FILES_DIR );
- PSLN_TRACE_DEBUG("CPslnFWBaseView::OpenLocalizedResourceFileL END");
- }
-
-// ---------------------------------------------------------------------------
-// Same as above, except this takes resource path from user.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::OpenLocalizedResourceFileL(
- const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader,
- const TDesC* aPath )
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::OpenLocalizedResourceFileL 2 BEGIN");
- // Find the resource file:
- TParse* parse = new (ELeave) TParse;
- CleanupStack::PushL( parse );
- parse->Set( aResourceFileName, aPath, NULL );
- TFileName* fileName = new (ELeave) TFileName( parse->FullName() );
- CleanupStack::PushL( fileName );
-
- // Open resource file:
- aResourceLoader.OpenL( *fileName );
-
- CleanupStack::PopAndDestroy( 2, parse ); // fileName, parse
- PSLN_TRACE_DEBUG("CPslnFWBaseView::OpenLocalizedResourceFileL 2 END");
- }
-
-// ---------------------------------------------------------------------------
-// Sets middle softkey label.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::SetMiddleSoftKeyLabelL(
- const TInt aResourceId, const TInt aCommandId )
- {
- PSLN_TRACE_DEBUG("CPslnFWBaseView::SetMiddleSoftKeyLabelL BEGIN");
- CEikButtonGroupContainer* cbaGroup = Cba();
- if ( cbaGroup )
- {
- HBufC* middleSKText = StringLoader::LoadLC( aResourceId );
- TPtr mskPtr = middleSKText->Des();
- cbaGroup->AddCommandToStackL(
- KPslnMSKControlID,
- aCommandId,
- mskPtr );
- CleanupStack::PopAndDestroy( middleSKText );
- }
- PSLN_TRACE_DEBUG("CPslnFWBaseView::SetMiddleSoftKeyLabelL END");
- }
-
-// ---------------------------------------------------------------------------
-// Handles Help command.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::HandleCommandL( TInt aCommand )
- {
- CAknViewAppUi* appUi = AppUi();
- if ( !appUi )
- {
- User::Leave( KErrNotFound );
- }
- switch( aCommand )
- {
- case EAknCmdHelp:
- case EPslnCmdAppHelp:
- // launch Help
- HlpLauncher::LaunchHelpApplicationL(
- iCoeEnv->WsSession(), appUi->AppHelpContextL());
- break;
- default:
- appUi->HandleCommandL( aCommand );
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Set title pane to a view.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWBaseView::SetTitlePaneL( TInt& /*aResourceId*/ )
- {
- // Empty implementation to be overloaded.
- }
-
-// ----------------------------------------------------------------------------
-// Checks that the location is valid.
-// ----------------------------------------------------------------------------
-//
-TBool CPslnFWBaseView::IsValidLocation( const TInt& aLoc ) const
- {
- TBool retVal = ETrue;
- // First location is always forbidden.
- if ( aLoc == KPslnFWGeneralThemeViewLocation )
- {
- retVal = EFalse;
- }
- return retVal;
- }
-
-//End of File
--- a/psln/PslnFramework/src/PslnFWIconHelper.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,291 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility class to get icons to setting lists and
-* help with loc strings.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "pslnfwiconhelper.h"
-
-// Icons
-#include <AknIconArray.h>
-#include <gulicon.h>
-#include <pslnicon.mbg>
-#include <variatedbitmaps.mbg>
-#include <data_caging_path_literals.hrh>
-
-// Resource loading
-#include <bautils.h>
-#include <barsread.h>
-#include <StringLoader.h>
-#include <ConeResLoader.h>
-
-// Listboxes
-#include <eikclb.h>
-#include <eikclbd.h>
-
-// Skins
-#include <AknsUtils.h>
-#include <aknconsts.h>
-
-// CONSTANTS
-// Location of icon file.
-_LIT( KPslnFWIconFilename, "z:Pslnicon.mbm" );
-// Granularity of icon array.
-const TInt KPslnIconArraySize = 6;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnFWIconHelper::CPslnFWIconHelper()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CPslnFWIconHelper* CPslnFWIconHelper::NewL()
- {
- CPslnFWIconHelper* self = new( ELeave ) CPslnFWIconHelper;
- return self;
- }
-
-// Destructor
-EXPORT_C CPslnFWIconHelper::~CPslnFWIconHelper()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Adds pre- and post-text icons to setting item lists.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWIconHelper::AddIconsToSettingItemsL(
- TBool aAll, TInt aMaxIndexToAdd, CEikTextListBox* aListBox )
- {
- // Check that the given parameters are valid.
- if ( !aAll && aMaxIndexToAdd <= 0 )
- {
- User::Leave( KErrArgument );
- }
-
- CAknIconArray* icons =
- new (ELeave) CAknIconArray( KPslnIconArraySize );
-
- CEikColumnListBox* columnListBox =
- static_cast<CEikColumnListBox*>( aListBox );
-
- CArrayPtr<CGulIcon>* previcons =
- columnListBox->ItemDrawer()->ColumnData()->IconArray();
- if ( previcons )
- {
- previcons->ResetAndDestroy();
- delete previcons;
- previcons = NULL;
- }
- columnListBox->ItemDrawer()->ColumnData()->SetIconArray( icons );
-
- if ( !icons )
- {
- return;
- }
-
- TInt bitmapIndex = 0;
- if ( aAll || aMaxIndexToAdd >= bitmapIndex )
- {
- // 0: Non active (empty bitmap)
- CFbsBitmap *bitmap = new (ELeave) CFbsBitmap;
- User::LeaveIfError(
- bitmap->Create( TSize(0, 0), EColor256 ) );
- icons->AppendL( CGulIcon::NewL( bitmap ) );
- bitmapIndex++;
- }
-
- HBufC* fileName = HBufC::NewLC( KMaxFileName );
- TPtr fileNamePtr = fileName->Des();
- GetIconFilePath( fileNamePtr );
-
- if ( aAll || aMaxIndexToAdd >= bitmapIndex )
- {
- // 1: Active mark
- AddIconL( icons,
- KAknsIIDQgnPropPslnActive,
- fileNamePtr,
- EMbmPslniconQgn_prop_psln_active,
- EMbmPslniconQgn_prop_psln_active_mask );
- bitmapIndex++;
- }
-
- if ( aAll || aMaxIndexToAdd >= bitmapIndex )
- {
- // 2: URL icon (in front of EEL)
- AddIconL( icons,
- KAknsIIDQgnPropLinkEmbdSmall,
- KAvkonVariatedBitmapsFile,
- EMbmVariatedbitmapsQgn_prop_link_embd_small,
- EMbmVariatedbitmapsQgn_prop_link_embd_small_mask );
- bitmapIndex++;
- }
-
- if ( aAll || aMaxIndexToAdd >= bitmapIndex )
- {
- // 3: MMC icon
- AddIconL( icons,
- KAknsIIDQgnIndiMmcAdd,
- fileNamePtr,
- EMbmPslniconQgn_indi_mmc_add,
- EMbmPslniconQgn_indi_mmc_add_mask,
- ETrue );
- bitmapIndex++;
- }
-
- if ( aAll || aMaxIndexToAdd >= bitmapIndex )
- {
- //4: EAknsSrvProtected,
- AddIconL( icons,
- KAknsIIDQgnIndiDrmRightsAdd,
- fileNamePtr,
- EMbmPslniconQgn_indi_drm_rights_add,
- EMbmPslniconQgn_indi_drm_rights_add_mask,
- ETrue );
- bitmapIndex++;
- }
-
- if ( aAll || aMaxIndexToAdd >= bitmapIndex )
- {
- //5: EAknsSrvNoRights
- AddIconL( icons,
- KAknsIIDQgnIndiDrmRightsExpAdd,
- fileNamePtr,
- EMbmPslniconQgn_indi_drm_rights_exp_add,
- EMbmPslniconQgn_indi_drm_rights_exp_add_mask,
- ETrue );
- bitmapIndex++;
- }
-
- if ( aAll || aMaxIndexToAdd >= bitmapIndex )
- {
- //6: EAknsMinorGenericQgnIndiFmgrMsAdd - mass drive
- AddIconL( icons,
- KAknsIIDQgnIndiFmgrMsAdd,
- fileNamePtr,
- EMbmPslniconQgn_indi_fmgr_ms_add,
- EMbmPslniconQgn_indi_fmgr_ms_add_mask,
- ETrue );
- bitmapIndex++;
- }
- CleanupStack::PopAndDestroy( fileName );
- }
-
-// ---------------------------------------------------------------------------
-// Retrieves localized string txt.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CPslnFWIconHelper::GetLocalizedStringLC(
- const TDesC& aPath, TInt aResourceID, CCoeEnv* aCoeEnv )
- {
- RConeResourceLoader resLoader( *aCoeEnv );
- CleanupClosePushL( resLoader );
- // Open resource file:
- TFileName* file = new (ELeave) TFileName( aPath );
- CleanupStack::PushL( file );
- resLoader.OpenL( *file );
- CleanupStack::PopAndDestroy( file );
-
- HBufC* result = StringLoader::LoadL( aResourceID );
- CleanupStack::PopAndDestroy(); // resLoader - it is closed as well
- CleanupStack::PushL( result );
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// Adds icon to an icon array.
-// ---------------------------------------------------------------------------
-//
-void CPslnFWIconHelper::AddIconL(
- CAknIconArray* aIcons,
- const TAknsItemID& aSkinId,
- const TDesC& aFileName,
- TInt aBitmapId,
- TInt aMaskId,
- TBool aColorIcon )
- {
- if ( aColorIcon )
- {
- CFbsBitmap* bitmap = NULL;
- CFbsBitmap* mask = NULL;
- AknsUtils::CreateColorIconL(
- AknsUtils::SkinInstance(),
- aSkinId,
- KAknsIIDQsnIconColors,
- EAknsCIQsnIconColorsCG13,
- bitmap,
- mask,
- aFileName,
- aBitmapId,
- aMaskId,
- KRgbBlack );
- CleanupStack::PushL( bitmap );
- CleanupStack::PushL( mask );
- CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
- CleanupStack::Pop( 2, bitmap ); // bitmap, mask
- CleanupStack::PushL( icon );
- aIcons->AppendL( icon );
- CleanupStack::Pop( icon );
- }
- else
- {
- CFbsBitmap* bitmap = NULL;
- CFbsBitmap* mask = NULL;
- AknsUtils::CreateIconL(
- AknsUtils::SkinInstance(),
- aSkinId,
- bitmap,
- mask,
- aFileName,
- aBitmapId,
- aMaskId );
- CleanupStack::PushL( bitmap );
- CleanupStack::PushL( mask );
- CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
- CleanupStack::Pop( 2, bitmap ); // bitmap, mask
- CleanupStack::PushL( icon );
- aIcons->AppendL( icon );
- CleanupStack::Pop( icon );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Retrieves icon file path.
-// ---------------------------------------------------------------------------
-//
-void CPslnFWIconHelper::GetIconFilePath( TDes& aPath )
- {
- // Find the resource file:
- TParse parse;
- parse.Set( KPslnFWIconFilename, &KDC_APP_BITMAP_DIR, NULL );
- if ( aPath.MaxLength() >= parse.FullName().Length() )
- {
- aPath.Copy( parse.FullName() );
- }
- }
-
-
-// End of File
--- a/psln/PslnFramework/src/PslnFWPluginHandler.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class for plugins containing other plugins.
-*
-*/
-
-
-// INCLUDE FILES
-#include "pslnfwpluginhandler.h"
-#include "PslnDebug.h"
-
-const TInt KPslnFWGeneralThemeViewLocation = 0;
-const TInt KPslnFWWallpaperViewLocation = 3;
-const TInt KPslnFWScreensaverViewLocation = 4;
-
-// ========================= MEMBER FUNCTIONS ================================
-
-// ---------------------------------------------------------------------------
-// CPslnFWPluginHandler::NewL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPslnFWPluginHandler* CPslnFWPluginHandler::NewL(
- CAknViewAppUi* aAppUi, CArrayPtrFlat<CPslnFWPluginInterface>* aPluginArray )
- {
- PSLN_TRACE_DEBUG("CPslnFWPluginHandler::NewL");
- CPslnFWPluginHandler* self =
- new ( ELeave) CPslnFWPluginHandler( aAppUi, aPluginArray );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnFWPluginHandler::CPslnFWPluginHandler()
-// ---------------------------------------------------------------------------
-//
-CPslnFWPluginHandler::CPslnFWPluginHandler(
- CAknViewAppUi* aAppUi, CArrayPtrFlat<CPslnFWPluginInterface>* aPluginArray )
- : iAppUi( aAppUi ), iPluginArray( aPluginArray )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPslnFWPluginHandler::~CPslnFWPluginHandler()
- {
- PSLN_TRACE_DEBUG("CPslnFWPluginHandler::destructor");
- iImplInfoArray.ResetAndDestroy();
- // iPluginArray is not owned, and thus not deleted.
- }
-
-// ---------------------------------------------------------------------------
-// Loads all found plugins.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnFWPluginHandler::LoadPluginsL(
- CArrayPtrFlat<CPslnFWPluginInterface>* aPluginArray )
- {
- PSLN_TRACE_DEBUG("CPslnFWPluginHandler::LoadPluginsL BEGIN");
- if ( iPluginArray )
- {
- iPluginArray = aPluginArray;
- }
- else
- {
- User::Leave( KErrArgument );
- }
-
- REComSession::ListImplementationsL(
- KPslnFWPluginInterfaceUid,
- iImplInfoArray );
-
- // Reset iterator:
- iImplInfoArrayIterator = 0;
-
- LoadNextPlugin();
- PSLN_TRACE_DEBUG("CPslnFWPluginHandler::LoadPluginsL END");
- }
-
-// ---------------------------------------------------------------------------
-// Loads one specific plugin.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPslnFWPluginInterface* CPslnFWPluginHandler::LoadPluginL( const TUid aPluginId )
- {
- PSLN_TRACE_DEBUG("CPslnFWPluginHandler::LoadPluginL BEGIN");
- REComSession::ListImplementationsL(
- KPslnFWPluginInterfaceUid,
- iImplInfoArray );
-
- // Reset iterator:
- iImplInfoArrayIterator = 0;
-
- // Iterate through iImplInfoArray.
- for( ; iImplInfoArrayIterator < iImplInfoArray.Count(); )
- {
- CImplementationInformation* info =
- iImplInfoArray[ iImplInfoArrayIterator ];
- TUid implUid = info->ImplementationUid();
-
- if ( implUid.iUid == aPluginId.iUid )
- {
- // Create a plugin.
- CPslnFWPluginInterface* plugin = CPslnFWPluginInterface::NewL(
- aPluginId,
- iAppUi );
- // Ownership transferred.
- PSLN_TRACE_DEBUG("CPslnFWPluginHandler::LoadPluginL plugin found");
- return plugin;
- }
-
- iImplInfoArrayIterator++;
- }
- PSLN_TRACE_DEBUG("CPslnFWPluginHandler::LoadPluginL END");
- return NULL;
- }
-
-// ---------------------------------------------------------------------------
-// Constructor without array.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPslnFWPluginHandler* CPslnFWPluginHandler::NewL( CAknViewAppUi* aAppUi )
- {
- PSLN_TRACE_DEBUG("CPslnFWPluginHandler::NewL 2");
- CPslnFWPluginHandler* self =
- new ( ELeave) CPslnFWPluginHandler( aAppUi, NULL );
- return self;
- }
-
-// ----------------------------------------------------------------------------
-// Iterate through iImplInfoArray. Load the plugin if it is eligible for
-// loading. Loaded plugin is added to iPluginArray.
-// ----------------------------------------------------------------------------
-//
-void CPslnFWPluginHandler::LoadNextPlugin()
- {
- // Iterate through iImplInfoArray.
- for( ; iImplInfoArrayIterator < iImplInfoArray.Count(); )
- {
- CImplementationInformation* info =
- iImplInfoArray[ iImplInfoArrayIterator ];
- TUid implUid = info->ImplementationUid();
-
- iImplInfoArrayIterator++;
-
- // Load plugin - if it fails, just go to next one.
- TRAP_IGNORE( AppendPluginL( implUid ) );
- }
- }
-
-// ----------------------------------------------------------------------------
-// Inserts plugin to plugin-array.
-// ----------------------------------------------------------------------------
-//
-void CPslnFWPluginHandler::AppendPluginL( const TUid& aImplUid )
- {
- // Create a plugin.
- CPslnFWPluginInterface* plugin = CPslnFWPluginInterface::NewL(
- aImplUid,
- iAppUi );
- CleanupStack::PushL ( plugin );
-
- CPslnFWPluginInterface::TPslnFWLocationType locType =
- CPslnFWPluginInterface::EPslnFWNotSpecified;
- TInt location = KErrNotFound;
- plugin->GetLocationTypeAndIndex( locType, location );
-
-
- // If plugin claims invalid location, OR location is not specified,
- // append to the end.
- if ( IsInvalidLocation( location ) ||
- locType == CPslnFWPluginInterface::EPslnFWNotSpecified )
- {
- if ( iPluginArray )
- {
- iPluginArray->AppendL( plugin );
- }
- }
- else
- {
- CPslnFWPluginInterface* arrayPlugin = NULL;
-
- CPslnFWPluginInterface::TPslnFWLocationType pluginLocType =
- CPslnFWPluginInterface::EPslnFWNotSpecified;
- TInt pluginLoc = KErrNotFound;
- TInt count = iPluginArray->Count();
-
- // Exception - first item, is always appended
- if ( count == 0 )
- {
- iPluginArray->AppendL( plugin );
- }
- else
- {
- // Loop through the plugin array, trying to find best location for the plugin.
- TBool breakLoop = EFalse;
- for ( TInt i = 0; i < count; i++ )
- {
- arrayPlugin = iPluginArray->At( i );
- arrayPlugin->GetLocationTypeAndIndex( pluginLocType, pluginLoc );
- if ( pluginLocType == CPslnFWPluginInterface::EPslnFWNotSpecified )
- {
- // There are no more valid locations, insert here
- iPluginArray->InsertL( i, plugin );
- breakLoop = ETrue;
- }
- if ( pluginLoc == location )
- {
- // Mismatch - plugin location already claimed.
- // Append plugin to last position in the array.
- iPluginArray->AppendL( plugin );
- breakLoop = ETrue;
- }
- else if ( pluginLoc < location )
- {
- // Do nothing go to next inserted plugin
- }
- else
- {
- // This location is best for the new plugin.
- iPluginArray->InsertL( i, plugin );
- breakLoop = ETrue;
- }
- // If plugin has been inserted, or appended, break the loop.
- if ( breakLoop )
- {
- i = count;
- }
- }
- }
- }
-
- // Transfer ownership to array.
- CleanupStack::Pop ( plugin );
- }
-
-// ----------------------------------------------------------------------------
-// Checks if the plugin tries to claim invalid location.
-// ----------------------------------------------------------------------------
-//
-TBool CPslnFWPluginHandler::IsInvalidLocation( const TInt& aLoc ) const
- {
- TBool retVal = ETrue;
- if ( aLoc == KPslnFWGeneralThemeViewLocation ||
- aLoc == KPslnFWWallpaperViewLocation ||
- aLoc == KPslnFWScreensaverViewLocation )
- {
- retVal = EFalse;
- }
- return retVal;
- }
-
-// End of File
--- a/psln/PslnGSPlugin/data/102818EC.rss Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM plugin resource file for PslnGSPlugin.
-*
-*/
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
- {
- dll_uid = 0x102818EC;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x10207236;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x102818ED;
- version_no = 1;
- display_name = "Themes plugin";
- default_data = "0x1020723B"; // Parent UID
-#ifdef RD_CONTROL_PANEL
- opaque_data = "8"; // Order number
-#else
- opaque_data = "3"; // Order number
-#endif // RD_CONTROL_PANEL
- }
- };
- }
- };
- }
-
--- a/psln/PslnGSPlugin/data/PslnGSPluginRsc.rss Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource file for PslnGSPlugin.
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME PSGS // 4 letter ID
-
-// INCLUDES
-#include <pslngsplugin.loc>
-
-#include <data_caging_paths_strings.hrh>
-#include <bldvariant.hrh>
-#include <avkon.loc>
-#include <avkon.mbg>
-#include <avkon.rsg>
-#include <eikcore.rsg>
-#include <uikon.rh>
-
-// CONSTANTS
-
-// RESOURCE DEFINITIONS
-
-//----------------------------------------------------
-//
-//
-// Needed or loading the resource fails!
-//
-//----------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE
- {
- }
-
-//----------------------------------------------------
-//
-// r_psln_gs_plugin_caption
-// Themes Plugin caption.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_gs_plugin_caption
- {
-#ifdef RD_CONTROL_PANEL
- buf = qtn_cp_folder_themes;
-#else
- buf = qtn_set_pers_theme;
-#endif // RD_CONTROL_PANEL
- }
-
-//End of File
--- a/psln/PslnGSPlugin/group/PslnGSPlugin.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project specification file for PslnGSPlugin.
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-CAPABILITY CAP_ECOM_PLUGIN
-TARGET PslnGSPlugin.dll
-TARGETTYPE PLUGIN
-UID 0x10009D8D 0x102818EC
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE PslnGSPlugin.cpp
-SOURCE PslnGSPluginImplementationTable.cpp
-
-
-// This is a SYSTEMINCLUDE macro containing the middleware
-// layer specific include directories
-MW_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE ../inc
-USERINCLUDE ../loc
-
-SOURCEPATH ../data
-
-// ECOM resource definition
-START RESOURCE 102818EC.rss
-TARGET PslnGSPlugin.rsc
-TARGETPATH ECOM_RESOURCE_DIR
-END // ECOM resource definition
-
-// Plugin's own resources.
-START RESOURCE PslnGSPluginRsc.rss
-HEADER
-TARGETPATH RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END // own resource file
-
-LIBRARY aknskins.lib
-LIBRARY apgrfx.lib
-LIBRARY apparc.lib
-LIBRARY avkon.lib
-LIBRARY bafl.lib
-LIBRARY commonengine.lib
-LIBRARY cone.lib
-LIBRARY ecom.lib
-LIBRARY efsrv.lib
-LIBRARY eikcoctl.lib
-LIBRARY eikcore.lib
-LIBRARY euser.lib
-LIBRARY GSEcomPlugin.lib
-LIBRARY GSFramework.lib
-LIBRARY ws32.lib
-
-// End of File
--- a/psln/PslnGSPlugin/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Information required for building PslnGSPlugin.
-*
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../loc/pslngsplugin.loc MW_LAYER_LOC_EXPORT_PATH(pslngsplugin.loc)
-
-PRJ_MMPFILES
-#ifndef TOOLS
-PslnGSPlugin.mmp
-#endif
-
-PRJ_TESTMMPFILES
-
-PRJ_EXTENSIONS
-
-#ifdef RD_CONTROL_PANEL
-START EXTENSION s60/mifconv
-OPTION TARGETFILE pslngsplugin.mif
-OPTION HEADERFILE pslngsplugin.mbg
-OPTION SOURCES -c8,8 qgn_prop_cp_perso_theme.svg
-END
-#endif // RD_CONTROL_PANEL
-
-// End of File
--- a/psln/PslnGSPlugin/inc/PslnGSPlugin.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: PslnGSPlugin implementation.
-*
-*/
-
-#ifndef C_PSLNGSPLUGIN_H
-#define C_PSLNGSPLUGIN_H
-
-#include <gsplugininterface.h>
-#include <aknview.h>
-#include <ConeResLoader.h>
-#include <eikclb.h>
-#include <AknServerApp.h>
-
-class CAknNavigationDecorator;
-class CAknViewAppUi;
-class CAknNullService;
-
-// This plugin's UID.
-const TUid KPslnGSPluginUID = { 0x102818ED };
-
-// CLASS DECLARATION
-
-/**
-* CPslnGSPlugin.
-*
-*
-*
-*/
-class CPslnGSPlugin : public CGSPluginInterface,
- public MAknServerAppExitObserver
- {
- public:
-
- /**
- * Symbian OS two-phased constructor
- * @param aInitParams initialization parameters.
- * @return new instance of CPslnGSPlugin.
- */
- static CPslnGSPlugin* NewL( TAny* aInitParams );
-
- /**
- * Destructor.
- */
- ~CPslnGSPlugin();
-
- /**
- * From CAknView.
- * This view's Id.
- * @return This plugin's UID.
- */
- TUid Id() const;
-
- /**
- * From CGSPluginInterface.
- * @param aCaption this plugin's caption.
- */
- void GetCaptionL( TDes& aCaption ) const;
-
- /**
- * From CGSPluginInterface.
- * @return this plugin's provider category.
- */
- TInt PluginProviderCategory() const;
-
- /**
- * From CGSPluginInterface.
- * @return this plugin's item type.
- */
- TGSListboxItemTypes ItemType();
-
- /**
- * From CGSPluginInterface.
- * @param aKey key name.
- * @param aValue key value.
- */
- void GetValue( const TGSPluginValueKeys aKey,
- TDes& aValue );
-
- /**
- * From CGSPluginInterface.
- * @param aSelectionType selection type.
- */
- void HandleSelection( const TGSSelectionTypes aSelectionType );
-
- /**
- * From CGSPluginInterface.
- * @param aIconType UID Icon type UID of the icon to be created.
- * @return Pointer of the icon. NOTE: Ownership of this icon is
- * transferred to the caller.
- */
- CGulIcon* CreateIconL( const TUid aIconType );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CPslnGSPlugin();
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * From CAknView.
- * This implementation is empty because this class, being just a dialog,
- * does not implement the CAknView finctionality.
- */
- void DoActivateL( const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * From CAknView.
- * This implementation is empty because this class, being just a dialog,
- * does not implement the CAknView finctionality.
- */
- void DoDeactivate();
-
- /**
- * Opens localized resource file.
- */
- void OpenLocalizedResourceFileL(
- const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader );
-
- /**
- * Launches provisioning application.
- */
- void LaunchThemesAppL();
-
- private: // Data
-
- /**
- * Resource loader for this plugin's resources.
- */
- RConeResourceLoader iResources;
-
- /**
- * AVKON NULL Service.
- * Own.
- */
- CAknNullService* iNullService;
- };
-
-#endif // C_PSLNGSPLUGIN_H
-// End of File
--- a/psln/PslnGSPlugin/loc/pslngsplugin.loc Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Localization strings for pslngsplugin.loc
-*
-*/
-
-
-// d: Themes plugin caption.
-// d:
-// l: title_pane_1
-// w:
-// r: 3.1
-//
-#define qtn_set_pers_theme "Theme"
-
-// d: Themes plugin caption in Personalisation folder of Control Panel.
-// d:
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 5.0
-//
-#define qtn_cp_folder_themes "Themes"
-
-// End of File
--- a/psln/PslnGSPlugin/src/PslnGSPlugin.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: PslnGSPlugin implementation.
-*
-*/
-
-
-// GS Framework and this plugin.
-#include "PslnGSPlugin.h"
-#ifdef RD_CONTROL_PANEL
-#include <pslngsplugin.mbg>
-#endif // RD_CONTROL_PANEL
-#include <gsparentplugin.h>
-#include <gscommon.hrh>
-#include <pslngspluginrsc.rsg>
-#include <gsprivatepluginproviderids.h>
-#include <gsfwviewuids.h>
-
-// General services.
-#include <AknNullService.h>
-#include <bautils.h>
-#include <StringLoader.h>
-#include <AknsUtils.h>
-
-// Themes application UID.
-const TUid KPslnThemesAppUid = { 0x10005A32 };
-
-// This application's resource file.
-_LIT( KPslnGSPluginResourceFileName, "z:pslngspluginrsc.rsc" );
-
-#ifdef RD_CONTROL_PANEL
- #ifdef __SCALABLE_ICONS
- // bitmap
- _LIT( KPslnGSPluginIconFileName, "\\resource\\apps\\pslngsplugin.mif");
- #else //__SCALABLE_ICONS
- // svg file
- _LIT( KPslnGSPluginIconFileName, "\\resource\\apps\\pslngsplugin.mbm");
- #endif //__SCALABLE_ICONS
-#endif // RD_CONTROL_PANEL
-
-
-// ========================= MEMBER FUNCTIONS ================================
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CPslnGSPlugin::CPslnGSPlugin() : iResources( *iCoeEnv ), iNullService( NULL )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnGSPlugin::~CPslnGSPlugin()
- {
- iResources.Close();
-
- if ( iNullService )
- {
- delete iNullService;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Symbian OS two-phased constructor
-// ---------------------------------------------------------------------------
-//
-void CPslnGSPlugin::ConstructL()
- {
- BaseConstructL();
-
- OpenLocalizedResourceFileL( KPslnGSPluginResourceFileName, iResources );
- }
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CPslnGSPlugin* CPslnGSPlugin::NewL( TAny* /*aInitParams*/ )
- {
- CPslnGSPlugin* self = new( ELeave ) CPslnGSPlugin();
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::Id
-// -----------------------------------------------------------------------------
-//
-TUid CPslnGSPlugin::Id() const
- {
- return KPslnGSPluginUID;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::DoActivateL
-// -----------------------------------------------------------------------------
-//
-void CPslnGSPlugin::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
- TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/ )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::DoDeactivate
-// -----------------------------------------------------------------------------
-//
-void CPslnGSPlugin::DoDeactivate()
- {
- }
-
-// ========================= From CGSPluginInterface ==================
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::GetCaptionL
-// -----------------------------------------------------------------------------
-//
-void CPslnGSPlugin::GetCaptionL( TDes& aCaption ) const
- {
- HBufC* result = StringLoader::LoadL( R_PSLN_GS_PLUGIN_CAPTION );
- aCaption.Copy( *result );
- delete result;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::PluginProviderCategory
-// -----------------------------------------------------------------------------
-//
-TInt CPslnGSPlugin::PluginProviderCategory() const
- {
- return KGSPluginProviderInternal;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::ItemType()
-// -----------------------------------------------------------------------------
-//
-TGSListboxItemTypes CPslnGSPlugin::ItemType()
- {
- return EGSItemTypeSettingDialog;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::GetValue()
-// -----------------------------------------------------------------------------
-//
-void CPslnGSPlugin::GetValue( const TGSPluginValueKeys /*aKey*/,
- TDes& /*aValue*/ )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::HandleSelection()
-// -----------------------------------------------------------------------------
-//
-void CPslnGSPlugin::HandleSelection(
- const TGSSelectionTypes /*aSelectionType*/ )
- {
- TRAP_IGNORE( LaunchThemesAppL() );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::CreateIconL()
-// -----------------------------------------------------------------------------
-//
-CGulIcon* CPslnGSPlugin::CreateIconL( const TUid aIconType )
- {
- CGulIcon* icon;
-#ifdef RD_CONTROL_PANEL
- if( aIconType == KGSIconTypeLbxItem )
- {
- icon = AknsUtils::CreateGulIconL(
- AknsUtils::SkinInstance(),
- KAknsIIDQgnPropCpPersoTheme,
- KPslnGSPluginIconFileName,
- EMbmPslngspluginQgn_prop_cp_perso_theme,
- EMbmPslngspluginQgn_prop_cp_perso_theme_mask );
- }
- else
- {
- icon = CGSPluginInterface::CreateIconL( aIconType );
- }
-#else
- icon = CGSPluginInterface::CreateIconL( aIconType );
-#endif // RD_CONTROL_PANEL
- return icon;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::OpenLocalizedResourceFileL()
-// -----------------------------------------------------------------------------
-//
-void CPslnGSPlugin::OpenLocalizedResourceFileL(
- const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader )
- {
- // Find the resource file:
- TParse* parse = new (ELeave) TParse;
- CleanupStack::PushL( parse );
- parse->Set( aResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL );
- TFileName* fileName = new (ELeave) TFileName( parse->FullName() );
- CleanupStack::PushL( fileName );
-
- // Open resource file:
- aResourceLoader.OpenL( *fileName );
- CleanupStack::PopAndDestroy( 2, parse ); // fileName, parse
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGSPlugin::LaunchThemesAppL()
-// -----------------------------------------------------------------------------
-//
-void CPslnGSPlugin::LaunchThemesAppL()
- {
- // Get the correct application data
- RWsSession ws;
- User::LeaveIfError( ws.Connect() );
- CleanupClosePushL( ws );
-
- // Find the task with uid
- TApaTaskList taskList(ws);
- TApaTask task = taskList.FindApp( KPslnThemesAppUid );
-
- if ( task.Exists() )
- {
- task.BringToForeground();
- }
- else
- {
- // Launch themes application as embedded.
- if ( iNullService )
- {
- delete iNullService;
- iNullService = NULL;
- }
- iNullService = CAknNullService::NewL( KPslnThemesAppUid, this );
- }
- CleanupStack::PopAndDestroy(); // ws
- }
-
-// End of file
--- a/psln/PslnGSPlugin/src/PslnGSPluginImplementationTable.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* 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: ECOM proxy table for PslnGSPlugin.
-*
-*/
-
-
-// User includes
-#include "PslnGSPlugin.h"
-
-// System includes
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-
-// Constants
-const TImplementationProxy KPslnGSPluginImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( 0x102818ED, CPslnGSPlugin::NewL )
- };
-
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Gate/factory function
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
- TInt& aTableCount )
- {
- aTableCount = sizeof( KPslnGSPluginImplementationTable )
- / sizeof( TImplementationProxy );
- return KPslnGSPluginImplementationTable;
- }
-
-
-// ---------------------------------------------------------------------------
-// E32Dll
-// EKA1 entry point
-//
-// ---------------------------------------------------------------------------
-//
-#ifndef EKA2
-GLDEF_C TInt E32Dll( TDllReason /*aReason*/ )
- {
- return( KErrNone );
- }
-#endif // EKA2
-// End of File
--- a/psln/PslnLibraryLoaders/BWINS/pslnbrowserlaunchloaderU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?GateFunction@@YAPAXXZ @ 1 NONAME ; void * GateFunction(void)
-
--- a/psln/PslnLibraryLoaders/BWINS/pslnprofilesettingsloaderU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?GateFunction@@YAPAXXZ @ 1 NONAME ; void * GateFunction(void)
-
--- a/psln/PslnLibraryLoaders/BWINS/pslnwallpaperutilsloaderU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?GateFunction@@YAPAXXZ @ 1 NONAME ; void * GateFunction(void)
-
--- a/psln/PslnLibraryLoaders/BWINS/pslnxnclientloaderU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?GateFunction@@YAPAXXZ @ 1 NONAME ; void * GateFunction(void)
-
--- a/psln/PslnLibraryLoaders/EABI/pslnbrowserlaunchloaderU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- _Z12GateFunctionv @ 1 NONAME
- _ZTI24CPslnBrowserLaunchLoader @ 2 NONAME ; #<TI>#
- _ZTV24CPslnBrowserLaunchLoader @ 3 NONAME ; #<VT>#
-
--- a/psln/PslnLibraryLoaders/EABI/pslnprofilesettingsloaderU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- _Z12GateFunctionv @ 1 NONAME
- _ZTI26CPslnProfileSettingsLoader @ 2 NONAME ; #<TI>#
- _ZTV26CPslnProfileSettingsLoader @ 3 NONAME ; #<VT>#
-
--- a/psln/PslnLibraryLoaders/EABI/pslnwallpaperutilsloaderU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- _Z12GateFunctionv @ 1 NONAME
- _ZTI25CPslnWallpaperUtilsLoader @ 2 NONAME ; #<TI>#
- _ZTV25CPslnWallpaperUtilsLoader @ 3 NONAME ; #<VT>#
-
--- a/psln/PslnLibraryLoaders/EABI/pslnxnclientloaderU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- _Z12GateFunctionv @ 1 NONAME
- _ZTI19CPslnXNClientLoader @ 2 NONAME ; #<TI>#
- _ZTV19CPslnXNClientLoader @ 3 NONAME ; #<VT>#
-
--- a/psln/PslnLibraryLoaders/group/pslnbrowserlaunchloader.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project PslnBrowserLaunchLoader
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET pslnbrowserlaunchloader.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x10281BA7
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE pslnbrowserlaunchloader.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../pslnengine/inc
-USERINCLUDE ../../Inc
-
-// This is a SYSTEMINCLUDE macro containing the application
-// layer specific include directories
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY ws32.lib
-LIBRARY euser.lib
-LIBRARY eikcore.lib
-LIBRARY apgrfx.lib
-LIBRARY favouritesengine.lib
--- a/psln/PslnLibraryLoaders/group/pslnprofilesettingsloader.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project PslnProfileSettingsLoader
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET pslnprofilesettingsloader.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x10281BA5
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE pslnprofilesettingsloader.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../pslnengine/inc
-USERINCLUDE ../../Inc
-
-// This is a SYSTEMINCLUDE macro containing the application
-// layer specific include directories
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY profileengine.lib
-LIBRARY profileEng.lib
-LIBRARY drmhelper.lib
-#ifdef RD_CONTENTNOTIFICATION
-LIBRARY contentnotification.lib
-#endif //RD_CONTENTNOTIFICATION
-LIBRARY cone.lib
--- a/psln/PslnLibraryLoaders/group/pslnwallpaperutilsloader.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project PslnWallpaperUtilsLoader
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET pslnwallpaperutilsloader.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x10282CE0
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE pslnwallpaperutilsloader.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../pslnengine/inc
-USERINCLUDE ../../Inc
-
-// This is a SYSTEMINCLUDE macro containing the middleware
-// layer specific include directories
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY aknswallpaperutils.lib
--- a/psln/PslnLibraryLoaders/group/pslnxnclientloader.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project PslnXNClientLoader
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET pslnxnclientloader.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x10281BA6
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE pslnxnclientloader.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../pslnengine/inc
-USERINCLUDE ../../inc
-
-// This is a SYSTEMINCLUDE macro containing the middleware
-// layer specific include directories
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY xnclient.lib
--- a/psln/PslnLibraryLoaders/inc/pslnbrowserlaunchloader.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Loads BrowserLaunch dll dynamically.
-*
-*/
-
-
-#ifndef C_PSLNBROWSERLAUNCHLOADER
-#define C_PSLNBROWSERLAUNCHLOADER
-
-#include <e32base.h>
-
-
-/**
-* Interface class for browser launcher library.
-*
-* @lib PslnBrowserLaunchLoader.lib
-* @since Series 60 3.2
-*/
-class MPslnBrowserLaunchLoader
- {
- public:
-
- /**
- * Pure virtual method for launching browser as standalone application.
- *
- */
- virtual void LaunchBrowserStandaloneL( ) = 0;
-
- /**
- * Pure virtual method for cancelling download.
- * @since 3.2
- */
- virtual void CancelDownload() = 0;
-
- };
-
-/**
-* This class is for dynamically loading browserlauncher.dll that
-* allows launching of browser as embedded application.
-*
-* @lib PslnBrowserLaunchLoader.lib
-* @since Series 60 3.2
-*/
-class CPslnBrowserLaunchLoader : public CBase, public MPslnBrowserLaunchLoader
- {
-public:
- /**
- * Two-phased constructor.
- * @return new instance of CPslnBrowserLaunchLoader.
- */
- static CPslnBrowserLaunchLoader* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CPslnBrowserLaunchLoader();
-
- /**
- * Launches browser as standalone application.
- *
- */
- void LaunchBrowserStandaloneL( );
-
- /**
- * Cancels download.
- * @since 3.2
- */
- void CancelDownload();
-
-private:
-
- /**
- * C++ default constructor.
- */
- CPslnBrowserLaunchLoader();
-
- /**
- * Gets browser bookmark folder id.
- */
- TInt GetFolderIdByContextIdL( TUint32 aContextId );
-
-
- };
-
-// Environment gate function
-IMPORT_C TAny* GateFunction();
-
-#endif // C_PSLNBROWSERLAUNCHLOADER
-
-// End of File
--- a/psln/PslnLibraryLoaders/inc/pslnprofilesettingsloader.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Loads ProfileSettingsView.dll dynamically.
-*
-*/
-
-
-#ifndef C_PSLNPROFILESETTINGSLOADER
-#define C_PSLNPROFILESETTINGSLOADER
-
-#include <e32base.h>
-
-class MProfileEngineExtended;
-class MProfileExtended;
-class CDRMHelper;
-/**
-* Interface class for profile settings view.
-*
-* @lib PslnProfileSettingsLoader.lib
-* @since Series 60 3.1
-*/
-class MPslnProfileSettingsLoader
- {
- public:
-
- /**
- * Pure virtual method for setting ringing tone for all profiles.
- * @param aType type of tone (actual ringing tone, or message alert tone).
- * @param aFullName full filename (inc. path) of tone.
- */
- virtual void SetToneForProfilesL( TInt aType, TDes& aFullName ) = 0;
-
- /**
- * Pure virtual method for indicating to the media gallery that
- * there is new sound file available in the gallery.
- * @param aFullPath path and file of the new sound file..
- */
- virtual void IndicateFileUpdationL( const TDesC& aFullPath ) = 0;
- };
-
-/**
-* This class is for dynamically loading ProfilesSettingsView.dll that
-* enables setting of ringing tone for all profiles.
-*
-* @lib PslnProfileSettingsLoader.lib
-* @since Series 60 3.1
-*/
-class CPslnProfileSettingsLoader : public CBase,
- public MPslnProfileSettingsLoader
- {
-public:
- /**
- * Two-phased constructor.
- * @return new instance of CPslnProfileSettingsLoader.
- */
- static CPslnProfileSettingsLoader* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CPslnProfileSettingsLoader();
-
- /**
- * Sets tone for all profiles.
- * @param aType type of tone (actual ringing tone, or message alert tone).
- * @param aFullName full filename (inc. path) of tone.
- */
- void SetToneForProfilesL( TInt aType, TDes& aFullName );
-
- /**
- * Indicates to the media gallery that there is new sound file
- * available in the gallery.
- * @param aFullPath path and file of the new sound file.
- */
- void IndicateFileUpdationL( const TDesC& aFullPath );
-
-private:
-
- /**
- * C++ default constructor.
- */
- CPslnProfileSettingsLoader();
-
- /**
- * Stores the settings to Profiles Engine and adds the file to automated
- * content list and removes the old file from automated content list.
- * @param aProfileEngine The MProfileEngineExtended.
- * @param aProfileId The ID of the profile (NOT an index).
- * @param aType Identifies the tone which is updated.
- * @param aFileName Full path and filename of the tone to be used
- * as the new ringing or alert tone.
- */
- void DoSetProfileToneL( MProfileEngineExtended* aProfileEngine, TInt aProfileId,
- TInt aType, const TDesC& aFileName );
-
- /**
- * Sets the tone to an MProfileExtended instance.
- * @param aProfile The MProfileExtended instance.
- * @param aType Identifies the tone which is updated.
- * @param aFileName The tone file name.
- */
- void SetToneL( MProfileExtended& aProfile,
- TInt aType, const TDesC& aFileName );
-
- /**
- * Reads a tone setting from an MProfileExtended instance.
- * @param aProfile The MProfileExtended instance.
- * @param aType Identifies the tone which is read.
- * @return Returns the tone file name.
- */
- const TDesC& ToneL( MProfileExtended& aProfile,TInt aType );
-
- /**
- * Set Automated content
- * @param aDrmHelper Pointer to Drm helper.
- * @param aType Identifies the type the content.
- * @param aFileName Filename for the content.
- * @return Returns success/fail.
- */
- TInt SetAutomated( CDRMHelper* aDrmHelper,TInt aType,
- const TDesC& aFileName );
- /**
- * Remove Automated content
- * @param aDrmHelper Pointer to Drm helper.
- * @param aFileName Filename for the content.
- */
- void RemoveAutomated( CDRMHelper* aDrmHelper,const TDesC& aFileName );
-
-
-private:
-
-#ifdef RD_CONTENTNOTIFICATION
- /**
- * Array of notification events.
- * Own.
- */
- CArrayFixFlat<CContentNotificationEvent*>* iEventArray;
-#endif // RD_CONTENTNOTIFICATION
- };
-
-// Environment gate function
-IMPORT_C TAny* GateFunction();
-
-#endif // C_PSLNPROFILESETTINGSLOADER
-
-// End of File
--- a/psln/PslnLibraryLoaders/inc/pslnwallpaperutilsloader.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Loads AknsWallpaperUtils dynamically.
-*
-*/
-
-
-#ifndef C_PSLNWALLPAPERUTILSLOADER
-#define C_PSLNWALLPAPERUTILSLOADER
-
-#include <e32base.h>
-#include <coemain.h>
-
-/**
-* Interface class for wallpaper utils library.
-*
-* @lib PslnWallpaperUtilsLoader.lib
-* @since Series 60 3.1
-*/
-class MPslnWallpaperUtilsLoader
- {
- public:
-
- /**
- * Pure virtual method for setting Idle wallpaper.
- * @param aFilename filename of image.
- * @param aCoeEnv coe environment.
- * @param aWaitNoteTextResourceID wait note text if any.
- * @param aWaitNoteResourceID resource ID for wait note, if any.
- * @return error code, or KErrNone.
- */
- virtual TInt SetIdleWallpaper(
- const TDesC& aFilename,
- CCoeEnv* aCoeEnv,
- TInt aWaitNoteTextResourceID = 0,
- TInt aWaitNoteResourceID = 0 ) = 0;
-
- };
-
-/**
-* This class is for dynamically loading AknsWallpaperUtils.dll that
-* enables setting of wallpaper.
-*
-* @lib PslnWallpaperUtilsLoader.lib
-* @since Series 60 3.1
-*/
-class CPslnWallpaperUtilsLoader : public CBase, public MPslnWallpaperUtilsLoader
- {
-public:
- /**
- * Two-phased constructor.
- * @return new instance of CPslnWallpaperUtilsLoader.
- */
- static CPslnWallpaperUtilsLoader* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CPslnWallpaperUtilsLoader();
-
- /**
- * Sets Idle wallpaper.
- * @param aFilename filename of image.
- * @param aCoeEnv coe environment.
- * @param aWaitNoteTextResourceID wait note text if any.
- * @param aWaitNoteResourceID resource ID for wait note, if any.
- * @return error code, or KErrNone.
- */
- TInt SetIdleWallpaper(
- const TDesC& aFilename,
- CCoeEnv* aCoeEnv,
- TInt aWaitNoteTextResourceID = 0,
- TInt aWaitNoteResourceID = 0 );
-
-private:
-
- /**
- * C++ default constructor.
- */
- CPslnWallpaperUtilsLoader();
-
- };
-
-// Environment gate function
-IMPORT_C TAny* GateFunction();
-
-#endif // C_PSLNWALLPAPERUTILSLOADER
-
-// End of File
--- a/psln/PslnLibraryLoaders/inc/pslnxnclientloader.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Loads dynamically XnClient.dll.
-*
-*/
-
-
-#ifndef C_PSLNXNCLIENTLOADER
-#define C_PSLNXNCLIENTLOADER
-
-#include <e32base.h>
-
-class CXnODT;
-class MXnThemeManagementServiceObserver;
-class CXnClient;
-
-/**
-* Interface class for browser launch.
-*
-* @lib PslnXNClientLoader.lib
-* @since Series 60 3.1
-*/
-class MPslnXNClientLoader
- {
- public:
-
- /**
- * Pure virtual method for searching for relevant themes.
- * @param aSearchMask mask to use when searching themes (contains app UID).
- * @param aHeaderList list to append found themes to.
- * @return result of operation
- */
- virtual TXnServiceCompletedMessage GetListHeaders(
- const CXnODT& aSearchMask,
- CArrayPtrFlat<CXnODT>& aHeaderList ) = 0;
-
- /**
- * Pure virtual method for applying active theme.
- * @param aSetMask mask to use when applying theme (contains skin UID).
- * @param aHeader on return this will contain the activated theme info.
- * @return result of operation
- */
- virtual TXnServiceCompletedMessage SetActiveTheme(
- const CXnODT& aSetMask,
- CXnODT& aHeader ) = 0;
-
- /**
- * Pure virtual method for getting the next found theme.
- */
- virtual void GetNextHeader() = 0;
-
- /**
- * Pure virtual method for cancelling theme list query.
- * @return result of operation
- */
- virtual TXnServiceCompletedMessage CancelGetListHeaders() = 0;
-
- /**
- * Pure virtual method for creating the XnClient object.
- * @param aObserver observer for XnClient.
- */
- virtual void CreateClientL(
- MXnThemeManagementServiceObserver& aObserver ) = 0;
- };
-
-/**
-* This class is for dynamically loading ProfilesSettingsView.dll that
-* enables setting of ringing tone for all profiles.
-*
-* @lib PslnXNClientLoader.lib
-* @since Series 60 3.1
-*/
-class CPslnXNClientLoader : public CBase, public MPslnXNClientLoader
- {
-public:
- /**
- * Two-phased constructor.
- * @return new instance of CPslnXNClientLoader.
- */
- static CPslnXNClientLoader* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CPslnXNClientLoader();
-
- /**
- * Searches for relevant application themes.
- * @param aSearchMask mask to use when searching themes (contains app UID).
- * @param aHeaderList list to append found themes to.
- * @return result of operation
- */
- TXnServiceCompletedMessage GetListHeaders(
- const CXnODT& aSearchMask,
- CArrayPtrFlat<CXnODT>& aHeaderList );
-
- /**
- * Applies active theme.
- * @param aSetMask mask to use when applying theme (contains skin UID).
- * @param aHeader on return this will contain the activated theme info.
- * @return result of operation
- */
- TXnServiceCompletedMessage SetActiveTheme(
- const CXnODT& aSetMask,
- CXnODT& aHeader );
-
- /**
- * Gets the next found theme.
- */
- void GetNextHeader();
-
- /**
- * Cancels theme list query.
- * @return result of operation
- */
- TXnServiceCompletedMessage CancelGetListHeaders();
-
- /**
- * Creates the XnClient object.
- * @param aObserver observer for XnClient.
- */
- void CreateClientL(
- MXnThemeManagementServiceObserver& aObserver );
-
-private:
-
- /**
- * C++ default constructor.
- */
- CPslnXNClientLoader();
-
-private:
-
- /**
- * Xuikon client interface for applying theme changes.
- * Own.
- */
- CXnClient* iXknClient;
-
- };
-
-// Environment gate function
-IMPORT_C TAny* GateFunction( TAny* aObserver );
-
-#endif // C_PSLNXNCLIENTLOADER
-
-// End of File
--- a/psln/PslnLibraryLoaders/src/pslnbrowserlaunchloader.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Loads browser launcher dynamically.
-*
-*/
-
-
-#include <e32base.h>
-#include <w32std.h>
-#include <apgcli.h>
-#include <apgtask.h>
-#include <FavouritesDb.h>
-
-#include "pslnbrowserlaunchloader.h"
-#include "PslnConst.h"
-
-//Browser UID
-const TUid KUidBrowser = { 0x10008D39 };
-const TInt KPslnBrowserParamLen = 20;
-_LIT( KPslnBrowserPrefix, "6 " );
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnBrowserLaunchLoader::CPslnBrowserLaunchLoader()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CPslnBrowserLaunchLoader* CPslnBrowserLaunchLoader::NewL()
- {
- CPslnBrowserLaunchLoader* self =
- new( ELeave ) CPslnBrowserLaunchLoader();
-
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnBrowserLaunchLoader::~CPslnBrowserLaunchLoader()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Launch browser as standalone application.
-// ---------------------------------------------------------------------------
-//
-void CPslnBrowserLaunchLoader::LaunchBrowserStandaloneL( )
- {
-
- HBufC* param = HBufC::NewLC( KPslnBrowserParamLen );
- param->Des().Copy( KPslnBrowserPrefix );
- TInt folderid = GetFolderIdByContextIdL( KFavouritesSkinContextId );
- param->Des().AppendNum( folderid );
-
- RWsSession wsSession;
- User::LeaveIfError( wsSession.Connect() );
- CleanupClosePushL<RWsSession>( wsSession );
- TApaTaskList taskList( wsSession );
- TApaTask task = taskList.FindApp( KUidBrowser );
-
- if ( task.Exists() )
- {
- HBufC8* param8 = HBufC8::NewLC( param->Length() );
- param8->Des().Append( param->Des() );
- task.SendMessage( TUid::Uid( 0 ), *param8 ); // Uid is not used
- CleanupStack::PopAndDestroy( param8 );
- }
- else
- {
- RApaLsSession appArcSession;
- User::LeaveIfError( appArcSession.Connect() );
- CleanupClosePushL<RApaLsSession>( appArcSession );
- TThreadId id;
- appArcSession.StartDocument( *param, KUidBrowser , id );
- CleanupStack::PopAndDestroy(); // appArcSession
- }
-
- CleanupStack::PopAndDestroy( 2 ); // param,wsSession
- }
-
-// ---------------------------------------------------------------------------
-// Cancel download.
-// ---------------------------------------------------------------------------
-//
-void CPslnBrowserLaunchLoader::CancelDownload()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Gets browser bookmark folder id.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnBrowserLaunchLoader::GetFolderIdByContextIdL( TUint32 aContextId )
- {
- TInt folder = KFavouritesNullUid;
- if ( aContextId != (TUint32)KFavouritesNullContextId )
- {
- CArrayFix<TInt>* uids = new (ELeave) CArrayFixFlat<TInt>( 1 );
- CleanupStack::PushL( uids );
-
- RFavouritesDb db;
- RFavouritesSession iFavouritesSess;
- User::LeaveIfError( iFavouritesSess.Connect() );
- CleanupClosePushL<RFavouritesSession>( iFavouritesSess );
- User::LeaveIfError( db.Open( iFavouritesSess, KBrowserBookmarks ) );
- CleanupClosePushL<RFavouritesDb>( db );
- User::LeaveIfError( db.GetUids( *uids, KFavouritesNullUid,
- CFavouritesItem::EFolder, NULL, aContextId ) );
-
- if( uids->Count() > 0 )
- {
- folder = uids->At( 0 );
- }
- CleanupStack::PopAndDestroy( 3 ); // db,iFavouritesSess,uids
- }
- return folder;
- }
-
-//----------------------------------------------------------------------------
-// Launcher gate function
-//----------------------------------------------------------------------------
-EXPORT_C TAny* GateFunction()
- {
- CPslnBrowserLaunchLoader* launcher = NULL;
- TRAPD( err, launcher = CPslnBrowserLaunchLoader::NewL() );
- if( err != KErrNone )
- {
- return NULL;
- }
-
- return launcher;
- }
-
-// End of File
--- a/psln/PslnLibraryLoaders/src/pslnprofilesettingsloader.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,292 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wrapper for media gallery and profiles libraries.
-*
-*/
-
-#include <MProfile.h>
-#include <MProfileTones.h>
-#include <MProfilesNamesArray.h>
-#include <MProfileEngineExtended.h>
-#include <MProfileSetExtraTones.h>
-#include <MProfileSetTones.h>
-#include <MProfileExtended.h>
-#include <MProfileName.h>
-
-#include <DRMHelper.h>
-
-#ifdef RD_CONTENTNOTIFICATION
-#include <contentnotification.hrh>
-#include <contentcreatedevent.h>
-#include <contentnotification.h>
-#endif //RD_CONTENTNOTIFICATION
-#include <coemain.h>
-
-#include "pslnprofilesettingsloader.h"
-#include "PslnConst.h"
-
-#ifdef RD_CONTENTNOTIFICATION
-const TInt KPslnEventArraySize = 2;
-#endif // RD_CONTENTNOTIFICATION
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnProfileSettingsLoader::CPslnProfileSettingsLoader()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CPslnProfileSettingsLoader* CPslnProfileSettingsLoader::NewL()
- {
- CPslnProfileSettingsLoader* self =
- new( ELeave ) CPslnProfileSettingsLoader();
-
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnProfileSettingsLoader::~CPslnProfileSettingsLoader()
- {
-#ifdef RD_CONTENTNOTIFICATION
- if ( iEventArray )
- {
- iEventArray->Delete( 0 );
- iEventArray->Reset();
- }
- delete iEventArray;
-#endif // RD_CONTENTNOTIFICATION
- }
-
-// ---------------------------------------------------------------------------
-// Sets tone for all profiles.
-// ---------------------------------------------------------------------------
-//
-void CPslnProfileSettingsLoader::SetToneForProfilesL(
- TInt aType, TDes& aFullName )
- {
- MProfileEngineExtended* profileEngine = CreateProfileEngineExtendedL();
- CleanupReleasePushL( *profileEngine );
- MProfilesNamesArray* profileArray = profileEngine->ProfilesNamesArrayLC();
-
- TInt arrayCount( profileArray->MdcaCount() );
- TInt arrayIndex( 0 );
- TInt profileId( 0 );
- TInt activeId( profileEngine->ActiveProfileId() );
-
- while( arrayIndex < arrayCount )
- {
- profileId = profileArray->ProfileName( arrayIndex )->Id();
- // Updating of the active profile will be done last to make sure that
- // UI gets the new value of the ringing tone if settings view is active
- // and it is containing settings of another than active profile
- if( profileId != activeId )
- {
- TRAPD(r, DoSetProfileToneL( profileEngine, profileId, aType, aFullName ));
- // Filter situation when profile is not allowed to be changed
- // e.g. Drive-profile
- if( ( r != KErrNone ) && ( r != KErrAccessDenied ) )
- {
- User::Leave( r );
- }
- }
- arrayIndex ++;
- }
-
- // Update the active profile:
- TRAPD(r, DoSetProfileToneL( profileEngine, activeId, aType, aFullName ));
- if( ( r != KErrNone ) && ( r != KErrAccessDenied ) )
- {
- User::Leave( r );
- }
- CleanupStack::PopAndDestroy( 2 ); //profileEngine,profileArray
- }
-
-// ---------------------------------------------------------------------------
-// Do Sets tone for all profiles.
-// ---------------------------------------------------------------------------
-//
-void CPslnProfileSettingsLoader::DoSetProfileToneL( MProfileEngineExtended* aProfileEngine,
- TInt aProfileId, TInt aType,const TDesC& aFileName )
- {
- MProfileExtended* profile = aProfileEngine->ProfileLC( aProfileId );
- CDRMHelper* drmHelper = CDRMHelper::NewLC();
-
- // Get the old tone in order to remove it from the automated content list
- TFileName oldTone( ToneL( *profile, aType ) );
-
- // Replace the old tone with the new tone
- SetToneL( *profile, aType, aFileName );
-
- // Commit changes. Write the new settings to the Profiles Engine
- aProfileEngine->CommitChangeL( *profile );
-
- // Register file as automated content
- TInt err( SetAutomated( drmHelper, aType, aFileName ) );
- if( err == KErrNone )
- {
- // Remove old tone from the automated content list
- RemoveAutomated( drmHelper,oldTone );
- }
- else
- {
- // Put the old tone back into Profiles:
- TRAP_IGNORE(
- SetToneL( *profile, aType, oldTone );
- aProfileEngine->CommitChangeL( *profile );
- );
- }
-
- CleanupStack::PopAndDestroy( 2 ); // profile,drmHelper
- }
-
-// ---------------------------------------------------------------------------
-// SetTones.
-// ---------------------------------------------------------------------------
-//
-void CPslnProfileSettingsLoader::SetToneL( MProfileExtended& aProfile,
- TInt aType, const TDesC& aFileName )
- {
- MProfileSetTones& setTones = aProfile.ProfileSetTones();
- switch ( aType )
- {
- case EAknsMinorSoundRingingTone:
- setTones.SetRingingTone1L( aFileName );
- break;
- case EAknsMinorSoundMessageAlert:
- setTones.SetMessageAlertToneL( aFileName );
- break;
- default:
- User::Leave( KErrArgument );
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Read Tones.
-// ---------------------------------------------------------------------------
-//
-const TDesC& CPslnProfileSettingsLoader::ToneL( MProfileExtended& aProfile,
- TInt aType )
- {
- const MProfileTones& tones = aProfile.ProfileTones();
- switch ( aType )
- {
- case EAknsMinorSoundRingingTone:
- {
- return tones.RingingTone1();
- }
- case EAknsMinorSoundMessageAlert:
- {
- return tones.MessageAlertTone();
- }
- default:
- User::Leave( KErrArgument );
- break;
- }
- return KNullDesC;
- }
-
-// -----------------------------------------------------------------------------
-// SetAutomated
-// -----------------------------------------------------------------------------
-//
-TInt CPslnProfileSettingsLoader::SetAutomated( CDRMHelper* aDrmHelper,TInt aType,
- const TDesC& aFileName )
- {
- switch ( aType )
- {
- case EAknsMinorSoundRingingTone:
- aDrmHelper->SetAutomatedType( CDRMHelper::EAutomatedTypeRingingTone );
- break;
- case EAknsMinorSoundMessageAlert:
- aDrmHelper->SetAutomatedType( CDRMHelper::EAutomatedTypeMessageAlert );
- break;
- default:
- aDrmHelper->SetAutomatedType( CDRMHelper::EAutomatedTypeOther );
- }
- return aDrmHelper->SetAutomatedSilent( aFileName, EFalse );
- }
-
-// -----------------------------------------------------------------------------
-// RemoveAutomated
-// -----------------------------------------------------------------------------
-//
-void CPslnProfileSettingsLoader::RemoveAutomated( CDRMHelper* aDrmHelper,const TDesC& aFileName )
- {
- aDrmHelper->RemoveAutomatedPassive( aFileName ); // ignore return value
- }
-
-// ---------------------------------------------------------------------------
-// Indicates to the Media Gallery that new file has been copied.
-// ---------------------------------------------------------------------------
-//
-void CPslnProfileSettingsLoader::IndicateFileUpdationL( const TDesC& aFullPath )
- {
- // Notice: this code is used to avoid the building warning!
- aFullPath.Length();
-#ifdef RD_CONTENTNOTIFICATION
- CContentNotification* notifier = CContentNotification::NewL();
- CleanupStack::PushL( notifier );
-
- if ( iEventArray )
- {
- iEventArray->Delete( 0 );
- iEventArray->Reset();
- delete iEventArray;
- iEventArray = NULL;
- }
-
- iEventArray =
- new CArrayFixFlat<CContentNotificationEvent*>(KPslnEventArraySize);
-
- // Nofication about new content
- CContentNotificationEvent* event =
- CContentCreatedEvent::NewL( aFullPath );
- CleanupStack::PushL( event );
- iEventArray->AppendL( event );
- CleanupStack::Pop( event ); // array owns the event
-
- // Send all notification event with one call
- User::LeaveIfError( notifier->SendNotification( iEventArray->Array() ) );
- delete event;
- event = NULL;
- CleanupStack::PopAndDestroy( notifier );
-#endif //RD_CONTENTNOTIFICATION
- }
-
-//----------------------------------------------------------------------------
-// Launcher gate function
-//----------------------------------------------------------------------------
-EXPORT_C TAny* GateFunction()
- {
- CPslnProfileSettingsLoader* launcher = NULL;
- TRAPD( err, launcher = CPslnProfileSettingsLoader::NewL() );
- if( err != KErrNone )
- {
- return NULL;
- }
- return launcher;
- }
-
-// End of File
--- a/psln/PslnLibraryLoaders/src/pslnwallpaperutilsloader.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wrapper dll for wallpaperutils.dll.
-*
-*/
-
-#include <AknsWallpaperUtils.h>
-
-#include "pslnwallpaperutilsloader.h"
-#include "PslnConst.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnWallpaperUtilsLoader::CPslnWallpaperUtilsLoader()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CPslnWallpaperUtilsLoader* CPslnWallpaperUtilsLoader::NewL()
- {
- CPslnWallpaperUtilsLoader* self =
- new( ELeave ) CPslnWallpaperUtilsLoader();
-
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnWallpaperUtilsLoader::~CPslnWallpaperUtilsLoader()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Set idle wallpaper.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnWallpaperUtilsLoader::SetIdleWallpaper(
- const TDesC& aFilename,
- CCoeEnv* aCoeEnv,
- TInt aWaitNoteTextResourceID,
- TInt aWaitNoteResourceID )
- {
- return AknsWallpaperUtils::SetIdleWallpaper(
- aFilename,
- aCoeEnv,
- aWaitNoteTextResourceID,
- aWaitNoteResourceID );
- }
-
-//----------------------------------------------------------------------------
-// Launcher gate function
-//----------------------------------------------------------------------------
-EXPORT_C TAny* GateFunction()
- {
- CPslnWallpaperUtilsLoader* launcher = NULL;
- TRAPD( err, launcher = CPslnWallpaperUtilsLoader::NewL() );
- if( err != KErrNone )
- {
- return NULL;
- }
-
- return launcher;
- }
-
-// End of File
--- a/psln/PslnLibraryLoaders/src/pslnxnclientloader.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: XnClient.DLL wrapper.
-*
-*/
-
-
-#include <XnClient.h>
-
-#include "PslnXNClientLoader.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnXNClientLoader::CPslnXNClientLoader()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CPslnXNClientLoader* CPslnXNClientLoader::NewL()
- {
- CPslnXNClientLoader* self =
- new( ELeave ) CPslnXNClientLoader();
-
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnXNClientLoader::~CPslnXNClientLoader()
- {
- delete iXknClient;
- }
-
-//----------------------------------------------------------------------------
-// Launcher gate function
-//----------------------------------------------------------------------------
-TXnServiceCompletedMessage CPslnXNClientLoader::GetListHeaders(
- const CXnODT& aSearchMask, CArrayPtrFlat<CXnODT>& aHeaderList )
- {
- return iXknClient->XnGetListHeaders( aSearchMask, aHeaderList );
- }
-
-//----------------------------------------------------------------------------
-// Launcher gate function
-//----------------------------------------------------------------------------
-TXnServiceCompletedMessage CPslnXNClientLoader::SetActiveTheme(
- const CXnODT& aSetMask, CXnODT& aHeader )
- {
- return iXknClient->XnSetActiveTheme( aSetMask, aHeader );
- }
-
-//----------------------------------------------------------------------------
-// Launcher gate function
-//----------------------------------------------------------------------------
-void CPslnXNClientLoader::GetNextHeader()
- {
- iXknClient->XnGetNextHeader();
- }
-
-//----------------------------------------------------------------------------
-// Launcher gate function
-//----------------------------------------------------------------------------
-TXnServiceCompletedMessage CPslnXNClientLoader::CancelGetListHeaders()
- {
- return iXknClient->XnCancelGetListHeaders();
- }
-
-//----------------------------------------------------------------------------
-// Create client.
-//----------------------------------------------------------------------------
-void CPslnXNClientLoader::CreateClientL(
- MXnThemeManagementServiceObserver& aObserver )
- {
- iXknClient = CXnClient::NewL( aObserver );
- }
-
-//----------------------------------------------------------------------------
-// Launcher gate function
-//----------------------------------------------------------------------------
-EXPORT_C TAny* GateFunction()
- {
- CPslnXNClientLoader* launcher = NULL;
- TRAPD( err, launcher = CPslnXNClientLoader::NewL() );
- if( err != KErrNone )
- {
- return NULL;
- }
-
- return launcher;
- }
-
-// End of File
--- a/psln/Rss/Psln.rss Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1006 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource definitions for project psln
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME PSLN // 4 letter ID
-
-// INCLUDES
-
-// Resource types
-#include <eikon.rh>
-#include <avkon.rh>
-#include <appinfo.rh>
-
-// Compiled resources
-#include <avkon.rsg>
-#include <eikcore.rsg>
-#include <eikon.rsg>
-#include <pslncommon.rsg>
-
-// Graphics
-#include <avkon.mbg>
-
-// Commands etc.
-#include <AvkonIcons.hrh>
-#include <data_caging_paths_strings.hrh>
-
-// Localized texts.
-#include <avkon.loc>
-#include <drmcommon.loc>
-
-#include "psln.hrh"
-#include <psln.loc>
-
-// RESOURCE DEFINITIONS
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF { buf=""; }
-
-// -----------------------------------------------------------------------------
-//
-// EIK_APP_INFO
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
- {
- status_pane = r_psln_status_pane;
- }
-
-RESOURCE LOCALISABLE_APP_INFO r_psln_localisable_app_info
- {
- short_caption = qtn_apps_skins_grid;
- caption_and_icon =
- CAPTION_AND_ICON_INFO
- {
- caption = qtn_apps_skins_list;
- number_of_icons = 1;
- icon_file = APP_BITMAP_DIR"\\psln_aif.mif";
- };
- }
-
-// **COMMON RESOURCES
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_skins_loading_image
-// Wait note text when loading image.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_skins_loading_image
- {
- buf = qtn_skins_loading_image;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_general_wait_note
-// General wait note
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_psln_general_wait_note
- {
- flags = EAknWaitNoteFlags;
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = EPslnGeneralWaitNote;
- control= AVKON_NOTE
- {
- layout = EWaitLayout;
- imagefile = AVKON_ICON_FILE;
- imageid = EMbmAvkonQgn_note_progress;
- imagemask = EMbmAvkonQgn_note_progress_mask;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_image_corrupted
-// Image corrupted information note.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_image_corrupted
- {
- buf = qtn_skins_image_format_wrong;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_confirm_active_skin_string
-// Text in a note when activating a theme.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_confirm_active_skin_string
- {
- buf = qtn_skins_theme_act_note;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_screen_saver_default_text
-// Name of text screensaver.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_screen_saver_default_text
- {
- buf = qtn_sanim_text_default;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_confirm_query
-// General confirmation query.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_psln_confirm_query
- {
- flags = EGeneralQueryFlags;
-
- buttons = R_AVKON_SOFTKEYS_YES_NO;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control= AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- };
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_screen_saver_text_query_dialog
-// Screen saver text query dialog.
-// Note that for APAC variant, the dialog maxlength is set dynamically.
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_psln_screen_saver_text_query_dialog
- {
- flags = EAknDialogGenericQueryFlags | EEikDialogFlagNoShadow;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_DATA_QUERY
- {
- layout = EDataLayout;
- label = qtn_sanim_object_text_promt;
- control = EDWIN
- {
- flags = EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks;
- width = 5;
- lines = 1;
- maxlength = 15;
- avkon_flags = EAknEditorFlagEnablePictographInput;
- default_input_mode = EAknEditorTextInputMode;
- };
- };
- }
- };
- }
-
-// **General theme VIEW
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_skin_list_view_title
-// Skin list view's title.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TITLE_PANE r_psln_skin_list_view_title
- {
- txt = qtn_skins_title;
- }
-
-// **SCREEN SAVER SETTING PAGE
-
-// -----------------------------------------------------------------------------
-//
-// r_screen_saver_setting_page_lbx
-// Screen saver setting page's listbox.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_screen_saver_setting_page_lbx
- {
- items =
- {
- LBUF { txt = qtn_sanim_object_none; },
- LBUF { txt = qtn_sanim_object_date; },
- LBUF { txt = qtn_sanim_object_text; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_drm_prev_rights_set
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_drm_prev_rights_set
- {
- buf = qtn_drm_prev_rights_set;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_memlo_ram_out_of_mem
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_memlo_ram_out_of_mem
- {
- buf = qtn_memlo_ram_out_of_mem;
- }
-
-// **EMBEDDED LINKS
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_skins_download_skins
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_skins_download_skins
- {
- buf = qtn_skins_download_skins;
- }
-
-// **OPENING NOTE
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_gen_note_opening
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_gen_note_opening
- {
- buf = qtn_gen_note_opening;
- }
-
-// **SKIN CORRUPTED NOTE
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_skins_error_corrupted
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_skins_error_corrupted
- {
- buf = qtn_skins_error_corrupted;
- }
-
-// **SOUNDS IN SKINS
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_skins_query_activate_tone
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_skins_query_activate_tone
- {
- buf = qtn_skins_query_activate_tone;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_skins_query_activate_tones
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_skins_query_activate_tones
- {
- buf = qtn_skins_query_activate_tones;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_skins_note_tone_activated
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_skins_note_tone_activated
- {
- buf = qtn_skins_note_tone_activated;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_skins_note_tones_activated
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_skins_note_tones_activated
- {
- buf = qtn_skins_note_tones_activated;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_profiles_info_tone_no_drm
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_profiles_info_tone_no_drm
- {
- buf = qtn_profiles_info_tone_no_drm;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_qtn_file_format_error
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_file_format_error
- {
- buf = text_not_done;
- }
-
-//*** APPLICATION SPECIFIC SKINS ***
-// -----------------------------------------------------------------------------
-//
-// r_psln_main_view
-// Main view.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_psln_main_view
- {
- menubar = r_psln_main_view_menubar;
-#ifdef RD_CONTROL_PANEL
- cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
-#else
- cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
-#endif //RD_CONTROL_PANEL
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_wallpaper_view
-// Wallpaper editing view.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_psln_wallpaper_view
- {
- menubar = r_psln_wallpaper_menubar;
- cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_screensaver_view
-// Screen saver editing view.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_psln_screensaver_view
- {
- menubar = r_psln_ss_view_menubar;
- cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_general_view
-// General theme view.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_psln_general_view
- {
- menubar = r_psln_gen_view_menubar;
- cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_gen_view_menubar
-// Options menu with 'Download', 'Activate', 'Help' and 'Exit' items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_psln_gen_view_menubar
- {
- titles =
- {
- MENU_TITLE { menu_pane = r_psln_basic_menupane; },
- MENU_TITLE { menu_pane = r_psln_transition_effects_menu_pane; },
-// MENU_TITLE { menu_pane = r_psln_anim_background_menu_pane; },
- MENU_TITLE { menu_pane = R_PSLN_GEN_VIEW_MENUPANE; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_ss_view_menubar
-// Options menu with
-// 'Apply', 'Change', 'Settings', 'Help' and 'Exit' items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_psln_ss_view_menubar
- {
- titles =
- {
- MENU_TITLE { menu_pane = r_psln_basic_menupane; },
- MENU_TITLE { menu_pane = r_psln_ss_view_menupane; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_main_view_menubar
-// Options menu with 'Open', 'Help' and 'Exit' items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_psln_main_view_menubar
- {
- titles =
- {
- MENU_TITLE { menu_pane = r_psln_basic_menupane; },
- MENU_TITLE { menu_pane = r_psln_main_view_menupane; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_main_view_menupane
-// Menu pane for main view. Contains 'Open' item.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_main_view_menupane
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdAppOpen;
- txt = qtn_options_open;
- flags = EEikMenuItemAction;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_ss_view_menupane
-// Menu pane for screen saver editing view.
-// Contains 'Apply', 'Change', 'Preview' and 'Settings' items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_ss_view_menupane
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdAppSetScreenSaver;
- txt = qtn_skins_option_set;
- flags = EEikMenuItemAction;
- },
- MENU_ITEM
- {
- command = EPslnCmdAppChangeScreenSaver;
- txt = qtn_options_change;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EPslnCmdPreviewScreenSaver;
- txt = qtn_skins_option_preview;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EPslnCmdAppSettings;
- txt = qtn_skins_options_ss_settings;
- flags = EEikMenuItemSpecific;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_basic_menupane
-// Menu pane for main view.
-// Contains 'Help' and 'Exit' items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_basic_menupane
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdAppHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_options_exit;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_prop_view_lbx
-// General attribute view's listbox.
-// "0\tTextLabel\t1\t2"
-// -----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_psln_main_view_lbx
- {
- items =
- {
- LBUF { txt = "0\t"qtn_skins_title_general"\t\t"; },
- LBUF { txt = "1\t"qtn_skins_title_wallpaper"\t\t"; },
- LBUF { txt = "2\t"qtn_skins_title_screensaver"\t\t"; }
- };
- }
-
-//----------------------------------------------------
-//
-// The status pane for Psln application
-//
-//----------------------------------------------------
-//
-RESOURCE STATUS_PANE_APP_MODEL r_psln_status_pane
- {
- panes =
- {
-#ifndef RD_CONTROL_PANEL
- SPANE_PANE
- {
- id = EEikStatusPaneUidNavi;
- type = EAknCtNaviPane;
- resource = r_psln_navi_decorator;
- }
- ,
- SPANE_PANE
- {
- id = EEikStatusPaneUidTitle;
- type = EAknCtTitlePane;
- resource = r_psln_default_title_pane;
- }
-#endif // RD_CONTROL_PANEL
- };
- }
-
-//----------------------------------------------------
-//
-// The navi decorator for Psln application
-// Defines application views tabs - by default has only
-// one tab item. Others are added dynamically.
-//
-//----------------------------------------------------
-//
-RESOURCE NAVI_DECORATOR r_psln_navi_decorator
- {
- type = ENaviDecoratorControlTabGroup;
- control = TAB_GROUP
- {
- tab_width = EAknTabWidthWithThreeLongTabs;
- tabs =
- {
- TAB
- {
- id = 0;
- txt = qtn_skins_tabs_general;
- }
- };
- };
- }
-
-//----------------------------------------------------
-//
-// Wallpaper view's tab item.
-//
-//----------------------------------------------------
-//
-RESOURCE TAB r_psln_wallpaper_tab
- {
- id = 3;
- txt = qtn_skins_tabs_wallpaper;
- }
-
-//----------------------------------------------------
-//
-// Screensaver view's tab item.
-//
-//----------------------------------------------------
-//
-RESOURCE TAB r_psln_screensaver_tab
- {
- id = 4;
- txt = qtn_skins_tabs_screensaver;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_wp_view_lbx
-// General attribute view's listbox.
-// "0\tTextLabel\t1\t2"
-// Note that icons need to be added in source code.
-// -----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_psln_wp_view_lbx
- {
- items =
- {
- LBUF { txt = qtn_skins_settings_default"\t\t"; },
- LBUF { txt = qtn_skins_settings_wp_image"\t\t"; }
-#ifdef RD_SLIDESHOW_WALLPAPER
- ,
- LBUF { txt = qtn_skins_wp_slide_set"\t\t"; }
-#endif // RD_SLIDESHOW_WALLPAPER
-
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_plugin_default_view_lbx
-// Note that icons need to be added in source code.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_psln_plugin_default_view_lbx
- {
- items =
- {
- LBUF { txt = "0\t"qtn_skins_download_skins"\t\t"; },
- LBUF { txt = qtn_skins_list_general_theme"\t\t"; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_image_too_large
-// Image corrupted information note.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_image_too_large
- {
- buf = qtn_skins_image_too_large;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_msk_open
-// Middle softkey label: open.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_msk_open
- {
- buf = qtn_msk_open;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_msk_activate
-// Middle softkey label: activate.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_msk_activate
- {
- buf = qtn_msk_activate;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_msk_select
-// Middle softkey label: select.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_msk_select
- {
- buf = qtn_msk_select;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_wallpaper_menubar
-// Options menu with 'Apply', 'Change', 'Help' and 'Exit' items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_psln_wallpaper_menubar
- {
- titles =
- {
- MENU_TITLE { menu_pane = r_psln_basic_menupane; },
- MENU_TITLE { menu_pane = r_psln_wallpaper_menupane; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_wallpaper_menupane
-// Menu pane with 'Apply' and 'Change' items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_wallpaper_menupane
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdAppSetWallpaper;
- txt = qtn_skins_option_activate;
- flags = EEikMenuItemAction;
- },
- MENU_ITEM
- {
- command = EPslnCmdAppChangeWallpaper;
- txt = qtn_options_change;
- flags = EEikMenuItemSpecific;
- }
-#ifdef RD_SLIDESHOW_WALLPAPER
- ,
- MENU_ITEM
- {
- command = EPslnCmdWallpaperConfigure;
- txt = qtn_skins_option_wp_settings;
- flags = EEikMenuItemSpecific;
- }
-#endif // RD_SLIDESET_WALLPAPER
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_msk_change
-// Middle softkey label: change.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_msk_change
- {
- buf = qtn_msk_change;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_msk_dummy
-// Middle softkey label: empty.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_msk_dummy
- {
- buf = "";
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_transition_effects_menu_pane
-// Transition effects Options menu item.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_transition_effects_menu_pane
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdTransitionEffectsSubMenuOpen;
- txt = qtn_skins_option_effects;
- cascade = r_psln_transition_effects_cascade_menu;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_transition_effects_cascade_menu
-// Transition effects Options cascade menu items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_transition_effects_cascade_menu
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdTransitionEffectsActivate;
- txt = qtn_skins_option_effects_on;
- flags = EEikMenuItemRadioStart | EEikMenuItemSymbolOn;
- },
- MENU_ITEM
- {
- command = EPslnCmdTransitionEffectsDeactivate;
- txt = qtn_skins_option_effects_off;
- flags = EEikMenuItemRadioEnd;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_wp_image_changed_note
-// Text for note when wallpaper image has been changed.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_wp_image_changed_note
- {
- buf = qtn_skins_note_image_changed;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_not_enough_memory
-// Text for error note when there is not enough memory to perform the operation.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_not_enough_memory
- {
- buf = qtn_memlo_ram_out_of_mem;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_title_pane_general
-// Text for title pane text in general theme view.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_title_pane_general
- {
- buf = qtn_skins_title_pane_general;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_title_pane_wallpaper
-// Text for title pane text in wallpaper view.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_title_pane_wallpaper
- {
- buf = qtn_skins_title_pane_wallpaper;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_title_pane_screensaver
-// Text for title pane text in screensaver view.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_title_pane_screensaver
- {
- buf = qtn_skins_title_pane_screensaver;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_default_title_pane
-// Default title for personalisation
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TITLE_PANE r_psln_default_title_pane
- {
- txt = qtn_skins_title;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_psm_infonote
-// Text for power saving mode protected settings.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_qtn_psm_infonote
- {
- buf = qtn_power_saving_protected_settings_infonote;
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_anim_background_menu_pane
-// Animated Background Options menu item.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_anim_background_menu_pane
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdAnimBackgroundSubMenuOpen;
- txt = qtn_skins_option_anim_bg;
- cascade = r_psln_anim_background_cascade_menu;
- }
- };
- }
-
-RESOURCE MENU_PANE r_psln_anim_background_cascade_menu
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdAnimBackgroundActivate;
- txt = qtn_skins_option_anim_bg_on;
- flags = EEikMenuItemRadioStart | EEikMenuItemSymbolOn;
- },
- MENU_ITEM
- {
- command = EPslnCmdAnimBackgroundDeactivate;
- txt = qtn_skins_option_anim_bg_off;
- flags = EEikMenuItemRadioEnd;
- }
- };
- }
-// End of File
--- a/psln/Rss/PslnCommon.rss Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Common resources for application, framework and plugins.
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME PSLC // 4 letter ID
-
-// INCLUDES
-#include "psln.hrh"
-#include <psln.loc>
-#include <uikon.rh>
-#include <avkon.rh>
-#include <eikon.rh>
-
-// RESOURCE DEFINITIONS
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF { buf=""; }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_gen_view_menupane
-// Menu pane for general theme view.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_gen_view_menupane
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnCmdAppDownload;
- txt = qtn_skins_option_dltheme;
- },
- MENU_ITEM
- {
- command = EPslnCmdAppActivate;
- txt = qtn_skins_option_activate;
- }
- };
- }
-
-// End of File
-
-
--- a/psln/Rss/PslnSkinNames.rss Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2002-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: Localized resources for skin names
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME PSSN // 4 letter ID
-
-// INCLUDES
-#include <eikon.rh>
-
-#include "PslnSkinNames.rh"
-#include <psln.loc>
-
-// RESOURCE DEFINITIONS
-
-// -----------------------------------------------------------------------------
-//
-// RSS_SIGNATURE
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE
- {
- }
-
-
-// **SKIN NAMES
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_skin_names
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE PSLN_SKINNAME_LIST r_psln_skinname_list
- {
- items =
- {
- // Series 60 Default System skin
- PSLN_SKINNAME
- {
- pid1 = 0x101f84b9;
- pid2 = 0;
- listname = qtn_skins_list_namenoktheme;
- titlename = qtn_skins_title_s60;
- },
- // Series 60 reference "Ice" skin
- PSLN_SKINNAME
- {
- pid1 = 0x101f84ba;
- pid2 = 0;
- listname = qtn_skins_list_nameskin1;
- titlename = qtn_skins_title_skin1;
- },
- // Series 60 reference "Structure" skin
- PSLN_SKINNAME
- {
- pid1 = 0x101f84bb;
- pid2 = 0;
- listname = qtn_skins_list_nameskin2;
- titlename = qtn_skins_title_skin2;
- }
- };
- }
-
-// End of File
--- a/psln/Rss/Psln_reg.rss Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* 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:
-*
-*/
-
-#include <appinfo.rh>
-#include <psln.rsg>
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x10005A32 // Psln UID
-
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file = "Psln";
- localisable_resource_file = APP_RESOURCE_DIR"\\psln";
- localisable_resource_id = R_PSLN_LOCALISABLE_APP_INFO;
- }
-
-// End of File
--- a/psln/Src/PslnApplication.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2002-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: Provides Psln Application class methods.
-*
-*/
-
-
-// INCLUDE FILES
-#include <eikstart.h>
-
-#include "PslnApplication.h"
-#include "PslnDocument.h"
-#include "PslnConst.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CPslnApplication::CreateDocumentL
-// -----------------------------------------------------------------------------
-//
-CApaDocument* CPslnApplication::CreateDocumentL()
- {
- return CPslnDocument::NewL( *this );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnApplication::AppDllUid
-// -----------------------------------------------------------------------------
-//
-TUid CPslnApplication::AppDllUid() const
- {
- return KUidPsln;
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-LOCAL_C CApaApplication* NewApplication()
- {
- return new CPslnApplication;
- }
-
-GLDEF_C TInt E32Main()
- {
- return EikStart::RunApplication( NewApplication );
- }
-
-//lint -esym(714,uid) Inhibit message in Psln.uid.cpp
-
-// End of File
--- a/psln/Src/PslnBaseContainer.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class for Psln's view containers.
-*
-*/
-
-
-// INCLUDE FILES
-// General services.
-#include <barsread.h>
-#include <akntitle.h>
-#include <eiktxlbm.h>
-#include <AknUtils.h>
-
-// Psln framework.
-#include <mpslnfwmsklabelobserver.h>
-
-// Psln specific.
-#include "PslnModel.h"
-#include "PslnBaseContainer.h"
-#include "PslnUi.h"
-
-// MEMBER FUNCTIONS
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CPslnBaseContainer::CPslnBaseContainer()
- {
- iModel = static_cast<CPslnUi*>( ControlEnv()->AppUi() )->Model();
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::BaseConstructL
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::BaseConstructL( const TRect& aRect, TInt aResLbxId )
- {
- CreateWindowL(); // Makes the control a window-owning control
- iListBox->SetContainerWindowL( *this );
-
- iListBox->ConstructL( this, EAknListBoxSelectionList );
- iItemArray = static_cast<CDesCArray*>
- ( iListBox->Model()->ItemTextArray() );
-
- ConstructListBoxL( aResLbxId );
- iListBox->CreateScrollBarFrameL( ETrue );
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
- SetRect( aRect );
- ActivateL();
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::BaseConstructL
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::BaseConstructL(
- const TRect& aRect, TInt aResTitleId, TInt aResLbxId )
- {
- // Set title
- if ( aResTitleId )
- {
- CEikStatusPane* sp =
- iAvkonAppUi->StatusPane();
- if ( sp )
- {
- CAknTitlePane* title = static_cast<CAknTitlePane*>(
- sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
- if ( title )
- {
- TResourceReader rReader;
- iCoeEnv->CreateResourceReaderLC( rReader, aResTitleId );
- title->SetFromResourceL( rReader );
- CleanupStack::PopAndDestroy(); //rReader
- }
- }
- }
- BaseConstructL( aRect, aResLbxId );
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnBaseContainer::~CPslnBaseContainer()
- {
- delete iListBox;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::SetListBoxObserver
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::SetListBoxObserver( MEikListBoxObserver* aObserver )
- {
- iListBox->SetListBoxObserver( aObserver );
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::CurrentItemIndex
-// ---------------------------------------------------------------------------
-//
-TInt CPslnBaseContainer::CurrentItemIndex() const
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::SetCurrentItemIndexAndDraw
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::SetCurrentItemIndexAndDraw( TInt aNewIndex )
- {
- if( ( aNewIndex >= 0 ) &&
- ( aNewIndex < iListBox->Model()->NumberOfItems() ) )
- {
- iListBox->SetCurrentItemIndexAndDraw( aNewIndex );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::SetCurrentItemIndex
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::SetCurrentItemIndex( TInt aNewIndex )
- {
- if( ( aNewIndex >= 0 ) &&
- ( aNewIndex < iListBox->Model()->NumberOfItems() ) )
- {
- iListBox->SetCurrentItemIndex( aNewIndex );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::GetMiddleSoftkeyObserver
-// ---------------------------------------------------------------------------
-//
-MPslnFWMSKObserver* CPslnBaseContainer::GetMiddleSoftkeyObserver()
- {
- return iMSKObserver;
- }
-
-// ---------------------------------------------------------------------------
-// Sets observer for MSK label updations.
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::SetMiddleSoftkeyObserver( MPslnFWMSKObserver* aObserver )
- {
- if ( !iMSKObserver && aObserver )
- {
- iMSKObserver = aObserver;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::UpdateListBoxL
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::UpdateListBoxL()
- {
- // Update items.
- CreateListBoxItemsL();
- }
-
-// ---------------------------------------------------------------------------
-// Called when a key is pressed.
-// ---------------------------------------------------------------------------
-
-TKeyResponse CPslnBaseContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType )
- {
- switch ( aKeyEvent.iCode )
- {
- case EKeyUpArrow:
- case EKeyDownArrow:
- {
- TKeyResponse listboxResp =
- iListBox->OfferKeyEventL( aKeyEvent, aType );
- if ( iMSKObserver )
- {
- iMSKObserver->CheckMiddleSoftkeyLabelL();
- }
- return listboxResp;
- }
- case EKeyLeftArrow:
- case EKeyRightArrow:
- // Listbox takes all events even if it doesn't use them
- return EKeyWasNotConsumed;
- default:
- break;
- }
-
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
-
-// ---------------------------------------------------------------------------
-// Called by framwork when the view size is changed.
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::CountComponentControls
-// ---------------------------------------------------------------------------
-//
-TInt CPslnBaseContainer::CountComponentControls() const
- {
- return 1; //magic
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::ComponentControl
-// ---------------------------------------------------------------------------
-//
-CCoeControl* CPslnBaseContainer::ComponentControl( TInt /*aIndex*/ ) const
- {
- return iListBox;
- } //lint !e1763 Member intentionally exposed through const method
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::HandleResourceChange
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::HandleResourceChange( TInt aType )
- {
- CCoeControl::HandleResourceChange( aType );
- if ( aType == KEikDynamicLayoutVariantSwitch )
- {
- TRect mainPaneRect;
- AknLayoutUtils::LayoutMetricsRect(
- AknLayoutUtils::EMainPane,
- mainPaneRect );
- SetRect( mainPaneRect );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseContainer::FocusChanged
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseContainer::FocusChanged( TDrawNow aDrawNow )
- {
- // Pass focus changed event to listbox.
- if ( iListBox )
- {
- iListBox->SetFocus( IsFocused(), aDrawNow );
- }
- }
-
-// End of File
--- a/psln/Src/PslnBaseView.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Provides Psln Application Base view methods.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "PslnBaseView.h"
-
-#include <mpslnfwmsklabelobserver.h>
-
-#include <aknnavi.h>
-#include <aknnavide.h>
-#include <aknViewAppUi.h>
-#include <akntitle.h>
-#include <barsread.h>
-#include <StringLoader.h>
-#include <eikbtgpc.h>
-#include <eikmenup.h>
-#include <avkon.rsg>
-
-#include <psln.rsg>
-
-#include "PslnFeatures.h"
-#include "PslnUi.h"
-#include "PslnBaseContainer.h"
-#include "PslnConst.h"
-
-// ========================= MEMBER FUNCTIONS ================================
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CPslnBaseView::CPslnBaseView()
- {
- iPslnUi = static_cast<CPslnUi*>( AppUi() );
-
- if ( !iModel )
- {
- iModel = iPslnUi->Model();
- }
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnBaseView::~CPslnBaseView()
- {
- if ( iContainer )
- {
- iPslnUi->RemoveFromStack( iContainer );
- delete iContainer;
- }
- if ( iNaviPaneContext &&
- iNaviPaneContext != iPslnUi->PslnTabGroup() )
- {
- delete iNaviPaneContext;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseView::HandleListBoxEventL
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseView::HandleListBoxEventL(
- CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
- {
- switch ( aEventType )
- {
- case EEventItemClicked:
- case EEventFlickStopped:
- if ( iContainer && iContainer->GetMiddleSoftkeyObserver() )
- {
- iContainer->GetMiddleSoftkeyObserver()->CheckMiddleSoftkeyLabelL();
- }
- HandleListBoxItemHighlightL();
- break;
- case EEventEnterKeyPressed:
- case EEventItemDoubleClicked:
- case EEventItemSingleClicked:
- HandleListBoxSelectionL();
- break;
- case EEventPenDownOnItem:
- HandleListBoxStylusDown();
- break;
- case EEventItemDraggingActioned:
- HandleListBoxStylusDrag();
- break;
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseView::DoActivateL
-// Activates the view.
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseView::DoActivateL( const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId, const TDesC8& /*aCustomMessage*/ )
- {
- if( aPrevViewId.iViewUid == Id() &&
- aPrevViewId.iAppUid == KUidPsln )//same view?
- {
- //if continuous activate same view twice,direct return,do nothing
- return;
- }
-
- if( iContainer )
- {
- RemoveContainer();
- }
-
- CreateContainerL();
- iPslnUi->AddToStackL( *this, iContainer );
- iContainer->SetListBoxObserver( this );
-
- SetNaviPaneL();
- TInt titlePaneResourceID = KErrNone;
- SetTitlePaneL( titlePaneResourceID );
- // Retrieve title pane and set it.
- CEikStatusPane* sp = iAvkonAppUi->StatusPane();
- if ( sp )
- {
- CAknTitlePane* titlePane = static_cast<CAknTitlePane*>(
- sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
- if ( ( titlePaneResourceID > KErrNone ) && titlePane )
- {
- HBufC* titlePaneText = NULL;
- titlePaneText = StringLoader::LoadLC( titlePaneResourceID );
- titlePane->SetTextL( titlePaneText->Des() );
- CleanupStack::PopAndDestroy( titlePaneText );
- }
- }
-
- CEikButtonGroupContainer* cba = Cba();
- if (cba)
- {
- TInt id = CbaResourceId( aPrevViewId, aCustomMessageId );
- cba->SetCommandSetL( id );
- cba->DrawDeferred();
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseView::DoDeactivate
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseView::DoDeactivate()
- {
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- RemoveContainer();
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseView::CreateContainerL()
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseView::CreateContainerL()
- {
- NewContainerL();
- iContainer->SetMopParent( this );
-
- CPslnBaseContainer* container = iContainer;
- iContainer = NULL;
- CleanupStack::PushL( container );
- container->ConstructL( ClientRect() );
- CleanupStack::Pop( container );
- iContainer = container;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnBaseView::SetNaviPaneL
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseView::SetNaviPaneL()
- {
-#ifndef RD_CONTROL_PANEL
- CAknNavigationControlContainer* naviPane = iPslnUi->NaviContainer();
- if ( !naviPane )
- {
- return;
- }
- if ( iNaviPaneContext )
- {
- iPslnUi->NaviContainer()->PushL( *iNaviPaneContext );
-
- if ( iNaviPaneContext == iPslnUi->PslnTabGroup() )
- {
- iPslnUi->UpdateTabIndex();
- }
- }
- else
- {
- iPslnUi->NaviContainer()->PushDefaultL();
- }
-#else
- iPslnUi->NaviContainer()->PushDefaultL();
-#endif //RD_CONTROL_PANEL
- }
-
-// ---------------------------------------------------------------------------
-// Sets middle softkey label.
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseView::SetMiddleSoftKeyLabelL(
- const TInt aResourceId, const TInt aCommandId )
- {
- CEikButtonGroupContainer* cbaGroup = Cba();
- if ( cbaGroup )
- {
- HBufC* middleSKText = StringLoader::LoadLC( aResourceId );
- TPtr mskPtr = middleSKText->Des();
- cbaGroup->AddCommandToStackL(
- KPslnMSKControlID,
- aCommandId,
- mskPtr );
- CleanupStack::PopAndDestroy( middleSKText );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Removes Help if it is not supported.
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- if ( aResourceId == R_PSLN_BASIC_MENUPANE )
- {
- if( !PslnFeatures::IsHelpSupported() )
- {
- // Disable help if not supported
- aMenuPane->SetItemDimmed( EPslnCmdAppHelp, ETrue );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Whether to set right softkey as exit
-// ---------------------------------------------------------------------------
-//
-TInt CPslnBaseView::CbaResourceId(const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/ )
- {
- return R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-// -----------------------------------------------------------------------------
-// Handle listbox stylus move event.
-// -----------------------------------------------------------------------------
-//
-void CPslnBaseView::HandleListBoxStylusDown()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Handle listbox stylus move event.
-// -----------------------------------------------------------------------------
-//
-void CPslnBaseView::HandleListBoxStylusDrag()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Removes container.
-// ---------------------------------------------------------------------------
-//
-void CPslnBaseView::RemoveContainer()
- {
- if ( iPslnUi )
- {
- iPslnUi->RemoveFromStack( iContainer );
- }
- delete iContainer;
- iContainer = NULL;
- }
-
-//End of File
--- a/psln/Src/PslnDRMImplementation.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2004-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: Utility class that verifies content's that it is in accordance
-* with DRM.
-*
-*/
-
-
-// INCLUDE FILES
-#include <DRMHelper.h>
-#include <aknnotewrappers.h>
-#include <StringLoader.h>
-#include <psln.rsg>
-
-#include "PslnDRMImplementation.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnDRMImplementation::CPslnDRMImplementation()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnDRMImplementation::ConstructL()
- {
- iDRMHelper = CDRMHelper::NewL(*CCoeEnv::Static());
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnDRMImplementation* CPslnDRMImplementation::NewL()
- {
- CPslnDRMImplementation* self = new(ELeave) CPslnDRMImplementation();
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CPslnDRMImplementation::~CPslnDRMImplementation()
- {
- delete iDRMHelper;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnDRMImplementation::VerifySelectionL
-// -----------------------------------------------------------------------------
-//
-TBool CPslnDRMImplementation::VerifySelectionL(const MDesCArray* aSelectedFiles)
- {
- if(!aSelectedFiles)
- {
- User::Leave(KErrArgument);
- }
-
- if(aSelectedFiles->MdcaCount() == 0)
- {
- return ETrue;
- }
-
- User::LeaveIfError(iDRMHelper->SetAutomatedType(CDRMHelper::EAutomatedTypeWallpaper));
-
- TBool canBeAutomated = EFalse;
- TInt error = iDRMHelper->CanSetAutomated(aSelectedFiles->MdcaPoint(0), canBeAutomated);
-
- if(error == KErrNone)
- {
- if(!canBeAutomated)
- {
- ShowErrorNoteL( R_PSLN_QTN_DRM_PREV_RIGHTS_SET );
- }
-
- return canBeAutomated;
- }
- else if( error == KErrUnderflow )
- {
- ShowErrorNoteL( R_PSLN_IMAGE_CORRUPTED );
- }
- else if ( ( error != KErrNone ) || !canBeAutomated )
- {
- if ( iDRMHelper )
- {
- iDRMHelper->HandleErrorL(
- error,
- aSelectedFiles->MdcaPoint( 0 ) );
- }
- }
-
- return EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnDRMImplementation::ShowErrorNoteL
-// -----------------------------------------------------------------------------
-//
-void CPslnDRMImplementation::ShowErrorNoteL( TInt aResourceId )
- {
- HBufC* errorText = StringLoader::LoadLC(aResourceId);
- CAknInformationNote* note = new(ELeave) CAknInformationNote(EFalse);
- note->ExecuteLD(*errorText);
- CleanupStack::PopAndDestroy(errorText);
- }
-// End of File
--- a/psln/Src/PslnDocument.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2002-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: Document class for psln.
-*
-*/
-
-
-#include "PslnDocument.h"
-#include "PslnUi.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Symbian constructor.
-// ---------------------------------------------------------------------------
-//
-CPslnDocument* CPslnDocument::NewL( CEikApplication& aApp )
- {
- CPslnDocument* self = new(ELeave) CPslnDocument( aApp );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CPslnDocument::~CPslnDocument()
- {
- }
-
-// ---------------------------------------------------------------------------
-// C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CPslnDocument::CPslnDocument( CEikApplication& aApp ) : CAknDocument( aApp )
- {
- }
-
-// ---------------------------------------------------------------------------
-// From CEikDocument.
-// Create an CPslnAppUi instance and return it.
-// ---------------------------------------------------------------------------
-//
-CEikAppUi* CPslnDocument::CreateAppUiL()
- {
- return new (ELeave) CPslnUi;
- }
-
-// End of File
--- a/psln/Src/PslnGeneralThemeContainer.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,826 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: General theme view's container.
-*
-*/
-
-
-// INCLUDE FILES
-// General
-#include <aknlists.h>
-#include <eikclbd.h>
-#include <StringLoader.h>
-#include <AknGlobalNote.h>
-
-#include <aknlocalskinlib.h>
-#include <aknlistloadertfx.h>
-
-#include <aknnotewrappers.h>
-
-// Resources.
-#include <psln.rsg>
-
-// Constants.
-#include "PslnConst.h"
-
-// Help context.
-#include <csxhelp/skins.hlp.hrh>
-
-// HAL
-#include <hal.h>
-
-// General - psln specific.
-#include "PslnGeneralThemeContainer.h"
-#include "PslnFeatures.h"
-#include "PslnModel.h"
-#include "PslnDebug.h"
-#include "PslnSkinEntry.h"
-#include "PslnUi.h"
-
-// Central Repository and Publish&Subscribe keys.
-#include <centralrepository.h>
-#include "pslninternalcrkeys.h"
-
-
-// Framework
-#include <pslnfwiconhelper.h>
-#include <mpslnfwmsklabelobserver.h>
-
-// Constant for delay for the first timer event
-const TTimeIntervalMicroSeconds32 KIdlePreviewDelay = 250000;
-
-// Constant for interval for the subsequent timer events
-const TTimeIntervalMicroSeconds32 KIdlePreviewInterval = 200000;
-
-// ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnGeneralThemeContainer::CPslnGeneralThemeContainer()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::ConstructL( const TRect& aRect )
- {
- iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
-
-
- iPreviewIdle = CPeriodic::NewL( CActive::EPriorityIdle );
-
- RFs& fs = CCoeEnv::Static()->FsSession();
- iLocalSkinInstance = CAknLocalSkinInstance::NewL ( fs, iModel->SkinSrvSession() );
-
- if( PslnFeatures::IsSupported( KPslnSupportFastPreviewTheme ) )
- {
- InitPreviewTime();
- }
- BaseConstructL( aRect, R_PSLN_SKIN_LIST_VIEW_TITLE, KPslnNoResource );
- iOldSkinNum = iModel->NumberOfSkins();
- }
-
-// Destructor
-CPslnGeneralThemeContainer::~CPslnGeneralThemeContainer()
- {
- // iListBox is deleted in class CPslnBaseContainer.
-
- iSkinItemList.Reset();
-
- if ( iPreviewIdle )
- {
- iPreviewIdle->Cancel();
- }
- delete iPreviewIdle;
- delete iLocalSkinInstance;
-
- // Remove locally skinned items.
- MAknsSkinInstance* si = AknsUtils::SkinInstance();
- if ( si )
- {
- si->SetChangeEventsEnabled( EFalse );
- si->RemoveLocalItemDefs();
- si->SetChangeEventsEnabled( ETrue );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Checks if embedded browser is supported.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnGeneralThemeContainer::IsEmbeddedLinkVisible() const
- {
- return PslnFeatures::IsEnhancedEmbeddedLinksSupported();
- }
-
-// ---------------------------------------------------------------------------
-// Updates skin item list.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::UpdateSkinListItemsL( const TInt& aNewIndex )
-{
- // This is needed to make the list effects update
- CAknListLoader::InvalidateAll();
-
- PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::UpdateSkinListItemsL");
- // Update skins.
- iItemArray->Reset();
- iToBeUsedIndex = KErrNotFound;
- if ( aNewIndex != KErrNotFound )
- {
- iToBeUsedIndex = aNewIndex;
- }
- CreateListBoxItemsL();
-
- // Create pre- and post-text icons.
- CPslnFWIconHelper* iconHelper = CPslnFWIconHelper::NewL();
- CleanupStack::PushL( iconHelper );
- iconHelper->AddIconsToSettingItemsL(
- ETrue,
- KErrNotFound, // not used since we are adding all
- iListBox );
- CleanupStack::PopAndDestroy( iconHelper );
-
- }
-
-// -----------------------------------------------------------------------------
-// Creates listbox.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::ConstructListBoxL( TInt /*aResLbxId*/ )
- {
- iListBox->DisableSingleClick( ETrue );
- UpdateSkinListItemsL( KErrNotFound );
- }
-
-// -----------------------------------------------------------------------------
-// Empty implementation of inherited method.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::CreateListBoxItemsL()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::CreateListBoxItemsL BEGIN");
- TInt downloadAdded = 0;
- if ( IsEmbeddedLinkVisible() )
- {
- HBufC* text = StringLoader::LoadLC(
- R_PSLN_QTN_SKINS_DOWNLOAD_SKINS, iEikonEnv );
- // Reallocating invalidates original text, so it is required that
- // original text is popped from cleanupstack, then reassigned to
- // reallocated value and finally pushed back to cleanupstack.
- HBufC* reallocText = text->ReAllocL( text->Length() + KPslnIconSize );
- CleanupStack::Pop( text );
- text = reallocText;
- CleanupStack::PushL( text );
- // Do not use reallocated string after assigning it to the original.
- reallocText = NULL;
- TPtr textPtr = text->Des();
-
- textPtr.Insert( 0, KPslnFWEmbeddedLinkListItemFormat );
- iItemArray->InsertL( 0, textPtr );
- downloadAdded = 1;
- CleanupStack::PopAndDestroy( text );
- }
-
- TInt maxSkinIndex = 0;
- if ( iModel )
- {
- // If current skin is not found => update from server.
- if ( iModel->ActiveSkinIndex() == KErrNotFound )
- {
- iModel->PerformCompleteUpdateL();
- }
- maxSkinIndex = iModel->NumberOfSkins();
- }
-
- HBufC* skinName = HBufC::NewLC( KMaxName );
- TInt currentlyActiveSkinIndex = KErrNotFound;
- static_cast<CPslnUi*>( ControlEnv()->AppUi() )->
- SetDRMProtectedSkinInSkinList( EFalse );
-
- for ( TInt skinIndex = KPslnSeries60SkinIndex;
- skinIndex < maxSkinIndex; skinIndex++ )
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::CreateListBoxItemsL 3");
- TPtr skinNamePtr = skinName->Des();
- iModel->GetSkinNameByIndex(
- skinIndex,
- skinNamePtr,
- EPslnSkinNameTypeList );
-
- // Add pre-text icon.
- if ( iModel->IsActiveSkinSelected( skinIndex ) )
- {
- skinNamePtr.Insert( 0, KPslnFWActiveListItemFormat );
- currentlyActiveSkinIndex = skinIndex;
- }
- else
- {
- skinNamePtr.Insert( 0, KPslnFWNonActiveListItemFormat );
- }
-
- if( iModel->IsActiveSkinSelected( skinIndex ) && iToBeUsedIndex == KErrNotFound )
- {
- iModel->SetCurrentSelectedSkinIndex (skinIndex);
- iToBeUsedIndex = skinIndex + downloadAdded;
- }
-
- // Add post-text icon(s).
-#ifndef RD_MULTIPLE_DRIVE
- if( iModel->LocationOfSkin( skinIndex ) == EAknsSrvMMC )
- {
- skinNamePtr.Append( KPslnFWListItemFormatMMCSuffix );
- }
-#else
- if( iModel->IsThemeOnMemoryCard( skinIndex ) )
- {
- skinNamePtr.Append( KPslnFWListItemFormatMMCSuffix );
- }
- else if( iModel->IsThemeOnMassDrive( skinIndex ) )
- {
- skinNamePtr.Append( KPslnFWListItemFormatMassDriveSuffix );
- }
-#endif // RD_MULTIPLE_DRIVE
-
- switch( iModel->ProtectionOfSkin( skinIndex ) )
- {
- case EAknsSrvProtected:
- skinNamePtr.Append( KPslnFWListItemFormatDRMProtectedSuffix );
- static_cast<CPslnUi*>( ControlEnv()->AppUi() )->
- SetDRMProtectedSkinInSkinList( ETrue );
- break;
- case EAknsSrvNoRights:
- case EAknsSrvCountBased:
- case EAknsSrvFutureRights:
- case EAknsSrvExpiredRights:
- skinNamePtr.Append( KPslnFWListItemFormatDRMExpiredSuffix );
- static_cast<CPslnUi*>( ControlEnv()->AppUi() )->
- SetDRMProtectedSkinInSkinList( ETrue );
- break;
- case EAknsSrvNoProtection:
- default:
- // Do nothing
- break;
- }
- PSLN_TRACE_DEBUG1("CPslnGeneralThemeContainer::CreateListBoxItemsL postfix icon: %d", iModel->ProtectionOfSkin( skinIndex ) );
- iItemArray->InsertL( ( skinIndex + downloadAdded ), skinNamePtr );
- skinNamePtr.Zero();
- }
- CleanupStack::PopAndDestroy( skinName );
-
- if ( iOldSkinNum != maxSkinIndex )
- {
- iToBeUsedIndex = currentlyActiveSkinIndex + downloadAdded;
- }
- if ( ( iToBeUsedIndex >= ( 0 + downloadAdded ) ) &&
- ( iToBeUsedIndex <= ( maxSkinIndex + downloadAdded ) ) )
- {
- SetCurrentItemIndex( iToBeUsedIndex );
- iActiveSkinItemIndex = iToBeUsedIndex;
- }
- else
- {
- SetCurrentItemIndex( ( currentlyActiveSkinIndex + downloadAdded ) );
- iActiveSkinItemIndex = currentlyActiveSkinIndex + downloadAdded;
- }
- iListBox->HandleItemAdditionL();
- if ( iOldSkinNum != maxSkinIndex )
- {
- StartThemePreviewL();
- iOldSkinNum = maxSkinIndex;
- }
- PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::CreateListBoxItemsL END");
- }
-
-// ---------------------------------------------------------------------------
-// Updates D column icons.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::UpdateSkinListItemsDColumnOnlyL()
- {
- // Create pre- and post-text icons.
- CPslnFWIconHelper* iconHelper = CPslnFWIconHelper::NewL();
- CleanupStack::PushL( iconHelper );
- iconHelper->AddIconsToSettingItemsL(
- ETrue,
- KErrNotFound, // not used since we are adding all
- iListBox );
- CleanupStack::PopAndDestroy( iconHelper );
- }
-
-// ---------------------------------------------------------------------------
-// Starts theme preview.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::StartThemePreviewL( TBool aTouch )
- {
- // Start timer with 0.5s delay.
- iPreviewIdle->Cancel();
-
- if( PslnFeatures::IsSupported( KPslnSupportFastPreviewTheme ) )
- {
- iPreviewIdle->Start(
- aTouch ? iPreviewDelayTime : iPreviewDelayTimeOnHardKey,
- iPreviewIntervalTime,
- TCallBack( DoHandleIdleTimeL, this ) );
- }
- else
- {
- iPreviewIdle->Start(
- KIdlePreviewDelay,
- KIdlePreviewInterval,
- TCallBack( DoHandleIdleTimeL, this ) );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Cancel theme preview.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::CancelThemePreviewL()
- {
- iPreviewIdle->Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Sets theme preview observer.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::SetThemePreviewObserver(
- MPslnThemePreviewObserver* aObserver )
- {
- iObserver = aObserver;
- }
-
-// ---------------------------------------------------------------------------
-// Locks up and down key events.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::LockUpAndDownKeys( const TBool& aLocked )
- {
- TRAPD( transitionEffectsValue, iModel->GetTransitionEffectStateL() );
- // Effects are enabled if value is NOT KMaxTInt.
- // Only lock keys, if transition effects are off.
- if( transitionEffectsValue == KMaxTInt )
- {
- iLockedKeys = aLocked;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Gets help context for Help application.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::GetHelpContext(
- TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KUidPsln;
- aContext.iContext = KSKINS_HLP_LIST;
- }
-
-// ---------------------------------------------------------------------------
-// Handles key events.
-// Starts the new preview theme load before passing the event to base class.
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CPslnGeneralThemeContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- TKeyResponse resp = EKeyWasConsumed;
-
- // If lock is active, ignore up and down key events.
- if ( iLockedKeys &&
- !( aKeyEvent.iCode == EKeyUpArrow || aKeyEvent.iCode == EKeyDownArrow ) ||
- !iLockedKeys )
- {
- resp = CPslnBaseContainer::OfferKeyEventL( aKeyEvent, aType );
- }
-
- // React to up and down arrow key events IF download skin is not selected.
- if ( aType == EEventKey &&
- (aKeyEvent.iCode == EKeyUpArrow || aKeyEvent.iCode == EKeyDownArrow ) &&
- !iLockedKeys )
- {
- iObserver->HandlePreviewStateChange( ETrue );
- StartThemePreviewL( EFalse );
- }
-
- return resp;
- }
-
-// ---------------------------------------------------------------------------
-// Creates the skin item list for local item skinning.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::CreateSkinItemList()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::CreateSkinItemList" );
- TInt retVal = KErrNone;
-
- // Main area, screen, status pane and control pane.
- retVal += AddItemToList( KAknsIIDQsnBgScreen );
- //retVal += AddItemToList( KAknsIIDQsnBgAreaMainListGene );
- retVal += AddItemToList( KAknsIIDQsnBgAreaStaconRt );
- retVal += AddItemToList( KAknsIIDQsnBgAreaStaconLt );
- retVal += AddItemToList( KAknsIIDQsnBgAreaStaconRb );
- retVal += AddItemToList( KAknsIIDQsnBgAreaStaconLb );
- retVal += AddItemToList( KAknsIIDQsnBgAreaControl );
- retVal += AddItemToList( KAknsIIDQsnBgAreaControlPopup );
- retVal += AddItemToList( KAknsIIDQsnBgAreaStatus );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlat );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCornerTl );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCornerTr );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCornerBl );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCornerBr );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatSideT );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatSideB );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatSideL );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatSideR );
- retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCenter );
-
- // Navipane
- retVal += AddItemToList( KAknsIIDQsnBgNavipaneSolid );
- retVal += AddItemToList( KAknsIIDQsnBgNavipaneWipe );
- retVal += AddItemToList( KAknsIIDQgnIndiNaviArrowLeft );
- retVal += AddItemToList( KAknsIIDQgnIndiNaviArrowRight );
-
- // Battery pane, signal pane
- retVal += AddItemToList( KAknsIIDQgnIndiSignalStrength );
- retVal += AddItemToList( KAknsIIDQgnIndiBatteryStrength );
-
- // Scrollbars
- retVal += AddItemToList( KAknsIIDQsnCpScrollBgTop );
- retVal += AddItemToList( KAknsIIDQsnCpScrollBgMiddle );
- retVal += AddItemToList( KAknsIIDQsnCpScrollBgBottom );
- retVal += AddItemToList( KAknsIIDQsnCpScrollHandleBgTop );
- retVal += AddItemToList( KAknsIIDQsnCpScrollHandleBgMiddle );
- retVal += AddItemToList( KAknsIIDQsnCpScrollHandleBgBottom );
- retVal += AddItemToList( KAknsIIDQsnCpScrollHandleTop );
- retVal += AddItemToList( KAknsIIDQsnCpScrollHandleMiddle );
- retVal += AddItemToList( KAknsIIDQsnCpScrollHandleBottom );
-
- // Tabs
- retVal += AddItemToList( KAknsIIDQgnGrafTabActiveL );
- retVal += AddItemToList( KAknsIIDQgnGrafTabActiveM );
- retVal += AddItemToList( KAknsIIDQgnGrafTabActiveR );
- retVal += AddItemToList( KAknsIIDQgnGrafTabPassiveL );
- retVal += AddItemToList( KAknsIIDQgnGrafTabPassiveM );
- retVal += AddItemToList( KAknsIIDQgnGrafTabPassiveR );
-
- // Highlight
- retVal += AddItemToList( KAknsIIDQsnFrList );
- retVal += AddItemToList( KAknsIIDQsnFrListCornerTl );
- retVal += AddItemToList( KAknsIIDQsnFrListCornerTr );
- retVal += AddItemToList( KAknsIIDQsnFrListCornerBl );
- retVal += AddItemToList( KAknsIIDQsnFrListCornerBr );
- retVal += AddItemToList( KAknsIIDQsnFrListSideT );
- retVal += AddItemToList( KAknsIIDQsnFrListSideB );
- retVal += AddItemToList( KAknsIIDQsnFrListSideL );
- retVal += AddItemToList( KAknsIIDQsnFrListSideR );
- retVal += AddItemToList( KAknsIIDQsnFrListCenter );
-
- // Options menu
- retVal += AddItemToList( KAknsIIDQsnFrPopup );
- retVal += AddItemToList( KAknsIIDQsnFrPopupCornerTl );
- retVal += AddItemToList( KAknsIIDQsnFrPopupCornerTr );
- retVal += AddItemToList( KAknsIIDQsnFrPopupCornerBl );
- retVal += AddItemToList( KAknsIIDQsnFrPopupCornerBr );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSideT );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSideB );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSideL );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSideR );
- retVal += AddItemToList( KAknsIIDQsnFrPopupCenter );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSub );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSubCornerTl );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSubCornerTr );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSubCornerBl );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSubCornerBr );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSubSideT );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSubSideB );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSubSideL );
- retVal += AddItemToList( KAknsIIDQsnFrPopupSubSideR );
- retVal += AddItemToList( KAknsIIDQsnFrPopupCenterSubmenu );
- retVal += AddItemToList( KAknsIIDQgnIndiSubmenu );
-
- // Icons
- retVal += AddItemToList( KAknsIIDQgnPropPslnActive );
- retVal += AddItemToList( KAknsIIDQgnIndiMmcAdd );
-
- // QHD specific CBA.
- retVal += AddItemToList( KAknsIIDQgnIndiSctrlMaskInactLsc );
- retVal += AddItemToList( KAknsIIDQgnIndiSctrlMaskActLsc );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButton );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCornerTl );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCornerTr );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCornerBl );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCornerBr );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonSideT );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonSideB );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonSideL );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonSideR );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCenter );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButton );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCornerTl );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCornerTr );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCornerBl );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCornerBr );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonSideT );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonSideB );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonSideL );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonSideR );
- retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCenter );
-
- __ASSERT_DEBUG( retVal == KErrNone, User::Panic(_L("Error in inserting"), 1) );
- }
-
-// ---------------------------------------------------------------------------
-// Adds one item to skin item list.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnGeneralThemeContainer::AddItemToList( const TAknsItemID& aSkinID )
- {
- TAknsItemID skinItem;
- skinItem.Set( aSkinID.iMajor, aSkinID.iMinor );
- TInt error = iSkinItemList.InsertInOrder( skinItem, TAknsItemID::LinearOrder );
- PSLN_TRACE_DEBUG3("CPslnGeneralThemeContainer::AddItemToList item=%d %d added %d",
- aSkinID.iMajor, aSkinID.iMinor, error );
- return error;
- }
-
-// -----------------------------------------------------------------------------
-// Callback function when application is idle.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnGeneralThemeContainer::DoHandleIdleTimeL( TAny* aAny )
- {
- static_cast< CPslnGeneralThemeContainer* >( aAny )->HandleIdleTimeL();
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// Callback function when application is idle.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnGeneralThemeContainer::DoHandleEffectEndL( TAny* aAny )
- {
- static_cast< CPslnGeneralThemeContainer* >( aAny )->HandleEffectEndL();
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// Handle idle time.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::HandleIdleTimeL()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::HandleIdleTimeL" );
- // First stop timer.
- iPreviewIdle->Cancel();
-
-
- // Check free mem
- TInt freeMem = 0;
- HAL::Get( HALData::EMemoryRAMFree , freeMem );
- if( freeMem <= KPslnMinMemSize )
- {
- HBufC* errorBuf = StringLoader::LoadLC(
- R_PSLN_QTN_MEMLO_RAM_OUT_OF_MEM );
- // Display global note.
- CAknGlobalNote* errorNote = CAknGlobalNote::NewLC();
- errorNote->ShowNoteL( EAknGlobalErrorNote, *errorBuf );
- CleanupStack::PopAndDestroy( 2 ); // errorNote & errorBuf
- return;
- }
-
- // Ignore download skin item if it is available.
- TInt modifier = IsEmbeddedLinkVisible();
- TInt activeSkinIndex = iListBox->CurrentItemIndex() - modifier;
-
- TBool usbAttached = static_cast<CPslnUi*>( ControlEnv()->AppUi() )->USBAttachState();
-
- iActiveSkinItemIndex = iListBox->CurrentItemIndex();
- if( iModel->IsValidForPreview(activeSkinIndex) == EFalse )
- {
- // If skin file didn't valid, preview active skin.
- activeSkinIndex = iModel->ActiveSkinIndex();
- }
- if ( IsEmbeddedLinkVisible() && iListBox->CurrentItemIndex() == 0 )
- {
- activeSkinIndex = iModel->ActiveSkinIndex();
- }
- if( iModel->IsThemeOnMemoryCard( activeSkinIndex ) && usbAttached)
- {
- activeSkinIndex = 0;
- }
-
- CPslnSkinEntry* activeSkin = iModel->VisibleSkin( activeSkinIndex );
-
- if ( activeSkin )
- {
- // Re-create the list, since skin preview library removes skinned items
- // from used list (performance reasons).
- iSkinItemList.Reset();
- CreateSkinItemList();
- PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::HandleIdleTimeL Create Preview" );
- static_cast<CPslnUi*>( ControlEnv()->AppUi() )->ToggleScreenBlankerL( ETrue, ETrue, EFalse );
-
- if ( iModel->IsActiveSkinSelected( activeSkinIndex ) )
- {
- // Remove locally skinned items.
- MAknsSkinInstance* si = AknsUtils::SkinInstance();
- if ( si )
- {
- si->SetChangeEventsEnabled( EFalse );
- si->RemoveLocalItemDefs();
- si->SetChangeEventsEnabled( ETrue );
- }
- }
- else
- {
- TRAPD(err,iLocalSkinInstance->ApplyL( activeSkin->FullName(), iSkinItemList ));
- if (err == EAknsSrvProtected)
- {
- ShowErrorNoteL( R_PSLN_QTN_DRM_PREV_RIGHTS_SET );
- }
- else if (err == KErrCorrupt)
- {
- //Skin corrupt
- ShowErrorNoteL( R_PSLN_QTN_SKINS_ERROR_CORRUPTED );
- //Preview the active skin
- TRAP_IGNORE(iLocalSkinInstance->ApplyL(
- iModel->VisibleSkin(iModel->ActiveSkinIndex())->FullName(),
- iSkinItemList ));
- SetCurrentItemIndex( iModel->ActiveSkinIndex() + modifier);
- if ( iMSKObserver )
- {
- iMSKObserver->CheckMiddleSoftkeyLabelL();
- }
- }
- else
- {
- User::LeaveIfError(err);
- }
- }
-
- // This is needed to make the list effects update
- CAknListLoader::InvalidateAll();
-
- if( PslnFeatures::IsSupported( KPslnSupportFastPreviewTheme ) )
- {
- iPreviewIdle->Start(
- iPreviewDelayTime,
- iPreviewIntervalTime,
- TCallBack( DoHandleEffectEndL, this ) );
- }
- else
- {
- iPreviewIdle->Start(
- KIdlePreviewDelay,
- KIdlePreviewInterval,
- TCallBack( DoHandleEffectEndL, this ) );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Handle effect end.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::HandleEffectEndL()
- {
- // First stop timer.
- iPreviewIdle->Cancel();
- static_cast<CPslnUi*>( ControlEnv()->AppUi() )->
- ToggleScreenBlankerL( EFalse, EFalse );
- iObserver->HandlePreviewStateChange( EFalse );
- }
-
-
-
-// ---------------------------------------------------------------------------
-// Restart Quick Preview
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::RestartQuickPreviewL()
- {
- TInt modifier = IsEmbeddedLinkVisible();
- TInt activeSkinIndex = iListBox->CurrentItemIndex() - modifier;
- if( iModel->IsThemeOnMemoryCard(activeSkinIndex) )
- {
- HandleIdleTimeL();
- }
- }
-
-// ---------------------------------------------------------------------------
-// Get Preview Skin Index
-// ---------------------------------------------------------------------------
-//
-TInt CPslnGeneralThemeContainer::PreviewSkinIndex()
- {
- // Ignore download skin item if it is available.
- TInt modifier = IsEmbeddedLinkVisible();
- TInt previewSkinIndex = iListBox->CurrentItemIndex() - modifier;
-
- TBool usbAttached = static_cast<CPslnUi*>( ControlEnv()->AppUi() )->USBAttachState();
-
- if( !iModel->IsValidForPreview(previewSkinIndex) )
- {
- // If skin file on memorycard and usb attached, preview default skin.
- previewSkinIndex = 0;
- }
- else if( iModel->IsThemeOnMemoryCard( previewSkinIndex ) && usbAttached)
- {
- // If skin file didn't exist, preview default skin.
- previewSkinIndex = 0;
- }
- return previewSkinIndex;
- }
-
-// ---------------------------------------------------------------------------
-// Set theme preview state active.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::SetPreviewStateActive()
- {
- iObserver->HandlePreviewStateChange( ETrue );
- }
-
-// ---------------------------------------------------------------------------
-// Checks if current focus theme is in preview state.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnGeneralThemeContainer::CurrentThemeInPreviewState()
- {
- return iListBox->CurrentItemIndex() != iActiveSkinItemIndex;
- }
-
-// -----------------------------------------------------------------------------
-// Load preview delay time settings from CenRep.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::InitPreviewTime()
- {
- //load from cenrep
- iPreviewDelayTime = KErrNone;
- iPreviewDelayTimeOnHardKey = KErrNone;
- iPreviewIntervalTime = KErrNone;
- CRepository* timeRepository = NULL;
- TRAPD( err, timeRepository = CRepository::NewL( KCRUidThemes ) );
- if( err != KErrNone )
- {
- return;
- }
- timeRepository->Get( KThemesPreviewDelayTime, iPreviewDelayTime );
- timeRepository->Get( KThemesPreviewDelayTimeOnHardKey, iPreviewDelayTimeOnHardKey );
- timeRepository->Get( KThemesPreviewIntervalTime, iPreviewIntervalTime );
- delete timeRepository;
- timeRepository = NULL;
- }
-
-// -----------------------------------------------------------------------------
-// Show Error Note.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::ShowErrorNoteL( TInt aResourceId )
- {
- HBufC* errorText = StringLoader::LoadLC(aResourceId);
- CAknErrorNote * note = new(ELeave) CAknErrorNote (EFalse);
- note->ExecuteLD(*errorText);
- CleanupStack::PopAndDestroy(errorText);
- }
-
-// -----------------------------------------------------------------------------
-// Handle Pointer Event.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::HandlePointerEventL( const TPointerEvent &aPointerEvent )
- {
- // Cancel this kind of preview, in conflict with kinetic scrolling.
-/*
- // Launch theme preview when pen up, in case pen is out of listbox.
- if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
- {
- iObserver->HandlePreviewStateChange( ETrue );
- StartThemePreviewL( ETrue );
- }
-*/
-
- CCoeControl::HandlePointerEventL( aPointerEvent );
- }
-
-// End of File
--- a/psln/Src/PslnGeneralThemeView.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,686 +0,0 @@
-/*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: General theme view.
-*
-*/
-
-
-
-// INCLUDE FILES
-
-// General - services
-#include <StringLoader.h>
-#include <AknGlobalNote.h>
-#include <aknnotewrappers.h>
-#include <akntitle.h>
-#include <barsread.h>
-#include <eikbtgpc.h>
-#include <eikmenup.h>
-
-// Feature manager.
-#include <featmgr.h>
-#include <features.hrh>
-
-// Power save mode setting
-#include <psmsettings.h>
-
-// Resources
-#include <psln.rsg>
-#include <pslncommon.rsg>
-#include <data_caging_path_literals.hrh>
-
-// Psln specific.
-#include "PslnGeneralThemeView.h"
-#include "PslnConst.h"
-#include "PslnUi.h"
-#include "PslnModel.h"
-#include "PslnFeatures.h"
-#include "PslnDebug.h"
-
-
-// Path to common personalization resources. This resource file is meant for
-// shared resources between application and plugins.
-_LIT( KPslnCommonResourceFileName, "z:pslncommon.rsc" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnGeneralThemeView::CPslnGeneralThemeView()
- : iResourceLoaderCommon( *iCoeEnv )
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::ConstructL()
- {
- BaseConstructL( R_PSLN_GENERAL_VIEW );
-
- iNaviPaneContext = iPslnUi->PslnTabGroup();
-
- // Find the common resource file:
- TParse* parse = new (ELeave) TParse;
- CleanupStack::PushL( parse );
- parse->Set( KPslnCommonResourceFileName, &KDC_APP_RESOURCE_DIR, NULL );
- TFileName* fileName = new (ELeave) TFileName( parse->FullName() );
- CleanupStack::PushL( fileName );
-
- // Open resource file:
- iResourceLoaderCommon.OpenL( *fileName );
-
- CleanupStack::PopAndDestroy( 2, parse ); // fileName, parse
-
- // Normally download item is the first one.
- iDownloadItemIndex = 0;
-
- // If enchanted embedded links are not supported, then there shouldn't be
- // 'Download' item at all.
- if ( !PslnFeatures::IsEnhancedEmbeddedLinksSupported() )
- {
- iDownloadItemIndex = KErrNotFound;
- }
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnGeneralThemeView* CPslnGeneralThemeView::NewLC()
- {
- CPslnGeneralThemeView* self = new (ELeave) CPslnGeneralThemeView();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor
-CPslnGeneralThemeView::~CPslnGeneralThemeView()
- {
- iResourceLoaderCommon.Close();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGeneralThemeView::Id
-// -----------------------------------------------------------------------------
-//
-TUid CPslnGeneralThemeView::Id() const
- {
- return KPslnGeneralView;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGeneralThemeView::HandleCommandL
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandleCommandL( TInt aCommand )
- {
- // First set active item and active skin.
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
- TInt activeSkinIndex = iCurrentItem;
- if ( iDownloadItemIndex != KErrNotFound )
- {
- activeSkinIndex--;
- }
- switch ( aCommand )
- {
- case EPslnCmdTransitionEffectsActivate:
- {
- TInt PsmMode = 0;
- CPsmSettings *PsmSettings = CPsmSettings::NewL();
- PsmSettings->GetCurrentMode( PsmMode );
- delete PsmSettings;
-
- if ( PsmMode == EPsmsrvModePowerSave ) // PSM on, setting is protected
- {
- HBufC* buf = StringLoader::LoadLC( R_PSLN_QTN_PSM_INFONOTE );
- CAknInformationNote* note = new (ELeave) CAknInformationNote( ETrue );
- note->ExecuteLD( *buf );
- CleanupStack::PopAndDestroy( buf );
- return;
- }
-
- TInt error = iModel->SetTransitionEffectsL( EPslnEnableAllEffects );
-
- if ( error == KErrNone )
- {
- if ( PslnFeatures::IsSupported( KPslnSupportAnimBackground ) &&
- iModel->IsSupportAnimBg( iModel->ActiveSkinIndex() ) )
- {
- error = iModel->SetAnimBackground( EPslnEnableAllEffects );
- }
- }
-
- if ( error == KErrNoMemory )
- {
- HBufC* errorBuf = StringLoader::LoadLC(
- R_PSLN_NOT_ENOUGH_MEMORY );
- // Display global note.
- CAknGlobalNote* errorNote = CAknGlobalNote::NewLC();
- errorNote->ShowNoteL( EAknGlobalErrorNote, *errorBuf );
- CleanupStack::PopAndDestroy( 2, errorBuf ); // errorNote also
- }
- else
- {
- User::LeaveIfError( error );
- }
- }
- break;
- case EPslnCmdTransitionEffectsDeactivate:
- iModel->SetTransitionEffectsL( EPslnDisableAllEffects );
- //Deactive AnimBackground
- iModel->SetAnimBackground( EPslnDisableAllEffects );
- break;
-
- case EPslnCmdAnimBackgroundActivate:
- {
- TInt error = iModel->SetAnimBackground( EPslnEnableAllEffects );
- if ( error == KErrNoMemory )
- {
- HBufC* errorBuf = StringLoader::LoadLC(
- R_PSLN_NOT_ENOUGH_MEMORY );
-
- CAknGlobalNote* errorNote = CAknGlobalNote::NewLC();
- errorNote->ShowNoteL( EAknGlobalErrorNote, *errorBuf );
- CleanupStack::PopAndDestroy( 2, errorBuf ); // errorNote also
- }
- }
- break;
- case EPslnCmdAnimBackgroundDeactivate:
- iModel->SetAnimBackground( EPslnDisableAllEffects );
- break;
- case EPslnCmdEmptyCommand: // Fallthrough
- case EPslnCmdAppActivate: // Fallthrough
- {
- if ( iContainer )
- {
- if ( iPreviewMode )
- {
- //stop preview
- iToBeActivatedSkinIndex = activeSkinIndex;
- static_cast<CPslnGeneralThemeContainer*>(iContainer)->
- LockUpAndDownKeys( ETrue );
- static_cast<CPslnGeneralThemeContainer*>(iContainer)->
- CancelThemePreviewL();
-
- HandlePreviewStateChange( EFalse );
- }
-
- if ( iToBeActivatedSkinIndex != KErrNotFound )
- {
- activeSkinIndex = iToBeActivatedSkinIndex;
- iToBeActivatedSkinIndex = -1;
- }
- // Do nothing if active theme is selected.
- if ( iModel->IsActiveSkinSelected( activeSkinIndex ) )
- {
- HandlePreviewStateChange( ETrue );
- static_cast<CPslnGeneralThemeContainer*>(iContainer)->
- StartThemePreviewL();
- break;
- }
- // Check is the theme corrupted.
- if ( !iModel->IsValidForActivation( activeSkinIndex ) )
- {
- HBufC* errorBuf = StringLoader::LoadLC(
- R_PSLN_QTN_SKINS_ERROR_CORRUPTED );
- // Display global note.
- CAknGlobalNote* errorNote = CAknGlobalNote::NewLC();
- errorNote->ShowNoteL( EAknGlobalErrorNote, *errorBuf );
- CleanupStack::PopAndDestroy( 2, errorBuf ); // errorNote also
- return;
- }
- else
- {
- iModel->SetCurrentSelectedSkinIndex( activeSkinIndex );
- }
- static_cast<CPslnGeneralThemeContainer*>(iContainer)->
- LockUpAndDownKeys( EFalse );
- }
- }
- case EPslnCmdAppDownload: // Fallthrough
- default:
- iPslnUi->HandleCommandL( aCommand );
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnGeneralThemeView::UpdateSkinListItemsL()
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::UpdateSkinListItemsL( TInt aCurrentIndex )
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::UpdateSkinListItemsL");
- if ( iContainer )
- {
- if ( aCurrentIndex == KErrNotFound )
- {
- aCurrentIndex = iContainer->CurrentItemIndex();
- }
- static_cast<CPslnGeneralThemeContainer*>(iContainer)->
- UpdateSkinListItemsL( aCurrentIndex );
- }
- CheckMiddleSoftkeyLabelL();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGeneralThemeView::DoActivateL
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage )
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::DoActivateL");
-
- CPslnBaseView::DoActivateL(
- aPrevViewId,
- aCustomMessageId,
- aCustomMessage );
-
- // If view is directly activated (not through main view), update
- // tab group (and main view's active folder). The static views
- // have same UID as their tab index.
- if ( aPrevViewId.iAppUid != KUidPsln )
- {
- iPslnUi->UpdateTabIndex(
- KPslnGeneralView.iUid,
- KPslnGeneralView.iUid );
- }
-
- // Update skin list.
- // Set active index and update container.
- TInt currentlySelected = iModel->ActiveSkinIndex();
- iModel->SetCurrentSelectedSkinIndex( currentlySelected );
-
- CheckMiddleSoftkeyLabelL();
-
- iPslnUi->ToggleScreenBlankerL( EFalse, EFalse );
- iToBeActivatedSkinIndex = -1;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGeneralThemeView::DoDeactivate
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::DoDeactivate()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::DoDeactivate");
- RemoveCommandFromMSK();
- CPslnBaseView::DoDeactivate();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnGeneralThemeView::DynInitMenuPaneL
-//
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::DynInitMenuPaneL");
- if( aResourceId == R_PSLN_GEN_VIEW_MENUPANE )
- {
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
-
- TBool downloadExists = ETrue;
- // Download theme is not selected, or it is not supported.
- if ( iDownloadItemIndex == KErrNotFound )
- {
- // Download item is not supported.
- aMenuPane->SetItemDimmed( EPslnCmdAppDownload, ETrue );
- downloadExists = EFalse;
- }
- else if ( iCurrentItem != iDownloadItemIndex )
- {
- // Download is supported, but is not selected.
- aMenuPane->SetItemDimmed( EPslnCmdAppDownload, ETrue );
- downloadExists = ETrue;
- }
- else
- {
- aMenuPane->SetItemDimmed( EPslnCmdAppActivate, ETrue );
- }
-
- // Update current item index in model.
- // Possibly reduce by one, since UI might show Download item.
- TInt skinIndex = iCurrentItem - (TInt) downloadExists;
- iModel->SetCurrentSelectedSkinIndex( skinIndex );
-
- if( iModel->IsActiveSkinSelected() ||
- !iModel->IsValidForActivation( skinIndex ) )
- {
- aMenuPane->SetItemDimmed( EPslnCmdAppActivate, ETrue );
- }
- }
- else if ( aResourceId == R_PSLN_TRANSITION_EFFECTS_MENU_PANE )
- {
- if ( ( iCurrentItem == iDownloadItemIndex &&
- iDownloadItemIndex != KErrNotFound ) ||
- !FeatureManager::FeatureSupported(KFeatureIdUiTransitionEffects) )
- {
- // Remove Transition Effects when Download is highlighted.
- aMenuPane->SetItemDimmed( EPslnCmdTransitionEffectsSubMenuOpen, ETrue );
- }
- }
- else if ( aResourceId == R_PSLN_TRANSITION_EFFECTS_CASCADE_MENU )
- {
- // Do nothing with cascade menu values, if Download is highlighted.
- if ( iCurrentItem != iDownloadItemIndex ||
- iDownloadItemIndex != KErrNotFound )
- {
- TInt transitionEffectsValue = iModel->GetTransitionEffectStateL();
- // Effects are enabled if value is NOT KMaxTInt.
- if( transitionEffectsValue != KMaxTInt )
- {
- aMenuPane->SetItemButtonState(
- EPslnCmdTransitionEffectsActivate,
- EEikMenuItemSymbolOn );
- aMenuPane->SetItemButtonState(
- EPslnCmdTransitionEffectsDeactivate,
- EEikMenuItemSymbolIndeterminate );
- }
- else
- {
- aMenuPane->SetItemButtonState(
- EPslnCmdTransitionEffectsActivate,
- EEikMenuItemSymbolIndeterminate );
- aMenuPane->SetItemButtonState(
- EPslnCmdTransitionEffectsDeactivate,
- EEikMenuItemSymbolOn );
- }
- }
- }
- else if ( aResourceId == R_PSLN_ANIM_BACKGROUND_MENU_PANE )
- {
- TBool downloadExists = ETrue;
- if ( iDownloadItemIndex == KErrNotFound )
- {
- downloadExists = EFalse;
- }
- TInt skinIndex = iCurrentItem - (TInt) downloadExists;
-
- if ( ( iCurrentItem != iDownloadItemIndex &&
- iDownloadItemIndex != KErrNotFound )||
- !iModel->IsActiveSkinSelected() ||
- !PslnFeatures::IsSupported( KPslnSupportAnimBackground ) ||
- !iModel->IsSupportAnimBg(skinIndex))
- {
- aMenuPane->SetItemDimmed( EPslnCmdAnimBackgroundSubMenuOpen, ETrue );
- }
- }
- else if ( aResourceId == R_PSLN_ANIM_BACKGROUND_CASCADE_MENU )
- {
- // Do nothing with cascade menu values, if Download is highlighted.
- if ( iCurrentItem != iDownloadItemIndex ||
- iDownloadItemIndex != KErrNotFound )
- {
- TInt animEffectsValue = iModel->AnimBackgroundState();
- // Animation background are enabled if value is NOT KMaxTInt.
- if( animEffectsValue != KMaxTInt )
- {
- aMenuPane->SetItemButtonState(
- EPslnCmdAnimBackgroundActivate,
- EEikMenuItemSymbolOn );
- aMenuPane->SetItemButtonState(
- EPslnCmdAnimBackgroundDeactivate,
- EEikMenuItemSymbolIndeterminate );
- }
- else
- {
- aMenuPane->SetItemButtonState(
- EPslnCmdAnimBackgroundActivate,
- EEikMenuItemSymbolIndeterminate );
- aMenuPane->SetItemButtonState(
- EPslnCmdAnimBackgroundDeactivate,
- EEikMenuItemSymbolOn );
- }
- }
- }
- else
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::DynInitMenuPaneL empty else");
- }
- CPslnBaseView::DynInitMenuPaneL( aResourceId, aMenuPane );
- }
-
-// -----------------------------------------------------------------------------
-// Handle listbox selection.
-//
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandleListBoxSelectionL()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::HandleListBoxSelectionL");
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
-
- if ( iCurrentItem == iDownloadItemIndex )
- {
- HandleCommandL( EPslnCmdAppDownload );
- }
- else
- {
- HandleCommandL( EPslnCmdAppActivate );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Handle listbox item highlight.
-//
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandleListBoxItemHighlightL()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::HandleListBoxItemHighlightL");
- if ( iContainer )
- {
- HandlePreviewStateChange( ETrue );
- static_cast<CPslnGeneralThemeContainer*>(iContainer)->StartThemePreviewL();
- }
- }
-
-// -----------------------------------------------------------------------------
-// Create container.
-//
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::NewContainerL()
- {
- iContainer = new(ELeave) CPslnGeneralThemeContainer();
- iContainer->SetMiddleSoftkeyObserver( this );
- static_cast<CPslnGeneralThemeContainer*>(iContainer)->
- SetThemePreviewObserver( this );
- }
-
-// -----------------------------------------------------------------------------
-// Sets view specific title pane text.
-//
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::SetTitlePaneL( TInt& aResourceId )
- {
- aResourceId = R_PSLN_TITLE_PANE_GENERAL;
- }
-
-// -----------------------------------------------------------------------------
-// Checks is there a need to update the middle softkey label.
-// This method should do nothing but MSK issues, since it is still called
-// if the framework does not support MSK.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::CheckMiddleSoftkeyLabelL()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::CheckMiddleSoftkeyLabelL");
- TInt currentItem = KErrNotFound;
- if ( iContainer )
- {
- currentItem = iContainer->CurrentItemIndex();
- }
-
- TInt activeSkinIndex = 0;
- if ( iModel )
- {
- activeSkinIndex = iModel->ActiveSkinIndex();
- }
- if ( iDownloadItemIndex != KErrNotFound )
- {
- // If download item is present, increment current index,
- // so that skin index maps directly to listbox indexes.
- activeSkinIndex++;
- }
-
- // First remove any prevous commands.
- RemoveCommandFromMSK();
- if ( currentItem == iDownloadItemIndex && currentItem != KErrNotFound )
- {
- // Set middle softkey as Download.
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_SELECT,
- EPslnCmdAppDownload );
- }
- else if ( currentItem != activeSkinIndex )
- {
- // Set middle softkey as Apply.
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_ACTIVATE,
- EPslnCmdAppActivate );
- }
- else
- {
- // Set middle softkey as dummy.
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_DUMMY,
- EPslnCmdEmptyCommand );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Requests container to update skin data for D column.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::UpdateSkinListItemsDColumnOnlyL()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::UpdateSkinListItemsL");
- if ( iContainer )
- {
- static_cast<CPslnGeneralThemeContainer*>(iContainer)->
- UpdateSkinListItemsDColumnOnlyL();
- }
- CheckMiddleSoftkeyLabelL();
- }
-
-// -----------------------------------------------------------------------------
-// New theme preview state available.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandlePreviewStateChange( const TBool& aPreviewMode )
- {
- iPreviewMode = aPreviewMode;
-// TRAPD( state, iModel->GetTransitionEffectStateL() );
-// if ( state != KMaxTInt )
-// {
-// CAknView::StopDisplayingMenuBar();
-// }
- if ( iDelayedSkinActivation && !iPreviewMode )
- {
- TRAP_IGNORE( HandleCommandL( EPslnCmdAppActivate ) );
- iDelayedSkinActivation = EFalse;
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// Restart Quick Preview
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::RestartQuickPreviewL()
- {
- CPslnGeneralThemeContainer* container = static_cast<CPslnGeneralThemeContainer*>(iContainer);
-
- container->RestartQuickPreviewL();
- }
-
-// -----------------------------------------------------------------------------
-// Remove local skin items.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::RemoveLocalSkinItems()
- {
- // Remove locally skinned items.
- MAknsSkinInstance* si = AknsUtils::SkinInstance();
- if ( si )
- {
- si->SetChangeEventsEnabled( EFalse );
- si->RemoveLocalItemDefs();
- si->SetChangeEventsEnabled( ETrue );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Remove MSK command mappings.
-// This method should do nothing but MSK issues.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::RemoveCommandFromMSK()
- {
- PSLN_TRACE_DEBUG("CPslnGeneralThemeView::RemoveCommandFromMSK");
- CEikButtonGroupContainer* cbaGroup = Cba();
- // Check if model exists => indicates that UI is not exiting.
- if ( cbaGroup && iPslnUi->Model() )
- {
- cbaGroup->RemoveCommandFromStack( KPslnMSKControlID, EPslnCmdAppDownload );
- cbaGroup->RemoveCommandFromStack( KPslnMSKControlID, EPslnCmdAppActivate );
- }
- }
-// -----------------------------------------------------------------------------
-// Handle listbox stylus down event.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandleListBoxStylusDown()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Handle listbox stylus move event.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandleListBoxStylusDrag()
- {
- }
-// -----------------------------------------------------------------------------
-// Hightligt Default skin
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HightlightDefaultSkin()
- {
- CPslnGeneralThemeContainer* container = static_cast<CPslnGeneralThemeContainer*>(iContainer);
- TInt modifier = container->IsEmbeddedLinkVisible( );
- container->SetCurrentItemIndex( modifier );
- }
-// End of File
--- a/psln/Src/PslnMainView.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,361 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Main state view for Psln application.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <psln.rsg>
-
-#include <eikbtgpc.h>
-#include <avkon.rsg>
-
-#include "PslnMainView.h"
-#include "PslnMainViewContainer.h"
-#include "PslnUi.h"
-
-// Framework
-#include <pslnfwplugininterface.h>
-#include "PslnPluginHandler.h"
-
-// CONSTANTS
-// Main view indexes of default plugins.
-const TInt KPslnASPluginLoc = 1;
-const TInt KPslnAIPluginLoc = 2;
-
-// ============================ MEMBER FUNCTIONS ===============================
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CPslnMainView* CPslnMainView::NewLC()
- {
- CPslnMainView* self = new (ELeave) CPslnMainView();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::ConstructL()
- {
- BaseConstructL( R_PSLN_MAIN_VIEW );
-
- ConstructViewArrayL();
- // Start background operation and create tabgroup.
- iPslnUi->LoadViewsWhenIdleL();
- iPslnUi->ConstructTabGroupL();
- }
-
-// ---------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnMainView::CPslnMainView()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CPslnMainView::~CPslnMainView()
- {
- iViewIds.Close();
- }
-
-// ---------------------------------------------------------------------------
-// TUid CPslnMainView::Id()
-// ---------------------------------------------------------------------------
-//
-TUid CPslnMainView::Id() const
- {
- return KPslnMainView2;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::HandleCommandL
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::HandleCommandL( TInt aCommand )
- {
- switch ( aCommand )
- {
- case EPslnCmdAppOpen:
- DoActivateLocalViewL();
- break;
- // If view was launched externally, handle back as exit.
- case EAknSoftkeyBack:
- case EAknSoftkeyExit:
- aCommand = EAknCmdExit;
- //lint -fallthrough
- default:
- iPslnUi->HandleCommandL( aCommand );
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::ActiveView
-// ---------------------------------------------------------------------------
-//
-TInt CPslnMainView::ActiveView() const
- {
- return iCurrentItem;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::SetActiveFolder
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::SetActiveFolder( TInt aIndex )
- {
- iCurrentItem = aIndex;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::ActiveFolderUid
-// ---------------------------------------------------------------------------
-//
-TInt CPslnMainView::ActiveFolderUid()
- {
- if ( ( iCurrentItem > iViewIds.Count() )||
- ( iCurrentItem < 0 ) )
- {
- // If index is out-of-bounds, set first item active.
- iCurrentItem = 0;
- return 0;
- }
- return iViewIds[ iCurrentItem ].iUid;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::SetActiveFolder
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::SetActiveFolder( TUid aUid )
- {
- for ( TInt idx = 0; idx < iViewIds.Count(); idx++ )
- {
- if ( iViewIds[ idx ].iUid == aUid.iUid )
- {
- iCurrentItem = idx;
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::DoActivateL
-// ---------------------------------------------------------------------------
-void CPslnMainView::DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage )
- {
- // If application is launched through NULL thread, it means that it is
- // launched as embedded application
- if ( aPrevViewId.iAppUid.iUid == KUidPsln.iUid &&
- aPrevViewId.iViewUid.iUid == KPslnGeneralView.iUid )
- {
- MAknsSkinInstance* si = AknsUtils::SkinInstance();
- si->SetChangeEventsEnabled( EFalse );
- si->RemoveLocalItemDefs();
- si->SetChangeEventsEnabled( ETrue );
- }
-
- CPslnBaseView::DoActivateL(
- aPrevViewId,
- aCustomMessageId,
- aCustomMessage );
-
- // Set middle softkey label.
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_OPEN,
- EPslnCmdAppOpen );
-
- //set highlight ,if returning from other view
- if(iContainer && aPrevViewId.iAppUid.iUid == KUidPsln.iUid)
- {
- //search which item should be highlighted
- TInt activateItem = GetListboxItemIndexByViewId(aPrevViewId);
- if(activateItem != KErrNotFound)
- {
- iContainer->SetCurrentItemIndex( activateItem );
- }
- else
- {
- iContainer->SetCurrentItemIndex( iCurrentItem );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::DynInitMenuPaneL
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- CPslnBaseView::DynInitMenuPaneL( aResourceId, aMenuPane );
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::HandleListBoxSelectionL
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::HandleListBoxSelectionL()
- {
- HandleCommandL( EPslnCmdAppOpen );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnMainView::HandleListBoxItemHighlightL
-// -----------------------------------------------------------------------------
-//
-void CPslnMainView::HandleListBoxItemHighlightL()
- {
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::NewContainerL
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::NewContainerL()
- {
- iContainer = new(ELeave) CPslnMainViewContainer( iPslnUi );
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::ConstructViewArrayL
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::ConstructViewArrayL()
- {
- // First add static views.
- iViewIds.AppendL( KPslnGeneralView );
-
- TBitFlags views = iPslnUi->ViewSupport();
- if ( views.IsSet( CPslnUi::EPslnWallpaperView ) )
- {
- iViewIds.AppendL( KPslnWallpaperView );
- }
-
- if ( views.IsSet ( CPslnUi::EPslnScreensaverView ) )
- {
- iViewIds.AppendL( KPslnScreenSaverView );
- }
-
- // Then start looking for plugins.
- CArrayPtrFlat<CPslnFWPluginInterface>* array =
- iPslnUi->PluginHandler()->GetPluginArray();
- CleanupStack::PushL ( array );
- if ( array )
- {
- TBool appShellPluginInserted = EFalse;
- for ( TInt i = 0; i < array->Count(); i++ )
- {
- CAknView* view = array->At( i );
-
- // If plugin is either AS or AI, insert between static views.
- if ( view->Id().iUid == KPslnASPluginUid.iUid )
- {
- iViewIds.InsertL( view->Id(), KPslnASPluginLoc );
- appShellPluginInserted = ETrue;
- }
- else if ( view->Id().iUid == KPslnAIPluginUid.iUid )
- {
- if ( appShellPluginInserted )
- {
- iViewIds.InsertL( view->Id(), KPslnAIPluginLoc );
- }
- else
- {
- // If there is ASplugin - claim it's place.
- // note that ASplugin maybe later inserted to this place.
- iViewIds.InsertL( view->Id(), KPslnASPluginLoc );
- }
- }
- // Other plugins are just appended in order from plugin array.
- // Plugins are already ordered in PluginHandler.
- else
- {
- iViewIds.AppendL( view->Id() );
- }
- }
- }
- CleanupStack::Pop( array );
- }
-
-// ---------------------------------------------------------------------------
-// CPslnMainView::CbaExitEnabled
-// ---------------------------------------------------------------------------
-//
-TInt CPslnMainView::CbaResourceId( const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/ )
- {
- TBool value = iEikonEnv->StartedAsServerApp();
- return value ? R_AVKON_SOFTKEYS_OPTIONS_BACK
- : R_AVKON_SOFTKEYS_OPTIONS_EXIT;
- }
-
-// ---------------------------------------------------------------------------
-// Tries to activate local view from UI class. If class is not yet
-// created, instructs UI class to create the view first.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainView::DoActivateLocalViewL()
- {
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
- if ( iCurrentItem > iViewIds.Count() )
- {
- User::Leave( KErrOverflow );
- }
- // These views are possibly done dynamically. It is possible that due to
- // idle time, they have already been created.
- if ( iCurrentItem == KPslnGeneralView.iUid ||
- iCurrentItem == KPslnWallpaperView.iUid ||
- iCurrentItem == KPslnScreenSaverView.iUid )
- {
- iPslnUi->CreateViewL( iViewIds[ iCurrentItem ] );
- }
- iPslnUi->ActivateLocalViewL( iViewIds[ iCurrentItem ] );
- }
-
-// ---------------------------------------------------------------------------
-// Return given view's index by searching the view id
-// ---------------------------------------------------------------------------
-//
-TInt CPslnMainView::GetListboxItemIndexByViewId(const TVwsViewId& aViewId) const
- {
- TInt listBoxItemIndex = KErrNotFound;
-
- for( int i=0; i<iViewIds.Count(); i++ )
- {
- if( iViewIds[i] == aViewId.iViewUid )
- {
- listBoxItemIndex = i;
- }
- }
-
- return listBoxItemIndex;
- };
-
-// End of File
--- a/psln/Src/PslnMainViewContainer.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,381 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Container for Main View.
-*
-*/
-
-
-
-// INCLUDE FILES
-
-// Psln specific.
-#include "PslnMainViewContainer.h"
-#include "PslnUi.h"
-#include "PslnDebug.h"
-#include "PslnConst.h"
-
-// Lists & Icons.
-#include <aknlists.h>
-#include <AknIconArray.h>
-#include <eikclbd.h>
-
-// Framework
-#include <pslnfwplugininterface.h>
-#include "PslnPluginHandler.h"
-
-// Resources
-#include <psln.rsg>
-#include <pslnicon.mbg>
-#include <data_caging_path_literals.hrh>
-
-// Help related.
-#include <csxhelp/skins.hlp.hrh>
-
-// CONSTANTS
-// Tab character.
-_LIT( KTab, "\t" );
-
-// Icon indexes for listbox.
-const TInt KPslnGeneralId = 0;
-const TInt KPslnWallpaperId = 1;
-const TInt KPslnScreenSaverId = 2;
-// Container granularity.
-const TInt KPslnMainConGranularity = 6;
-// Max index of static (i.e. non-ECOM) folder when no plugins loaded.
-const TInt KPslnStaticFolderNum = 2;
-
-// Path to icon file.
-_LIT( KPslnIconFilename, "z:pslnicon.mbm" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// ---------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnMainViewContainer::CPslnMainViewContainer( CPslnUi* aPslnUi )
- : iPslnUi( aPslnUi )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CPslnMainViewContainer::~CPslnMainViewContainer()
- {
- // iListBox is deleted in class CPslnBaseContainer.
- delete iItems;
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainViewContainer::ConstructL( const TRect& aRect )
- {
- iListBox = new (ELeave) CAknSingleLargeStyleListBox;
-
- BaseConstructL(
- aRect,
- R_PSLN_SKIN_LIST_VIEW_TITLE,
- R_PSLN_MAIN_VIEW_LBX );
- }
-
-// ---------------------------------------------------------------------------
-// Creates listbox.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainViewContainer::ConstructListBoxL( TInt aResLbxId )
- {
- iItems = iCoeEnv->ReadDesC16ArrayResourceL( aResLbxId );
- CreateListBoxItemsL();
- }
-
-
-// ---------------------------------------------------------------------------
-// Creates listbox items.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainViewContainer::CreateListBoxItemsL()
- {
- PSLN_TRACE_DEBUG("CPslnMainViewContainer::CreateListBoxItemsL BEGIN");
- // Array for icons in the listbox. Owns the icons.
- CAknIconArray* iconList =
- new (ELeave) CAknIconArray( KPslnMainConGranularity );
- CleanupStack::PushL( iconList );
-
- // Find the resource file:
- HBufC* iconFile = HBufC::NewLC( KMaxFileName );
- TPtr fileNamePtr = iconFile->Des();
- GetIconFilePath( fileNamePtr );
-
- // Add non-plugin icons to icon group.
- // General icon.
- AddIconL(
- iconList,
- KAknsIIDQgnPropPslnGeneralSub,
- fileNamePtr,
- EMbmPslniconQgn_prop_psln_general_sub,
- EMbmPslniconQgn_prop_psln_general_sub_mask );
-
- // Wallpaper icon.
- AddIconL(
- iconList,
- KAknsIIDQgnPropPslnWpaperSub,
- fileNamePtr,
- EMbmPslniconQgn_prop_psln_wpaper_sub,
- EMbmPslniconQgn_prop_psln_wpaper_sub_mask );
-
- // Screensaver screensaver.
- AddIconL(
- iconList,
- KAknsIIDQgnPropPslnSsaverSub,
- fileNamePtr,
- EMbmPslniconQgn_prop_psln_ssaver_sub,
- EMbmPslniconQgn_prop_psln_ssaver_sub_mask );
-
- CleanupStack::PopAndDestroy( iconFile );
-
- // Add General Theme static view.
- // Icon location is ok - directly from resources.
- MakeItemL( KPslnGeneralId );
-
- // How many dynamic items have been added in-between.
- TInt offset = 0;
- iPluginArray = iPslnUi->PluginHandler()->GetPluginArray();
- // Create buffers.
- HBufC* buf = HBufC::NewLC( KPslnItemLength );
- TPtr ptrBuf = buf->Des();
- HBufC* item = HBufC::NewLC( KPslnItemLength );
- TPtr ptrItem = item->Des();
- // Add Active Idle (and Application Shell) plugin(s).
- if ( iPluginArray )
- {
- for ( TInt i = 0; i < iPluginArray->Count(); i++ )
- {
- CPslnFWPluginInterface* plugin = iPluginArray->operator[]( i );
- CleanupStack::PushL( plugin );
-
- // TRAP all but OOM, so that plugins cannot cause Psln to fail to
- // launch.
- TRAPD( err,
- offset += MakePluginItemL( *plugin, *iconList, ptrBuf, ptrItem ) );
- if ( err == KErrNoMemory )
- {
- User::Leave( KErrNoMemory );
- }
-
- // Initialize buffers.
- ptrBuf.Zero();
- ptrItem.Zero();
-
- // icon is now owned by icon array and plugin by plugin handler
- CleanupStack::Pop( plugin );
- plugin = NULL;
- }
- }
- CleanupStack::PopAndDestroy( 2, buf ); // buf, item
-
- // Add Screen Saver and Wallpaper static views.
- TBitFlags views = iPslnUi->ViewSupport();
- if ( views.IsSet( CPslnUi::EPslnWallpaperView ) )
- {
- MakeItemL( KPslnWallpaperId, offset );
- }
-
- if ( views.IsSet( CPslnUi::EPslnScreensaverView ) )
- {
- MakeItemL( KPslnScreenSaverId, offset );
- }
-
- iPslnUi->AllViewsDone();
-
- // Destroy the old icons because SetIconArray() does not destroy them.
- CEikColumnListBox* listbox = static_cast<CEikColumnListBox*> ( iListBox );
- CArrayPtr<CGulIcon>* oldIcons =
- listbox->ItemDrawer()->ColumnData()->IconArray();
- if( oldIcons )
- {
- oldIcons->ResetAndDestroy();
- delete oldIcons;
- }
-
- // Transfer ownership of icon array to the lbx.
- listbox->ItemDrawer()->ColumnData()->SetIconArray( iconList );
- CleanupStack::Pop( iconList );
-
- iListBox->HandleItemAdditionL();
- PSLN_TRACE_DEBUG("CPslnMainViewContainer::CreateListBoxItemsL END");
- }
-
-// ---------------------------------------------------------------------------
-// Creates a specific setting item.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainViewContainer::MakeItemL( const TInt aIndex, const TInt aOffset )
- {
- PSLN_TRACE_DEBUG("CPslnMainViewContainer::MakeItemL BEGIN");
- if ( aIndex > iItems->Count() )
- {
- User::Leave( KErrArgument );
- }
- HBufC* item = (*iItems)[aIndex].AllocLC();
- // Reallocating invalidates the original string.
- HBufC* reallocItem = item->ReAllocL( item->Length() + KPslnIconSize );
- CleanupStack::Pop( item );
- item = reallocItem;
- CleanupStack::PushL( item );
- reallocItem = NULL; // do not use anymore.
- TPtr ptr = item->Des();
- if ( aOffset != KErrNotFound )
- {
- iItemArray->InsertL( aIndex + aOffset, ptr );
- }
- else
- {
- iItemArray->InsertL( aIndex, ptr );
- }
- CleanupStack::PopAndDestroy( item );
- PSLN_TRACE_DEBUG("CPslnMainViewContainer::MakeItemL END");
- }
-
-// ---------------------------------------------------------------------------
-// Gets help context for Help application.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainViewContainer::GetHelpContext( TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KUidPsln;
- aContext.iContext = KSKINS_HLP_APP_MAIN;
- }
-
-// ---------------------------------------------------------------------------
-// Creates a plugin item (with title and icon)
-// ---------------------------------------------------------------------------
-//
-TInt CPslnMainViewContainer::MakePluginItemL(
- CPslnFWPluginInterface& aPlugin, CAknIconArray& aIconList,
- TPtr& aBufPtr, TPtr& aItemPtr )
- {
- TInt offset = 0;
- // Adding icon.
- CGulIcon* icon = aPlugin.CreateIconL();
- CleanupStack::PushL( icon );
- PSLN_TRACE_DEBUG("CPslnMainViewContainer::MakePluginItemL BEGIN");
-
- aPlugin.GetCaptionL( aBufPtr );
- TInt location = KErrNotFound;
- CPslnFWPluginInterface::TPslnFWLocationType locType;
- aPlugin.GetLocationTypeAndIndex( locType, location );
-
- // If it is AS or AI plugin, add it.
- if ( aPlugin.Id().iUid == KPslnASPluginUid.iUid ||
- aPlugin.Id().iUid == KPslnAIPluginUid.iUid )
- {
- TInt upcomingPlace = location + KPslnStaticFolderNum;
- if ( upcomingPlace >= aIconList.Count() )
- {
- upcomingPlace = aIconList.Count();
- }
- aIconList.InsertL( upcomingPlace , icon );
-
- // Let's correct the icon index.
- upcomingPlace = location + KPslnStaticFolderNum;
- aItemPtr.AppendNum( upcomingPlace );
- aItemPtr.Append( KTab );
- aItemPtr.Append( aBufPtr );
- if ( location >= iItemArray->Count() )
- {
- location = iItemArray->Count();
- }
- iItemArray->InsertL( location , aItemPtr );
- offset++;
- }
- else
- {
- aIconList.AppendL( icon );
- // use icon list position as index
- // iconList->Count() is here always at least 1
- // we need to adjust the icon index based on loaded plugins
- // which are inserted between static views.
- aItemPtr.AppendNum( aIconList.Count() - 1 + iAIAdded + iASAdded );
- aItemPtr.Append( KTab );
- aItemPtr.Append( aBufPtr );
- iItemArray->AppendL( aItemPtr );
- }
-
- if ( aPlugin.Id().iUid == KPslnASPluginUid.iUid )
- {
- iASAdded = ETrue;
- }
-
- if ( aPlugin.Id().iUid == KPslnAIPluginUid.iUid )
- {
- iAIAdded = ETrue;
- }
-
- CleanupStack::Pop( icon );
- return offset;
- }
-
-// ---------------------------------------------------------------------------
-// Adds icon to icon array.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainViewContainer::AddIconL(
- CAknIconArray* aIcons,
- const TAknsItemID& aSkinId,
- const TDesC& aFileName,
- TInt aBitmapId,
- TInt aMaskId )
- {
- CFbsBitmap* bitmap = NULL;
- CFbsBitmap* mask = NULL;
- AknsUtils::CreateIconL(
- AknsUtils::SkinInstance(),
- aSkinId,
- bitmap,
- mask,
- aFileName,
- aBitmapId,
- aMaskId );
- CleanupStack::PushL( bitmap );
- CleanupStack::PushL( mask );
- CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
- CleanupStack::Pop( 2, bitmap ); // bitmap, mask
- CleanupStack::PushL( icon );
- if ( aIcons )
- {
- aIcons->AppendL( icon );
- }
- CleanupStack::Pop( icon );
- }
-
-// ---------------------------------------------------------------------------
-// Parses icon file path to given parameter.
-// ---------------------------------------------------------------------------
-//
-void CPslnMainViewContainer::GetIconFilePath( TDes& aPath )
- {
- // Find the resource file:
- TParse parse;
- parse.Set( KPslnIconFilename, &KDC_APP_BITMAP_DIR, NULL );
- if ( aPath.MaxLength() >= parse.FullName().Length() )
- {
- aPath.Copy( parse.FullName() );
- }
- }
-
-// End of File
--- a/psln/Src/PslnPluginHandler.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles application specific theme plugins.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "PslnPluginHandler.h"
-#include "PslnUi.h"
-#include "PslnDebug.h"
-
-// Framework
-#include <pslnfwplugininterface.h>
-#include <pslnfwpluginhandler.h>
-
-// CONSTANTS
-// Plugins granularity.
-const TInt KPslnPluginGranularity = 4;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnPluginHandler::CPslnPluginHandler( CPslnUi* aPslnUi ) : iPslnUi( aPslnUi )
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnPluginHandler::ConstructL()
- {
- // Load the plugin views.
- iPluginArray =
- new CArrayPtrFlat<CPslnFWPluginInterface>( KPslnPluginGranularity );
- CPslnFWPluginHandler* pluginLoader =
- CPslnFWPluginHandler::NewL( iPslnUi, iPluginArray );
- CleanupStack::PushL( pluginLoader );
- pluginLoader->LoadPluginsL( iPluginArray );
- CleanupStack::PopAndDestroy( pluginLoader );
-
- for ( TInt i = 0; i < iPluginArray->Count(); i ++ )
- {
- CPslnFWPluginInterface* plugin = iPluginArray->operator[]( i );
- iPslnUi->AddNewViewL( plugin );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnPluginHandler* CPslnPluginHandler::NewL( CPslnUi* aPslnUi )
- {
- CPslnPluginHandler* self = new( ELeave ) CPslnPluginHandler( aPslnUi );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// Destructor
-CPslnPluginHandler::~CPslnPluginHandler()
- {
- // Reset also deletes the plugins
- if ( iPluginArray )
- {
- iPluginArray->Reset();
- REComSession::FinalClose();
- delete iPluginArray;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnPluginHandler::GetPluginArray
-// ---------------------------------------------------------------------------
-//
-CArrayPtrFlat<CPslnFWPluginInterface>* CPslnPluginHandler::GetPluginArray() const
- {
- return iPluginArray;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnPluginHandler::GetPlugin
-//
-// ---------------------------------------------------------------------------
-//
-CPslnFWPluginInterface* CPslnPluginHandler::GetPlugin( const TUid& aUid )
- {
- CPslnFWPluginInterface* pluginToFind = NULL;
- PSLN_TRACE_DEBUG1("CPslnPluginHandler::GetPlugin Plugin Uid=%d", aUid.iUid );
- if ( iPluginArray )
- {
- TInt pluginCount = iPluginArray->Count();
- PSLN_TRACE_DEBUG1("CPslnPluginHandler::GetPlugin Plugin count=%d", pluginCount );
-
- // Go through all the plugins and add the info to tab group.
- TInt i = 0;
- for ( ; i < pluginCount; i++ )
- {
- CPslnFWPluginInterface* plugin = iPluginArray->operator[]( i );
- if ( plugin )
- {
- PSLN_TRACE_DEBUG1("CPslnPluginHandler::GetPlugin Id=%d", plugin->Id().iUid );
- if ( plugin->Id().iUid == aUid.iUid )
- {
- PSLN_TRACE_DEBUG("CPslnPluginHandler::GetPlugin found");
- pluginToFind = plugin;
- break;
- }
- }
- else
- {
- PSLN_TRACE_DEBUG("CPslnPluginHandler::GetPlugin Plugin fails");
- }
- }
- if ( !pluginToFind )
- {
- PSLN_TRACE_DEBUG("CPslnPluginHandler::GetPlugin not found");
- }
- }
- else
- {
- PSLN_TRACE_DEBUG("CPslnPluginHandler::GetPlugin No plugin array");
- }
- return pluginToFind;
- }
-// End of File
--- a/psln/Src/PslnPropertySubscriber.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Starts subscribing PubSub key.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "PslnPropertySubscriber.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-//
-// NOTE that callback method is NOT allowed to leave.
-// -----------------------------------------------------------------------------
-//
-CPslnPropertySubscriber::CPslnPropertySubscriber(
- TCallBack aCallBack, RProperty& aProperty )
- : CActive( CActive::EPriorityStandard ), iCallBack( aCallBack ),
- iProperty( aProperty )
- {
- CActiveScheduler::Add( this );
- }
-
-// Destructor
-CPslnPropertySubscriber::~CPslnPropertySubscriber()
- {
- Cancel();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnPropertySubscriber::Subscribe
-// -----------------------------------------------------------------------------
-//
-void CPslnPropertySubscriber::Subscribe()
- {
- if ( !IsActive() )
- {
- iProperty.Subscribe( iStatus );
- SetActive();
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnPropertySubscriber::RunL
-// -----------------------------------------------------------------------------
-//
-void CPslnPropertySubscriber::RunL()
- {
- if ( iStatus.Int() == KErrNone )
- {
- Subscribe();
- iCallBack.CallBack();
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnPropertySubscriber::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CPslnPropertySubscriber::DoCancel()
- {
- iProperty.Cancel();
- }
-
-// End of File
--- a/psln/Src/PslnScreenSaverContainer.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Screen saver view's container.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <aknlists.h>
-#include <eikclbd.h>
-
-// Help context.
-#include <csxhelp/skins.hlp.hrh>
-
-// Psln specific.
-#include <psln.rsg>
-#include "PslnModel.h"
-#include "PslnScreenSaverContainer.h"
-#include "PslnDebug.h"
-#include "PslnConst.h"
-
-// Framework
-#include <pslnfwiconhelper.h>
-
-// ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnScreenSaverContainer::CPslnScreenSaverContainer()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverContainer::ConstructL( const TRect& aRect )
- {
- iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
-
- BaseConstructL( aRect, 0 );
- }
-
-// Destructor
-CPslnScreenSaverContainer::~CPslnScreenSaverContainer()
- {
- // iListBox is deleted in class CPslnBaseContainer.
- }
-
-// ---------------------------------------------------------------------------
-// Updates listbox.
-// ---------------------------------------------------------------------------
-//
-void CPslnScreenSaverContainer::UpdateListBoxL()
- {
- CPslnBaseContainer::UpdateListBoxL();
- }
-
-// -----------------------------------------------------------------------------
-// Creates listbox.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverContainer::ConstructListBoxL( TInt /*aResLbxId*/ )
- {
- CreateListBoxItemsL();
- }
-
-// -----------------------------------------------------------------------------
-// Creates items for listbox.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverContainer::CreateListBoxItemsL()
- {
- PSLN_TRACE_DEBUG("CPslnScreenSaverContainer::CreateListBoxItemsL BEGIN");
- __ASSERT_DEBUG( iModel, User::Panic( _L("Psln"), 1 ) );
- iItemArray->Reset();
- // Find all the screensavers available
- TInt selectedItem = iModel->CurrentPropertyIndexL( KPslnScreenSettingId );
- if ( selectedItem < 0 )
- {
- selectedItem = 0;
- }
-
- const MDesC16Array& ssNames = iModel->ScreensaverNames();
- for( TInt i = 0; i < ssNames.MdcaCount(); i++ )
- {
- HBufC* itemBuf = ssNames.MdcaPoint( i ).AllocL();
- if ( itemBuf )
- {
- PSLN_TRACE_DEBUG("CPslnScreenSaverContainer::CreateListBoxItemsL 2");
- itemBuf = itemBuf->ReAllocL( itemBuf->Length() + KPslnIconSize );
- TPtr ptr = itemBuf->Des();
- if ( selectedItem == i )
- {
- ptr.Insert( 0, KPslnFWActiveListItemFormat );
- }
- else
- {
- ptr.Insert( 0, KPslnFWNonActiveListItemFormat );
- }
- if ( iModel->IsScreenSaverOnMemoryCard( i ) )
- {
- ptr.Append( KPslnFWListItemFormatMMCSuffix );
- }
- else if ( iModel->IsScreenSaverOnMassDrive( i ) )
- {
- ptr.Append( KPslnFWListItemFormatMassDriveSuffix );
- }
- iItemArray->InsertL( i, ptr );
- delete itemBuf;
- }
- }
-
- // Create pre- and post-text icons.
- CPslnFWIconHelper* iconHelper = CPslnFWIconHelper::NewL();
- CleanupStack::PushL( iconHelper );
- iconHelper->AddIconsToSettingItemsL(
- ETrue,
- KErrNotFound,
- iListBox );
- CleanupStack::PopAndDestroy( iconHelper );
- DrawDeferred();
- PSLN_TRACE_DEBUG("CPslnScreenSaverContainer::CreateListBoxItemsL END");
- }
-
-// ---------------------------------------------------------------------------
-// Gets help context for Help application.
-// ---------------------------------------------------------------------------
-//
-void CPslnScreenSaverContainer::GetHelpContext(
- TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KUidPsln;
- aContext.iContext = KSKINS_HLP_SCREENS_SETTINGS;
- }
-
-// End of File
--- a/psln/Src/PslnScreenSaverView.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,818 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Screen saver view.
-*
-*/
-
-
-// INCLUDE FILES
-
-// RProperty keys.
-#include <e32cmn.h>
-#include <e32def.h>
-
-// Central repository.
-#include <centralrepository.h>
-#include <cenrepnotifyhandler.h>
-
-// AVKON services.
-#include <AknWaitDialog.h>
-#include <aknnotewrappers.h>
-#include <avkon.hrh>
-#include <StringLoader.h>
-#include <eikmenup.h>
-
-// Power save mode setting
-#include <psmsettings.h>
-
-// Psln specific.
-#include <psln.rsg>
-#include "PslnModel.h"
-#include "PslnScreenSaverView.h"
-#include "PslnScreenSaverContainer.h"
-#include "PslnConst.h"
-#include "PslnUi.h"
-
-// CONSTANTS
-// Number of default system screensavers.
-const TInt KPslnSystemScreenSavers = 2;
-// Value in PubSub when screensaver preview is off.
-const TInt KPslnScreenSaverPreviewOff = 0;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnScreenSaverView::CPslnScreenSaverView()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::ConstructL()
- {
- BaseConstructL( R_PSLN_SCREENSAVER_VIEW );
-
- iNaviPaneContext = iPslnUi->PslnTabGroup();
-
- iScreenSaverRepository = NULL;
- iScreenSaverNotifier = CCenRepNotifyHandler::NewL(
- *this,
- *iScreenSaverRepository,
- CCenRepNotifyHandler::EIntKey,
- NULL );
-
- // Load screensavers.
- iModel->LoadScreensaverArrayL();
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnScreenSaverView* CPslnScreenSaverView::NewLC()
- {
- CPslnScreenSaverView* self = new (ELeave) CPslnScreenSaverView();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor
-CPslnScreenSaverView::~CPslnScreenSaverView()
- {
- if ( iPreviewModeSubscriber )
- {
- iPreviewModeSubscriber->Cancel();
- }
- iPreviewModeProperty.Close();
- delete iPreviewModeSubscriber;
- if ( iPreviewStateSubscriber )
- {
- iPreviewStateSubscriber->Cancel();
- }
- iPreviewStateProperty.Close();
- delete iPreviewStateSubscriber;
-
- if(iPsmClient)
- {
- iPsmClient->CancelPowerSaveModeNotificationRequest();
- delete iPsmClient;
- }
-
- if ( iWaitDlg )
- {
- delete iWaitDlg;
- }
-
- if ( iScreenSaverNotifier->IsActive() )
- {
- iScreenSaverNotifier->StopListening();
- }
- delete iScreenSaverNotifier;
- delete iScreenSaverRepository;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::Id
-// -----------------------------------------------------------------------------
-//
-TUid CPslnScreenSaverView::Id() const
- {
- return KPslnScreenSaverView;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::HandleCommandL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleCommandL( TInt aCommand )
- {
- TInt currentItem = 0;
- if ( iContainer )
- {
- currentItem = iContainer->CurrentItemIndex();
- }
- switch ( aCommand )
- {
- case EPslnCmdAppChangeScreenSaver:
- if ( iModel->ScreensaverHasCapability( currentItem, EScpCapsConfigure ) )
- {
- HandleScreenSaverSettingsL( currentItem );
- }
- else
- {
- HandleScreenSaverActivationL( currentItem );
- }
- break;
- case EPslnCmdAppSetScreenSaver:
-#ifdef __WINS__
- // Trap in wins => unhandled leave propagated to UI level.
- TRAP_IGNORE( HandleScreenSaverActivationL( currentItem ) );
-#else
- HandleScreenSaverActivationL( currentItem );
-#endif //__WINS__
- break;
-
- case EPslnCmdPreviewScreenSaver:
- HandleScreenSaverPreviewL( currentItem );
- break;
-
- case EPslnCmdAppSettings:
- HandleScreenSaverSettingsL( currentItem );
- break;
-
- case EAknSoftkeyExit:
- aCommand = EAknCmdExit;
- //lint -fallthrough
- default:
- iPslnUi->HandleCommandL( aCommand );
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// When screensaver list is updated due to install/uninstall of screensaver,
-// this method is called.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandlePluginListChangeL()
- {
- // Set highlight to selected item.
- if ( iContainer )
- {
- static_cast<CPslnScreenSaverContainer*> (iContainer)->UpdateListBoxL();
-
- TInt newDefault = iModel->CurrentPropertyIndexL( KPslnScreenSettingId );
- if ( newDefault == KErrNotFound )
- {
- // If no default found, assume that date is default.
- newDefault = 0;
- iModel->SetCurrentPropertyTypeL(
- KPslnScreenSettingId,
- newDefault );
- }
- iContainer->SetCurrentItemIndexAndDraw( newDefault );
- CheckMiddleSoftkeyLabelL();
- }
- }
-
-// -----------------------------------------------------------------------------
-// When this method is called, view checks based on highlight focus, if the MSK
-// label is correct.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::CheckMiddleSoftkeyLabelL()
- {
- // First remove any prevous commands.
- RemoveCommandFromMSK();
-
- if ( IsChangeCommandVisibleL() )
- {
- // Set middle softkey as Change.
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_CHANGE,
- EPslnCmdAppChangeScreenSaver );
- }
- else if(IsApplyCommandVisibleL())
- {
- // For "Date" and for inactive screensavers MSK Label is Apply.
- // Apply is also used for simple installed screensavers that do not have settings.
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_ACTIVATE,
- EPslnCmdAppSetScreenSaver );
-
- }
- else
- {
- // when current focus and ticked item is Date.
- // Do not show MSK.
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_DUMMY,
- EPslnCmdAppSetScreenSaver );
- }
- }
-
-// ---------------------------------------------------------------------------
-// This is callback method for iPreviewModeSubscriber.
-// This method is not allowed to leave - if it leaves, subscription is not
-// activated.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnScreenSaverView::HandlePreviewModeChanged( TAny *aPtr )
- {
- CPslnScreenSaverView* self =
- static_cast<CPslnScreenSaverView*>(aPtr);
- TInt value = KErrNone;
- if ( self->iPreviewModeSubscriber )
- {
- self->iPreviewModeProperty.Get( value );
- }
-
- if ( value == KPslnScreenSaverPreviewOff )
- {
-
- // Stop listening for preview mode changes.
- if ( self->iPreviewModeSubscriber )
- {
- self->iPreviewModeSubscriber->Cancel();
- }
-
- // Restore the original screen saver
- self->iModel->ActivateScreenSaver(
- KErrNotFound,
- EPslnScreenSaverPreviewDeactivation );
-
- if ( self->iContainer )
- {
- // Update container.
- TRAP_IGNORE(
- static_cast<CPslnScreenSaverContainer*>
- (self->iContainer)->UpdateListBoxL() );
- }
- }
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// This is callback method for iPreviewStateSubscriber.
-// This method is not allowed to leave - if it leaves, subscription is not
-// activated.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnScreenSaverView::HandlePreviewStateChanged( TAny* aPtr )
- {
- CPslnScreenSaverView* self =
- static_cast<CPslnScreenSaverView*>(aPtr);
- TInt value = KErrNone;
- if ( self->iPreviewStateSubscriber )
- {
- self->iPreviewStateProperty.Get( value );
- }
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// Screensaver array needs to be loaded before activating the view.
-// It is done from UI class.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage )
- {
- CPslnBaseView::DoActivateL(
- aPrevViewId,
- aCustomMessageId,
- aCustomMessage );
-
- // If view is directly activated (not through main view), update
- // tab group (and main view's active folder). The static views
- // have same UID as their tab index.
- if ( aPrevViewId.iAppUid != KUidPsln )
- {
- iPslnUi->UpdateTabIndex(
- KPslnScreenSaverView.iUid,
- KPslnScreenSaverView.iUid );
- }
-
- // Notify model that we are ready to receive changes in screensavers.
- iModel->EnableScreenSaverNotifications( ETrue, *this );
-
- if ( !iScreenSaverNotifier->IsActive() )
- {
- iScreenSaverNotifier->StartListeningL();
- }
-
- iPsmClient = CPsmClient::NewL(*this);
- iPsmClient->RequestPowerSaveModeNotification();
-
- // Set highlight to selected item.
- if ( iContainer )
- {
- iContainer->SetCurrentItemIndexAndDraw(
- iModel->CurrentPropertyIndexL( KPslnScreenSettingId ) );
- }
- CheckMiddleSoftkeyLabelL();
- }
-
-// -----------------------------------------------------------------------------
-// This is called when view is deactivated (when another view has been activated),
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::DoDeactivate()
- {
- CPslnBaseView::DoDeactivate();
-
- // Notify model that we are no longer active.
- // Get the pointer to model from UI class (even though base view also has it)
- // because, the model might have been deleted at this point and base class is
- // not aware of the deletion.
- if ( iPslnUi->Model() )
- {
- iPslnUi->Model()->EnableScreenSaverNotifications( EFalse, *this );
- }
-
- if(iPsmClient)
- {
- iPsmClient->CancelPowerSaveModeNotificationRequest();
- delete iPsmClient;
- iPsmClient = NULL;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::DynInitMenuPaneL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- if ( aResourceId == R_PSLN_SS_VIEW_MENUPANE )
- {
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
-
- if ( IsChangeCommandVisibleL() )
- {
- // Remove Set screensaver, if current selection is already active.
- aMenuPane->SetItemDimmed( EPslnCmdAppSetScreenSaver, ETrue );
- }
- else if ( IsApplyCommandVisibleL() )
- {
- // Remove Change screensaver if
- // a) not active screensaver
- // b) not of Date type
- // c) installed screensaver is such that it does not have settings.
- aMenuPane->SetItemDimmed( EPslnCmdAppChangeScreenSaver, ETrue );
- }
- else
- {
- // when current focus and ticked item is Date.
- // a) do not show apply
- // b) do not show change
- aMenuPane->SetItemDimmed( EPslnCmdAppSetScreenSaver, ETrue );
- aMenuPane->SetItemDimmed( EPslnCmdAppChangeScreenSaver, ETrue );
- }
-
- // If it is System screen saver, or the plug-in doesn't allow editing
- // of settings, remove 'Settings' item.
- if ( ( iCurrentItem < KPslnSystemScreenSavers ) ||
- ( !iModel->ScreensaverHasCapability(
- iCurrentItem, EScpCapsConfigure ) ) )
- {
- // Set Settings off.
- aMenuPane->SetItemDimmed( EPslnCmdAppSettings, ETrue );
- }
- }
- CPslnBaseView::DynInitMenuPaneL( aResourceId, aMenuPane );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::HandleListBoxSelectionL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleListBoxSelectionL()
- {
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
- if ( IsChangeCommandVisibleL() )
- {
- HandleCommandL( EPslnCmdAppChangeScreenSaver );
- }
- else
- {
- HandleCommandL( EPslnCmdAppSetScreenSaver );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::HandleListBoxItemHighlightL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleListBoxItemHighlightL()
- {
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::NewContainerL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::NewContainerL()
- {
- iContainer = new (ELeave) CPslnScreenSaverContainer();
- iContainer->SetMiddleSoftkeyObserver( this );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::SetTitlePaneL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::SetTitlePaneL( TInt& aResourceId )
- {
-#ifdef RD_CONTROL_PANEL
- aResourceId = R_PSLN_TITLE_PANE_SCREENSAVER;
-#endif //RD_CONTROL_PANEL
- }
-
-// -----------------------------------------------------------------------------
-// If wallpaper image has changed, update container.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleNotifyInt( TUint32 /*aId*/, TInt /*aNewValue*/ )
- {
-
- TInt value = KErrNone;
- if ( iPreviewModeSubscriber )
- {
- iPreviewModeProperty.Get( value );
- }
-
- if( iContainer && ( value == KPslnScreenSaverPreviewOff ) )
- {
- // Update container.
- TRAP_IGNORE(
- static_cast<CPslnScreenSaverContainer*>
- (iContainer)->UpdateListBoxL() );
- }
- }
-
-// -----------------------------------------------------------------------------
-// If the whole repository changes, update container.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleNotifyGeneric( TUint32 aId )
- {
- if ( aId == NCentralRepositoryConstants::KInvalidNotificationId || iContainer )
- {
- // Update container.
- TRAP_IGNORE(
- static_cast<CPslnScreenSaverContainer*>
- (iContainer)->UpdateListBoxL() );
- }
- }
-
-// -----------------------------------------------------------------------------
-// In case of error, try to re-start listening.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleNotifyError(
- TUint32 /*aId*/,
- TInt aError,
- CCenRepNotifyHandler* aHandler )
- {
- if ( ( aError != KErrNone ) && aHandler )
- {
- TRAP_IGNORE( aHandler->StartListeningL() );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::HandleScreenSaverActivationL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleScreenSaverActivationL( TInt aCurrentItem )
- {
- TInt PsmMode = 0;
- iPsmClient->PsmSettings().GetCurrentMode( PsmMode );
- if ( PsmMode == EPsmsrvModePowerSave ) // PSM on, setting is protected
- {
- HBufC* buf = StringLoader::LoadLC( R_PSLN_QTN_PSM_INFONOTE );
- CAknInformationNote* note = new (ELeave) CAknInformationNote( ETrue );
- note->ExecuteLD( *buf );
- CleanupStack::PopAndDestroy( buf );
- return;
- }
-
- TRAPD( err, DoInvokeScreenSaverFunctionL(
- aCurrentItem,
- EScpCapsSelectionNotification ) );
-
- if ( err == KErrNone )
- {
- TRAPD( seterr,iModel->SetCurrentPropertyTypeL(
- KPslnScreenSettingId,
- aCurrentItem ) );
- if( seterr == KErrCancel )
- {
- return;
- }
- else
- {
- User::LeaveIfError( seterr );
- }
-
- if ( iContainer )
- {
- // Update container.
- static_cast<CPslnScreenSaverContainer*>
- (iContainer)->UpdateListBoxL();
- }
- CheckMiddleSoftkeyLabelL();
- }
-
- return;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::HandleScreenSaverPreviewL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleScreenSaverPreviewL( TInt aCurrentItem )
- {
- TRAPD( err, DoInvokeScreenSaverFunctionL(
- aCurrentItem,
- EScpCapsPreviewNotification ) );
-
- if ( err == KErrNone )
- {
- // Start listening for screensaver preview mode key changes.
- CreatePreviewModeSubscriberL();
- CreatePreviewStateSubscriberL();
-
- User::LeaveIfError(
- iModel->ActivateScreenSaver(
- aCurrentItem,
- EPslnScreenSaverPreviewActivation ) );
- }
-
- return;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnScreenSaverView::HandleScreenSaverSettingsL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleScreenSaverSettingsL( TInt aCurrentItem )
- {
- // Indicate to the plugin that active screensaver is possibly modified.
- // Configure plugin.
- TRAP_IGNORE( DoInvokeScreenSaverFunctionL(
- aCurrentItem,
- EScpCapsConfigure ) );
- }
-
-// -----------------------------------------------------------------------------
-// Non-Leaving version of wait note launching.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::LaunchNote()
- {
- TRAP_IGNORE( LaunchNoteL() );
- }
-
-// -----------------------------------------------------------------------------
-// Launches wait note.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::LaunchNoteL()
- {
- HBufC* noteText = StringLoader::LoadLC( R_PSLN_QTN_GEN_NOTE_OPENING );
-
- if ( !iWaitDlg )
- {
- // Create note and launch it.
- CAknWaitDialog* requestingNote = new(ELeave) CAknWaitDialog(
- (REINTERPRET_CAST( CEikDialog**, &iWaitDlg ) ), ETrue );
- iWaitDlg = requestingNote;
- requestingNote->PrepareLC( R_PSLN_GENERAL_WAIT_NOTE );
- if ( noteText )
- {
- requestingNote->SetTextL( noteText->Des() );
- }
- requestingNote->RunLD();
- }
-
- CleanupStack::PopAndDestroy( noteText );
- }
-
-// -----------------------------------------------------------------------------
-// Non-Leaving version of wait note removal.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::RemoveNote()
- {
- TRAP_IGNORE( RemoveNoteL() );
- }
-
-// -----------------------------------------------------------------------------
-// Removes opening note and stops listening for preview state changes.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::RemoveNoteL()
- {
- // Stop listening for preview mode changes.
- if ( iPreviewStateSubscriber )
- {
- iPreviewStateSubscriber->Cancel();
- }
- // Remove wait note.
- if ( iWaitDlg )
- {
- iWaitDlg->ProcessFinishedL();
- iWaitDlg = NULL;
- }
- }
-
-// -----------------------------------------------------------------------------
-// Invokes screensaver function.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::DoInvokeScreenSaverFunctionL(
- const TInt aCurrentItem, const TScPluginCaps aType )
- {
- // Offer selection notification, if requested by the saver
- if( iModel && iModel->ScreensaverHasCapability(
- aCurrentItem,
- aType ) )
- {
- iModel->InvokeSSPluginFunctionL(
- aCurrentItem,
- aType );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Creates subscriber and starts to listen.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::CreatePreviewModeSubscriberL()
- {
- if ( !iPreviewModeSubscriber )
- {
- iPreviewModeSubscriber =
- new (ELeave) CPslnPropertySubscriber(
- TCallBack( HandlePreviewModeChanged, this ),
- iPreviewModeProperty );
- }
- iPreviewModeSubscriber->Subscribe();
- }
-
-void CPslnScreenSaverView::CreatePreviewStateSubscriberL()
- {
- if ( !iPreviewStateSubscriber )
- {
- iPreviewStateSubscriber =
- new (ELeave) CPslnPropertySubscriber(
- TCallBack( HandlePreviewStateChanged, this ),
- iPreviewStateProperty );
- }
- iPreviewStateSubscriber->Subscribe();
- }
-
-// -----------------------------------------------------------------------------
-// Remove unnecessary commands from Middle softkey.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::RemoveCommandFromMSK()
- {
- CEikButtonGroupContainer* cbaGroup = Cba();
- if ( cbaGroup )
- {
- cbaGroup->RemoveCommandFromStack( KPslnMSKControlID, EPslnCmdAppSetScreenSaver );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Is 'Change' command visible or not.
-// -----------------------------------------------------------------------------
-//
-TBool CPslnScreenSaverView::IsChangeCommandVisibleL() const
- {
- if ( !iContainer )
- {
- return EFalse;
- }
-
- TInt currentItem = KErrNotFound;
- currentItem = iContainer->CurrentItemIndex();
-
- // Remove Change screensaver if
- // a) not active screensaver
- // b) not of Date type
- // c) installed screensaver is such that it does not have settings.
- if ( currentItem == iModel->CurrentPropertyIndexL( KPslnScreenSettingId ) &&
- iModel->ScreensaverHasCapability( currentItem, EScpCapsConfigure ) )
- {
- return ETrue;
- }
-
- return EFalse;
- }
-
-
-// -----------------------------------------------------------------------------
-// Is the focus item the same as the setting
-// -----------------------------------------------------------------------------
-//
-TBool CPslnScreenSaverView::IsApplyCommandVisibleL() const
- {
- if ( !iContainer )
- {
- return EFalse;
- }
-
- TInt currentItem = KErrNotFound;
- currentItem = iContainer->CurrentItemIndex();
-
- // Remove Apply screensaver if
- // a) the focused item is the same as ticked
- // c)
-
- TBool retVal = ETrue;
- if ( currentItem == iModel->CurrentPropertyIndexL( KPslnScreenSettingId ))
- {
- retVal = EFalse;
- }
- return retVal;
- }
-
-
-// -----------------------------------------------------------------------------
-// Called when the power save mode is changed.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::PowerSaveModeChanged( const TPsmsrvMode /*aMode*/ )
- {
- TRAP_IGNORE( iContainer->SetCurrentItemIndexAndDraw(
- iModel->CurrentPropertyIndexL( KPslnScreenSettingId ) ) );
- TRAP_IGNORE( CheckMiddleSoftkeyLabelL() );
-
- if ( iPsmClient )
- {
- iPsmClient->RequestPowerSaveModeNotification();
- }
- }
-
-
-// -----------------------------------------------------------------------------
-// Called when some wrong with the power save mode change.
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::PowerSaveModeChangeError( const TInt /*aError*/ )
- {
- }
-
-
-// End of File
--- a/psln/Src/PslnSoundActivator.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
-* Copyright (c) 2004-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: Activates sound content, if part of the skin.
-*
-*/
-
-
-// INCLUDE FILES
-#include <AknsUtils.h>
-#include <AknsSrvClient.h>
-#include <pathinfo.h>
-#include <driveinfo.h>
-#include <eikenv.h>
-
-// Psln specific.
-#include "pslnprofilesettingsloader.h"
-#include "PslnSoundActivator.h"
-#include "PslnConst.h"
-#include "PslnDebug.h"
-
-
-// CONSTANTS
-// Path and filename of wrapper dll.
-_LIT( KPslnProfilesSettingsLoaderName,
- "\\system\\libs\\PslnProfileSettingsLoader.dll");
-
-// TYPE DEFINITIONS
-// Profiles tone setter.
-typedef TAny* (*NewProfilesSetterL)();
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnSoundActivator::CPslnSoundActivator()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSoundActivator* CPslnSoundActivator::NewLC()
- {
- CPslnSoundActivator* self = new( ELeave ) CPslnSoundActivator;
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-void CPslnSoundActivator::ConstructL()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSoundActivator::~CPslnSoundActivator()
- {
- delete iProfilesSetter;
- if( iProfilesDllLoaded )
- {
- iProfilesDll.Close();
- }
- iSoundArray.Reset();
- iSoundArray.Close();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSoundActivator::CollectSoundsL
-// -----------------------------------------------------------------------------
-//
-void CPslnSoundActivator::CollectSoundsL( const TDesC& aSkinPath, TInt& aCount )
- {
- PSLN_TRACE_DEBUG("CPslnSoundActivator::CollectSoundsL BEGIN");
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- if ( !skin )
- {
- return;
- }
- iSoundArray.Reset();
-
- TInt i = KErrNotFound;
- while( KPslnSoundItems[++i] != KAknsIIDNone )
- {
- CAknsStringItemData* data =
- static_cast<CAknsStringItemData*>(
- skin->CreateUncachedItemDataL(
- KPslnSoundItems[i],
- EAknsITString ) );
- if ( data )
- {
- CleanupStack::PushL( data );
-
- PSLN_TRACE_DEBUG("CPslnSoundActivator::CollectSoundsL skin item found");
- HBufC* fullName = HBufC::NewLC( KMaxFileName );
- TPtr fullNamePtr = fullName->Des();
-
- if ( aSkinPath.Length() > 0 )
- {
- FindSoundFile( fullNamePtr, data->String(), aSkinPath );
- }
- else
- {
- PSLN_TRACE_DEBUG("CPslnSoundActivator::CollectSoundsL empty path" );
- // @todo - start going through all the drives available.
- }
-
- if( fullNamePtr.Length() > 0 )
- {
- PSLN_TRACE_DEBUG("CPslnSoundActivator::CollectSoundsL file found");
- TPslnSoundActivatorEntry entry;
- entry.iFullName = fullNamePtr;
- entry.iID = KPslnSoundItems[i];
- iSoundArray.Append( entry );
- }
-
- CleanupStack::PopAndDestroy( 2, data ); // data, fullName
- }
- }
- aCount = iSoundArray.Count();
- PSLN_TRACE_DEBUG("CPslnSoundActivator::CollectSoundsL END");
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSoundActivator::ActivateToProfilesL
-// -----------------------------------------------------------------------------
-//
-void CPslnSoundActivator::ActivateToProfilesL()
- {
- PSLN_TRACE_DEBUG("CPslnSoundActivator::ActivateToProfilesL BEGIN");
-
- // Profiles tone setter dll loading.
- if( !iProfilesDllLoaded )
- {
- PSLN_TRACE_DEBUG("CPslnSoundActivator::ActivateToProfilesL about load");
- if( iProfilesDll.Load( KPslnProfilesSettingsLoaderName ) == KErrNone )
- {
- PSLN_TRACE_DEBUG("CPslnSoundActivator::ActivateToProfilesL loaded");
- iProfilesDllLoaded = ETrue;
- // Request the entry function
- NewProfilesSetterL profilesSetter =
- (NewProfilesSetterL) iProfilesDll.Lookup( KPslnDllEntryPoint );
- if( profilesSetter )
- {
- PSLN_TRACE_DEBUG("CPslnSoundActivator::ActivateToProfilesL create");
- // Create the class
- iProfilesSetter =
- (CPslnProfileSettingsLoader*) (*profilesSetter)();
- }
- }
- }
- // The wrapper failed to load.
- if ( !iProfilesSetter )
- {
- User::Leave( KErrNotFound );
- }
-
- MoveSoundFilesL();
-
- // Activate all tones to all profiles.
- for( TInt i = 0; i < iSoundArray.Count(); i++ )
- {
- TPslnSoundActivatorEntry entry = iSoundArray[i];
- PSLN_TRACE_DEBUG1("CPslnSoundActivator::ActivateToProfilesL tone %d", i);
- PSLN_TRACE_DEBUG1("CPslnSoundActivator::ActivateToProfilesL minor ID %d", entry.iID.iMinor);
- PSLN_TRACE_DEBUG1("CPslnSoundActivator::ActivateToProfilesL name lenght %d ", iSoundArray[i].iFullName.Length() );
- iProfilesSetter->SetToneForProfilesL(
- entry.iID.iMinor,
- entry.iFullName );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSoundActivator::FindSoundFile
-// -----------------------------------------------------------------------------
-//
-void CPslnSoundActivator::FindSoundFile(
- TDes& aFullName, const TDesC& aSoundFile, const TDesC& aSkinPath )
- {
- aFullName.Copy( aSkinPath );
- aFullName.Append( aSoundFile );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSoundActivator::MoveSoundFilesL
-// -----------------------------------------------------------------------------
-//
-void CPslnSoundActivator::MoveSoundFilesL()
- {
- RAknsSrvSession skinsrv;
- User::LeaveIfError( skinsrv.Connect() );
- CleanupClosePushL( skinsrv );
-
- RFs& fs = CEikonEnv::Static()->FsSession();
-
- for( TInt i = 0; i < iSoundArray.Count(); i++ )
- {
- TPslnSoundActivatorEntry entry = iSoundArray[i];
-
- HBufC* targetPath = NULL;
- TFileName filename;
-
- // Sort out path to which store the sound file.
- TInt driveId;
- User::LeaveIfError(
- RFs::CharToDrive( entry.iFullName[0], driveId ) );
-
- TUint driveStatus;
- User::LeaveIfError(
- DriveInfo::GetDriveStatus( fs, driveId, driveStatus ) );
-
- if ( driveStatus & DriveInfo::EDriveReadOnly )
- {
- // If ROM, then let's store to phone memory.
- User::LeaveIfError(
- DriveInfo::GetDefaultDrive(
- DriveInfo::EDefaultPhoneMemory,
- driveId ) );
- }
-
- User::LeaveIfError(
- PathInfo::GetRootPath( filename, driveId ) );
- filename.Append( PathInfo::SoundsPath() );
- targetPath = filename.AllocLC();
-
- TParsePtrC parse( entry.iFullName );
- TFileName* targetFile = new (ELeave) TFileName;
- CleanupStack::PushL( targetFile );
- targetFile->Copy( *targetPath );
- targetFile->Append( parse.NameAndExt() );
-
- skinsrv.CopySoundFile( entry.iFullName, *targetFile );
- if ( iProfilesSetter )
- {
- PSLN_TRACE_DEBUG("CPslnSoundActivator::MoveSoundFilesL indicate to mgx");
- PSLN_TRACE_DEBUG1("CPslnSoundActivator: Move to \"%S\" ", targetFile );
-
- iProfilesSetter->IndicateFileUpdationL( *targetFile );
- }
- iSoundArray[i].iFullName = *targetFile;
- PSLN_TRACE_DEBUG1("CPslnSoundActivator: Move2 lenght %d ", iSoundArray[i].iFullName.Length() );
- CleanupStack::PopAndDestroy( 2, targetPath );
- }
- CleanupStack::PopAndDestroy(); //skinsrv
- }
-
-// End of File
--- a/psln/Src/PslnUi.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1482 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: UI class of Psln.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "PslnUi.h"
-
-#include <barsread.h>
-#include <StringLoader.h>
-
-// Navi pane, Title Pane & Tab groups
-#include <aknnavi.h>
-#include <aknnavide.h>
-#include <akntitle.h>
-
-// Notes & Dialogs
-#include <AknGlobalNote.h>
-#include <aknnotewrappers.h>
-
-// DRM.
-#include <DRMHelper.h>
-#include <DRMRights.h>
-
-// Psln specific.
-#include <psln.rsg>
-#include "PslnModel.h"
-#include "PslnSkinEntry.h"
-#include "PslnFeatures.h"
-#include "PslnSoundActivator.h"
-#include "pslntaskactivatesounds.h"
-#include "pslntaskgenericupdate.h"
-#include "pslnidletaskcreateviews.h"
-#include "PslnConst.h"
-#include "PslnDebug.h"
-#include "PslnModel.h"
-#include "PslnPropertySubscriber.h"
-
-// Views
-#include "PslnMainView.h"
-#include "PslnGeneralThemeView.h"
-#include "PslnScreenSaverView.h"
-#include "PslnWallpaperView.h"
-
-// Framework
-#include "PslnPluginHandler.h"
-#include <pslnfwplugininterface.h>
-#include <pslnfwbaseview.h>
-
-// Help texts
-#include <hlplch.h>
-#include <csxhelp/skins.hlp.hrh>
-#include <UsbWatcherInternalPSKeys.h> // KPSUidUsbWatcher
-#include <usbpersonalityids.h> // Usb Personality Ids
-
-// Sets internal state correctly when leave occurs in skin changing.
-
-// Handles application exit correctly when leave occurs in exiting.
-void HandleExitLeave( TAny* aPtr )
- {
- CPslnUi* psln = static_cast<CPslnUi*>(aPtr);
- psln->HandleCmdExitLeave();
- }
-
-// ========================= MEMBER FUNCTIONS ================================
-// ---------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnUi::CPslnUi() : iPslnUiStatus ( EPslnCreated )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Symbian two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::ConstructL()
- {
- PSLN_TRACE_DEBUG1("CPslnUi::ConstructL, Start:%d", User::NTickCount() );
-
- BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
- EnableExternalViewSwitches(ETrue);
-
- // Create ECOM plugin loader.
- PSLN_TRACE_DEBUG("CPslnUi::ConstructL PluginHandler");
- iPluginHandler = CPslnPluginHandler::NewL( this );
-
- PSLN_TRACE_DEBUG("CPslnUi::ConstructL Model");
- // Force creation of model, since it is anyway created when ANY view is
- // activated.
- CreateModelL();
-
- PSLN_TRACE_DEBUG("CPslnUi::ConstructL StatusPane");
- // Show tabs for main views from resources
- CEikStatusPane* sp = StatusPane();
- if ( sp )
- {
- // Fetch pointer to the default navi pane control
- iNaviPane = (CAknNavigationControlContainer*)sp->ControlL(
- TUid::Uid(EEikStatusPaneUidNavi));
- }
-
- // New main view
- PSLN_TRACE_DEBUG("CPslnUi::ConstructL View-Main");
- CPslnMainView* view = CPslnMainView::NewLC();
- AddViewL( view ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop( view ); // the view has to be popped from cleanupstack here
- iMainView = view;
- SetDefaultViewL( *view );
-
- iIdleActivateSkin = CIdle::NewL( CActive::EPriorityIdle );
- iIdleUpdateSkin = CIdle::NewL( CActive::EPriorityIdle );
-
- PSLN_TRACE_DEBUG("CPslnUi::ConstructL OK");
- User::LeaveIfError( iEnableUSBWatchProperty.Attach(
- KPSUidUsbWatcher, KUsbWatcherSelectedPersonality) );
- iUSBWatchSubscriber = new (ELeave) CPslnPropertySubscriber(
- TCallBack(USBCallBackL, this), iEnableUSBWatchProperty );
- iUSBWatchSubscriber->Subscribe();
-
-
- TInt value = KErrNone;
- iEnableUSBWatchProperty.Get(value);
- if (value == KUsbPersonalityIdMS)
- {
- iUSBAttached = ETrue;
- }
- else
- {
- iUSBAttached = EFalse;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnUi::~CPslnUi()
- {
- PSLN_TRACE_DEBUG("CPslnUi::Destructor");
-
- // Reset skin info when exiting normally. This prevents model class
- // from trying to revert back to previous skin.
- if ( iView && iView->Id().iUid == KPslnMainView2.iUid )
- {
- // It is possible that Model is not created, if exiting immediately after
- // application launch. So first check that Model is created.
- if ( iModel )
- {
- TInt currentlySelected = iModel->ActiveSkinIndex();
- iModel->SetCurrentSelectedSkinIndex( currentlySelected );
- }
- }
- delete iModel;
- // This nullification is needed, since external DLL's may try to access
- // model through view framework and it might succeed even if model and UI
- // classes are already deleted, but external DLLs aren't.
- // This is due to that model reference is passed as a pointer due to delayed
- // construction - it is not available at the time when view is constructed.
- iModel = NULL;
- delete iDecoratedTabGroup;
-
- if ( iPluginHandler )
- {
- delete iPluginHandler;
- }
-
- delete iIdleTask;
- delete iIdleActivateSkin;
- delete iIdleUpdateSkin;
-
-
- if( iUSBWatchSubscriber )
- {
- iUSBWatchSubscriber->Cancel();
- }
- iEnableUSBWatchProperty.Close();
- delete iUSBWatchSubscriber;
- }
-
-// ---------------------------------------------------------------------------
-// Handles event when focus loss or gain.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination )
- {
- PSLN_TRACE_DEBUG("CPslnUi::HandlwWSEvent");
- if ( iView )
- {
- TInt eventType = aEvent.Type();
- TUid currentView = iView->Id();
-
- // do this everytime when foreground gained.
- if ( ( currentView.iUid == KPslnGeneralView.iUid ) &&
- ( eventType == EEventFocusGained ) &&
- ( GetStatus( EPslnListUpdateNeeded ) ||
- GetStatus( EPslnProtectedSkinInList ) ) && IsForeground() )
- {
- PSLN_TRACE_DEBUG("CPslnUi::HandlwWSEvent Update list");
- SetStateOff( EPslnListUpdateNeeded );
- DoCreateWaitNoteL();
- }
- }
- CAknViewAppUi::HandleWsEventL( aEvent, aDestination );
- }
-
-// ---------------------------------------------------------------------------
-// Handles commands directed to this class.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::HandleCommandL( TInt aCommand )
- {
- PSLN_TRACE_DEBUG1("CPslnUi::HandleCommand %d", aCommand );
- switch ( aCommand )
- {
- //both exit commands should do the same thing
- case EEikCmdExit:
- case EAknCmdExit:
- case EAknSoftkeyExit:
- HandleCmdExitL();
- break;
-
- case EPslnCmdAppActivate:
- {
- if (!iIdleActivateSkin->IsActive())
- {
- iIdleActivateSkin->Start(TCallBack( DoActivateSkinL, this ));
- }
- }
- break;
- case EPslnCmdAppDownload:
- DownloadSkinL();
- break;
- case EAknCmdHelp:
- case EPslnCmdAppHelp:
- {
- HlpLauncher::LaunchHelpApplicationL(
- iEikonEnv->WsSession(), AppHelpContextL());
- }
- break;
- case EAknSoftkeyBack:
- // If General view is active and Back key is
- // pressed and there is skin activation ongoing
- // set internal state off.
- if ( iView && GetStatus( EPslnSkinChangeRequested ) &&
- ( iView->Id().iUid == KPslnGeneralView.iUid ) )
- {
- SetStateOff( EPslnSkinChangeRequested );
- }
- ActivateLocalViewL( KPslnMainView2 );
- break;
- default:
- CAknViewAppUi::HandleCommandL( aCommand );
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::HandleResourceChangeL
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::HandleResourceChangeL( TInt aType )
- {
- PSLN_TRACE_DEBUG("CPslnUi::HandleResourceChangeL");
- if ( iView && !GetStatus( EPslnSkinChangeRequested ) &&
- iView->Id().iUid == KPslnGeneralView.iUid &&
- aType == KAknsMessageSkinChange )
- {
- iGeneralThemeView->UpdateSkinListItemsDColumnOnlyL();
- }
- CAknViewAppUi::HandleResourceChangeL( aType );
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::ActivateLocalViewL
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::ActivateLocalViewL( TUid aViewId )
- {
- if ( GetStatus( EPslnListUpdateNeeded ) &&
- ( aViewId.iUid == KPslnGeneralView.iUid ) )
- {
- PSLN_TRACE_DEBUG("CPslnUi::ActivateLocalViewL update list");
- SetStateOff( EPslnListUpdateNeeded );
- DoCreateWaitNoteL();
- }
- CAknViewAppUi::ActivateLocalViewL( aViewId );
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::SkinContentChanged
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::SkinContentChanged()
- {
- PSLN_TRACE_DEBUG("CPslnUi::SkinContentChanged");
- if ( !iView || iView->Id().iUid != KPslnGeneralView.iUid )
- {
- SetStateOn( EPslnListUpdateNeeded );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::SkinConfigurationChanged
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::SkinConfigurationChanged(
- const TAknsSkinStatusConfigurationChangeReason aReason )
- {
- PSLN_TRACE_DEBUG("CPslnUi::SkinConfigurationChanged");
- TRAPD( err, SkinConfigurationChangedL( aReason ) );
- if ( err != KErrNone )
- {
- TRAP_IGNORE( iGeneralThemeView->UpdateSkinListItemsL() );
- TRAP_IGNORE( ToggleScreenBlankerL( EFalse, EFalse ) );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::SkinPackageChanged
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::SkinPackageChanged(
- const TAknsSkinStatusPackageChangeReason aReason )
- {
- PSLN_TRACE_DEBUG("CPslnUi::SkinPackageChanged");
- if ( aReason == EAknsSkinStatusPackageListUpdate )
- {
- if ( !iView || iView->Id().iUid != KPslnGeneralView.iUid )
- {
- SetStateOn( EPslnListUpdateNeeded );
- }
- else
- {
- PSLN_TRACE_DEBUG("CPslnUi::SkinPackageChanged update list");
- //To Fix Defect:ESNN-7CXCT2:Themes: Layout is incorrect
- //when removing memory card which the active theme is installed in.
- //DoCreateWaitNoteL take too much time and stop the skin refresh.
- //Need to wait for the Skin Server finish its work,so we use CIdle.
- //Also we need User::After to delay some time to make sure
- //iIdleUpdateSkin start late enough.
- User::After(KPslnUpdateSkinDelay);
- if (!iIdleUpdateSkin->IsActive())
- {
- iIdleUpdateSkin->Start(TCallBack( DoCreateWaitNoteL, this ));
- }
- SetStateOff( EPslnListUpdateNeeded );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Return model pointer.
-// ---------------------------------------------------------------------------
-//
-CPslnModel* CPslnUi::Model() const
- {
- return iModel;
- }
-
-// ---------------------------------------------------------------------------
-// Updates tab group to current tab index
-// The parameters are optional.
-// ---------------------------------------------------------------------------
-//
-#ifdef RD_CONTROL_PANEL
-void CPslnUi::UpdateTabIndex( const TInt aMyId, const TInt /*aMyTabIndex*/ )
-#else
-void CPslnUi::UpdateTabIndex( const TInt /*aMyId*/, const TInt aMyTabIndex )
-#endif // RD_CONTROL_PANEL
- {
-#ifdef RD_CONTROL_PANEL
- if ( aMyId != KErrNotFound )
- {
- if ( iMainView )
- {
- iMainView->SetActiveFolder( TUid::Uid( aMyId ) );
- }
- }
-#else
- if ( aMyTabIndex != KErrNotFound )
- {
- if ( iTabGroup )
- {
- iTabGroup->SetActiveTabById( aMyTabIndex );
- }
- }
- if ( ( iView == iMainView ) && iTabGroup && iMainView )
- {
- iTabGroup->SetActiveTabByIndex( iMainView->ActiveView() );
- }
-#endif //RD_CONTROL_PANEL
- }
-
-// ---------------------------------------------------------------------------
-// Creates given view.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::CreateViewL( TUid aViewUid )
- {
- PSLN_TRACE_DEBUG1("CPslnUi::CreateViewL, Start:%d", User::NTickCount() );
- TBitFlags views = ViewSupport();
-
-if ( aViewUid == KPslnWallpaperView &&
- !GetStatus( EPslnWallpaperViewCreated ) )
- {
-
- if ( views.IsSet( EPslnWallpaperView ) )
- {
- CAknView* view = CPslnWallpaperView::NewLC();
- AddViewL( view ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop( view );
-
- SetStateOn( EPslnWallpaperViewCreated );
-
- PSLN_TRACE_DEBUG("CPslnUi::CreateViewL - Wallpaper");
- PSLN_TRACE_DEBUG1("CPslnUi::CreateViewL, End:%d", User::NTickCount() );
- }
- }
- // Screensaver view.
- else if ( aViewUid == KPslnScreenSaverView &&
- !GetStatus( EPslnScreenSaverViewCreated ) )
- {
- if ( views.IsSet( EPslnScreensaverView ) )
- {
- CAknView* view = CPslnScreenSaverView::NewLC();
- AddViewL( view ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop( view );
-
- SetStateOn( EPslnScreenSaverViewCreated );
-
- PSLN_TRACE_DEBUG("CPslnUi::CreateViewL - ScreenSaver");
- PSLN_TRACE_DEBUG1("CPslnUi::CreateViewL, End:%d", User::NTickCount() );
- }
- }
- // General view.
- else if ( aViewUid.iUid == KPslnGeneralView.iUid &&
- !GetStatus( EPslnGeneralViewCreated ) )
- {
- CAknView* view = CPslnGeneralThemeView::NewLC();
- AddViewL( view ); // transfer ownership to CAknViewAppUi
- iGeneralThemeView = static_cast< CPslnGeneralThemeView* >( view );
- CleanupStack::Pop( view );
-
- SetStateOn( EPslnGeneralViewCreated );
-
- PSLN_TRACE_DEBUG("CPslnUi::CreateViewL - General");
- PSLN_TRACE_DEBUG1("CPslnUi::CreateViewL, End:%d", User::NTickCount() );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Return navi control container pointer.
-// ---------------------------------------------------------------------------
-//
-CAknNavigationControlContainer* CPslnUi::NaviContainer() const
- {
- return iNaviPane;
- }
-
-// ---------------------------------------------------------------------------
-// Return tab group pointer.
-// ---------------------------------------------------------------------------
-//
-CAknNavigationDecorator* CPslnUi::PslnTabGroup()
- {
- if ( !GetStatus( EPslnTabGroupCreated ) )
- {
- TRAP_IGNORE( ConstructTabGroupL() );
- }
- return iDecoratedTabGroup;
- }
-
-// ---------------------------------------------------------------------------
-// Return plugin handler pointer.
-// ---------------------------------------------------------------------------
-//
-CPslnPluginHandler* CPslnUi::PluginHandler() const
- {
- return iPluginHandler;
- }
-
-// ---------------------------------------------------------------------------
-// Adds new view to UI class, if the UI class is not already completed.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::AddNewViewL( CAknView* aNewView )
- {
- if ( GetStatus( EPslnCreated ) )
- {
- if ( aNewView && !View( aNewView->Id() ) )
- {
- AddViewL( aNewView );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// When this method is called, UI class considers itself to be complete.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::AllViewsDone()
- {
- SetStateOff( EPslnCreated );
- }
-
-// ---------------------------------------------------------------------------
-// Handles errors that occur when handling images.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::HandleImageErrorsL( TInt aError )
- {
- PSLN_TRACE_DEBUG1("CPslnUi::HandleImageError %d", aError );
- if ( aError == KErrNoMemory || aError == KErrTooBig )
- {
- // Show information note
- HBufC* prompt = iCoeEnv->AllocReadResourceLC( R_PSLN_IMAGE_TOO_LARGE );
- CAknInformationNote* note = new (ELeave) CAknInformationNote( ETrue );
- note->ExecuteLD( *prompt );
- CleanupStack::PopAndDestroy( prompt );
- }
- else if ( aError == KErrCancel || aError == KErrCouldNotConnect )
- {
- // Other error codes are ignored; as not real errors (i.e. KErrCancel),
- // or such errors that Psln cannot react to them (KErrCouldNotConnect)
- }
- else
- {
- // Show information note
- HBufC* prompt = iCoeEnv->AllocReadResourceLC( R_PSLN_IMAGE_CORRUPTED );
- CAknInformationNote* note = new (ELeave) CAknInformationNote( ETrue );
- note->ExecuteLD( *prompt );
- CleanupStack::PopAndDestroy( prompt );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Indicate that tab group has been changed.
-// ---------------------------------------------------------------------------
-//
-#ifndef RD_CONTROL_PANEL
-void CPslnUi::TabChangedL( TInt aIndex )
- {
- PSLN_TRACE_DEBUG("CPslnUi::TabChangedL 1" );
- // If it is one of the dynamically created views, check if the view is
- // already created. If view is not created, create it.
- if ( aIndex == KPslnGeneralView.iUid )
- {
- if ( !GetStatus( EPslnGeneralViewCreated ) )
- {
- CreateViewL( KPslnGeneralView );
- }
- }
- else if ( aIndex == KPslnWallpaperView.iUid )
- {
- if ( !GetStatus( EPslnWallpaperViewCreated ) )
- {
- CreateViewL( KPslnWallpaperView );
- }
- }
- else if ( aIndex == KPslnScreenSaverView.iUid )
- {
- if ( !GetStatus( EPslnScreenSaverViewCreated ) )
- {
- CreateViewL( KPslnScreenSaverView );
- }
- }
- if ( iMainView )
- {
- iMainView->SetActiveFolder( aIndex );
- ActivateLocalViewL( TUid::Uid( iMainView->ActiveFolderUid() ) );
- }
- }
-#endif //RD_CONTROL_PANEL
-
-// ---------------------------------------------------------------------------
-// Loads views when application is idle.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::LoadViewsWhenIdleL()
- {
- if ( !iIdleTask )
- {
- iIdleTask = CPslnIdleTaskCreateViews::NewL( this );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the Tab group.
-// ---------------------------------------------------------------------------
-void CPslnUi::ConstructTabGroupL()
- {
-#ifdef RD_CONTROL_PANEL
- return;
-#else
- if ( GetStatus( EPslnTabGroupCreated ) )
- {
- // Tabgroup has already been created.
- return;
- }
- // Tabgroup has been read from resource and it were pushed to the navi pane.
- // Get pointer to the navigation decorator
- // and set this to be a MAknTabObserver.
- if ( iNaviPane )
- {
- iDecoratedTabGroup = iNaviPane->ResourceDecorator();
- }
- if ( iDecoratedTabGroup )
- {
- PSLN_TRACE_DEBUG("CPslnUi::ConstructTabGroupL DecoTabGrp");
- iTabGroup = static_cast <CAknTabGroup*>
- ( iDecoratedTabGroup->DecoratedControl() );
- iTabGroup->SetObserver( this );
- }
- TInt tabCount = 1; // index 0 = general view
- TBitFlags views = ViewSupport();
-
- // Update Tab group to contain default plugins.
- if ( iPluginHandler )
- {
- CPslnFWPluginInterface* plugin =
- iPluginHandler->GetPlugin( KPslnASPluginUid );
- if ( plugin )
- {
- AddPluginToTab( *plugin );
- static_cast <CPslnFWBaseView*>
- (plugin)->SetNaviPaneDecorator( iDecoratedTabGroup );
- tabCount++; // index 1 = AS plugin
- }
- plugin = iPluginHandler->GetPlugin( KPslnAIPluginUid );
- if ( plugin )
- {
- AddPluginToTab( *plugin );
- static_cast <CPslnFWBaseView*>
- (plugin)->SetNaviPaneDecorator( iDecoratedTabGroup );
- tabCount++; // index 2 = AI plugin
- }
- }
-
- // Add tabs for screen saver and wallpaper.
- if ( iTabGroup )
- {
- if ( views.IsSet( EPslnWallpaperView ) )
- {
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC( reader, R_PSLN_WALLPAPER_TAB );
- iTabGroup->AddTabL( reader );
- CleanupStack::PopAndDestroy(); // reader - AppUi now owns this tab,
- tabCount++; // index 3 = Wallpaper view
- }
-
- if ( views.IsSet( EPslnScreensaverView ) )
- {
- TResourceReader reader2;
- iCoeEnv->CreateResourceReaderLC( reader2, R_PSLN_SCREENSAVER_TAB );
- iTabGroup->AddTabL( reader2 );
- CleanupStack::PopAndDestroy(); // reader2 - AppUi now owns this tab,
- tabCount++; // index 4 = Screensaver view
- }
- PSLN_TRACE_DEBUG("CPslnUi::ConstructTabGroupL Default Tabs added to TabGrp");
- }
-
- // Add rest of the plugins to tabs.
- if ( iPluginHandler )
- {
- // Fetch the plugin array.
- CArrayPtrFlat<CPslnFWPluginInterface>* pluginArray =
- iPluginHandler->GetPluginArray();
- CleanupStack::PushL( pluginArray );
- TInt pluginCount = pluginArray->Count();
- PSLN_TRACE_DEBUG1("CPslnUi::ConstructTabGroupL Plugin count=%d", pluginCount );
-
- // Go through all the plugins and add plugins to tab group.
- for ( TInt i = 0; i < pluginCount; i++ )
- {
- CPslnFWPluginInterface* plugin = pluginArray->operator[]( i );
-
- if ( !plugin )
- {
- PSLN_TRACE_DEBUG("CPslnUi::ConstructTabGroupL Plugin fails");
- }
- // Default plugins can be skipped.
- else if ( plugin->Id().iUid == KPslnASPluginUid.iUid ||
- plugin->Id().iUid == KPslnAIPluginUid.iUid )
- {
- PSLN_TRACE_DEBUG("CPslnUi::ConstructTabGroupL Plugin skipped");
- }
- else
- {
- PSLN_TRACE_DEBUG1("CPslnUi::ConstructTabGroupL Plugin Id=%d", plugin->Id().iUid );
- AddPluginToTab( *plugin );
- static_cast <CPslnFWBaseView*>
- (plugin)->SetNaviPaneDecorator( iDecoratedTabGroup );
- // Inform to the plugin which tab index it is using.
- static_cast <CPslnFWBaseView*>
- (plugin)->SetTabIndex( tabCount++ );
- PSLN_TRACE_DEBUG("CPslnUi::ConstructTabGroupL Plugin added to tab");
- }
- }
- CleanupStack::Pop( pluginArray ); // plugin handler owns plugin array
- }
- // Push empty navi pane, so that tab group is not shown with default item (first),
- // if other than main view is activated externally.
- iNaviPane->PushDefaultL();
- SetStateOn( EPslnTabGroupCreated );
-#endif //RD_CONTROL_PANEL
- }
-
-// ---------------------------------------------------------------------------
-// Activates screen blanker. Note that second parameter is only used when
-// enabling blanker (i.e. first parameter is ETrue ).
-// ---------------------------------------------------------------------------
-void CPslnUi::ToggleScreenBlankerL(
- const TBool& aToggleValue, const TBool& /*aStatusPaneVisible*/, const TBool& aRealAct )
- {
- TInt transitionEffectsValue = iModel->GetTransitionEffectStateL();
- if ( aToggleValue )
- {
- // Effects are enabled if value is NOT KMaxTInt.
- if( transitionEffectsValue != KMaxTInt )
- {
- if ( aRealAct )
- {
- iModel->TransEffect(EPslnTransitionEffectStartThemeActivation);
- }
- else
- {
- iModel->TransEffect(EPslnTransitionEffectStartPreview);
- }
- }
-// else if ( iView && iView->MenuBar()->IsDisplayed() )
-// {
-// iView->MenuBar()->StopDisplayingMenuBar();
-// }
- }
- else
- {
- // Effects are enabled if value is NOT KMaxTInt.
- if( transitionEffectsValue != KMaxTInt )
- {
- iModel->TransEffect(EPslnTransitionEffectStop);
- }
-// else if ( iView && iView->MenuBar()->IsDisplayed() )
-// {
-// iView->MenuBar()->MenuPane()->DrawNow();
-// }
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// Is this class able to handle a new skin activation related command.
-// ---------------------------------------------------------------------------
-TBool CPslnUi::IsReadyToHandleCommands()
- {
- return !GetStatus( EPslnSkinChangeRequested );
- }
-
-// ---------------------------------------------------------------------------
-// Ensure that Exit() is called when trying to exit and leave occurs.
-// ---------------------------------------------------------------------------
-void CPslnUi::HandleCmdExitLeave()
- {
- Exit();
- }
-
-// ---------------------------------------------------------------------------
-// Sets title pane back to default text.
-// ---------------------------------------------------------------------------
-void CPslnUi::SetTitleToDefaultL()
- {
- // Set default title back. But do not change title when application is about
- // to die.
- if ( iCoeEnv && Model() )
- {
- TResourceReader rReader;
- iCoeEnv->CreateResourceReaderLC( rReader, R_PSLN_SKIN_LIST_VIEW_TITLE );
- if ( iAvkonAppUi )
- {
- CEikStatusPane* sp = iAvkonAppUi->StatusPane();
- if ( sp )
- {
- CAknTitlePane* title = static_cast<CAknTitlePane*>(
- sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-
- if ( title )
- {
- title->SetFromResourceL( rReader );
- }
- }
- }
- CleanupStack::PopAndDestroy(); // rReader
- }
- }
-
-// ---------------------------------------------------------------------------
-// Checks if a view has been created.
-// ---------------------------------------------------------------------------
-TBitFlags CPslnUi::ViewSupport()
- {
- // Initially all views are 'on'.
- TBitFlags viewFlags;
- viewFlags.SetAll();
- if ( GetStatus( EPslnViewSupportChecked ) )
- {
- if ( GetStatus( EPslnNoScreenSaverView ) )
- {
- viewFlags.Clear( EPslnScreensaverView );
- }
- if ( GetStatus( EPslnNoWallpaperView ) )
- {
- viewFlags.Clear( EPslnWallpaperView );
- }
- }
- else
- {
- TBool noWallpaperView = PslnFeatures::IsSupported( KPslnRemoveWallpaper );
- TBool noScreenSaverView = PslnFeatures::IsSupported( KPslnRemoveScreensaver );
- if ( noWallpaperView )
- {
- SetStateOn( EPslnNoWallpaperView );
- viewFlags.Clear( EPslnWallpaperView );
- }
- if ( noScreenSaverView )
- {
- SetStateOn( EPslnNoScreenSaverView );
- viewFlags.Clear( EPslnScreensaverView );
- }
- SetStateOn( EPslnViewSupportChecked );
- }
- return viewFlags;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-void CPslnUi::SetDRMProtectedSkinInSkinList(
- const TBool& aProtectedSkinInList )
- {
- if ( aProtectedSkinInList )
- {
- SetStateOn( EPslnProtectedSkinInList );
- }
- else
- {
- SetStateOff( EPslnProtectedSkinInList );
- }
- }
-
-
-// -----------------------------------------------------------------------------
-// Callback - USB status change.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnUi::USBCallBackL(TAny* aPtr)
- {
- CPslnUi* self = static_cast<CPslnUi*>(aPtr);
- if ( self )
- {
- self->HandleUSBCallBackL();
- }
- return KErrNone;
- }
-
-
- /**
- * USB Attach State.
- * @return ETrue when USB already attached, otherwise EFalse,
- */
-// ---------------------------------------------------------------------------
-// USB Attach State.
-// ---------------------------------------------------------------------------
-TBool CPslnUi::USBAttachState()
- {
- return iUSBAttached;
- }
-
-// ---------------------------------------------------------------------------
-// Called when a key is pressed and no other class has catched the event.
-// Handles only key events that are meant to control the tab group.
-// ---------------------------------------------------------------------------
-#ifdef RD_CONTROL_PANEL
-TKeyResponse CPslnUi::HandleKeyEventL(
- const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/ )
-#else
-TKeyResponse CPslnUi::HandleKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType )
-#endif // RD_CONTROL_PANEL
- {
- PSLN_TRACE_DEBUG("CPslnUi::HandleKeyEventL");
-
-#ifndef RD_CONTROL_PANEL
- // If tab group is not yet created, create it.
- if ( !GetStatus( EPslnTabGroupCreated ) )
- {
- ConstructTabGroupL();
- }
- iTabGroup = static_cast<CAknTabGroup*>
- ( iDecoratedTabGroup->DecoratedControl() );
-
- // Only forward key events to tabgroup when:
- // 1) TabGroup has been created (and is not NULL)
- // 2) Active view is not MainView (there is no tab group in Main)
- // 3) key event is either left key or right key
- if ( iTabGroup && iView && iView->Id().iUid != KPslnMainView2.iUid &&
- ( aKeyEvent.iScanCode == EStdKeyLeftArrow ||
- aKeyEvent.iScanCode == EStdKeyRightArrow ) )
- {
- PSLN_TRACE_DEBUG("CPslnUi::HandleKeyEventL forward event to Tab");
- // If preview is about to activate, cancel it.
- if ( GetStatus( EPslnSkinChangeRequested ) &&
- iView->Id().iUid == KPslnGeneralView.iUid )
- {
- SetStateOff( EPslnSkinChangeRequested );
- }
-
- return iTabGroup->OfferKeyEventL( aKeyEvent, aType );
- }
-#endif // !RD_CONTROL_PANEL
- return EKeyWasNotConsumed;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::SkinConfigurationChangedL
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::SkinConfigurationChangedL(
- const TAknsSkinStatusConfigurationChangeReason aReason )
- {
- PSLN_TRACE_DEBUG1("CPslnUi::SkinConfigurationChangedL internal state before: %d", iPslnUiStatus );
- HBufC* errorBuf = NULL;
-
- switch( aReason )
- {
- // Skin activation failed due to OOM.
- // Set skin activation user activity off, so that subsequent attempts can be made.
- // Also, set error note text.
- // Finally, set skin activation attempt off and update skin list.
- case EAknsSkinStatusConfigurationFailedOOM:
- SetStateOff( EPslnSkinChangeRequested );
- errorBuf = StringLoader::LoadLC( R_PSLN_QTN_MEMLO_RAM_OUT_OF_MEM );
- if ( GetStatus( EPslnSkinActivated ) )
- {
- SetStateOff( EPslnSkinActivated );
- DoCreateWaitNoteL();
- }
- break;
- // Skin activation failed due to skin being corrupted.
- // Set skin activation user activity off, so that subsequent attempts can be made.
- // Also, set error note text.
- // Then set skin activation attempt off and update skin list.
- // Finally, activate default skin.
- case EAknsSkinStatusConfigurationFailedCorrupt:
- SetStateOff( EPslnSkinChangeRequested );
- iGeneralThemeView->HightlightDefaultSkin();
- errorBuf = StringLoader::LoadLC( R_PSLN_QTN_SKINS_ERROR_CORRUPTED );
- if ( GetStatus( EPslnSkinActivated ) )
- {
- SetStateOff( EPslnSkinActivated );
- DoCreateWaitNoteL();
- }
- SetStateOn( EPslnListUpdateNeeded );
- break;
- // Skin activation was success.
- // Set skin activation user activity off.
- // Show confirmation note about the skin change and set activation
- // request state off. Finally, check if there are sounds in the skin.
- case EAknsSkinStatusConfigurationDeployed:
- SetStateOff( EPslnSkinChangeRequested );
- if ( GetStatus( EPslnSkinActivated ) )
- {
- SetStateOff( EPslnSkinActivated );
- SkinDeployedL();
- }
- else // Theme changed by other app, update view.
- {
- iModel->PerformCompleteUpdateL();
- iGeneralThemeView->UpdateSkinListItemsL( iModel->ActiveSkinIndex() +
- PslnFeatures::IsEnhancedEmbeddedLinksSupported() );
- iGeneralThemeView->RemoveLocalSkinItems();
- }
-
- if ( GetStatus( EPslnSoundActivationPending ) )
- {
- SetStateOff( EPslnSoundActivationPending );
- ActivateSoundsL();
- }
- ToggleScreenBlankerL( EFalse, EFalse );
- break;
- default:
- break;
- }
-
- if( errorBuf )
- {
- ShowErrorNoteL( *errorBuf );
- CleanupStack::PopAndDestroy( errorBuf );
- }
- PSLN_TRACE_DEBUG1("CPslnUi::SkinConfigurationChangedL internal state after: %d", iPslnUiStatus );
- }
-
-// ---------------------------------------------------------------------------
-// Activate a Skin.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::ActivateSkinL()
- {
- PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL");
- TInt skinIndex = iModel->CurrentSelectedSkinIndex();
-
- CPslnSkinEntry* entry = iModel->VisibleSkin( skinIndex );
- if( !entry )
- {
- SetStateOff( EPslnSkinChangeRequested );
- return;
- }
-
- TBool showWaitNote = EFalse;
- TInt drmError = KErrNone;
- HBufC* errorBuf = NULL;
-
- PSLN_TRACE_DEBUG1("CPslnUi::ActivateSkinL entry->Protection: %d", entry->Protection() );
- switch ( entry->Protection() )
- {
- case EAknsSrvNoRights:
- drmError = CDRMRights::ENoRights;
- showWaitNote = ETrue;
- break;
- case EAknsSrvFutureRights:
- drmError = CDRMRights::ERightsExpired;
- break;
- case EAknsSrvExpiredRights:
- drmError = CDRMRights::ERightsExpired;
- showWaitNote = ETrue;
- break;
- default :
- break;
- }
-
- // DRMHelper handles the error.
- if ( drmError )
- {
- RAknsSrvSession skinsrv;
- User::LeaveIfError( skinsrv.Connect() );
- CleanupClosePushL( skinsrv );
-
- TInt fileserverhandle;
- TInt filehandle;
- fileserverhandle = skinsrv.OpenBitmapFile( entry->FullName(), filehandle );
- RFile file;
- User::LeaveIfError( file.AdoptFromServer( fileserverhandle, filehandle ) );
- CleanupClosePushL( file );
-
- TInt returnCode = KErrNone;
- PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL use DRMHelper to show the error note");
- CDRMHelper* drmhelper = CDRMHelper::NewLC( *CCoeEnv::Static() );
- returnCode = drmhelper->HandleErrorL(
- drmError,
- file );
-
- PSLN_TRACE_DEBUG1("CPslnUi::ActivateSkinL DRMHelper returns: %d", returnCode );
- if ( returnCode && showWaitNote )
- {
- if ( GetStatus( EPslnListUpdateNeeded ) )
- {
- SetStateOff( EPslnListUpdateNeeded );
- DoCreateWaitNoteL();
- }
- }
- SetStateOff( EPslnSkinChangeRequested );
- CleanupStack::PopAndDestroy( 3 ); // drmHelper, skinsrv, file
- }
- else
- {
- if ( entry->Protection() == EAknsSrvCountBased )
- {
- errorBuf = StringLoader::LoadLC( R_PSLN_QTN_DRM_PREV_RIGHTS_SET );
- }
- // Check for corruption.
- if ( entry->IsCorrupted() )
- {
- PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL corrupt skin!");
- errorBuf = StringLoader::LoadLC( R_PSLN_QTN_SKINS_ERROR_CORRUPTED );
- }
-
- // Non-DRMHelper error handling.
- if ( errorBuf )
- {
- SetStateOff( EPslnSkinChangeRequested );
- ShowErrorNoteL( *errorBuf );
- CleanupStack::PopAndDestroy( errorBuf );
- }
- // No errors, activate the skin.
- else
- {
- PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL 2");
- // Start changing active skin.
- iModel->GuardActivationLC();
- TBool shownote = EFalse;
-
- // Show screen clearer when skin is changing.
- ToggleScreenBlankerL( ETrue, ETrue );
-
- PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL directly");
- shownote = iModel->ActivateSkinL( skinIndex );
-
- if ( shownote )
- {
- PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL skin activated");
- SetStateOn( EPslnSkinActivated );
- }
- else
- {
- // If user declined to activate protected skin, re-initialize status
- // flag.
- if ( GetStatus( EPslnSkinChangeRequested ) )
- {
- PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL decline DRM activation");
- SetStateOff( EPslnSkinChangeRequested );
- // Remove screen clearer.
- ToggleScreenBlankerL( EFalse, EFalse );
- }
- }
- CleanupStack::PopAndDestroy(); // activation guard
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::ActivateSoundsL
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::ActivateSoundsL()
- {
- PSLN_TRACE_DEBUG("CPslnUi::ActivateSoundsL");
-
- // Is sounds are not supperted, ignore.
- if ( !PslnFeatures::IsSoundsInSkinsSupported()
-
- // If sounds are supported, but general view is not active, ignore.
- || iView && iView->Id().iUid != KPslnGeneralView.iUid )
- {
- return;
- }
-
- TPath skinPath;
- CPslnSkinEntry* entry = iModel->VisibleSkin( iModel->ActiveSkinIndex() );
- if( entry )
- {
- entry->GetSkinPath( skinPath );
- skinPath.Append( KPslnPathSeparator );
- }
- else
- {
- User::Leave( KErrUnknown );
- }
-
- // Find sound files.
- CPslnSoundActivator* activator = CPslnSoundActivator::NewLC();
- TInt numberOfSounds = 0;
- activator->CollectSoundsL( skinPath, numberOfSounds );
-
- PSLN_TRACE_DEBUG1("CPslnUi::ActivateSoundsL num of tunes %d", numberOfSounds );
-
- if ( numberOfSounds <= 0 )
- {
- CleanupStack::PopAndDestroy( activator );
- return;
- }
-
- // Launch profile settings loader.
- CPslnTaskActivateSounds* activateTask = new (ELeave)
- CPslnTaskActivateSounds( *activator );
- CleanupStack::PushL( activateTask );
-
- CreateAndShowWaitWrapperL(
- *activateTask,
- R_PSLN_QTN_GEN_NOTE_OPENING,
- KNullDesC() );
-
- HBufC* noteText = NULL;
-
- PSLN_TRACE_DEBUG1("CPslnUi::ActivateSoundsL error %d", activateTask->iActivationErr );
-
- if( activateTask->iActivationErr == KErrNone )
- {
- if ( numberOfSounds == 1 )
- {
- noteText = StringLoader::LoadLC(
- R_PSLN_QTN_SKINS_NOTE_TONE_ACTIVATED );
- }
- else
- {
- noteText = StringLoader::LoadLC(
- R_PSLN_QTN_SKINS_NOTE_TONES_ACTIVATED );
- }
-
- CAknConfirmationNote* note =
- new (ELeave) CAknConfirmationNote( ETrue );
- note->ExecuteLD( *noteText );
- }
- else
- {
- if( activateTask->iActivationErr == KErrPermissionDenied )
- {
- noteText = StringLoader::LoadLC(
- R_PSLN_QTN_PROFILES_INFO_TONE_NO_DRM );
- }
- else
- {
- noteText = StringLoader::LoadLC(
- R_PSLN_QTN_FILE_FORMAT_ERROR );
- }
- CAknErrorNote* note =
- new (ELeave) CAknErrorNote( ETrue );
- note->ExecuteLD( *noteText );
- }
-
- CleanupStack::PopAndDestroy( 3, activator );
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::DownloadSkinL
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::DownloadSkinL()
- {
- PSLN_TRACE_DEBUG("CPslnUi::DownloadSkinL");
- iModel->DownloadSkinL();
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::CreateAndShowWaitWrapperL
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::CreateAndShowWaitWrapperL( MAknBackgroundProcess& aTask,
- const TInt aResourceID, const TDesC& aString,
- const TBool aShowImmediately )
- {
- HBufC* noteText = NULL;
- if ( aString.Length() == 0 )
- {
- noteText = StringLoader::LoadLC( aResourceID, iEikonEnv );
- }
- else
- {
- noteText = StringLoader::LoadLC( aResourceID, aString, iEikonEnv );
- }
-
- CAknWaitNoteWrapper* wrapper = CAknWaitNoteWrapper::NewL();
- CleanupDeletePushL( wrapper );
- if ( wrapper )
- {
- wrapper->ExecuteL(
- R_PSLN_GENERAL_WAIT_NOTE, aTask, *noteText, aShowImmediately );
- }
-
- CleanupStack::PopAndDestroy( 2, noteText ); // noteText, wrapper
- }
-
-// ---------------------------------------------------------------------------
-// CPslnUi::AddPluginToTabL
-// ---------------------------------------------------------------------------
-//
-#ifndef RD_CONTROL_PANEL
-void CPslnUi::AddPluginToTabL( CPslnFWPluginInterface& aPlugin )
- {
- PSLN_TRACE_DEBUG("CPslnUi::AddPluginToTabL Start");
- HBufC* buf = HBufC::NewLC( KPslnItemLength );
- TPtr ptrBuf = buf->Des();
- aPlugin.GetTabTextL( ptrBuf );
- TInt pluginUid = aPlugin.Id().iUid;
- if ( iTabGroup )
- {
- iTabGroup->AddTabL( pluginUid, ptrBuf );
- }
- PSLN_TRACE_DEBUG("CPslnUi::AddPluginToTabL Default Plugin added to tab");
- CleanupStack::PopAndDestroy( buf );
- }
-#endif //!RD_CONTROL_PANEL
-
-// ---------------------------------------------------------------------------
-// Handles Exit command.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::HandleCmdExitL()
- {
- Exit();
- }
-
-// ---------------------------------------------------------------------------
-// Shows error note.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::ShowErrorNoteL( HBufC& aErrorBuf ) const
- {
- // Display global note.
- CAknGlobalNote* errorNote = CAknGlobalNote::NewLC();
- errorNote->ShowNoteL( EAknGlobalErrorNote, aErrorBuf );
- CleanupStack::PopAndDestroy( errorNote );
- }
-// ---------------------------------------------------------------------------
-// Callback when idle time occurs for skin update.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnUi::DoCreateWaitNoteL( TAny* aAny )
- {
- static_cast< CPslnUi* >( aAny )->DoCreateWaitNoteL();
- return EFalse;
- }
-// ---------------------------------------------------------------------------
-// CPslnUi::DoCreateWaitNoteL
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::DoCreateWaitNoteL()
- {
- CPslnTaskGenericUpdate* updateTask =
- new (ELeave) CPslnTaskGenericUpdate(
- *this, &CPslnModel::PerformCompleteUpdateL, ETrue );
- CleanupStack::PushL( updateTask );
-
- CreateAndShowWaitWrapperL( *updateTask,
- R_PSLN_QTN_GEN_NOTE_OPENING, KNullDesC(), EFalse );
-
- User::LeaveIfError( updateTask->iCallErr );
-
- CleanupStack::PopAndDestroy( updateTask );
- }
-
-// ---------------------------------------------------------------------------
-// This operation needs to be atomic. If it leaves, set state back to previous.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnUi::ActivateSkin( const TInt aPslnStatus )
- {
- TInt error = KErrNone;
- if ( !GetStatus( aPslnStatus ) )
- {
- SetStateOn( aPslnStatus );
- TRAPD( err, ActivateSkinL() );
- if ( err != KErrNone )
- {
- SetStateOff( aPslnStatus );
- error = err;
- }
- }
- iGeneralThemeView->RemoveLocalSkinItems();
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Non-leaving version of AddPluginToTabL.
-// ---------------------------------------------------------------------------
-//
-#ifndef RD_CONTROL_PANEL
-TInt CPslnUi::AddPluginToTab( CPslnFWPluginInterface& aPlugin )
- {
- TRAPD( err, AddPluginToTabL( aPlugin ) );
- if ( err )
- {
- PSLN_TRACE_DEBUG1("CPslnUi::AddPluginToTab plugin fails: ", aPlugin.Id().iUid );
- }
- return err;
- }
-#endif //!RD_CONTROL_PANEL
-
-// ---------------------------------------------------------------------------
-// Show skin activated note.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::SkinDeployedL()
- {
-#ifdef RD_UI_TRANSITION_EFFECTS_PHASE2
- // Only set sound state - no conf note anymore.
- SetStateOn( EPslnSoundActivationPending );
-#else
- HBufC* skinName = HBufC::NewLC( KMaxName );
- TPtr skinNamePtr = skinName->Des();
- TInt skinIndex = iModel->ActiveSkinIndex();
-
- iModel->GetSkinNameByIndex(
- skinIndex,
- skinNamePtr,
- EPslnSkinNameTypeTitle );
-
- // Show confirmation note about skin change.
- HBufC* noteTxt = StringLoader::LoadL(
- R_PSLN_CONFIRM_ACTIVE_SKIN_STRING,
- skinNamePtr,
- iEikonEnv );
- CleanupStack::PushL( noteTxt );
-
- SetStateOn( EPslnSoundActivationPending );
- CAknConfirmationNote* note =
- new (ELeave) CAknConfirmationNote( ETrue );
- note->ExecuteLD( *noteTxt );
- CleanupStack::PopAndDestroy( 2, skinName ); // skinName, noteTxt
-
-#endif
- iGeneralThemeView->UpdateSkinListItemsL();
- }
-
-// ---------------------------------------------------------------------------
-// Creates model class.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::CreateModelL()
- {
- if ( !GetStatus( EPslnModelCreated ) )
- {
- iModel = CPslnModel::NewL( this );
- SetStateOn( EPslnModelCreated );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Callback when idle time occurs for skin activation.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnUi::DoActivateSkinL( TAny* aAny )
- {
- static_cast< CPslnUi* >( aAny )->DoActivateSkinL();
- return EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// Callback when idle time occurs for skin activation.
-// ---------------------------------------------------------------------------
-//
-void CPslnUi::DoActivateSkinL()
- {
- TInt error = ActivateSkin( EPslnSkinChangeRequested );
- if ( error == KErrNoMemory )
- {
- HBufC* errorBuf = StringLoader::LoadLC(
- R_PSLN_QTN_MEMLO_RAM_OUT_OF_MEM );
- // Display global note.
- CAknGlobalNote* errorNote = CAknGlobalNote::NewLC();
- errorNote->ShowNoteL( EAknGlobalErrorNote, *errorBuf );
- CleanupStack::PopAndDestroy( 2 ); // errorNote & errorBuf
- }
- }
-
-
-/**
-* Handle USB Callback.
-*/
-void CPslnUi::HandleUSBCallBackL()
- {
- if ( iView && iView->Id().iUid == KPslnGeneralView.iUid )
- {
- TInt value = KErrNone;
- iEnableUSBWatchProperty.Get(value);
-
- if (value == KUsbPersonalityIdMS )
- {
- iUSBAttached = ETrue;
- }
- else
- {
- iUSBAttached = EFalse;
- }
- static_cast< CPslnGeneralThemeView* >( iView )->RestartQuickPreviewL();
- }
- }
-// End of File
-
--- a/psln/Src/PslnWallpaperContainer.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wallpaper view's container.
-*
-*/
-
-
-
-// INCLUDE FILES
-
-// UI framework services.
-#include <aknlists.h>
-#include <eikclbd.h>
-
-// Help context.
-#include <csxhelp/skins.hlp.hrh>
-
-// Resources
-#include <psln.rsg>
-
-// Psln specific.
-#include "PslnModel.h"
-#include "PslnWallpaperContainer.h"
-#include "PslnConst.h"
-#include "PslnDebug.h"
-#include "PslnFeatures.h"
-
-// Framework
-#include <pslnfwiconhelper.h>
-
-// CONSTANTS
-// Number of wallpaper items in listbox.
-#ifndef RD_SLIDESHOW_WALLPAPER
-const TInt KPslnWallpaperItems = 2;
-#else
-const TInt KPslnWallpaperItems = 3;
-#endif // RD_SLIDESHOW_WALLPAPER
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnWallpaperContainer::CPslnWallpaperContainer()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperContainer::ConstructL( const TRect& aRect )
- {
- iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
-
- BaseConstructL(
- aRect,
- R_PSLN_WP_VIEW_LBX );
- }
-
-// Destructor
-CPslnWallpaperContainer::~CPslnWallpaperContainer()
- {
- // iListBox is deleted in class CPslnBaseContainer.
- delete iItems;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnWallpaperContainer::UpdateListBoxL
-// ---------------------------------------------------------------------------
-//
-void CPslnWallpaperContainer::UpdateListBoxL()
- {
- CPslnBaseContainer::UpdateListBoxL();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperContainer::ConstructListBoxL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperContainer::ConstructListBoxL( TInt aResLbxId )
- {
- iItems = iCoeEnv->ReadDesC16ArrayResourceL( aResLbxId );
- CreateListBoxItemsL();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperContainer::CreateListBoxItemsL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperContainer::CreateListBoxItemsL()
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperContainer::CreateListBoxItemsL BEGIN");
- iItemArray->Reset();
- TInt selectedItem = iModel->CurrentPropertyIndexL( KPslnBgIdleSettingId );
-
- TBool slidesetSupport =
- PslnFeatures::IsSupported( KPslnWallpaperSlideSetDialog );
-
- // Check that returned value is meaningful. If not, assume 'none' is set.
- TInt maxIndex = KPslnWallpaperItems - 1;
- if ( selectedItem < 0 ||
- selectedItem > maxIndex )
- {
- selectedItem = 0;
- }
-
- for( TInt i = 0; i < KPslnWallpaperItems; i++ )
- {
- if ( i > iItems->Count() )
- {
- User::Leave( KErrOverflow );
- }
- HBufC* itemBuf = (*iItems)[i].AllocL();
- if ( itemBuf )
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperContainer::CreateListBoxItemsL 2");
- itemBuf = itemBuf->ReAllocL( itemBuf->Length() + KPslnIconSize );
- TPtr ptr = itemBuf->Des();
- if ( selectedItem == i )
- {
- ptr.Insert( 0, KPslnFWActiveListItemFormat );
- }
- else
- {
- ptr.Insert( 0, KPslnFWNonActiveListItemFormat );
- }
- if ( !slidesetSupport && (i + 1) == KPslnWallpaperItems )
- {
- // skip
- }
- else
- {
- iItemArray->InsertL( i, ptr );
- }
- delete itemBuf;
- }
- }
-
- // Add only 'not-selected' and 'selected' icons.
- CPslnFWIconHelper* iconHelper = CPslnFWIconHelper::NewL();
- CleanupStack::PushL( iconHelper );
- iconHelper->AddIconsToSettingItemsL(
- EFalse,
- 1,
- iListBox );
- CleanupStack::PopAndDestroy( iconHelper );
- DrawDeferred();
- PSLN_TRACE_DEBUG("CPslnWallpaperContainer::CreateListBoxItemsL END");
- }
-
-// ---------------------------------------------------------------------------
-// Gets help context for Help application.
-// ---------------------------------------------------------------------------
-//
-void CPslnWallpaperContainer::GetHelpContext(
- TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KUidPsln;
- aContext.iContext = KSKINS_HLP_WP_SETTINGS;
- }
-
-// End of File
--- a/psln/Src/PslnWallpaperView.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,565 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wallpaper view.
-*
-*/
-
-
-// INCLUDE FILES
-// Psln specific
-#include <psln.rsg>
-#include "PslnModel.h"
-#include "PslnWallpaperView.h"
-#include "PslnWallpaperContainer.h"
-#include "PslnConst.h"
-#include "PslnUi.h"
-#include "PslnDRMImplementation.h"
-#include "PslnDebug.h"
-
-// General services
-#include <MGFetch.h>
-#include <AknSkinsInternalCRKeys.h>
-#include <centralrepository.h>
-#include <StringLoader.h>
-#include <AknGlobalNote.h>
-
-#ifdef RD_SLIDESHOW_WALLPAPER
-// Slide set wallpaper.
-#include <pslnslidesetwallpaperdialog.h>
-#include <mmf/common/mmfcontrollerpluginresolver.h>
-#include <ecom/resolver.h>
-#endif // RD_SLIDESHOW_WALLPAPER
-
-// CONSTANTS
-// Granularity for wallpaper items.
-const TInt KPslnFileArrayGranularity = 4;
-// Index of selected file item from MGFetch.
-const TInt KPslnSelectedFile = 0;
-
-// Index of current wallpaper item selection.
-enum TPslnWallpaperSelection
- {
- EPslnNoneWP = 0,
- EPslnUserDefinedWP,
- EPslnSlideSetWP
- };
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnWallpaperView::CPslnWallpaperView()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::ConstructL()
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperView::ConstructL BEGIN");
- BaseConstructL( R_PSLN_WALLPAPER_VIEW );
-
- iNaviPaneContext = iPslnUi->PslnTabGroup();
-
- iWallpaperRepository = CRepository::NewL( KCRUidPersonalisation );
- iWallpaperNotifier = CCenRepNotifyHandler::NewL(
- *this,
- *iWallpaperRepository,
- CCenRepNotifyHandler::EIntKey,
- KPslnWallpaperType );
- iWpDlgRunnig = EFalse;
- PSLN_TRACE_DEBUG("CPslnWallpaperView::ConstructL END");
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnWallpaperView* CPslnWallpaperView::NewLC()
- {
- CPslnWallpaperView* self = new (ELeave) CPslnWallpaperView();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor
-CPslnWallpaperView::~CPslnWallpaperView()
- {
- if ( iWallpaperNotifier )
- {
- iWallpaperNotifier->StopListening();
- }
- delete iWallpaperNotifier;
- delete iWallpaperRepository;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::Id
-// -----------------------------------------------------------------------------
-//
-TUid CPslnWallpaperView::Id() const
- {
- return KPslnWallpaperView;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::HandleCommandL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::HandleCommandL( TInt aCommand )
- {
- if ( aCommand == EAknSoftkeyOk ||
- aCommand == EPslnCmdAppSetWallpaper ||
- aCommand == EPslnCmdAppChangeWallpaper ||
- aCommand == EPslnCmdWallpaperConfigure )
- {
- if ( iContainer )
- {
- TInt setBgImage = KErrNone;
- // If User specified is selected.
- switch ( iContainer->CurrentItemIndex() )
- {
- case EPslnUserDefinedWP:
- {
- if ( iWpDlgRunnig )
- {
- return;
- }
- if ( !ShowBackgroundImageListL() )
- {
- return;
- }
- iModel->SetCurrentPropertyTypeL(
- KPslnBgIdleSettingId,
- EPslnUserDefinedWP );
- }
- break;
- case EPslnNoneWP:
- if ( iActiveWallpaper != EPslnNoneWP )
- {
- iModel->SetCurrentPropertyTypeL(
- KPslnBgIdleSettingId,
- EPslnNoneWP );
- setBgImage = iModel->SetBackgroundImagePath( KNullDesC );
- if ( setBgImage != KErrNone )
- {
- iPslnUi->HandleImageErrorsL( setBgImage );
- }
- }
- else
- {
- // No need to do anything.
- return;
- }
- break;
- case EPslnSlideSetWP:
- {
-#ifdef RD_SLIDESHOW_WALLPAPER
- if ( iWpDlgRunnig )
- {
- //Try not run slideset dialog more than once.
- return;
- }
- RImplInfoPtrArray array;
- const TUid wallpaperUid = { 0x102823AD };
- const TEComResolverParams emptyParams;
- REComSession::ListImplementationsL(
- wallpaperUid,
- emptyParams,
- KRomOnlyResolverUid,
- array );
- CleanupResetAndDestroyPushL( array );
-
- CImplementationInformation* info = array[ KPslnWallpaperSlideSettingDialog ];
- TUid implUid = info->ImplementationUid();
-
- CPslnSlidesetDialogInterface* plugin =
- CPslnSlidesetDialogInterface::NewL( implUid );
- if ( aCommand == EPslnCmdWallpaperConfigure )
- {
- plugin->SetDialogFlag(
- CPslnSlidesetDialogInterface::EPslnLaunchMode,
- CPslnSlidesetDialogInterface::EPslnConfigureOnly );
- }
- if ( aCommand == EPslnCmdAppSetWallpaper &&
- plugin->GetDialogFlag(
- CPslnSlidesetDialogInterface::EPslnConfigurability ) ==
- CPslnSlidesetDialogInterface::EPslnDirectActivationPossible )
- {
- delete plugin; // just delete the plugin as it is not needed.
- iWallpaperRepository->Set( KPslnWallpaperType, EPslnSlideSetWP );
- UpdateCurrentItem();
- }
- else
- {
- iWpDlgRunnig = ETrue;
- plugin->ExecuteDialogLD();
- iWpDlgRunnig = EFalse;
- }
-
- plugin = NULL;
- CleanupStack::PopAndDestroy(); // array
-
- // Plugin stores wallpaper type, if it deems that the user selection is valid.
-
-#endif // RD_SLIDESHOW_WALLPAPER
- }
- break;
- default:
- break;
- }
-
- // Update container.
- static_cast<CPslnWallpaperContainer*>
- (iContainer)->UpdateListBoxL();
- CheckMiddleSoftkeyLabelL();
- }
- }
- else
- {
- if ( ( aCommand == EAknSoftkeyBack ) && iWpDlgRunnig )
- {
- return;
- }
- iPslnUi->HandleCommandL( aCommand );
- }
- }
-
-// -----------------------------------------------------------------------------
-// When this method is called, view checks based on highlight focus, if the MSK
-// label is correct.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::CheckMiddleSoftkeyLabelL()
- {
- // First remove any prevous commands.
- RemoveCommandFromMSK();
-
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
-
- // Set MSK label.
- if ( iActiveWallpaper != iCurrentItem )
- {
- // Set middle softkey as Apply, if:
- // a) 'None' is selected
- // b) highlight is on inactive selection
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_ACTIVATE,
- EPslnCmdAppSetWallpaper );
- }
- else if ( iActiveWallpaper == 0 )
- {
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_DUMMY,
- EPslnCmdEmptyCommand );
- }
- else
- {
- // Otherwise set middle softkey as Change.
- CPslnBaseView::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_CHANGE,
- EPslnCmdAppChangeWallpaper );
- }
- }
-
-// -----------------------------------------------------------------------------
-// If wallpaper image has changed, update container.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::HandleNotifyInt( TUint32 aId, TInt /*aNewValue*/ )
- {
- if ( ( aId == KPslnWallpaperType ) && iContainer )
- {
- TInt previousValue = UpdateCurrentItem();
- if ( iActiveWallpaper != previousValue )
- {
- UpdateContainer();
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// If the whole repository changes, update container.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::HandleNotifyGeneric( TUint32 aId )
- {
- if ( ( aId == NCentralRepositoryConstants::KInvalidNotificationId ||
- aId == KPslnWallpaperType ) && iContainer )
- {
- TInt previousValue = UpdateCurrentItem();
- if ( iActiveWallpaper != previousValue )
- {
- UpdateContainer();
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// In case of error, try to re-start listening.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::HandleNotifyError(
- TUint32 /*aId*/,
- TInt aError,
- CCenRepNotifyHandler* aHandler )
- {
- if ( ( aError != KErrNone ) && aHandler )
- {
- TRAP_IGNORE( aHandler->StartListeningL() );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::DoActivateL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage )
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperView::DoActivateL START");
- CPslnBaseView::DoActivateL(
- aPrevViewId,
- aCustomMessageId,
- aCustomMessage );
-
- // If view is directly activated (not through main view), update
- // tab group (and main view's active folder). The static views
- // have same UID as their tab index.
- if ( aPrevViewId.iAppUid != KUidPsln )
- {
- iPslnUi->UpdateTabIndex(
- KPslnWallpaperView.iUid,
- KPslnWallpaperView.iUid );
- }
-
- if ( iContainer )
- {
- UpdateCurrentItem();
- // Set highlight to selected item.
- iContainer->SetCurrentItemIndexAndDraw( iActiveWallpaper );
- }
- if ( iWallpaperNotifier )
- {
- iWallpaperNotifier->StartListeningL();
- }
- CheckMiddleSoftkeyLabelL();
- iWpDlgRunnig = EFalse;
- PSLN_TRACE_DEBUG("CPslnWallpaperView::DoActivateL END");
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::DynInitMenuPaneL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- if ( aResourceId == R_PSLN_WALLPAPER_MENUPANE )
- {
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
- // Remove change if none is selected, or highlight is not in active item.
- if ( iActiveWallpaper != iCurrentItem )
- {
- aMenuPane->SetItemDimmed( EPslnCmdAppChangeWallpaper, ETrue );
- }
- else if ( iActiveWallpaper == 0 )
- {
- aMenuPane->SetItemDimmed( EPslnCmdAppSetWallpaper, ETrue );
- aMenuPane->SetItemDimmed( EPslnCmdAppChangeWallpaper, ETrue );
- }
- else
- {
- aMenuPane->SetItemDimmed( EPslnCmdAppSetWallpaper, ETrue );
- }
-
-#ifdef RD_SLIDESHOW_WALLPAPER
-
- if ( iCurrentItem != EPslnSlideSetWP )
- {
- aMenuPane->SetItemDimmed( EPslnCmdWallpaperConfigure, ETrue );
- }
-#endif // RD_SLIDESET_WALLPAPER
- }
- CPslnBaseView::DynInitMenuPaneL( aResourceId, aMenuPane );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::HandleListBoxSelectionL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::HandleListBoxSelectionL()
- {
- if ( iContainer )
- {
- iCurrentItem = iContainer->CurrentItemIndex();
- }
- HandleCommandL( EAknSoftkeyOk );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::HandleListBoxItemHighlightL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::HandleListBoxItemHighlightL()
- {
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::NewContainerL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::NewContainerL()
- {
- iContainer = new(ELeave) CPslnWallpaperContainer();
- iContainer->SetMiddleSoftkeyObserver( this );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::SetTitlePaneL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::SetTitlePaneL( TInt& aResourceId )
- {
-#ifdef RD_CONTROL_PANEL
- aResourceId = R_PSLN_TITLE_PANE_WALLPAPER;
-#endif //RD_CONTROL_PANEL
- }
-
-// ---------------------------------------------------------------------------
-// CPslnWallpaperView::CbaExitEnabled
-// ---------------------------------------------------------------------------
-//
-TInt CPslnWallpaperView::CbaResourceId( const TVwsViewId& /*aPrevViewId*/,TUid aCustomMessageId )
- {
- return aCustomMessageId.iUid ?
- R_AVKON_SOFTKEYS_OPTIONS_EXIT : R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnWallpaperView::ShowBackgroundImageListL
-// ---------------------------------------------------------------------------
-//
-TBool CPslnWallpaperView::ShowBackgroundImageListL()
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperView::ShowBackgroundImageListL");
- TBool retVal = EFalse;
- CDesCArrayFlat* files =
- new (ELeave) CDesCArrayFlat( KPslnFileArrayGranularity );
- CleanupStack::PushL( files );
- CPslnDRMImplementation* verifier = NULL;
- verifier = CPslnDRMImplementation::NewL();
- CleanupStack::PushL( verifier );
-
- PSLN_TRACE_DEBUG("CPslnWallpaperView::ShowBackgroundImageListL MGFetch");
- iWpDlgRunnig = ETrue;
- TBool selected = EFalse;
- TRAPD( err,selected = MGFetch::RunL( *files, EImageFile, EFalse, verifier ) );
- iWpDlgRunnig = EFalse;
- User::LeaveIfError( err );
- if ( !verifier )
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperView::ShowBackgroundImageListL DRM Error");
- }
-
- else if( selected && ( files->MdcaCount() > 0 ) )
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperView::ShowBackgroundImageListL Fetch successful");
- TInt setBgImage = iModel->SetBackgroundImagePath(
- files->MdcaPoint( KPslnSelectedFile ) );
- if ( setBgImage != KErrNone )
- {
- if ( setBgImage == KLeaveExit )
- {
- User::Leave( KLeaveExit );
- }
- else
- {
- iPslnUi->HandleImageErrorsL( setBgImage );
- }
- }
- else
- {
- // Image selected, no DRM issues.
- retVal = ETrue;
- }
- CheckMiddleSoftkeyLabelL();
- }
- else
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperView::ShowBackgroundImageListL Fetch cancelled");
- }
-
- CleanupStack::PopAndDestroy( 2, files ); // verifier, files
-
- PSLN_TRACE_DEBUG("CPslnWallpaperView::ShowBackgroundImageListL METHOD COMPLETED");
- return retVal;
- }
-
-// ---------------------------------------------------------------------------
-// Updates the container.
-// ---------------------------------------------------------------------------
-//
-void CPslnWallpaperView::UpdateContainer()
- {
- PSLN_TRACE_DEBUG("CPslnWallpaperView::UpdateContainer START");
- if ( iContainer )
- {
- TRAP_IGNORE( static_cast<CPslnWallpaperContainer*>
- (iContainer)->UpdateListBoxL();
- CheckMiddleSoftkeyLabelL();
- );
- }
- PSLN_TRACE_DEBUG("CPslnWallpaperView::UpdateContainer END");
- }
-
-// ---------------------------------------------------------------------------
-// Removes unnecessary commands from Middle softkey.
-// ---------------------------------------------------------------------------
-//
-void CPslnWallpaperView::RemoveCommandFromMSK()
- {
- CEikButtonGroupContainer* cbaGroup = Cba();
- if ( cbaGroup )
- {
- cbaGroup->RemoveCommandFromStack( KPslnMSKControlID, EPslnCmdAppSetWallpaper );
- cbaGroup->RemoveCommandFromStack( KPslnMSKControlID, EPslnCmdAppChangeWallpaper );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Updates current item.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnWallpaperView::UpdateCurrentItem()
- {
- TInt previousValue = iActiveWallpaper;
- iActiveWallpaper = iModel->CurrentPropertyIndex( KPslnBgIdleSettingId );
- return previousValue;
- }
-
-// End of File
--- a/psln/Src/pslnidletaskcreateviews.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Background task for creating views.
-*
-*/
-
-
-#include "pslnidletaskcreateviews.h"
-#include "PslnUi.h"
-#include "PslnConst.h"
-#include "PslnModel.h"
-
-// First step is to create tabgroup.
-const TInt KPslnCreateTabs = 0;
-// Second step is to create parts of the model.
-const TInt KPslnFullUpdateModel = 1;
-// Third step is to create general theme view.
-const TInt KPslnCreateGeneralView = 2;
-// Fourth step is to create wallpaper view.
-const TInt KPslnCreateWallpaperView = 3;
-// Fifth (and final) step is to create screensaver view.
-const TInt KPslnCreateScreensaverView = 4;
-
-// ---------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnIdleTaskCreateViews::CPslnIdleTaskCreateViews( CPslnUi* aPslnUi ) :
- iPslnUi( aPslnUi ), iDone( EFalse ), iIdleStep( KPslnCreateTabs )
- {
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnIdleTaskCreateViews* CPslnIdleTaskCreateViews::NewL( CPslnUi* aPslnUi )
- {
- CPslnIdleTaskCreateViews* self =
- new( ELeave ) CPslnIdleTaskCreateViews( aPslnUi );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnIdleTaskCreateViews::ConstructL()
- {
- iIdleTask = CIdle::NewL( CActive::EPriorityIdle );
- iIdleTask->Start( TCallBack( DoHandleIdleTimeL, this ) );
- }
-
-// Destructor
-CPslnIdleTaskCreateViews::~CPslnIdleTaskCreateViews()
- {
- if ( iIdleTask )
- {
- iIdleTask->Cancel();
- }
- delete iIdleTask;
- }
-
-// ---------------------------------------------------------------------------
-// Informs when task is finished.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnIdleTaskCreateViews::IsFinished() const
- {
- return iDone;
- }
-
-// -----------------------------------------------------------------------------
-// Callback function when application is idle.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnIdleTaskCreateViews::DoHandleIdleTimeL( TAny* aAny )
- {
- static_cast< CPslnIdleTaskCreateViews* >( aAny )->HandleIdleTimeL();
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// Handles idle time. With each step a new view is created.
-// -----------------------------------------------------------------------------
-//
-void CPslnIdleTaskCreateViews::HandleIdleTimeL()
- {
- if ( !IsFinished() )
- {
- TUid viewToCreate = KPslnGeneralView; //just initialise
- switch( iIdleStep )
- {
- case KPslnCreateTabs:
- iPslnUi->ConstructTabGroupL();
- break;
- case KPslnFullUpdateModel:
- if ( iPslnUi->Model() &&
- iPslnUi->Model()->ActiveSkinIndex() == KErrNotFound )
- {
- iPslnUi->Model()->PerformCompleteUpdateL();
- }
- break;
- case KPslnCreateGeneralView:
- viewToCreate = KPslnGeneralView;
- break;
- case KPslnCreateWallpaperView:
- viewToCreate = KPslnWallpaperView;
- break;
- case KPslnCreateScreensaverView:
- viewToCreate = KPslnScreenSaverView;
- iDone = ETrue;
- break;
- default:
- User::Leave( KErrArgument );
- break;
- }
- if ( iIdleStep != KPslnCreateTabs && iIdleStep != KPslnFullUpdateModel )
- {
- iPslnUi->CreateViewL( viewToCreate );
- }
- iIdleStep++;
- if ( !iDone )
- {
- if ( iIdleTask && !iIdleTask->IsActive() )
- {
- iIdleTask->Start( TCallBack( DoHandleIdleTimeL, this ) );
- }
- }
- }
- }
-
-// End of file
--- a/psln/Src/pslntaskactivatesounds.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* 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: Background task for activating sounds in skin package.
-*
-*/
-
-
-#include "pslntaskactivatesounds.h"
-#include "PslnSoundActivator.h"
-
-// ======== MEMBER FUNCTIONS ========
-// ---------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnTaskActivateSounds::CPslnTaskActivateSounds(
- CPslnSoundActivator& aActivator ) : iDone( EFalse ),
- iActivator( aActivator ),
- iActivationErr( KErrNone )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Informs when task is finished.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnTaskActivateSounds::IsProcessDone() const
- {
- return iDone;
- }
-
-// ---------------------------------------------------------------------------
-// Task step.
-// ---------------------------------------------------------------------------
-//
-void CPslnTaskActivateSounds::StepL()
- {
- if( IsProcessDone() )
- {
- return;
- }
- TRAP( iActivationErr, iActivator.ActivateToProfilesL() );
- iDone = ETrue;
- }
-
-// End of file
--- a/psln/Src/pslntaskgenericupdate.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2003-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: Background task for generic tasks.
-*
-*/
-
-
-#include "pslntaskgenericupdate.h"
-#include "PslnUi.h"
-#include "PslnGeneralThemeView.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnTaskGenericUpdate::CPslnTaskGenericUpdate(
- CPslnUi& aUi,
- TPslnModelFunctionPtr aModelFunc,
- TBool aUpdateList ) : iUi( aUi ),
- iModelFunc( aModelFunc ),
- iUpdateList( aUpdateList ),
- iDone( EFalse ),
- iCallErr( KErrNone )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Return ETrue when the process is done.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnTaskGenericUpdate::IsProcessDone() const
- {
- return iDone;
- }
-
-// ---------------------------------------------------------------------------
-// Completes one cycle of the process.
-// ---------------------------------------------------------------------------
-//
-void CPslnTaskGenericUpdate::StepL()
- {
- if( IsProcessDone() )
- {
- return;
- }
-
- TRAP( iCallErr, ( iUi.Model()->*iModelFunc)() );
-
- if( iUpdateList )
- {
- static_cast<CPslnGeneralThemeView*>
- ( iUi.View( KPslnGeneralView ) )->
- UpdateSkinListItemsL();
- }
-
- iDone = ETrue;
- }
-
-// End of file
-
Binary file psln/cenrep/keys_themes.xls has changed
Binary file psln/conf/themes.confml has changed
Binary file psln/conf/themes_102818E8.crml has changed
Binary file psln/conf/themes_102818EB.crml has changed
Binary file psln/help/data/xhtml.zip has changed
--- a/psln/help/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - Initial contribution
-*
-* Contributors:
-*
-*
-* Description:
-* Export help related files.
-*
-*/
-
-#include <platform_paths.hrh>
-PRJ_EXPORTS
-:zip ../data/xhtml.zip /epoc32/data/z/resource/ overwrite
-:zip ../data/xhtml.zip /epoc32/winscw/c/resource/ overwrite
-
-../inc/skins.hlp.hrh MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/skins.hlp.hrh)
-../rom/pslnhelps_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(pslnhelps_variant.iby)
--- a/psln/help/inc/skins.hlp.hrh Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//
-// skins.hlp.hrh generated by CSXHelp Utilities.
-//
-
-#ifndef __SKINS_HLP_HRH__
-#define __SKINS_HLP_HRH__
-
-_LIT(KSKINS_HLP_LIST, "SKINS_HLP_LIST"); //
-_LIT(KSCREENSAVER_HLP_WP_SETTINGS, "SCREENSAVER_HLP_WP_SETTINGS"); //
-_LIT(KSKINS_HLP_WP_SETTINGS, "SKINS_HLP_WP_SETTINGS"); //
-_LIT(KSKINS_HLP_SCREENS_SETTINGS, "SKINS_HLP_SCREENS_SETTINGS"); //
-_LIT(KSKINS_HLP_CIMAGE_SETTINGS, "SKINS_HLP_CIMAGE_SETTINGS"); //
-_LIT(KSKINS_HLP_APPSHELL, "SKINS_HLP_APPSHELL"); //
-_LIT(KSKINS_HLP_IDLE, "SKINS_HLP_IDLE"); //
-_LIT(KSKINS_HLP_APP_MAIN, "SKINS_HLP_APP_MAIN"); //
-_LIT(KSKINS_HLP_APPSKINS_LIST, "SKINS_HLP_APPSKINS_LIST"); //
-
-#endif
\ No newline at end of file
--- a/psln/help/rom/pslnhelps_variant.iby Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __PSLNHELPS_VARIANT_IBY__
-#define __PSLNHELPS_VARIANT_IBY__
-
-#if defined(FF_S60_HELPS_IN_USE)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005A32\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10005A32\contents.zip)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005A32\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005A32\index.xml)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005A32\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005A32\keywords.xml)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005A32\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005A32\meta.xml)
-#endif
-
-#endif
\ No newline at end of file
--- a/psln/pslnengine/BWINS/pslnengineU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-EXPORTS
- ??1CPslnModel@@UAE@XZ @ 1 NONAME ; CPslnModel::~CPslnModel(void)
- ?ActivateScreenSaver@CPslnModel@@QAEHHW4TPslnScreenSaverActivation@@@Z @ 2 NONAME ; int CPslnModel::ActivateScreenSaver(int, enum TPslnScreenSaverActivation)
- ?ActivateSkinL@CPslnModel@@QAEHABVTDesC8@@H@Z @ 3 NONAME ; int CPslnModel::ActivateSkinL(class TDesC8 const &, int)
- ?ActiveSkinIndex@CPslnModel@@QBEHXZ @ 4 NONAME ; int CPslnModel::ActiveSkinIndex(void) const
- ?CurrentPropertyIndex@CPslnModel@@QAEHH@Z @ 5 NONAME ; int CPslnModel::CurrentPropertyIndex(int)
- ?CurrentSelectedSkinIndex@CPslnModel@@QBEHXZ @ 6 NONAME ; int CPslnModel::CurrentSelectedSkinIndex(void) const
- ?DownloadSkinL@CPslnModel@@QAEXXZ @ 7 NONAME ; void CPslnModel::DownloadSkinL(void)
- ?FullName@CPslnSkinEntry@@QBEAAVTDesC16@@XZ @ 8 NONAME ; class TDesC16 & CPslnSkinEntry::FullName(void) const
- ?GetSkinNameByIndex@CPslnModel@@QBEXHAAVTDes16@@W4TPslnSkinNameType@@@Z @ 9 NONAME ; void CPslnModel::GetSkinNameByIndex(int, class TDes16 &, enum TPslnSkinNameType) const
- ?GetSkinPath@CPslnSkinEntry@@QBEXAAVTDes16@@@Z @ 10 NONAME ; void CPslnSkinEntry::GetSkinPath(class TDes16 &) const
- ?GuardActivationLC@CPslnModel@@QAEXXZ @ 11 NONAME ; void CPslnModel::GuardActivationLC(void)
- ?InvokeSSPluginFunctionL@CPslnModel@@QAEXHW4TScPluginCaps@@@Z @ 12 NONAME ; void CPslnModel::InvokeSSPluginFunctionL(int, enum TScPluginCaps)
- ?IsActiveSkinSelected@CPslnModel@@QBEHH@Z @ 13 NONAME ; int CPslnModel::IsActiveSkinSelected(int) const
- ?IsCorrupted@CPslnSkinEntry@@QBEHXZ @ 14 NONAME ; int CPslnSkinEntry::IsCorrupted(void) const
- ?IsEnhancedEmbeddedLinksSupported@PslnFeatures@@SAHXZ @ 15 NONAME ; int PslnFeatures::IsEnhancedEmbeddedLinksSupported(void)
- ?IsHelpSupported@PslnFeatures@@SAHXZ @ 16 NONAME ; int PslnFeatures::IsHelpSupported(void)
- ?IsSoundsInSkinsSupported@PslnFeatures@@SAHXZ @ 17 NONAME ; int PslnFeatures::IsSoundsInSkinsSupported(void)
- ?IsValidForActivation@CPslnModel@@QAEHH@Z @ 18 NONAME ; int CPslnModel::IsValidForActivation(int)
- ?IsValidForPreview@CPslnModel@@QAEHH@Z @ 19 NONAME ; int CPslnModel::IsValidForPreview(int)
- ?LoadScreensaverArrayL@CPslnModel@@QAEXXZ @ 20 NONAME ; void CPslnModel::LoadScreensaverArrayL(void)
- ?LocationOfSkin@CPslnModel@@QAE?AW4TAknSkinSrvSkinPackageLocation@@H@Z @ 21 NONAME ; enum TAknSkinSrvSkinPackageLocation CPslnModel::LocationOfSkin(int)
- ?NewL@CPslnModel@@SAPAV1@PAVMAknsSkinChangeObserver@@@Z @ 22 NONAME ; class CPslnModel * CPslnModel::NewL(class MAknsSkinChangeObserver *)
- ?NumberOfSkins@CPslnModel@@QBEHXZ @ 23 NONAME ; int CPslnModel::NumberOfSkins(void) const
- ?PerformCompleteUpdateL@CPslnModel@@QAEXXZ @ 24 NONAME ; void CPslnModel::PerformCompleteUpdateL(void)
- ?Protection@CPslnSkinEntry@@QBE?AW4TAknsSkinSrvSkinProtectionType@@XZ @ 25 NONAME ; enum TAknsSkinSrvSkinProtectionType CPslnSkinEntry::Protection(void) const
- ?ProtectionOfSkin@CPslnModel@@QAE?AW4TAknsSkinSrvSkinProtectionType@@H@Z @ 26 NONAME ; enum TAknsSkinSrvSkinProtectionType CPslnModel::ProtectionOfSkin(int)
- ?ScreensaverHasCapability@CPslnModel@@QBEHHW4TScPluginCaps@@@Z @ 27 NONAME ; int CPslnModel::ScreensaverHasCapability(int, enum TScPluginCaps) const
- ?ScreensaverNames@CPslnModel@@QBEABVMDesC16Array@@XZ @ 28 NONAME ; class MDesC16Array const & CPslnModel::ScreensaverNames(void) const
- ?SetBackgroundImagePath@CPslnModel@@QAEHABVTDesC16@@@Z @ 29 NONAME ; int CPslnModel::SetBackgroundImagePath(class TDesC16 const &)
- ?SetCurrentPropertyType@CPslnModel@@QAEHHH@Z @ 30 NONAME ; int CPslnModel::SetCurrentPropertyType(int, int)
- ?SetCurrentSelectedSkinIndex@CPslnModel@@QAEXH@Z @ 31 NONAME ; void CPslnModel::SetCurrentSelectedSkinIndex(int)
- ?VisibleSkin@CPslnModel@@QAEPAVCPslnSkinEntry@@H@Z @ 32 NONAME ; class CPslnSkinEntry * CPslnModel::VisibleSkin(int)
- ?EnableScreenSaverNotifications@CPslnModel@@QAEXABHAAVMPslnScreenSaverECOMObserver@@@Z @ 33 NONAME ; void CPslnModel::EnableScreenSaverNotifications(int const &, class MPslnScreenSaverECOMObserver &)
- ?NewL@CPslnEcomListener@@SAPAV1@AAVCPslnModel@@AAVMPslnScreenSaverECOMObserver@@@Z @ 34 NONAME ; class CPslnEcomListener * CPslnEcomListener::NewL(class CPslnModel &, class MPslnScreenSaverECOMObserver &)
- ?ActivateSkinL@CPslnModel@@QAEHABVTDesC8@@HABH@Z @ 35 NONAME ; int CPslnModel::ActivateSkinL(class TDesC8 const &, int, int const &)
- ?CurrentPropertyIndexL@CPslnModel@@QAEHH@Z @ 36 NONAME ; int CPslnModel::CurrentPropertyIndexL(int)
- ?GetTransitionEffectStateL@CPslnModel@@QAEHXZ @ 37 NONAME ; int CPslnModel::GetTransitionEffectStateL(void)
- ?SetTransitionEffectsL@CPslnModel@@QAEHH@Z @ 38 NONAME ; int CPslnModel::SetTransitionEffectsL(int)
- ?NewL@CPslnModel@@SAPAV1@XZ @ 39 NONAME ; class CPslnModel * CPslnModel::NewL(void)
- ?IsScreenSaverOnMemoryCard@CPslnModel@@QBEHH@Z @ 40 NONAME ; int CPslnModel::IsScreenSaverOnMemoryCard(int) const
- ?SetCurrentPropertyTypeL@CPslnModel@@QAEXHH@Z @ 41 NONAME ; void CPslnModel::SetCurrentPropertyTypeL(int, int)
- ?IsOnMassDrive@CPslnSkinEntry@@QBEHXZ @ 42 NONAME ; int CPslnSkinEntry::IsOnMassDrive(void) const
- ?IsOnMemoryCard@CPslnSkinEntry@@QBEHXZ @ 43 NONAME ; int CPslnSkinEntry::IsOnMemoryCard(void) const
- ?IsThemeOnMassDrive@CPslnModel@@QAEHABH@Z @ 44 NONAME ; int CPslnModel::IsThemeOnMassDrive(int const &)
- ?IsThemeOnMemoryCard@CPslnModel@@QAEHABH@Z @ 45 NONAME ; int CPslnModel::IsThemeOnMemoryCard(int const &)
- ?IsScreenSaverOnMassDrive@CPslnModel@@QBEHABH@Z @ 46 NONAME ; int CPslnModel::IsScreenSaverOnMassDrive(int const &) const
- ?IsSupported@PslnFeatures@@SAHH@Z @ 47 NONAME ; int PslnFeatures::IsSupported(int)
- ?SkinSrvSession@CPslnModel@@QBE?AVRAknsSrvSession@@XZ @ 48 NONAME ; class RAknsSrvSession CPslnModel::SkinSrvSession(void) const
- ?TransEffect@CPslnModel@@QBEXH@Z @ 49 NONAME ; void CPslnModel::TransEffect(int) const
- ?ActivateSkinL@CPslnModel@@QAEHH@Z @ 50 NONAME ; int CPslnModel::ActivateSkinL(int)
- ?SetScreenSaverToDefault@CPslnModel@@QAEXXZ @ 51 NONAME ; void CPslnModel::SetScreenSaverToDefault(void)
- ?IsSupportAnimBg@CPslnSkinEntry@@QBEHXZ @ 52 NONAME ; int CPslnSkinEntry::IsSupportAnimBg(void) const
- ?SetAnimBackground@CPslnModel@@QAEHH@Z @ 53 NONAME ; int CPslnModel::SetAnimBackgroundL(int)
- ?AnimBackgroundState@CPslnModel@@QBEHXZ @ 54 NONAME ; int CPslnModel::AnimBackgroundState(void) const
- ?IsSupportAnimBg@CPslnModel@@QAEHH@Z @ 55 NONAME ; int CPslnModel::IsSupportAnimBg(int)
--- a/psln/pslnengine/EABI/pslnengineU.DEF Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-EXPORTS
- _ZN10CPslnModel11VisibleSkinEi @ 1 NONAME
- _ZN10CPslnModel13ActivateSkinLERK6TDesC8i @ 2 NONAME
- _ZN10CPslnModel13DownloadSkinLEv @ 3 NONAME
- _ZN10CPslnModel14LocationOfSkinEi @ 4 NONAME
- _ZN10CPslnModel16ProtectionOfSkinEi @ 5 NONAME
- _ZN10CPslnModel17GuardActivationLCEv @ 6 NONAME
- _ZN10CPslnModel17IsValidForPreviewEi @ 7 NONAME
- _ZN10CPslnModel19ActivateScreenSaverEi26TPslnScreenSaverActivation @ 8 NONAME
- _ZN10CPslnModel20CurrentPropertyIndexEi @ 9 NONAME
- _ZN10CPslnModel20IsValidForActivationEi @ 10 NONAME
- _ZN10CPslnModel21LoadScreensaverArrayLEv @ 11 NONAME
- _ZN10CPslnModel22PerformCompleteUpdateLEv @ 12 NONAME
- _ZN10CPslnModel22SetBackgroundImagePathERK7TDesC16 @ 13 NONAME
- _ZN10CPslnModel22SetCurrentPropertyTypeEii @ 14 NONAME
- _ZN10CPslnModel23InvokeSSPluginFunctionLEi13TScPluginCaps @ 15 NONAME
- _ZN10CPslnModel27SetCurrentSelectedSkinIndexEi @ 16 NONAME
- _ZN10CPslnModel4NewLEP23MAknsSkinChangeObserver @ 17 NONAME
- _ZN10CPslnModelD0Ev @ 18 NONAME
- _ZN10CPslnModelD1Ev @ 19 NONAME
- _ZN10CPslnModelD2Ev @ 20 NONAME
- _ZN12PslnFeatures15IsHelpSupportedEv @ 21 NONAME
- _ZN12PslnFeatures24IsSoundsInSkinsSupportedEv @ 22 NONAME
- _ZN12PslnFeatures32IsEnhancedEmbeddedLinksSupportedEv @ 23 NONAME
- _ZNK10CPslnModel13NumberOfSkinsEv @ 24 NONAME
- _ZNK10CPslnModel15ActiveSkinIndexEv @ 25 NONAME
- _ZNK10CPslnModel16ScreensaverNamesEv @ 26 NONAME
- _ZNK10CPslnModel18GetSkinNameByIndexEiR6TDes1617TPslnSkinNameType @ 27 NONAME
- _ZNK10CPslnModel20IsActiveSkinSelectedEi @ 28 NONAME
- _ZNK10CPslnModel24CurrentSelectedSkinIndexEv @ 29 NONAME
- _ZNK10CPslnModel24ScreensaverHasCapabilityEi13TScPluginCaps @ 30 NONAME
- _ZNK14CPslnSkinEntry10ProtectionEv @ 31 NONAME
- _ZNK14CPslnSkinEntry11GetSkinPathER6TDes16 @ 32 NONAME
- _ZNK14CPslnSkinEntry11IsCorruptedEv @ 33 NONAME
- _ZNK14CPslnSkinEntry8FullNameEv @ 34 NONAME
- _ZTI18CPslnSkinNameEntry @ 35 NONAME ; #<TI>#
- _ZTV18CPslnSkinNameEntry @ 36 NONAME ; #<VT>#
- _ZN10CPslnModel30EnableScreenSaverNotificationsERKiR28MPslnScreenSaverECOMObserver @ 37 NONAME
- _ZN17CPslnEcomListener4NewLER10CPslnModelR28MPslnScreenSaverECOMObserver @ 38 NONAME
- _ZN10CPslnModel13ActivateSkinLERK6TDesC8iRKi @ 39 NONAME
- _ZN10CPslnModel21CurrentPropertyIndexLEi @ 40 NONAME
- _ZN10CPslnModel21SetTransitionEffectsLEi @ 41 NONAME
- _ZN10CPslnModel25GetTransitionEffectStateLEv @ 42 NONAME
- _ZN10CPslnModel4NewLEv @ 43 NONAME
- _ZNK10CPslnModel25IsScreenSaverOnMemoryCardEi @ 44 NONAME
- _ZN10CPslnModel23SetCurrentPropertyTypeLEii @ 45 NONAME
- _ZN10CPslnModel18IsThemeOnMassDriveERKi @ 46 NONAME
- _ZN10CPslnModel19IsThemeOnMemoryCardERKi @ 47 NONAME
- _ZNK14CPslnSkinEntry13IsOnMassDriveEv @ 48 NONAME
- _ZNK14CPslnSkinEntry14IsOnMemoryCardEv @ 49 NONAME
- _ZNK10CPslnModel24IsScreenSaverOnMassDriveERKi @ 50 NONAME
- _ZN12PslnFeatures11IsSupportedEi @ 51 NONAME
- _ZNK10CPslnModel14SkinSrvSessionEv @ 52 NONAME
- _ZNK10CPslnModel11TransEffectEi @ 53 NONAME
- _ZN10CPslnModel13ActivateSkinLEi @ 54 NONAME
- _ZN10CPslnModel23SetScreenSaverToDefaultEv @ 55 NONAME
- _ZN10CPslnModel15IsSupportAnimBgEi @ 56 NONAME
- _ZN10CPslnModel17SetAnimBackgroundEi @ 57 NONAME
- _ZNK10CPslnModel19AnimBackgroundStateEv @ 58 NONAME
- _ZNK14CPslnSkinEntry15IsSupportAnimBgEv @ 59 NONAME
--- a/psln/pslnengine/group/PslnEngine.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project pslnengine
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET pslnengine.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x102818CD
-
-CAPABILITY CAP_GENERAL_DLL NetworkControl WriteDeviceData
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE PslnModel.cpp
-SOURCE PslnSkinEntry.cpp
-SOURCE PslnSkinNameEntry.cpp
-SOURCE PslnSkinStore.cpp
-SOURCE PslnDiskUtil.cpp
-SOURCE PslnFeatures.cpp
-SOURCE PslnEcomListener.cpp
-
-USERINCLUDE ../group
-USERINCLUDE ../inc
-USERINCLUDE ../../Inc
-USERINCLUDE ../../PslnLibraryLoaders/inc
-
-// This is a SYSTEMINCLUDE macro containing the application
-// layer specific include directories
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY avkon.lib
-LIBRARY cone.lib
-LIBRARY ecom.lib
-LIBRARY bafl.lib
-LIBRARY efsrv.lib
-LIBRARY apparc.lib
-LIBRARY featmgr.lib
-LIBRARY commonengine.lib
-LIBRARY centralrepository.lib
-LIBRARY aknskinsrv.lib
-LIBRARY drmhelper.lib
-LIBRARY platformenv.lib
-LIBRARY gfxtrans.lib
-LIBRARY caf.lib
-LIBRARY hal.lib
-LIBRARY cenrepnotifhandler.lib
-
--- a/psln/pslnengine/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file provides the information required for building engine.
-*
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-pslnengine.mmp
-
-PRJ_TESTMMPFILES
-
-// End of File
--- a/psln/pslnengine/inc/PslnDiskUtil.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2003-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: Utility class for disk operations.
-*
-*/
-
-
-#ifndef PSLNDISKUTIL_H
-#define PSLNDISKUTIL_H
-
-#include <e32std.h>
-#include <f32file.h>
-
-// Removable drive is write protected.
-const TInt KPslnDiskUtilReadOnly = 1;
-
-/**
-* Static utility class for general disk-related operations in Psln.
-*
-* @since S60 v2.1
-*/
-NONSHARABLE_CLASS( PslnDiskUtil )
- {
- public:
-
- /**
- * Checks the status of the memory card.
- *
- * @return KErrNone if memory card is available and can be accessed.
- * System-wide error code if an error occured.
- */
- static TInt MmcStatus();
-
- /**
- * Sets the given file as automated DRM content.
- * Uses DRM helper to display the query, if needed.
- *
- * @since 2.6
- *
- * @param aSkinSrvSession skin server session.
- * @param aFileName filename.
- * @return ETrue if can be automated, EFalse otherwise.
- */
- static TBool QueryAndSetAutomatedL(
- RAknsSrvSession& aSkinSrvSession,
- const TDesC& aFileName );
-
- private:
-
- /**
- * Static class can not be instantiated.
- */
- PslnDiskUtil();
- //lint -esym(1526,PslnDiskUtil::PslnDiskUtil) Intentionally undefined
-
- /**
- * Static class can not be instantiated.
- */
- ~PslnDiskUtil();
-
- };
-
-#endif // PSLNDISKUTIL_H
-
-// End of File
--- a/psln/pslnengine/inc/PslnEcomListener.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Listens to ECOM for screensaver plugin changes.
-*
-*/
-
-
-#ifndef C_PSLNECOMLISTENER_H
-#define C_PSLNECOMLISTENER_H
-
-#include <e32base.h>
-#include <ecom/ecom.h>
-
-class CPslnModel;
-class REComSession;
-class MPslnScreenSaverECOMObserver;
-
-/**
- * Listens to ECOM for screensaver plugin changes.
- *
- * Monitor changes in ECOM framework and requests model to update screensaver list,
- * if a change is notified.
- *
- * @lib PslnEngine
- * @since S60 v3.1
- */
-NONSHARABLE_CLASS( CPslnEcomListener ): public CActive
- {
-public:
-
- /**
- * Creates a new instance of CPslnEcomListener. Listener starts immediately
- * monitor ECOM and continues to do so, until class is destroyed.
- * @param aModel reference to PslnModel.
- * @return new instance of CPslnEcomListener.
- */
- IMPORT_C static CPslnEcomListener* NewL(
- CPslnModel& aModel,
- MPslnScreenSaverECOMObserver& aObserver );
-
- virtual ~CPslnEcomListener();
-
- /**
- * From CActive.
- * Called when Active Object is ready.
- */
- void RunL();
-
- /**
- * From CActive.
- * Called when Active Object has been cancelled.
- */
- void DoCancel();
-
-
-private:
-
- /* Starts listening for ECOM changes */
- void StartECOMMonitoringL();
-
- CPslnEcomListener(
- CPslnModel& aModel,
- MPslnScreenSaverECOMObserver& aObserver );
-
- void ConstructL();
-
-private: // data
-
- /**
- * Psln engine model reference.
- * Not own.
- */
- CPslnModel* iModel;
-
- /**
- * ECOM session.
- */
- REComSession iSession;
-
- /**
- * Observer interface,
- * Not own.
- */
- MPslnScreenSaverECOMObserver* iObserver;
-
- };
-
-
-#endif // C_PSLNECOMLISTENER_H
-
-// End of file
--- a/psln/pslnengine/inc/PslnFeatures.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2004-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: Utility class that defines supported features for Psln.
-*
-*/
-
-
-#ifndef PSLNFEATURES_H
-#define PSLNFEATURES_H
-
-// INCLUDE FILES
-
-#include <e32std.h>
-
-// CLASS DECLARATION
-
-/**
-* Static class that defines features supported by Personalisation application.
-*
-*/
-NONSHARABLE_CLASS( PslnFeatures )
- {
- public:
-
- /**
- * Checks whether help functionality is supported.
- * @return ETrue is Help is supported.
- */
- IMPORT_C static TBool IsHelpSupported();
-
- /**
- * Checks whether enhanced embedded links are supported.
- * @return ETrue if enhanced embedded links are supported.
- */
- IMPORT_C static TBool IsEnhancedEmbeddedLinksSupported();
-
- /**
- * Checks whether sounds in skins are supported.
- * @return ETrue if sounds in skins are supported.
- */
- IMPORT_C static TBool IsSoundsInSkinsSupported();
-
- /**
- * Checks whether memory card is supported.
- * @return ETrue if memory card is supported.
- */
- static TBool IsMMCSupported();
-
- /**
- * Checks whether APAC specific layouts are supported.
- * @return ETrue if APAC specific layouts are supported.
- */
- static TBool IsAPACSupported();
-
- /**
- * Check if given feature is supported or not.
- * See feature IDs from PslnVariant.hrh.
- */
- IMPORT_C static TBool IsSupported( TInt aLocalVariationID );
-
- private:
-
- /**
- * Checks whether seamless links OR enhanced embedded links OR both
- * are supported.
- * @return ETrue if seamless links OR enchanced embedded links OR both
- * are supported.
- */
- static TBool IsSeamlessLinksSupported();
-
- /*
- * Same as above, but possibly leaves.
- */
- static TBool IsSupportedL( TInt aLocalVariationID );
- };
-
-#endif // PSLNFEATURES_H
-
-// End of File
--- a/psln/pslnengine/inc/PslnModel.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,772 +0,0 @@
-/*
-* 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: Model class for Psln application.
-*
-*/
-
-
-#ifndef C_PSLNMODEL_H
-#define C_PSLNMODEL_H
-
-#include <AknsSrvClient.h>
-#include <babitflags.h>
-#include <cenrepnotifyhandler.h>
-
-// Screen saver plugin capabilities
-enum TScPluginCaps
- {
- // Plugin has no special capabilities
- EScpCapsNone = 0x00,
- // Plugin implements the configure function
- EScpCapsConfigure = 0x01,
- // Plugin wants to be notified when selected as the active screensaver
- EScpCapsSelectionNotification = 0x02,
- // Plugin wants to be notified when preview command is selected
- EScpCapsPreviewNotification = 0x04
- };
-
-// Determines the type of skin list.
-enum TPslnSkinNameType
- {
- // list name
- EPslnSkinNameTypeList = 0,
- // title name
- EPslnSkinNameTypeTitle
- };
-
-// What kind of scren saver activation it is.
-enum TPslnScreenSaverActivation
- {
- // Preview is activated.
- EPslnScreenSaverPreviewActivation = 0,
- // Preview is deactivated, and "real" screen saver is activated,
- EPslnScreenSaverPreviewDeactivation,
- // Real screen saver is activated straight away.
- EPslnScreenSaverActivation
- };
-
-// Defines actions for a transtion effects
-enum TPslnTransitionEffectAction
- {
- // Used only for enum range validation
- EPslnTransitionEffectDummyFirst = -1,
-
- // -- begin of real values --
-
- // Start theme preview transtion effect
- EPslnTransitionEffectStartPreview,
- // Start theme activation transtion effect
- EPslnTransitionEffectStartThemeActivation,
- // Stop the current transition effect
- EPslnTransitionEffectStop,
-
- // -- end of real values --
-
- // Used only for enum range validation
- EPslnTransitionEffectDummyLast
- };
-
-class MAknsSkinChangeObserver;
-class MPslnScreenSaverECOMObserver;
-class CEikonEnv;
-class CPslnSkinStore;
-class CRepository;
-class CPslnSkinEntry;
-class CPslnSkinNameEntry;
-class TAknsPkgID;
-class CPslnWallpaperUtilsLoader;
-class CPslnEcomListener;
-class CPslnBrowserLaunchLoader;
-class CCenRepNotifyHandler;
-
-// Maximum number of characters in Screen saver txt.
-const TInt KPslnMaxLengthOfScreenSaverText = 15;
-
-// CLASS DEFINITIONS
-
-// Inner class for skin name entry.
-class TPslnSkinNameEntry
- {
- public:
- // Package ID.
- TAknsPkgID iPid;
- // Skin list name.
- HBufC* iListName;
- // Skin title name.
- HBufC* iTitleName;
- };
-
-// Auxiliary class for screen saver info.
-class CPslnScreenSaverInfo : public CBase
- {
- public:
-
- // Symbian OS two-phased constructor.
- static CPslnScreenSaverInfo* NewL()
- {
- CPslnScreenSaverInfo* self = new (ELeave) CPslnScreenSaverInfo;
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- };
-
- // Destructor.
- ~CPslnScreenSaverInfo()
- {
- delete iScreenSaverTxt;
- iScreenSaverTxt = NULL;
- delete iFileName;
- iFileName = NULL;
- }
- private:
-
- // Symbian OS second phase constructor.
- void ConstructL()
- {
- iScreenSaverTxt = HBufC::NewL( KPslnMaxLengthOfScreenSaverText );
- iFileName = HBufC::NewL( KMaxFileName );
- };
-
- // C++ default constructor.
- CPslnScreenSaverInfo()
- {
- iScreenSaverType = 1; // magic, default value
- };
-
- public:
- // Filename for screensaver, if applicable.
- HBufC* iFileName;
- // Text, if any, shown in the screensaver.
- HBufC* iScreenSaverTxt;
- // Type of screen saver.
- TInt iScreenSaverType;
- };
-
-/**
-* CPslnModel is the model class of Psln app.
-* It provides functions to get and set setting values.
-*/
-NONSHARABLE_CLASS( CPslnModel ):
- public CBase,
- public MCenRepNotifyHandlerCallback
- {
- public:
-
- /**
- * Two-phased constructor.
- * @param aObserver observer for skin changes.
- * @return new instance of CPslnModel.
- */
- IMPORT_C static CPslnModel* NewL( MAknsSkinChangeObserver* aObserver );
-
- /**
- * Deprecated.
- * @return NULL.
- */
- IMPORT_C static CPslnModel* NewL();
-
- /**
- * Destructor
- */
- IMPORT_C ~CPslnModel();
-
- /**
- * Deprecated.
- */
- IMPORT_C TBool ActivateSkinL( const TDesC8& aPreviewType,
- const TInt aActiveSkinIndex );
-
- /**
- * Activates screen saver as set by user.
- * @param aItemIndex screensaver to activate.
- * @param aActivationType screensaver activation type
- * (activation/deactivation/preview).
- * @return error code, or KErrNone on success.
- */
- IMPORT_C TInt ActivateScreenSaver(
- const TInt aItemIndex,
- TPslnScreenSaverActivation aActivationType );
-
- /**
- * Disables skin notify changes.
- *
- * Creates and pushes internal class CPslnActivationGuard to the
- * stack. When CPslnActivationGuard is constructed, SkinSrvSession's
- * DisableSkinChangeNotify is called, and thus skin notify changes are
- * disabled. When CPslnActivationGuard is popped from stack,
- * SkinSrvSession's EnableSkinChangeNotify is called automatically and thus,
- * skin notify changes are again active.
- */
- IMPORT_C void GuardActivationLC();
-
- /**
- * Starts skin download.
- */
- IMPORT_C void DownloadSkinL();
-
- /**
- * Sets Idle Wallpaper.
- * @param aImagePath Path and filename of new wallpaper.
- * @return error code, or KErrNone on success.
- */
- IMPORT_C TInt SetBackgroundImagePath( const TDesC& aImagePath );
-
- /**
- * Invokes screensaver plugins PluginFunction for e.g. configuring
- * the screensaver.
- * @param aIndex screensaver index to use.
- * @param aFunction screensaver function to call.
- */
- IMPORT_C void InvokeSSPluginFunctionL(
- TInt aIndex,
- TScPluginCaps aFunction );
-
- /**
- * Updates skins from server, UI skins list, and screensaver array.
- */
- IMPORT_C void PerformCompleteUpdateL();
-
- /**
- * Creates screen saver array.
- */
- IMPORT_C void LoadScreensaverArrayL();
-
- /**
- * Gets the visible skin by its UI index.
- * Ownership is not transferred.
- * @param aIndex skin index.
- * @return pointer to skin entry.
- */
- IMPORT_C CPslnSkinEntry* VisibleSkin( const TInt aIndex );
-
- /**
- * Gets the name of the skin.
- * @param aIndex skin index to use.
- * @param aSkinName localized skin name.
- * @param aType which skin name to fetch (list/title name).
- */
- IMPORT_C void GetSkinNameByIndex( const TInt aIndex, TDes& aSkinName,
- const TPslnSkinNameType aType ) const;
-
- /**
- * Checks whether the current (or given) skin is active.
- * @param aSkinIndex skin index to use.
- * @return ETrue is given skin index is currently active skin.
- */
- IMPORT_C TBool IsActiveSkinSelected (
- TInt aSkinIndex = KErrNotFound ) const;
-
- /**
- * Deprecated since 5.0.
- */
- IMPORT_C TAknSkinSrvSkinPackageLocation LocationOfSkin( const TInt aIndex );
-
- /**
- * Returns skin index of active skin.
- * @return skin index of active skin.
- */
- IMPORT_C TInt ActiveSkinIndex() const;
-
- /**
- * Returns skin index of currently highlighted skin.
- * @return skin index of highlighted skin.
- */
- IMPORT_C TInt CurrentSelectedSkinIndex() const;
-
- /**
- * Returns number of found skins.
- * @return number of found skins.
- */
- IMPORT_C TInt NumberOfSkins() const;
-
- /**
- * Returns screensaver name array.
- * @return screensaver name array.
- */
- IMPORT_C const MDesC16Array& ScreensaverNames() const;
-
- /**
- * Checks if selected screensaver has the requested capability
- * @param aIndex index of screensaver in screensaver array.
- * @param aCapability requested capability.
- * @return ETrue if screensaver has the capability, EFalse otherwise.
- */
- IMPORT_C TBool ScreensaverHasCapability(
- const TInt aIndex,
- const TScPluginCaps aCapability ) const;
-
- /**
- * Returns protection type of skin.
- * @param aIndex skin index to use.
- * @return protection type of skin.
- */
- IMPORT_C TAknsSkinSrvSkinProtectionType ProtectionOfSkin(
- const TInt aIndex );
-
- /**
- * Checks if the skin can be activated.
- * @param aItemIndex skin index to use.
- * @return ETrue, if skin can be activated.
- */
- IMPORT_C TBool IsValidForActivation( const TInt aItemIndex );
-
- /**
- * Checks if the skin can be previewed.
- * @param aItemIndex skin index to use.
- * @return ETrue, if skin can be previewed.
- */
- IMPORT_C TBool IsValidForPreview( const TInt aItemIndex );
-
- /**
- * Checks if the skin support animated background.
- * @param aItemIndex skin index to use.
- * @return ETrue, if skin support animation background.
- */
- IMPORT_C TBool IsSupportAnimBg( TInt aItemIndex );
-
- /**
- * Sets the given skin index as currently highlighted one.
- * @param aCurrentSkinIndex skin index.
- */
- IMPORT_C void SetCurrentSelectedSkinIndex(
- const TInt aCurrentSkinIndex );
-
- /**
- * Deprecated.
- */
- IMPORT_C TInt SetCurrentPropertyType( const TInt aProperty,
- const TInt aCurItemIndex );
-
- /**
- * Gets currently active index of given property.
- * @param aProperty property type - either wallpaper or screensaver.
- * @return index of currently active property, or error code.
- */
- IMPORT_C TInt CurrentPropertyIndex( const TInt aProperty );
-
- /**
- * Enables (or disables) notifications from ECOM framework.
- * When ECOM state is changed, PslnModel will check that it's
- * screensaver list is up to date. Changes in the list are
- * indicated to observer class.
- * @param aActive if ETrue, notifications are subscribed, otherwise
- * subscription is terminated.
- * @param aObserver observer for notifications.
- */
- IMPORT_C void EnableScreenSaverNotifications(
- const TBool& aActive,
- MPslnScreenSaverECOMObserver& aObserver );
-
- /**
- * Deprecated.
- */
- IMPORT_C TBool ActivateSkinL(
- const TDesC8& aPreviewType,
- const TInt aActiveSkinIndex,
- const TBool& aActivateFromPreview );
-
- /**
- * Activates the entire skin.
- * @since 3.2
- * @param aActiveSkinIndex skin index of active skin.
- * @return ETrue, if skin activation is successful.
- */
- IMPORT_C TBool ActivateSkinL( const TInt aActiveSkinIndex );
-
- /**
- * Gets currently active index of given property.
- * This is leaving version of CurrentPropertyIndex (see above).
- * @param aProperty property type - either wallpaper or screensaver.
- * @return index of currently active property, or error code.
- */
- IMPORT_C TInt CurrentPropertyIndexL( const TInt aProperty );
-
- /**
- * Sets transition effects enabled/disabled as given in the parameter.
- * @param aEffectValue used as bitmask. Value of zero enables all effects,
- * and value of KMaxTInt disables all effects.
- * All other values are considered as invalid.
- * @return KErrArgument if aEffectValue is not zero or KMaxTInt.
- * Otherwise return value is what is given out by CRepository::Set().
- *
- * @since 3.2
- */
- IMPORT_C TInt SetTransitionEffectsL( const TInt aEffectValue );
-
- /**
- * Gets current transition effect value.
- * @return in error cases returns KErrNotFound,
- * otherwise returns current repository value.
- *
- * @since 3.2
- */
- IMPORT_C TInt GetTransitionEffectStateL();
-
- /**
- * Checks if the screensaver is installed on memory card.
- * @param aScreensaverIndex screensaver index
- * @return ETrue, if screensaver is installed to the memory card.
- *
- * @since 3.2
- */
- IMPORT_C TBool IsScreenSaverOnMemoryCard( const TInt aIndex ) const;
-
- /**
- * Sets a given property (wallpaper or screensaver) as active.
- * @param aProperty property type - either wallpaper or screensaver.
- * @param aCurItemIndex item index that is currently active.
- * @return KErrNone always.
- *
- * @since 3.2
- */
- IMPORT_C void SetCurrentPropertyTypeL( const TInt aProperty,
- const TInt aCurItemIndex );
-
- /**
- * Checks if a skin with given index is on memory card,
- * @param aIndex skin index from application.
- * @return ETrue if skin is on memory card, EFalse otherwise.
- *
- * @since 5.0
- */
- IMPORT_C TBool IsThemeOnMemoryCard( const TInt& aIndex );
-
- /**
- * Checks if a skin with given index is on mass drive,
- * @param aIndex skin index from application.
- * @return ETrue if skin is on memory card, EFalse otherwise.
- *
- * @since 5.0
- */
- IMPORT_C TBool IsThemeOnMassDrive( const TInt& aIndex );
-
- /**
- * Checks if the screensaver is installed on mass drive.
- * @param aScreensaverIndex screensaver index
- * @return ETrue, if screensaver is installed to the mass drive.
- *
- * @since 5.0
- */
- IMPORT_C TBool IsScreenSaverOnMassDrive( const TInt& aIndex ) const;
-
- /**
- * Returns skin server session.
- * @return skin server session.
- *
- * @since 3.2
- */
- IMPORT_C RAknsSrvSession SkinSrvSession() const;
-
- /**
- * Starts or stops transition effects.
- *
- * @param aAction specifies actions for transition effects.
- * The value can be one of the values defined in TPslnTransitionEffectAction.
- * @since 3.2
- */
- IMPORT_C void TransEffect(TInt aAction) const;
-
- /**
- * Set current screensaver to default screensaver.
- */
- IMPORT_C void SetScreenSaverToDefault();
-
- /**
- * Set Animated Background state
- * @param aValue specifies actions for animation background.
- * 0 mean enable animation effect, KMaxTInt means disable all animation effect.
- * @since 9.2
- */
- IMPORT_C TInt SetAnimBackground( TInt aValue );
-
- /**
- * Get Animated Background state.
- *
- * @return 0, if animation is enable; KMaxTInt if animation is disable.
- * @since 9.2
- */
- IMPORT_C TInt AnimBackgroundState() const;
-
-
- private:
-
- /**
- * Gets the separately localized name of the skin, if any.
- * @param aPID package ID to use.
- * @param aSkinName localized skin name.
- * @param aType which skin name to fetch (list/title name).
- * @return ETrue, if localized skin name was found.
- */
- TBool GetSeparatelyLocalizedSkinName(
- const TAknsPkgID aPID, TDes& aSkinName,
- const TPslnSkinNameType aType ) const;
-
-
- /**
- * Default C++ contructor
- */
- CPslnModel();
-
- /**
- * Symbian default constructor
- */
- void ConstructL( MAknsSkinChangeObserver* aObserver );
-
- /**
- * Loads the separately localized skin names resource.
- */
- void LoadSkinNamesResourceL();
-
- /**
- * Finds screensavers from the given path and appends them to the
- * screensaver list.
- * @return ETrue if screensavers were found, EFalse otherwise.
- */
- TBool FindAndAppendScreensaversL();
-
- /**
- * Updates the skin information from the server and
- * the list of visible skins.
- */
- void UpdateFromServerL();
-
- /**
- * Updates the list of visible skins.
- */
- void UpdateVisibleSkinListL();
-
- /**
- * Activates skin that is currently selected.
- */
- void SetActiveSkinL();
-
- /**
- * Launches query dialog for screensaver name.
- * @return EFalse, if user cancelled the query.
- */
- TBool QueryAndSetScreensaverTextL();
-
- /* Gets full name of skin. */
- const TDesC& GetSkinFullName( const TInt aItemIndex );
-
- /* Gets the name of the skin. */
- void GetSkinNameByPID( const TAknsPkgID aPID, TDes& aSkinName,
- const TPslnSkinNameType aType ) const;
-
- /* Activates default skin. */
- void ActivateDefaultSkinL();
-
- /* Gets default text for text screensaver. */
- void GetDefaultTextToScreensaverL( TDes& aDisplayText );
-
- /* Gets wallpaper item index. */
- TInt GetWallPaperItemIndex();
-
- /* Gets wallpaper item index. */
- TInt GetScreenSaverItemIndexL();
-
- /* Find the aFileName in iScreensaverFilenameArr, and return the index */
- TInt GetScreenSaverIndexByFileName(const TDesC &aFileName) const;
-
- /* Get screen saver object type from index */
- TInt GetScreensaverTypeByIndex(TInt aIndex);
-
- /* Loads AknsWallpaperUtils to memory. */
- void LoadWallpaperUtilsL();
-
- /* Strips file path information from screensaver UID. */
- TPtrC GetRealScreenSaverUid( const TInt aIndex );
-
- /* Leaving version of ActivateScreenSaver. */
- void ActivateScreenSaverL(
- const TInt aItemIndex,
- TPslnScreenSaverActivation aActivationType );
-
- /* Loads browser launcher dll to memory. */
- void LoadBrowserLaunchL();
-
- /**
- * Checks the status of the skin file.
- * @param aIndex skin index from application.
- * @return ETrue if skin file is exist and can be accessed.
- * EFalse if an error occured or didn't exist.
- */
- TBool SkinFileExist( const TInt& aIndex );
-
- /**
- * From MCenRepNotifyHandlerCallback.
- */
- void HandleNotifyInt(TUint32 aId, TInt aNewValue);
-
- /* Gets transition effect value and initialize CenRep notify handler. */
- void InitTransitionEffectVauleL();
-
- /* if KPslnSupportScreenSaverSelectionNone is supported return true, or false */
- TBool IsSupportScreenSaverNoneOption() const;
-
- private: // Data
-
- /*
- * Skin store.
- * Own.
- */
- CPslnSkinStore* iSkinStore;
-
- /*
- * Array of visible skins.
- * Own.
- */
- RPointerArray<CPslnSkinNameEntry>* iVisibleSkinArr;
-
- /*
- * Skin server session.
- */
- RAknsSrvSession iSkinSrvSession;
-
- /*
- * CenRep object for skin keys.
- * Own.
- */
- CRepository* iSkinsRepository;
-
- /*
- * CenRep object for screen saver keys.
- * Own.
- */
- CRepository* iScreenSaverRepository;
-
- /*
- * CenRep object for themes application keys.
- * Own.
- */
- CRepository* iThemesAppRepository;
-
- /*
- * Pointer to eikon environment. Stored to avoid repeated fetches.
- * Not own.
- */
- CEikonEnv* iEikEnv;
-
- /*
- * Currently highlighted skin index.
- */
- TInt iCurrentSkinIndex;
-
- /*
- * Active skin index.
- */
- TInt iActiveSkinIndex;
-
- /*
- * Array of skin names.
- */
- RArray<TPslnSkinNameEntry> iSkinNames;
-
- /*
- * Array of screensaver filenames.
- * Own.
- */
- CDesC16ArrayFlat* iScreensaverFilenameArr;
-
- /*
- * Array of screensaver names.
- * Own.
- */
- CDesC16ArrayFlat* iScreensaverNameArr;
-
- /*
- * Array of screensaver capabilities.
- */
- RArray<TInt> iScreensaverCapsArr;
-
- /*
- * Active screensaver information.
- * Own.
- */
- CPslnScreenSaverInfo* iScreenSaverInfo;
-
- /*
- * A handle to a dynamically loadable DLL.
- */
- RLibrary iWallpaperDll;
-
- /*
- * Loads Wallpaper Utils DLL dynamically to memory.
- * Allows use of the DLL through this pointer, but only for
- * methods implemented within the wrapper.
- * Own.
- */
- CPslnWallpaperUtilsLoader* iWallpaperSetter;
-
- /**
- * Listens to ECOM for screensaver plugin changes.
- * Own.
- */
- CPslnEcomListener* iScreenSaverListener;
-
- /*
- * A handle to a dynamically loadable DLL.
- */
- RLibrary iBrowserLaunchDll;
-
- /*
- * Loads Wallpaper Utils DLL dynamically to memory.
- * Allows use of the DLL through this pointer, but only for
- * methods implemented within the wrapper.
- * Own.
- */
- CPslnBrowserLaunchLoader* iBrowserLauncher;
-
- /*
- * Internal state of the class.
- */
- enum TPslnModelState
- {
- // initial state
- EPslnModelStateInitial = 0x00000000,
- // wallpaper dll has been loaded
- EPslnModelStateWallpaperDllLoaded = 0x00000001,
- // has the default enable CR key for transition effects been read
- EPslnModelStateTransitionEnableCRKeyRead = 0x00000002,
- // is skin being previewed
- EPslnModelStateSkinPreviewed = 0x00000004,
- // browser launch dll has been loaded
- EPslnModelStateBrowserLaunchDllLoaded = 0x00000008,
- // localized skin names have been loaded
- EPslnModelStateSkinNamesLoaded = 0x00000010
- };
- TBitFlags iInternalState;
-
- /**
- * Default mask for enable transition effects.
- */
- TInt iEffectsDefaultEnableMask;
-
- /**
- * Transition effect setting value.
- */
- TInt iTransitionEffectValue;
-
- /**
- * A pointer to Central Repository notification handling.
- * Used to monitor the change of KThemesTransitionEffects.
- * Own.
- */
- CCenRepNotifyHandler *iThemesAppCenRepNotifyHandler;
- };
-
-#endif // C_PSLNMODEL_H
-
-// End of File
--- a/psln/pslnengine/inc/PslnSkinEntry.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
-* Copyright (c) 2004-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: Class defining a specific skin within Psln.
-*
-*/
-
-
-#ifndef C_PSLNSKINENTRY_H
-#define C_PSLNSKINENTRY_H
-
-#include <e32base.h>
-#include <babitflags.h>
-#include <AknsSrvSkinInformationPkg.h>
-
-#include "PslnSkinNameEntry.h"
-
-/**
-* Class defining a specific skin within Psln.
-*/
-NONSHARABLE_CLASS( CPslnSkinEntry ) : public CPslnSkinNameEntry
- {
- public:
-
- /**
- * Two-phased constructor.
- * @param aInfo skin information package.
- * @return new instance of CPslnSkinEntry.
- */
- static CPslnSkinEntry* NewL( CAknsSrvSkinInformationPkg* aInfo );
-
- /**
- * Destructor.
- */
- virtual ~CPslnSkinEntry();
-
- /**
- * Gets skin path.
- * @param aDst copies skin path to this descriptor.
- */
- IMPORT_C void GetSkinPath( TDes& aDst ) const;
-
- /**
- * Checks if skin entry has corrupted flag set.
- * @return ETrue if corrupted flag is set.
- */
- IMPORT_C TBool IsCorrupted() const;
-
- /**
- * Checks if skin entry has animation background support.
- * @return ETrue if supprot animation background.
- */
- IMPORT_C TBool IsSupportAnimBg() const;
- /**
- * Returns protection type of skin.
- * @return protection type of the skin (@see AknsSrvSkinInformatioPkg.h)
- */
- IMPORT_C TAknsSkinSrvSkinProtectionType Protection() const;
-
- /**
- * Returns full name of the skin.
- * @return full name of the skin.
- */
- IMPORT_C TDesC& FullName() const;
-
- /**
- * Returns ETrue if skin is on mass drive,
- * @return is skin on mass drive.
- *
- * @since 5.0
- */
- IMPORT_C TBool IsOnMassDrive() const;
-
- /**
- * Returns ETrue if skin is on memory card,
- * @return is skin on memory card.
- *
- * @since 5.0
- */
- IMPORT_C TBool IsOnMemoryCard() const;
-
- /**
- * Gets ini-file path.
- * @param aDst copies ini-file path to this descriptor.
- */
- void GetIniPath( TDes& aDst ) const;
-
- /**
- * Sets protection type for the skin.
- * @param aProtection protection type for the skin.
- */
- void SetProtection( const TAknsSkinSrvSkinProtectionType aProtection );
-
- /**
- * Sets delete flag.
- */
- void SetDeleteFlag( const TBool& aValue );
-
- /**
- * Checks is delete flag has been set.
- * @return ETrue if delete flag has been set.
- */
- TBool IsDeleteFlag() const;
-
- /**
- * Checks the order of the items. The least of items should
- * be first in the skin list, followed by 'greater' items.
- * @param aFirst first skin entry
- * @param aSecond second skin entry
- * @return zero, if items are equal,
- * -1, if first item is 'less' than second item.
- * 1, if first item is 'greater' than second one item
- */
- static TInt LinearOrder(
- const CPslnSkinEntry& aFirst,
- const CPslnSkinEntry& aSecond );
-
- /**
- * Sets memory card flag.
- * @param aValue new flag value,
- * @since 5.0
- */
- void SetMemoryCardFlag( const TBool& aValue );
-
- /**
- * Sets mass drive flag.
- * @param aValue new flag value,
- * @since 5.0
- */
- void SetMassDriveFlag( const TBool& aValue );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CPslnSkinEntry();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private: // Data
-
- /**
- * Protection type of the skin.
- */
- TAknsSkinSrvSkinProtectionType iProtection;
-
- /**
- * Skin information package.
- * Own.
- */
- CAknsSrvSkinInformationPkg* iInfo;
-
- /*
- * Internal state of the class.
- */
- enum TPslnSkinEntryState
- {
- // initial state
- EPslnSkinEntryStateInitial = 0x00000000,
- // skin has been marked as deleted.
- EPslnSkinEntryStateDeleted = 0x00000001,
- // skin is on memory card
- EPslnSkinEntryStateMemoryCard = 0x00000002,
- // skin is mass drive
- EPslnSkinEntryStateMassDrive = 0x00000004
- };
- TBitFlags iInternalState;
-
- };
-
-#endif // C_PSLNSKINENTRY_H
-
-// End of File
--- a/psln/pslnengine/inc/PslnSkinNameEntry.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* 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: Class defining a specific skin within Psln.
-*
-*/
-
-
-#ifndef C_PSLNSKINNAMEENTRY_H
-#define C_PSLNSKINNAMEENTRY_H
-
-#include <e32base.h>
-#include <AknsSrvSkinInformationPkg.h>
-
-/**
-* Class defining a specific skin within Psln.
-* Defined attributes are name, ID and location.
-* @since S60 v2.5
-*/
-class CPslnSkinNameEntry : public CBase
- {
- public:
-
- /**
- * Two-phased constructor.
- * @return new instance of CPslnSkinNameEntry.
- */
- static CPslnSkinNameEntry* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CPslnSkinNameEntry();
-
- /**
- * Method for getting skin name.
- * @param aDst returns skin name for the entry.
- */
- void GetName( TDes& aDst ) const;
-
- /**
- * Method for setting skin name.
- * @param aName sets skin name for the entry to this descriptor.
- */
- void SetNameL( const TDesC& aName );
-
- /**
- * Method for fetching the location of skin package.
- * @see details from AknsSrvSkinInformationPkg.h.
- * @return skin package location.
- */
- TAknSkinSrvSkinPackageLocation Location() const;
-
- /**
- * Method for setting skin package location.
- * @see details from AknsSrvSkinInformationPkg.h.
- * @param aLocation skin package location.
- */
- void SetLocation( const TAknSkinSrvSkinPackageLocation aLocation );
-
- /**
- * Method for getting skin package name.
- * @return skin package ID.
- */
- TAknsPkgID PkgID() const;
-
- /**
- * Method for setting skin package name.
- * @param aPID skin package ID.
- */
- void SetPkgID( const TAknsPkgID& aPID );
-
- /**
- * Determines the order of two objects.
- * Default system skin is always less than anything else.
- * Otherwise the order is the (folded) order of names.
- *
- * @param aFirst First object to be compared.
- *
- * @param aSecond Second object to be compared.
- *
- * @return 0 if the two objects are equal, negative value if the first
- * object is less than the second and positive value if the first
- * object is greater than the second.
- */
- static TInt LinearOrder(
- const CPslnSkinNameEntry& aFirst,
- const CPslnSkinNameEntry& aSecond );
-
- /**
- * Returns skin package location, based on path parameter.
- * @param aPath path of skin package
- * @return skin package location
- */
- static TAknSkinSrvSkinPackageLocation LocationFromPath(
- const TDesC& aPath );
-
-protected:
-
- /* Copies data honoring size. */
- static void CopyHonoringSize( TDes& aDst, const TDesC* aSrc );
-
- /* Copies data honoring size. */
- static void CopyHonoringSize( TDes& aDst, const TDesC& aSrc );
-
- /* Base construct. */
- void BaseConstructL( CAknsSrvSkinInformationPkg* aInfo = NULL );
-
- /**
- * C++ default constructor.
- */
- CPslnSkinNameEntry();
-
-private: // data
-
- /**
- * Skin name.
- * Own
- */
- HBufC* iName;
-
- /**
- * Skin package location.
- */
- TAknSkinSrvSkinPackageLocation iLocation;
-
- /**
- * Skin package ID.
- */
- TAknsPkgID iPID;
-
- };
-
-
-#endif // C_PSLNSKINNAMEENTRY_H
-
-
-// End of File
\ No newline at end of file
--- a/psln/pslnengine/inc/PslnSkinStore.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2004-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: Store for all found skins.
-*
-*/
-
-
-#ifndef C_PSLNSKINSTORE_H
-#define C_PSLNSKINSTORE_H
-
-#include <e32base.h>
-#include <AknsSrvSkinInformationPkg.h>
-
-class CPslnModel;
-class CPslnSkinEntry;
-class CPslnSkinNameEntry;
-class TAknsPkgID;
-class RFs;
-
-/**
-* Store for all found skins.
-*/
-NONSHARABLE_CLASS( CPslnSkinStore ) : public CBase
- {
- public:
-
- /**
- * Two-phased constructor.
- * @param aModel pointer to model.
- * @return new instance of CPslnSkinStore.
- */
- static CPslnSkinStore* NewL( CPslnModel* aModel );
-
- /**
- * Destructor.
- */
- virtual ~CPslnSkinStore();
-
- /**
- * Tries to retrieve all skins.
- * @param aFsSession File server session.
- */
- void UpdateAllSkinsL( RFs& aFsSession );
-
- /**
- * Tries to find a specific skin from specified location.
- * @param aPID skin instance ID.
- * @param aLocation location from where to search (memory card, or flash)
- * @return pointer to retrieved skin instance.
- */
- CPslnSkinEntry* Find(
- const TAknsPkgID& aPID,
- TAknSkinSrvSkinPackageLocation aLocation );
-
- /**
- * Creates an array of skin names.
- *
- * @return Newly created array. Ownership is transferred.
- */
- RPointerArray<CPslnSkinNameEntry>* CreateNameArrayL();
-
- private:
-
- /**
- * Updates or adds the skin into array.
- *
- * @param aInfo Information structure. Ownership is transferred.
- */
- CPslnSkinEntry* UpdateOrAddL(
- CAknsSrvSkinInformationPkg* aInfo,
- RFs& aFsSession );
-
- /* Updates all skins from given location. */
- void UpdateAllSkinsL(
- TAknSkinSrvSkinPackageLocation aLocation, RFs& aFsSession );
-
- /* Appends one entry to array. */
- void AppendEntryL(
- RPointerArray<CPslnSkinNameEntry>& aArray, const TInt aIndex );
-
- /**
- * C++ default constructor.
- */
- CPslnSkinStore();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL( CPslnModel* aModel );
-
- private: // Data
-
- /**
- * Pointer to model.
- * Not own.
- */
- CPslnModel* iModel;
-
- /**
- * Skin array.
- */
- RPointerArray<CPslnSkinEntry> iSkinArray;
-
- /**
- * Default skin PID.
- */
- TAknsPkgID iDefaultSkinPID;
- };
-
-#endif // C_PSLNSKINSTORE_H
-
-// End of File
--- a/psln/pslnengine/inc/mpslnscreensaverecomobserver.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 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: ECOM change observer interface.
-*
-*/
-
-
-#ifndef MPSLNSCREENSAVERECOMOBSERVER_H
-#define MPSLNSCREENSAVERECOMOBSERVER_H
-
-#include <e32base.h>
-
-/**
- * Defines interface that listens for changes in ECOM.
- *
- * It is used to observe when new plugins become available for
- * the Psln Framework.
- *
- * @lib PslnEngine
- * @since S60 v3.1
- */
-class MPslnScreenSaverECOMObserver
- {
-
-public:
-
- /**
- * Interface that is called in observer, when change in ECOM occurs.
- */
- virtual void HandlePluginListChangeL() = 0;
-
- };
-
-
-#endif // MPSLNSCREENSAVERECOMOBSERVER_H
-
-// End of file
-
--- a/psln/pslnengine/src/PslnDiskUtil.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2003-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: Disk service utility for Psln.
-*
-*/
-
-
-// INCLUDE FILES
-
-// General.
-#include <coemain.h>
-#include <DRMHelper.h>
-#include <DRMRights.h>
-#include <AknsSrvClient.h>
-#include <pathinfo.h>
-#include <caf/manager.h>
-
-// Psln specific.
-#include "PslnDiskUtil.h"
-#include "PslnFeatures.h"
-#include "PslnConst.h"
-#include "PslnDebug.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// PslnDiskUtil::MmcStatus
-// -----------------------------------------------------------------------------
-//
-TInt PslnDiskUtil::MmcStatus()
- {
- PSLN_TRACE_DEBUG("PslnDiskUtil::MmcStatus");
- if( !PslnFeatures::IsMMCSupported() )
- {
- PSLN_TRACE_DEBUG("PslnDiskUtil::MmcStatus Not Supported");
- return KErrNotSupported;
- }
-
- RFs& fs = CCoeEnv::Static()->FsSession();
-
- TInt error = KErrNone;
- TDriveInfo driveInfo;
- TInt res = 0;
- fs.CharToDrive( PathInfo::MemoryCardRootPath()[0], res );
- error = fs.Drive( driveInfo, res );
- if( error )
- {
- PSLN_TRACE_DEBUG1("PslnDiskUtil::MmcStatus Error=%d", error );
- return error;
- }
-
- // MMC is locked
- if( driveInfo.iMediaAtt & KMediaAttLocked )
- {
- PSLN_TRACE_DEBUG("PslnDiskUtil::MmcStatus Locked");
- return KErrLocked;
- }
-
- // MMC is not present or of unknown type
- if ( driveInfo.iType == EMediaNotPresent ||
- driveInfo.iType == EMediaUnknown )
- {
- PSLN_TRACE_DEBUG("PslnDiskUtil::MmcStatus Not present");
- return KErrNotFound;
- }
-
- if( driveInfo.iMediaAtt & KMediaAttWriteProtected )
- {
- PSLN_TRACE_DEBUG("PslnDiskUtil::MmcStatus Read Only");
- return KPslnDiskUtilReadOnly;
- }
- PSLN_TRACE_DEBUG("PslnDiskUtil::MmcStatus Ok");
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// PslnDiskUtil::QueryAndSetAutomatedL
-// ---------------------------------------------------------------------------
-//
-TBool PslnDiskUtil::QueryAndSetAutomatedL(
- RAknsSrvSession& aSkinSrvSession, const TDesC& aFileName)
- {
- PSLN_TRACE_DEBUG("PslnDiskUtil::QueryAndSetAutomatedL");
-
- TBool isProtected = EFalse;
- TInt value = KErrNone;
-
- TInt fileserverhandle;
- TInt filehandle;
- fileserverhandle = aSkinSrvSession.OpenBitmapFile( aFileName, filehandle );
- RFile file;
- User::LeaveIfError( file.AdoptFromServer( fileserverhandle, filehandle ) );
- CleanupClosePushL( file );
-
- CContent* content = CContent::NewLC( file );
- User::LeaveIfError( content->GetAttribute( EIsProtected, value ) );
- if ( value )
- {
- isProtected = ETrue;
- }
- CleanupStack::PopAndDestroy( content );
-
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL prot=%d", isProtected );
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL value=%d", value );
-
- TBool set = ETrue;
- if ( isProtected )
- {
- CDRMHelper* helper = CDRMHelper::NewLC();
- CDRMHelperRightsConstraints* playconst = NULL;
- CDRMHelperRightsConstraints* dispconst = NULL;
- CDRMHelperRightsConstraints* execconst = NULL;
- CDRMHelperRightsConstraints* printconst = NULL;
- TBool expired = EFalse;
- TBool sendingallowed = EFalse;
- helper->GetRightsDetailsL(
- file,
- CDRMRights::EDisplay,
- expired,
- sendingallowed,
- playconst,
- dispconst,
- execconst,
- printconst );
- delete playconst;
- delete execconst;
- delete printconst;
- CleanupStack::PushL( dispconst );
-
- // Talkin' 'bout themes here
- helper->SetAutomatedType( CDRMHelper::EAutomatedTypeTheme );
-
- if ( dispconst && dispconst->FullRights() )
- {
- set = ETrue;
- // Set the Fullrights content as automated also
- // and ignore the result....
- helper->SetAutomated( file );
- }
- else
- {
- TInt res = KErrNone;
- res = helper->SetAutomated( file );
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL res=%d", res );
-
- if ( res == KErrCancel )
- {
- set = EFalse;
- }
- else
- {
- User::LeaveIfError( res );
- TInt err = helper->ConsumeFile2( file, CDRMRights::EPlay, CDRMHelper::EStart );
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL 1 err=%d", err );
- err = helper->ConsumeFile2( file, CDRMRights::EPlay, CDRMHelper::EFinish );
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL 2 err=%d", err );
- err = helper->ConsumeFile2( file, CDRMRights::EDisplay, CDRMHelper::EStart );
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL 3 err=%d", err );
- err = helper->ConsumeFile2( file, CDRMRights::EDisplay, CDRMHelper::EFinish );
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL 4 err=%d", err );
- err = helper->ConsumeFile2( file, CDRMRights::EExecute, CDRMHelper::EStart );
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL 5 err=%d", err );
- err = helper->ConsumeFile2( file, CDRMRights::EExecute, CDRMHelper::EFinish );
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL 6 err=%d", err );
- set = ETrue;
- }
- }
- CleanupStack::PopAndDestroy( 2, helper );
- }
- CleanupStack:: PopAndDestroy(); // file
- PSLN_TRACE_DEBUG1("PslnDiskUtil::QueryAndSetAutomatedL set=%d", (TInt) set );
- return set;
- }
-
-// End of File
--- a/psln/pslnengine/src/PslnEcomListener.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 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: Listens to ECOM for screensaver plugin changes.
-*
-*/
-
-
-#include "mpslnscreensaverecomobserver.h"
-
-#include "PslnEcomListener.h"
-#include "PslnModel.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnEcomListener::CPslnEcomListener( CPslnModel& aModel,
- MPslnScreenSaverECOMObserver& aObserver ) :
- CActive( CActive::EPriorityStandard ), iModel( &aModel ),
- iObserver( &aObserver )
- {
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-//
-void CPslnEcomListener::ConstructL()
- {
- iSession = REComSession::OpenL();
- // Start ECOM monitoring
- StartECOMMonitoringL();
- }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPslnEcomListener* CPslnEcomListener::NewL(
- CPslnModel& aModel, MPslnScreenSaverECOMObserver& aObserver )
- {
- CPslnEcomListener* self =
- new ( ELeave ) CPslnEcomListener( aModel, aObserver );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CPslnEcomListener::~CPslnEcomListener()
- {
- Cancel();
- iSession.Close();
- }
-
-// -----------------------------------------------------------------------------
-// Called when active object is ready.
-// -----------------------------------------------------------------------------
-//
-void CPslnEcomListener::RunL()
- {
- iModel->LoadScreensaverArrayL();
- iObserver->HandlePluginListChangeL();
- StartECOMMonitoringL();
- }
-
-// -----------------------------------------------------------------------------
-// Called when active object is cancelled.
-// -----------------------------------------------------------------------------
-//
-void CPslnEcomListener::DoCancel()
- {
- iSession.CancelNotifyOnChange( iStatus );
- }
-
-// -----------------------------------------------------------------------------
-// Called when active object is cancelled.
-// -----------------------------------------------------------------------------
-//
-void CPslnEcomListener::StartECOMMonitoringL()
- {
- if ( !IsActive() )
- {
- iSession.NotifyOnChange( iStatus );
- SetActive();
- }
- else
- {
- User::Leave( KErrAlreadyExists );
- }
- }
-
-// End of file
--- a/psln/pslnengine/src/PslnFeatures.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2004-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: Utility class that defines supported features for Psln.
-*
-*/
-
-
-// INCLUDE FILES
-
-// Feature manager.
-#include <featmgr.h>
-
-// Central repository
-#include <centralrepository.h>
-#include "PslnVariationPrivateCRKeys.h"
-
-// Psln specific.
-#include "PslnVariant.hrh"
-#include "PslnFeatures.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// PslnFeatures::IsHelpSupported
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool PslnFeatures::IsHelpSupported()
- {
- return FeatureManager::FeatureSupported( KFeatureIdHelp ); //lint !e40 Declared
- }
-
-// -----------------------------------------------------------------------------
-// PslnFeatures::IsEnhancedEmbeddedLinksSupported
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool PslnFeatures::IsEnhancedEmbeddedLinksSupported()
- {
- TBool linkSupport = EFalse;
- if ( IsSupported( KPslnEnhancedEmbeddedLinks ) &&
- IsSeamlessLinksSupported() )
- {
- linkSupport = ETrue;
- }
- return linkSupport;
- }
-
-// -----------------------------------------------------------------------------
-// PslnFeatures::IsSoundsInSkinsSupported
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool PslnFeatures::IsSoundsInSkinsSupported()
- {
- return IsSupported( KPslnSoundsInSkins );
- }
-
-// -----------------------------------------------------------------------------
-// PslnFeatures::IsMMCSupported
-// -----------------------------------------------------------------------------
-//
-TBool PslnFeatures::IsMMCSupported()
- {
- return FeatureManager::FeatureSupported( KFeatureIdMmc );
- }
-
-// -----------------------------------------------------------------------------
-// PslnFeatures::IsAPACSupported
-// -----------------------------------------------------------------------------
-//
-TBool PslnFeatures::IsAPACSupported()
- {
- return FeatureManager::FeatureSupported( KFeatureIdAvkonApac );
- }
-
-// -----------------------------------------------------------------------------
-// Checks if the given feature is currently supported.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool PslnFeatures::IsSupported( TInt aLocalVariationID )
- {
- TBool retVal = EFalse;
- TRAP_IGNORE( retVal = IsSupportedL( aLocalVariationID ) );
- return retVal;
- }
-
-// -----------------------------------------------------------------------------
-// PslnFeatures::IsSeamlessLinksSupported
-// -----------------------------------------------------------------------------
-//
-TBool PslnFeatures::IsSeamlessLinksSupported()
- {
- // Note that this method must return ETrue for EEL as well
- return FeatureManager::FeatureSupported( KFeatureIdSeamlessLinks ); //lint !e40 Declared
- }
-
-// -----------------------------------------------------------------------------
-// Checks if the given feature is currently supported.
-// -----------------------------------------------------------------------------
-//
-TBool PslnFeatures::IsSupportedL( TInt aLocalVariationID )
- {
- TInt value = KErrNone;
- CRepository* variationRepository =
- CRepository::NewL( KCRUidThemesVariation );
- variationRepository->Get( KThemesLocalVariation, value );
- delete variationRepository;
- variationRepository = NULL;
- return ( value & aLocalVariationID );
- }
-
-// End of File
--- a/psln/pslnengine/src/PslnModel.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1903 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Model class for Psln application.
-*
-*/
-
-
-// Psln specific.
-#include "PslnModel.h"
-#include "PslnDiskUtil.h"
-#include "PslnFeatures.h"
-#include "PslnSkinEntry.h"
-#include "PslnSkinStore.h"
-#include "PslnEcomListener.h"
-#include "PslnDebug.h"
-#include "PslnConst.h"
-
-// Wrapper for wallpaper utils.
-#include "pslnwallpaperutilsloader.h"
-#include "pslnbrowserlaunchloader.h"
-
-// Resources
-#include <psln.rsg>
-#include <pslnskinnames.rsg>
-
-// Generic
-#include <StringLoader.h>
-#include <data_caging_path_literals.hrh>
-#include <f32file.h>
-#include <hal.h>
-
-// UI libraries
-#include <AknsSkinUID.h>
-#include <AknsConstants.h>
-#include <eikenv.h>
-#include <AknQueryDialog.h>
-
-// Misc
-#include <bautils.h>
-#include <mmf/common/mmfcontrollerpluginresolver.h> // For CleanupResetAndDestroyPushL
-
-// Central Repository and Publish&Subscribe keys.
-#include <centralrepository.h>
-#include <e32property.h>
-#include "pslninternalcrkeys.h"
-#include <AknSkinsInternalCRKeys.h> // wallpaper, screen saver
-#include <cenrepnotifyhandler.h>
-
-// For enabling first component transition effect
-#include <gfxtranseffect/gfxtranseffect.h>
-#include <akntranseffect.h>
-#ifdef RD_MULTIPLE_DRIVE
-#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
-
-
-// CONSTANTS
-// Path of skin files.
-_LIT( KPslnSkinNamesFile,"z:PslnSkinNames.rsc" );
-
-// Default item index.
-const TInt KPslnDefaultItemIndex = 0;
-
-// Screen saver type: user defined text
-const TInt KPslnSsText = 0;
-// Screen saver type: date & time
-const TInt KPslnSsDate = 1;
-// Screen saver type: object
-const TInt KPslnSsObject = 3;
-// Screen saver type: none
-const TInt KPslnSsNone = 4;
-
-// Granularity of screen saver array.
-const TInt KPslnSsArrayGranularity = 5;
-// Length of drive number descriptor.
-const TInt KPslnDriveNumberLength = 2;
-// Free RAM required when activating transition effects.
-const TInt KPslnTransitionEffectRAMThreshold = 2000000;
-// Maximum of text length in text screensaver for APAC.
-// For western variant, value is taken directly from resources.
-const TInt KPslnSsTextDialogAPACMaxLength = 7;
-// Path to wallpaper utils.
-_LIT( KPslnWallpaperUtilsLoaderName,
- "\\system\\libs\\PslnWallpaperUtilsLoader.dll");
-_LIT( KPslnBrowserLaunchLoaderName,
- "\\system\\libs\\PslnBrowserLaunchLoader.dll");
-// Screen saver UID is stored like [ss_uid]. This is the end mark.
-_LIT( KPslnScreenSaverUidEndMark, "]" );
-
-// CLASS DECLARATIONS
-
-class CPslnActivationGuard : public CBase
- {
- public:
- virtual ~CPslnActivationGuard()
- {
- PSLN_TRACE_DEBUG("CPslnActivationGuard::destructor");
- iModel->SkinSrvSession().EnableSkinChangeNotify();
- }
-
- static CPslnActivationGuard* NewL( CPslnModel* aModel )
- {
- PSLN_TRACE_DEBUG("CPslnActivationGuard::NewL");
- CPslnActivationGuard* self = new (ELeave) CPslnActivationGuard();
- self->iModel = aModel;
- PSLN_TRACE_DEBUG("CPslnActivationGuard DisableSkinChangeNotify");
- aModel->SkinSrvSession().DisableSkinChangeNotify();
- return self;
- }
-
- private:
- CPslnModel* iModel;
- };
-
-// TYPE DEFINITIONS
-// Wallpaper Utils entry.
-typedef TAny* (*NewWallpaperUtilsL)();
-
-// Browser Launcher entry.
-typedef TAny* (*NewBrowserLauncherL)();
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CPslnModel* CPslnModel::NewL( MAknsSkinChangeObserver* aObserver )
- {
- PSLN_TRACE_DEBUG("CPslnModel::NewL");
- CPslnModel* self = new(ELeave) CPslnModel;
-
- CleanupStack::PushL( self );
- self->ConstructL( aObserver );
- CleanupStack::Pop( self );
-
- PSLN_TRACE_DEBUG("CPslnModel::NewL OK");
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor. Simpler version for PslnFramework use.
-// Deprecated.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CPslnModel* CPslnModel::NewL()
- {
- CPslnModel* self = new(ELeave) CPslnModel;
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Destructor
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CPslnModel::~CPslnModel()
- {
- PSLN_TRACE_DEBUG("CPslnModel::destructor");
-
- delete iSkinsRepository;
- delete iScreenSaverRepository;
- iSkinSrvSession.Close();
-
- while( iSkinNames.Count() )
- {
- delete iSkinNames[0].iListName;
- delete iSkinNames[0].iTitleName;
- iSkinNames.Remove(0);
- }
- iSkinNames.Close();
-
- delete iScreensaverFilenameArr;
- delete iScreensaverNameArr;
- iScreensaverCapsArr.Reset();
-
- delete iSkinStore;
- if( iVisibleSkinArr )
- {
- iVisibleSkinArr->ResetAndDestroy();
- delete iVisibleSkinArr;
- }
- delete iScreenSaverInfo;
-
- delete iWallpaperSetter;
- if( iInternalState.IsSet( EPslnModelStateWallpaperDllLoaded ) )
- {
- iWallpaperDll.Close();
- }
-
- delete iBrowserLauncher;
- if( iInternalState.IsSet( EPslnModelStateBrowserLaunchDllLoaded ) )
- {
- iBrowserLaunchDll.Close();
- }
-
- // If client is bad-behaving and has not cancelled listening,
- // cancel itself.
- if ( iScreenSaverListener )
- {
- if ( iScreenSaverListener->IsActive() )
- {
- iScreenSaverListener->Cancel();
- }
- delete iScreenSaverListener;
- // NUllified here, just in case if client later decides to try and
- // destroy this.
- iScreenSaverListener = NULL;
- }
-
- if(iThemesAppCenRepNotifyHandler)
- {
- iThemesAppCenRepNotifyHandler->StopListening();
- delete iThemesAppCenRepNotifyHandler;
- }
- delete iThemesAppRepository;
- }
-
-// -----------------------------------------------------------------------------
-// Activate a Skin.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::ActivateSkinL(
- const TDesC8& /*aPreviewType*/,
- const TInt /*aActiveSkinIndex*/ )
- {
- PSLN_TRACE_DEBUG("CPslnModel::ActivateSkinL -- depricated!!");
- User::Leave( KErrNotSupported );
- return EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// Activate a screen saver.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::ActivateScreenSaver( const TInt aItemIndex,
- TPslnScreenSaverActivation aActivationType )
- {
- PSLN_TRACE_DEBUG("CPslnModel::ActivateScreenSaver");
- TRAPD( err, ActivateScreenSaverL( aItemIndex, aActivationType ) );
- PSLN_TRACE_DEBUG1("CPslnModel::ActivateScreenSaver %d", err );
- return err;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::GuardActivationLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::GuardActivationLC()
- {
- PSLN_TRACE_DEBUG("CPslnModel::GuardActivationLC");
- CleanupStack::PushL( CPslnActivationGuard::NewL( this ) );
- }
-
-// -----------------------------------------------------------------------------
-// Download a skin.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::DownloadSkinL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::DownloadSkinL BEGIN");
- PSLN_TRACE_DEBUG("CPslnModel::DownloadSkinL Load DLL");
- LoadBrowserLaunchL();
- if ( iBrowserLauncher )
- {
- PSLN_TRACE_DEBUG("CPslnModel::DownloadSkinL Launch embedded browser");
- TRAPD( error,
- iBrowserLauncher->LaunchBrowserStandaloneL( ) );
- if ( error != KErrNone )
- {
- PSLN_TRACE_DEBUG1("CPslnModel::DownloadSkinL Handle exit: %d", error );
- }
- if ( error == KErrNoMemory )
- {
- PSLN_TRACE_DEBUG("CPslnModel::DownloadSkinL OOM");
- User::Leave( error );
- }
- }
- PSLN_TRACE_DEBUG("CPslnModel::DownloadSkinL END");
- }
-
-// -----------------------------------------------------------------------------
-// Set Background image path name.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::SetBackgroundImagePath( const TDesC& aImagePath )
- {
- PSLN_TRACE_DEBUG("CPslnModel::SetBackgroundImagePath");
-
- TRAP_IGNORE( LoadWallpaperUtilsL() );
- TInt retVal = KErrNone;
- if ( iWallpaperSetter )
- {
- if( aImagePath.Length() > 0 )
- {
- retVal = iWallpaperSetter->SetIdleWallpaper(
- aImagePath,
- CCoeEnv::Static(),
- R_PSLN_SKINS_LOADING_IMAGE,
- R_PSLN_GENERAL_WAIT_NOTE );
- }
- else
- {
- retVal = iWallpaperSetter->SetIdleWallpaper( KNullDesC, NULL );
- }
- }
- else
- {
- retVal = KErrNoMemory;
- }
- return retVal;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::InvokeSSPluginFunctionL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::InvokeSSPluginFunctionL(
- TInt aIndex,
- TScPluginCaps aFunction )
- {
- PSLN_TRACE_DEBUG("CPslnModel::InvokeSSPluginFunctionL");
- if ( !iScreensaverFilenameArr || iScreensaverFilenameArr->Count() == 0 )
- {
- User::Leave( KErrNotFound );
- }
-
- if( aIndex >= iScreensaverFilenameArr->MdcaCount() )
- {
- User::Leave( KErrArgument );
- }
-
- if(aFunction == EScpCapsConfigure &&
- aIndex == GetScreenSaverIndexByFileName(KPslnScreenSaverTypeText))
- {
- TBool ret = QueryAndSetScreensaverTextL();
- if ( !ret )
- {
- User::Leave( KErrCancel );
- }
- return;
- }
-
- // Convert the UID of the given screensaver plugin from text to integer
- // The string format of the UID: [12345678]
- // The number inside the brackets in hexadecimal format
- TLex lex( iScreensaverFilenameArr->MdcaPoint( aIndex ) );
- // Skip the first character: '['
- lex.Get();
- TUint screenSaverPluginImpUid;
- // Get the UID
- TInt err = lex.Val( screenSaverPluginImpUid, EHex );
- PSLN_TRACE_DEBUG1("CPslnModel::InvokeSSPluginFunctionL lexed: %d", err );
- User::LeaveIfError( err );
-
- if( err == KErrCancel && aIndex == CurrentPropertyIndexL( KPslnScreenSettingId ) )
- {
- SetScreenSaverToDefault();
- }
-
- User::LeaveIfError( err );
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::PerformCompleteUpdateL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::PerformCompleteUpdateL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::PerformCompleteUpdateL");
-
- if ( iInternalState.IsClear( EPslnModelStateSkinNamesLoaded ) )
- {
- LoadSkinNamesResourceL();
- }
- UpdateFromServerL();
- SetActiveSkinL();
-
- PSLN_TRACE_DEBUG("CPslnModel::PerformCompleteUpdateL COMPLETED");
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::LoadScreensaverArrayL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::LoadScreensaverArrayL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::LoadScreensaverArrayL");
-
- // Destroy old arrays, if any
- delete iScreensaverNameArr;
- iScreensaverNameArr = NULL;
- delete iScreensaverFilenameArr;
- iScreensaverFilenameArr = NULL;
- iScreensaverCapsArr.Reset();
-
- // Load default items
- iScreensaverNameArr = iEikEnv->ReadDesC16ArrayResourceL(
- R_SCREEN_SAVER_SETTING_PAGE_LBX );
-
- // Add descriptors for system screensavers
- iScreensaverFilenameArr =
- new (ELeave) CDesC16ArrayFlat( KPslnSsArrayGranularity );
- iScreensaverFilenameArr->AppendL( KPslnScreenSaverTypeDateTime );
- iScreensaverFilenameArr->AppendL( KPslnScreenSaverTypeText );
-
- // System screensavers have no capabilities
- User::LeaveIfError( iScreensaverCapsArr.Append( EFalse ) );
-
- if ( IsSupportScreenSaverNoneOption() )
- {
- iScreensaverFilenameArr->InsertL(0, KPslnScreenSaverTypeNone );
- User::LeaveIfError( iScreensaverCapsArr.Insert( 0, EFalse ) );
- }
- else
- {
- iScreensaverNameArr->Delete(0);
- }
-
- FindAndAppendScreensaversL();
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::VisibleSkin
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPslnSkinEntry* CPslnModel::VisibleSkin( const TInt aIndex )
- {
- PSLN_TRACE_DEBUG("CPslnModel::VisibleSkin");
- if ( !iSkinStore )
- {
- TRAPD( err, iSkinStore = CPslnSkinStore::NewL( this ) );
- if ( err != KErrNone )
- {
- return NULL;
- }
- }
- CPslnSkinEntry* visibleSkin = NULL;
- if ( iVisibleSkinArr )
- {
- if( ( aIndex >= 0 ) && ( aIndex < iVisibleSkinArr->Count() ) )
- {
- CPslnSkinNameEntry* nameEntry = (*iVisibleSkinArr)[aIndex];
- visibleSkin = iSkinStore->Find(
- nameEntry->PkgID(), nameEntry->Location() );
- }
- }
- return visibleSkin;
- }
-
-// -----------------------------------------------------------------------------
-// Get a skin's name by index.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::GetSkinNameByIndex( const TInt aIndex, TDes& aSkinName,
- const TPslnSkinNameType aType ) const
- {
- PSLN_TRACE_DEBUG("CPslnModel::GetSkinNameByIndex");
-
- TAknsPkgID pid = KAknsNullPkgID;
- if ( iVisibleSkinArr )
- {
- if( ( aIndex >= 0 ) && ( aIndex < iVisibleSkinArr->Count() ) )
- {
- pid = (*iVisibleSkinArr)[aIndex]->PkgID();
- }
- }
-
- GetSkinNameByPID( pid, aSkinName, aType );
- }
-
-// -----------------------------------------------------------------------------
-// Return if the selected skin is activated.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::IsActiveSkinSelected( TInt aSkinIndex ) const
- {
- PSLN_TRACE_DEBUG("CPslnModel::IsActiveOfSkinSelected");
-
- TInt skinIndex = iCurrentSkinIndex;
- if ( aSkinIndex >= 0 )
- {
- skinIndex = aSkinIndex;
- }
- return ( iActiveSkinIndex == skinIndex );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::LocationOfSkin
-// Deprecated.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TAknSkinSrvSkinPackageLocation CPslnModel::LocationOfSkin(
- const TInt aIndex )
- {
- PSLN_TRACE_DEBUG("CPslnModel::LocationOfSkin");
- TAknSkinSrvSkinPackageLocation skinLocation = EAknsSrvPhone;
- CPslnSkinEntry* entry = VisibleSkin( aIndex );
- if( entry )
- {
- skinLocation = entry->Location();
- }
- return skinLocation;
- }
-
-// -----------------------------------------------------------------------------
-// Return the active skin index.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::ActiveSkinIndex () const
- {
- PSLN_TRACE_DEBUG("CPslnModel::ActiveSkinIndex");
- return iActiveSkinIndex;
- }
-
-// -----------------------------------------------------------------------------
-// Return the skin index of the selection currently active.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::CurrentSelectedSkinIndex () const
- {
- PSLN_TRACE_DEBUG("CPslnModel::CurrentSelectedSkinIndex");
- return iCurrentSkinIndex;
- }
-
-// -----------------------------------------------------------------------------
-// Get number of skins.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::NumberOfSkins() const
- {
- PSLN_TRACE_DEBUG("CPslnModel::NumberOfSkins");
- TInt numberOfSkins = 0;
- if ( iVisibleSkinArr )
- {
- numberOfSkins = iVisibleSkinArr->Count();
- }
- return numberOfSkins;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::ScreensaverNames
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const MDesC16Array& CPslnModel::ScreensaverNames() const
- {
- PSLN_TRACE_DEBUG("CPslnModel::ScreensaverNames");
- return *iScreensaverNameArr;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::ScreensaverHasCapability
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::ScreensaverHasCapability(
- const TInt aIndex,
- const TScPluginCaps aCapability ) const
- {
- PSLN_TRACE_DEBUG("CPslnModel::ScreensaverHasCapability");
- if( ( aIndex < 0 ) || ( aIndex >= iScreensaverCapsArr.Count() ) )
- {
- return EFalse;
- }
-
- return ( iScreensaverCapsArr[ aIndex ] & aCapability );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::ProtectionOfSkin
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TAknsSkinSrvSkinProtectionType CPslnModel::ProtectionOfSkin(
- const TInt aIndex )
- {
- PSLN_TRACE_DEBUG("CPslnModel::ProtectionOfSkin");
- TAknsSkinSrvSkinProtectionType skinProtectionType = EAknsSrvNoProtection;
- CPslnSkinEntry* entry = VisibleSkin( aIndex );
- if( entry )
- {
- skinProtectionType = entry->Protection();
- }
- return skinProtectionType;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::IsValidForActivation
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::IsValidForActivation( const TInt aItemIndex )
- {
- PSLN_TRACE_DEBUG("CPslnModel::IsValidForActivation");
- CPslnSkinEntry* skinEntry = VisibleSkin( aItemIndex );
- return ( skinEntry && !skinEntry->IsCorrupted() );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::IsValidForPreview
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::IsValidForPreview( const TInt aItemIndex )
- {
- PSLN_TRACE_DEBUG("CPslnModel::IsValidForPreview");
- CPslnSkinEntry* skinEntry = VisibleSkin( aItemIndex );
- if( !skinEntry )
- {
- return EFalse;
- }
-
- if( skinEntry->IsCorrupted() )
- {
- return EFalse;
- }
- TInt type = skinEntry->Protection();
- if( type != EAknsSrvNoProtection && type != EAknsSrvProtected )
- {
- return EFalse;
- }
-
- TBool skinFileExist = SkinFileExist( aItemIndex );
- if( !skinFileExist )
- {
- return EFalse;
- }
-
- return ETrue;
- }
-
-// -----------------------------------------------------------------------------
-// Checks if the skin support animated background.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::IsSupportAnimBg( TInt aItemIndex )
- {
- CPslnSkinEntry* skinEntry = VisibleSkin( aItemIndex );
- return skinEntry && skinEntry->IsSupportAnimBg();
- }
-
-// -----------------------------------------------------------------------------
-// Set current selected skin index.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::SetCurrentSelectedSkinIndex(
- const TInt aCurrentSkinIndex )
- {
- PSLN_TRACE_DEBUG1("CPslnModel::SetCurrentSelectedSkinIndex:%d", aCurrentSkinIndex );
- if ( aCurrentSkinIndex >= 0 )
- {
- iCurrentSkinIndex = aCurrentSkinIndex;
- }
- // If given index is negative, assume that first skin is selected.
- else
- {
- iCurrentSkinIndex = 0;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::SetCurrentPropertyType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::SetCurrentPropertyType(
- const TInt /*aProperty*/, const TInt /*aCurItemIndex*/ )
- {
- // deprecated.
- return KErrNotSupported;
- }
-
-// -----------------------------------------------------------------------------
-// Get a Skin's Properties Type index.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::CurrentPropertyIndex( const TInt aProperty )
- {
- PSLN_TRACE_DEBUG1("CPslnModel::CurrentPropertyIndex:%d", aProperty );
- TInt currentIndex = KErrNotFound;
- TRAP_IGNORE( currentIndex = CurrentPropertyIndexL( aProperty ) );
- PSLN_TRACE_DEBUG1("CPslnModel::CurrentPropertyIndex return:%d", currentIndex );
- return currentIndex;
- }
-
-// -----------------------------------------------------------------------------
-// Starts to listen for ECOM screensaver changes.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::EnableScreenSaverNotifications(
- const TBool& aActive, MPslnScreenSaverECOMObserver& aObserver )
- {
- PSLN_TRACE_DEBUG("CPslnModel::EnableScreenSaverNotifications" );
- if ( aActive )
- {
- // Create listening class (active object)
- TRAP_IGNORE(
- iScreenSaverListener = CPslnEcomListener::NewL( *this, aObserver ) );
- }
- else
- {
- // Check if model has already destroyed this.
- if ( iScreenSaverListener )
- {
- if ( iScreenSaverListener->IsActive() )
- {
- iScreenSaverListener->Cancel();
- }
- delete iScreenSaverListener;
- iScreenSaverListener = NULL;
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// Activates skin. This overloaded version knows in which state the activation
-// is requested.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::ActivateSkinL(
- const TDesC8& /*aPreviewType*/,
- const TInt /*aActiveSkinIndex*/,
- const TBool& /*aActivateFromPreview*/ )
- {
- PSLN_TRACE_DEBUG("CPslnModel::ActivateSkinL -- depricated!!");
- User::Leave( KErrNotSupported );
- return EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// Activates skin.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::ActivateSkinL(
- const TInt aActiveSkinIndex )
- {
- PSLN_TRACE_DEBUG("CPslnModel::ActivateSkinL");
-
- TInt indexToActivate = aActiveSkinIndex;
- if( aActiveSkinIndex == KErrNotFound )
- {
- indexToActivate = iActiveSkinIndex;
- }
- PSLN_TRACE_DEBUG1("CPslnModel::ActivateSkinL activate skin index=%d", indexToActivate );
- // Get skin's full name.
- HBufC* fullName = HBufC::NewLC( KMaxFileName );
- TPtr fullNamePtr = fullName->Des();
- fullNamePtr = GetSkinFullName( indexToActivate );
-
- if ( !PslnDiskUtil::QueryAndSetAutomatedL( iSkinSrvSession, fullNamePtr ) )
- {
- CleanupStack::PopAndDestroy( fullName );
- PSLN_TRACE_DEBUG("CPslnModel::ActivateSkinL set autom. not ok");
- return EFalse;
- }
- CleanupStack::PopAndDestroy( fullName );
-
- // Find out the skin package ID
- CPslnSkinEntry* activeEntry = VisibleSkin( indexToActivate );
- if ( !activeEntry )
- {
- PSLN_TRACE_DEBUG("CPslnModel::ActivateSkinL NULL entry");
- User::Leave( KErrGeneral );
- }
-
- if ( !activeEntry->IsSupportAnimBg() )
- {
- //Stop animated background
- SetAnimBackground( EPslnDisableAllEffects );
- }
- TAknsPkgID activeSkinPid = activeEntry->PkgID();
- // Activate whole skin
- PSLN_TRACE_DEBUG("CPslnModel::ActivateSkinL set all definition sets");
- TInt error = iSkinSrvSession.SetAllDefinitionSets( activeSkinPid );
-
- // For enabling first component transition effect
- GfxTransEffect::Enable();
-
- if ( error != KErrNone )
- {
- PSLN_TRACE_DEBUG1("CPslnModel::ActivateSkinL error when setting definition sets: %d", error );
- User::LeaveIfError( error );
- }
-
- // Otherwise, save to shareddata
- TAknsPkgIDBuf pidBuf;
- activeSkinPid.CopyToDes( pidBuf );
-
- iSkinsRepository->Set(
- KPslnActiveSkinUid,
- pidBuf );
- iSkinsRepository->Set(
- KPslnActiveSkinLocation,
- activeEntry->Location() );
-
- iActiveSkinIndex = indexToActivate;
- return ETrue;
- }
-
-// -----------------------------------------------------------------------------
-// Leaving version of CurrentPropertyIndex.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::CurrentPropertyIndexL( const TInt aProperty )
- {
- PSLN_TRACE_DEBUG1("CPslnModel::CurrentPropertyIndex prop=%d", aProperty );
-
- TInt itemIndex = KErrNotFound;
-
- switch( aProperty )
- {
- case KPslnBgIdleSettingId:
- {
- itemIndex = GetWallPaperItemIndex();
- break;
- }
- case KPslnScreenSettingId:
- {
- itemIndex = GetScreenSaverItemIndexL();
- break;
- }
- default:
- break;
- }
- return itemIndex;
- }
-
-// -----------------------------------------------------------------------------
-// Sets transition effects.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::SetTransitionEffectsL( const TInt aEffectValue )
- {
- PSLN_TRACE_DEBUG("CPslnModel::SetTransitionEffectsL");
- TInt retVal = KErrNone;
-
- // For the first time only, read default enable mask.
- if ( iInternalState.IsClear( EPslnModelStateTransitionEnableCRKeyRead ) )
- {
- // Initialize to enable all.
- iEffectsDefaultEnableMask = EPslnEnableAllEffects;
-
- retVal = iThemesAppRepository->Get(
- KThemesDefaultTransitionEffects,
- iEffectsDefaultEnableMask );
- if ( retVal == KErrNone )
- {
- iInternalState.Set( EPslnModelStateTransitionEnableCRKeyRead );
- }
- }
-
- // Only accept default mask, zero or max value.
- if ( aEffectValue != iEffectsDefaultEnableMask &&
- aEffectValue != EPslnEnableAllEffects &&
- aEffectValue != EPslnDisableAllEffects )
- {
- retVal = KErrArgument;
- }
- else
- {
- if ( aEffectValue == EPslnEnableAllEffects ||
- aEffectValue == iEffectsDefaultEnableMask )
- {
- TInt freeRAM = 0;
- HAL::Get( HALData::EMemoryRAMFree, freeRAM );
- if ( freeRAM < KPslnTransitionEffectRAMThreshold )
- {
- return KErrNoMemory;
- }
- }
-
- // Use mask, if activating effects.
- TInt effectValue = aEffectValue;
- if ( aEffectValue != EPslnDisableAllEffects )
- {
- effectValue = iEffectsDefaultEnableMask;
- }
-
- iThemesAppRepository->Set(
- KThemesTransitionEffects,
- effectValue );
- }
-
- // Need to have TFXSrv running before calling enable
- const TInt KWaitForTFXServerStart( 100000 );
- User::After( KWaitForTFXServerStart );
- // For enabling first component transition effect
- GfxTransEffect::Enable();
-
- PSLN_TRACE_DEBUG1("CPslnModel::SetTransitionEffectsL %d", retVal );
- return retVal;
- }
-
-// -----------------------------------------------------------------------------
-// Gets current value of transition effects.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::GetTransitionEffectStateL()
- {
- if( PslnFeatures::IsSupported( KPslnSupportFastPreviewTheme ) )
- {
- return iTransitionEffectValue;
- }
-
-
- PSLN_TRACE_DEBUG("CPslnModel::GetTransitionEffectStateL");
- TInt effectsValue = KErrNone;
-
- TInt error = iThemesAppRepository->Get( KThemesTransitionEffects, effectsValue );
- if ( error != KErrNone || effectsValue < 0 )
- {
- PSLN_TRACE_DEBUG2("CPslnModel::GetTransitionEffectStateL Error: %d %d", error, effectsValue );
- effectsValue = KErrNotFound;
- }
-
- PSLN_TRACE_DEBUG1("CPslnModel::GetTransitionEffectStateL return %d", effectsValue );
- return effectsValue;
- }
-
-// -----------------------------------------------------------------------------
-// Get Animated Background state
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::AnimBackgroundState() const
- {
- TInt value = KErrNone;
- TInt error = iThemesAppRepository->Get( KThemesAnimBackgroundSupport, value );
- if ( error != KErrNone || value < 0 )
- {
- value = KMaxTInt;
- }
-
- return value;
- }
-
-// -----------------------------------------------------------------------------
-// Set Animated Background state
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CPslnModel::SetAnimBackground( TInt aValue )
- {
- ASSERT( aValue == EPslnEnableAllEffects ||
- aValue == EPslnDisableAllEffects );
-
- TInt retVal = KErrNone;
- if ( aValue == EPslnEnableAllEffects )
- {
- TInt freeRAM = 0;
- HAL::Get( HALData::EMemoryRAMFree, freeRAM );
- if ( freeRAM < KPslnTransitionEffectRAMThreshold )
- {
- return KErrNoMemory;
- }
- }
- iThemesAppRepository->Set( KThemesAnimBackgroundSupport, aValue );
-
- return retVal;
- }
-
-// -----------------------------------------------------------------------------
-// Checks if screensaver is on memory card.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::IsScreenSaverOnMemoryCard( const TInt aIndex ) const
- {
- if ( !iScreensaverFilenameArr || iScreensaverFilenameArr->Count() == 0 )
- {
- return EFalse;
- }
-
- TLex lex( iScreensaverFilenameArr->MdcaPoint( aIndex ) );
- // Skip the first character: '['
- lex.Get();
- TUint screenSaverPluginImpUid;
- TInt currentDrive = EDriveC;
- // Get the UID
- lex.Val( screenSaverPluginImpUid, EHex );
- // Skip character: ']'
- lex.Get();
- // Get the drive
- if ( !lex.Eos() )
- {
- // Find out which drive the plugin is on
- if ( lex.Val( currentDrive ) != KErrNone )
- {
- return EFalse;
- }
- }
-#ifndef RD_MULTIPLE_DRIVE
- if ( currentDrive == EDriveE )
- {
- return ETrue;
- }
- return EFalse;
-#else
- RFs& fs = iEikEnv->FsSession();
-
- TUint driveStatus = 0;
- TBool retVal = EFalse;
- TInt err = DriveInfo::GetDriveStatus( fs, currentDrive, driveStatus );
- if ( driveStatus & DriveInfo::EDriveExternallyMountable &&
- driveStatus & DriveInfo::EDriveRemovable )
- {
- retVal = ETrue;
- }
- return retVal;
-#endif // RD_MULTIPLE_DRIVE
- }
-
-// -----------------------------------------------------------------------------
-// Sets currently active content (screensaver/wallpaper) index.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::SetCurrentPropertyTypeL(
- const TInt aProperty, const TInt aCurItemIndex )
- {
- PSLN_TRACE_DEBUG2("CPslnModel::SetCurrentPropertyTypeL prop=%d index=%d",
- aProperty, aCurItemIndex );
-
- if( aCurItemIndex < KPslnDefaultItemIndex )
- {
- User::Leave( KErrArgument );
- }
-
- TInt retVal = KErrNone;
- switch( aProperty )
- {
- case KPslnBgIdleSettingId:
- retVal = iSkinsRepository->Set( KPslnWallpaperType, aCurItemIndex );
- break;
- case KPslnScreenSettingId:
- {
- TInt screensaverType = GetScreensaverTypeByIndex(aCurItemIndex);
- if ( screensaverType == KPslnSsText )
- {
- // Query text if necessary
- TBool ret = QueryAndSetScreensaverTextL();
- if ( !ret )
- {
- User::Leave( KErrCancel );
- }
- }
-
- break;
- }
- default:
- break;
- }
- User::LeaveIfError( retVal );
- }
-
-// -----------------------------------------------------------------------------
-// Checks if the theme is on memory card.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::IsThemeOnMemoryCard( const TInt& aIndex )
- {
-#ifndef RD_MULTIPLE_DRIVE
- return EFalse;
-#else
- PSLN_TRACE_DEBUG("CPslnModel::IsThemeOnMemoryCard");
- TBool isThemeOnMemoryCard = EFalse;
- CPslnSkinEntry* entry = VisibleSkin( aIndex );
- if( entry )
- {
- isThemeOnMemoryCard = entry->IsOnMemoryCard();
- }
- return isThemeOnMemoryCard;
-#endif //RD_MULTIPLE_DRIVE
- }
-
-// -----------------------------------------------------------------------------
-// Checks if the theme is on mass memory.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::IsThemeOnMassDrive( const TInt& aIndex )
- {
-#ifndef RD_MULTIPLE_DRIVE
- return EFalse;
-#else
- PSLN_TRACE_DEBUG("CPslnModel::IsThemeOnMassDrive");
- TBool isThemeOnMemoryCard = EFalse;
- CPslnSkinEntry* entry = VisibleSkin( aIndex );
- if( entry )
- {
- isThemeOnMemoryCard = entry->IsOnMassDrive();
- }
- return isThemeOnMemoryCard;
-#endif //RD_MULTIPLE_DRIVE
- }
-
-// -----------------------------------------------------------------------------
-// Checks if the screensaver is on mass memory.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnModel::IsScreenSaverOnMassDrive( const TInt& aIndex ) const
- {
-#ifndef RD_MULTIPLE_DRIVE
- return EFalse;
-#else
-
- if ( !iScreensaverFilenameArr || iScreensaverFilenameArr->Count() == 0 )
- {
- return EFalse;
- }
-
- TLex lex( iScreensaverFilenameArr->MdcaPoint( aIndex ) );
- // Skip the first character: '['
- lex.Get();
- TUint screenSaverPluginImpUid;
- TInt currentDrive = EDriveC;
- // Get the UID
- lex.Val( screenSaverPluginImpUid, EHex );
- // Skip character: ']'
- lex.Get();
- // Get the drive
- if ( !lex.Eos() )
- {
- // Find out which drive the plugin is on
- if ( lex.Val( currentDrive ) != KErrNone )
- {
- return EFalse;
- }
- }
-
- RFs& fs = iEikEnv->FsSession();
-
- TUint driveStatus = 0;
- TBool retVal = EFalse;
- TInt err = DriveInfo::GetDriveStatus( fs, currentDrive, driveStatus );
-
- // It is mass memory, if it is externally mountable, but not removable.
- if ( driveStatus & DriveInfo::EDriveExternallyMountable &&
- !( driveStatus & DriveInfo::EDriveRemovable ) )
- {
- retVal = ETrue;
- }
- return retVal;
-#endif // RD_MULTIPLE_DRIVE
- }
-
-// -----------------------------------------------------------------------------
-// Shares skin server session.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RAknsSrvSession CPslnModel::SkinSrvSession() const
- {
- return iSkinSrvSession;
- }
-
-// -----------------------------------------------------------------------------
-// Starts or stops transition effects.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::TransEffect(TInt aAction) const
- {
- __ASSERT_DEBUG( EPslnTransitionEffectDummyFirst < aAction &&
- aAction < EPslnTransitionEffectDummyLast,
- User::Panic(_L("Invalid action for CPslnModel::TransEffect"), 1) );
-
- switch (aAction)
- {
- case EPslnTransitionEffectStartPreview:
- GfxTransEffect::BeginFullScreen( /*AknTransEffect::EApplicationExit*/1500, TRect(),
- AknTransEffect::EParameterType,
- AknTransEffect::GfxTransParam( KUidPsln ) );
- break;
- case EPslnTransitionEffectStartThemeActivation:
- GfxTransEffect::BeginFullScreen( /*AknTransEffect::EApplicationExit*/1501, TRect(),
- AknTransEffect::EParameterType,
- AknTransEffect::GfxTransParam( KUidPsln ) );
- break;
-
- case EPslnTransitionEffectStop:
- GfxTransEffect::EndFullScreen();
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Set current screensaver to default screensaver.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPslnModel::SetScreenSaverToDefault()
- {
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::GetSeparatelyLocalizedSkinName
-// -----------------------------------------------------------------------------
-//
-TBool CPslnModel::GetSeparatelyLocalizedSkinName(
- const TAknsPkgID aPID, TDes& aSkinName,
- const TPslnSkinNameType aType ) const
- {
- PSLN_TRACE_DEBUG("CPslnModel::GetSeparatelyLocalizedSkinName");
- TBool retValue = EFalse;
- TInt i = KErrNone;
- for( ; i < iSkinNames.Count(); i++ )
- {
- if( iSkinNames[i].iPid == aPID )
- {
- switch( aType )
- {
- case EPslnSkinNameTypeList:
- aSkinName = *iSkinNames[i].iListName;
- break;
- case EPslnSkinNameTypeTitle:
- aSkinName = *iSkinNames[i].iTitleName;
- break;
- }
- retValue = ETrue;
- break; // break the for loop
- }
- }
- return retValue;
- }
-
-
-// -----------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnModel::CPslnModel()
- {
- PSLN_TRACE_DEBUG("CPslnModel::constructor");
- iEikEnv = CEikonEnv::Static();
- iActiveSkinIndex = KErrNotFound;
- iCurrentSkinIndex = KErrNotFound;
- iInternalState.ClearAll();
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnModel::ConstructL( MAknsSkinChangeObserver* aObserver )
- {
- PSLN_TRACE_DEBUG("CPslnModel::ConstructL");
-
- PSLN_TRACE_DEBUG("CPslnModel::ConstructL CenRep");
- iSkinsRepository = CRepository::NewL( KCRUidPersonalisation );
- iScreenSaverRepository = NULL;
- iThemesAppRepository = CRepository::NewL( KCRUidThemes );
-
- // Connect to skin server.
- User::LeaveIfError( iSkinSrvSession.Connect( aObserver ) );
-
- if( PslnFeatures::IsSupported( KPslnSupportFastPreviewTheme ) )
- {
- InitTransitionEffectVauleL();
- }
-
- PSLN_TRACE_DEBUG("CPslnModel::ConstructL OK");
- }
-
-// -----------------------------------------------------------------------------
-// Loads the skin name resource file
-// -----------------------------------------------------------------------------
-//
-void CPslnModel::LoadSkinNamesResourceL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::LoadSkinNamesResourceL");
- TParse* fp = new (ELeave) TParse;
- fp->Set( KPslnSkinNamesFile, &KDC_APP_RESOURCE_DIR, NULL );
- TFileName filename = fp->FullName();
- delete fp;
-
- BaflUtils::NearestLanguageFile( iEikEnv->FsSession(), filename );
- TResourceReader reader;
- TInt resourceFileOffset = iEikEnv->AddResourceFileL( filename );
- iEikEnv->CreateResourceReaderLC( reader, R_PSLN_SKINNAME_LIST );
-
- TInt items = reader.ReadInt16();
- for( TInt i = 0; i < items; i++ )
- {
- TInt pid1 = reader.ReadInt32();
- TInt pid2 = reader.ReadInt32();
- HBufC16* listname = reader.ReadHBufC16L();
- CleanupStack::PushL( listname );
- HBufC16* titlename = reader.ReadHBufC16L();
- CleanupStack::PushL( titlename );
-
- TPslnSkinNameEntry entry;
- entry.iPid.Set( pid2, pid1 );
- entry.iListName = listname;
- entry.iTitleName = titlename;
- User::LeaveIfError( iSkinNames.Append( entry ) );
-
- // Title and list name are deleted in the model's destructor.
- CleanupStack::Pop( 2, listname ); // titlename, listname
- }
- CleanupStack::PopAndDestroy(); // reader
-
- if( resourceFileOffset )
- {
- iEikEnv->DeleteResourceFile( resourceFileOffset );
- }
-
- iInternalState.Set( EPslnModelStateSkinNamesLoaded );
- PSLN_TRACE_DEBUG("CPslnModel::LoadSkinNamesResourceL DONE");
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::FindAndAppendScreensaversL
-// ---------------------------------------------------------------------------
-//
-TBool CPslnModel::FindAndAppendScreensaversL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::FindAndAppendScreensaversL");
-
- TBool found = EFalse;
-
- RImplInfoPtrArray screenSaverList;
- CleanupResetAndDestroyPushL( screenSaverList );
-
- const TInt ssCount = screenSaverList.Count();
-
- for( TInt i = 0; i < ssCount; i++ )
- {
- PSLN_TRACE_DEBUG("CPslnModel::FindAndAppendScreensaversL Plugin found");
-
- CImplementationInformation* implInfo = screenSaverList[i];
-
- // The the screensaver ecom plugin implementation UID will be used in place of
- // screensaver file name
- // The string format of the UID: [12345678]
- // The number inside the brackets in hexadecimal format
- TUid impUid = implInfo->ImplementationUid();
-
- // Stash plugin drive number after the UID.
- HBufC* ssName = HBufC::NewLC( KMaxUidName + KPslnDriveNumberLength );
- TPtr ssNamePtr = ssName->Des();
- ssNamePtr = impUid.Name();
- ssNamePtr.AppendNum( implInfo->Drive() );
-
- PSLN_TRACE_DEBUG("CPslnModel::FindAndAppendScreensaversL Getting caps");
- }
-
- PSLN_TRACE_DEBUG("CPslnModel::FindAndAppendScreensaversL COMPLETED");
- CleanupStack::PopAndDestroy( &screenSaverList );
- return found;
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::UpdateFromServerL
-// ---------------------------------------------------------------------------
-//
-void CPslnModel::UpdateFromServerL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::UpdateFromServerL");
- if ( !iSkinStore )
- {
- iSkinStore = CPslnSkinStore::NewL( this );
- }
- iSkinStore->UpdateAllSkinsL( iEikEnv->FsSession() );
- UpdateVisibleSkinListL();
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::UpdateVisibleSkinListL
-// ---------------------------------------------------------------------------
-//
-void CPslnModel::UpdateVisibleSkinListL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::UpdateVisibleSkinListL");
- if( iVisibleSkinArr )
- {
- iVisibleSkinArr->ResetAndDestroy();
- delete iVisibleSkinArr;
- iVisibleSkinArr = NULL;
- }
-
- if ( iSkinStore )
- {
- iVisibleSkinArr = iSkinStore->CreateNameArrayL();
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::SetActiveSkinL
-// -----------------------------------------------------------------------------
-//
-void CPslnModel::SetActiveSkinL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::SetActiveSkinL");
-
- TInt activeSkinLocation = KErrNotFound;
-
- iSkinsRepository->Get(
- KPslnActiveSkinLocation,
- activeSkinLocation );
-
- // If skin is from memory card, check memory card status.
- if( activeSkinLocation == EAknsSrvMMC )
- {
- if( PslnDiskUtil::MmcStatus() < 0 )
- {
- // If skin is on memory card, and there is access error,
- // activate default skin.
- ActivateDefaultSkinL();
- return;
- }
- }
-
- TAknsPkgIDBuf pidBuf;
- iSkinsRepository->Get(
- KPslnActiveSkinUid,
- pidBuf );
-
- TAknsPkgID activeSkinPid;
- activeSkinPid.SetFromDesL( pidBuf );
-
- if ( !iVisibleSkinArr )
- {
- User::Leave( KErrGeneral );
- }
- TInt activeSkinIndex = KErrNotFound;
- for( TInt i = 0; i < iVisibleSkinArr->Count(); i++ )
- {
- CPslnSkinNameEntry* nameEntry = (*iVisibleSkinArr)[i];
- if ( !nameEntry )
- {
- User::Leave( KErrGeneral );
- }
- if( ( activeSkinPid == nameEntry->PkgID() ) &&
- ( activeSkinLocation == nameEntry->Location() ) )
- {
- activeSkinIndex = i;
- break;
- }
- }
-
- if( activeSkinIndex == KErrNotFound )
- {
- // If the currently active skin no longer exists, activate the default.
- ActivateDefaultSkinL();
- return;
- }
-
- iActiveSkinIndex = activeSkinIndex;
- }
-
-// -----------------------------------------------------------------------------
-// Screen saver text query
-// -----------------------------------------------------------------------------
-//
-TBool CPslnModel::QueryAndSetScreensaverTextL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::QueryAndSetScreensaverTextL");
-
- HBufC* displayText = HBufC::NewLC( KPslnMaxNumberOfScreenSaverText );
- TPtr txtPtr = displayText->Des();
-
-
- // Just load the default text if nothing was set in the skin settings.
- if ( txtPtr.Length() == 0 )
- {
- GetDefaultTextToScreensaverL( txtPtr );
- }
-
- // Set text to query.
- CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL(
- txtPtr,
- CAknQueryDialog::ENoTone );
- dlg->SetPredictiveTextInputPermitted( ETrue );
-
- // If in APAC region, set dialog length dynamically.
- if ( PslnFeatures::IsAPACSupported() )
- {
- dlg->SetMaxLength( KPslnSsTextDialogAPACMaxLength );
- }
-
- TBool retValue = EFalse;
- // Show query for Screen saver txt.
- if( dlg->ExecuteLD( R_PSLN_SCREEN_SAVER_TEXT_QUERY_DIALOG ) )
- {
- retValue = ETrue;
- }
- CleanupStack::PopAndDestroy( displayText );
- return retValue;
- }
-
-
-// ---------------------------------------------------------------------------
-// CPslnModel::GetSkinFullName
-// ---------------------------------------------------------------------------
-//
-const TDesC& CPslnModel::GetSkinFullName( const TInt aItemIndex )
- {
- PSLN_TRACE_DEBUG("CPslnModel::GetSkinFullName");
- CPslnSkinEntry* skinEntry = VisibleSkin( aItemIndex );
- if ( skinEntry )
- {
- return skinEntry->FullName();
- }
- return KNullDesC;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::GetSkinNameByPID
-// -----------------------------------------------------------------------------
-//
-void CPslnModel::GetSkinNameByPID( const TAknsPkgID aPID, TDes& aSkinName,
- const TPslnSkinNameType aType ) const
- {
- PSLN_TRACE_DEBUG("CPslnModel::GetSkinNameByPID");
-
- aSkinName = KNullDesC;
-
- if( GetSeparatelyLocalizedSkinName( aPID, aSkinName, aType ) )
- {
- return;
- }
-
- if ( iSkinStore )
- {
- CPslnSkinEntry* entry = iSkinStore->Find( aPID, EAknsSrvAll );
- if ( entry )
- {
- entry->GetName( aSkinName );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CPslnModel::ActivateDefaultSkinL
-// ---------------------------------------------------------------------------
-//
-void CPslnModel::ActivateDefaultSkinL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::ActivateDefaultSkinL");
- GuardActivationLC();
- ActivateSkinL( KPslnSeries60SkinIndex );
- CleanupStack::PopAndDestroy(); // activation guard
- }
-
-// ---------------------------------------------------------------------------
-// Sets default text to parameter.
-// ---------------------------------------------------------------------------
-//
-void CPslnModel::GetDefaultTextToScreensaverL( TDes& aDisplayText )
- {
- PSLN_TRACE_DEBUG("CPslnModel::GetDefaultTextToScreensaverL");
- HBufC* strBuffer = NULL;
- strBuffer = StringLoader::LoadLC( R_PSLN_SCREEN_SAVER_DEFAULT_TEXT );
- if ( strBuffer )
- {
- aDisplayText = strBuffer->Des();
- }
- CleanupStack::PopAndDestroy( strBuffer );
- }
-
-// ---------------------------------------------------------------------------
-// Gets wallpaper item index. Same as above, but can leave.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnModel::GetWallPaperItemIndex()
- {
- PSLN_TRACE_DEBUG("CPslnModel::GetWallPaperItemIndexL");
- TInt itemIndex = KErrNotFound;
-
- TInt error = iSkinsRepository->Get( KPslnWallpaperType, itemIndex );
- if ( error != KErrNone )
- {
- itemIndex = KPslnDefaultItemIndex;
- }
- if ( itemIndex == KPslnDefaultItemIndex )
- {
- // Verify that key values are coherent.
- TFileName wallpaperPath;
- error = iSkinsRepository->Get( KPslnIdleBackgroundImagePath, wallpaperPath );
- if ( wallpaperPath.Length() > 0 )
- {
- // Wallpaper image is defined, but type is claimed as None.
- // Assume that image is desired.
- itemIndex = 1;
- }
- }
-
- return itemIndex;
- }
-
-// ---------------------------------------------------------------------------
-// Gets screensaver item index. Same as above, but can leave.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnModel::GetScreenSaverItemIndexL()
- {
- PSLN_TRACE_DEBUG("CPslnModel::GetScreenSaverItemIndexL");
- TInt screenObjectType = KErrNotFound;
- TInt error = KErrNone;
-
- if ( error != KErrNone )
- {
- return KErrNotFound;
- }
-
- if ( screenObjectType == KPslnSsNone && !IsSupportScreenSaverNoneOption() )
- {
- //if "none" option is not supported and the settings of cenrep is none
- //then change it to the default screen saver - "date".
- screenObjectType = KPslnSsDate;
- }
-
- switch ( screenObjectType )
- {
- case KPslnSsNone:
- return GetScreenSaverIndexByFileName(KPslnScreenSaverTypeNone);
- case KPslnSsDate:
- return GetScreenSaverIndexByFileName(KPslnScreenSaverTypeDateTime);
- case KPslnSsText:
- return GetScreenSaverIndexByFileName(KPslnScreenSaverTypeText);
- case KPslnSsObject:
- break;
- default:
- return KErrNotFound;
- }
-
- TInt itemIndex = KErrNotFound;
- HBufC* screenSaverFileName = HBufC::NewLC( KMaxFileName );
- TPtr ssFilePtr = screenSaverFileName->Des();
-
- // Try to look for ']'.
- TInt eqPos = ssFilePtr.Find( KPslnScreenSaverUidEndMark );
-
- // If not found, use the whole string.
- if( eqPos == KErrNotFound )
- {
- eqPos = ssFilePtr.Length();
- }
- // strip all characters right of it.
- ssFilePtr = ssFilePtr.Left( eqPos + 1 );
-
- if ( error == KErrNone && iScreensaverFilenameArr )
- {
- // Loop through all the screensavers.
- for( TInt i = 0; i < iScreensaverFilenameArr->MdcaCount(); i++ )
- {
- TPtrC ssNamePtr = GetRealScreenSaverUid( i );
- if( ssNamePtr.CompareF( ssFilePtr ) == 0 )
- {
- itemIndex = i;
- break;
- }
- }
- }
- CleanupStack::PopAndDestroy( screenSaverFileName );
- return itemIndex;
- }
-
-// ---------------------------------------------------------------------------
-// Dynamically loads AknsWallpaperUtils to memory.
-// ---------------------------------------------------------------------------
-//
-void CPslnModel::LoadWallpaperUtilsL()
- {
- // Wallpaper utils dll loading.
- if( iInternalState.IsClear( EPslnModelStateWallpaperDllLoaded ) )
- {
- PSLN_TRACE_DEBUG("CPslnModel::LoadWallpaperUtilsL about load");
- if( iWallpaperDll.Load( KPslnWallpaperUtilsLoaderName ) == KErrNone )
- {
- PSLN_TRACE_DEBUG("CPslnModel::LoadWallpaperUtilsL loaded");
- iInternalState.Set( EPslnModelStateWallpaperDllLoaded );
- // Request the entry function
- NewWallpaperUtilsL wallpaperUtils =
- (NewWallpaperUtilsL) iWallpaperDll.Lookup( KPslnDllEntryPoint );
- if( wallpaperUtils )
- {
- PSLN_TRACE_DEBUG("CPslnModel::LoadWallpaperUtilsL create");
- // Create the class
- iWallpaperSetter =
- (CPslnWallpaperUtilsLoader*) (*wallpaperUtils)();
- }
- }
- }
- if ( !iWallpaperSetter )
- {
- User::Leave( KErrNotFound );
- }
- }
-
-// -----------------------------------------------------------------------------
-// This function removes file information from ScreenSaver UID.
-// -----------------------------------------------------------------------------
-//
-TPtrC CPslnModel::GetRealScreenSaverUid( const TInt aIndex )
- {
- PSLN_TRACE_DEBUG("CPslnModel::GetRealScreenSaverUid");
- // Look for ']' - this indicates the end of screensaver UID.
- TInt eqPos =
- iScreensaverFilenameArr->MdcaPoint( aIndex ).Find(
- KPslnScreenSaverUidEndMark );
- // If not found, use the whole string.
- if( eqPos == KErrNotFound )
- {
- eqPos = iScreensaverFilenameArr->MdcaPoint( aIndex ).Length();
- }
- // strip all characters right of it.
- return iScreensaverFilenameArr->MdcaPoint( aIndex ).Left( eqPos + 1 );
- }
-
-// -----------------------------------------------------------------------------
-// This is leaving version of ActivateScreenSaver.
-// -----------------------------------------------------------------------------
-//
-void CPslnModel::ActivateScreenSaverL( const TInt aItemIndex,
- TPslnScreenSaverActivation aActivationType )
- {
- PSLN_TRACE_DEBUG("CPslnModel::ActivateScreenSaver");
-
- if ( aActivationType == EPslnScreenSaverPreviewActivation )
- {
- // get screen saver type to be previewed
- TInt previewSsType = GetScreensaverTypeByIndex( aItemIndex );
- if ( previewSsType == KErrNotFound )
- {
- User::Leave( KErrNotFound );
- }
-
- // create CScreenSaverInfo object to backup the current screensaver settings
- if ( !iScreenSaverInfo )
- {
- iScreenSaverInfo = CPslnScreenSaverInfo::NewL();
- }
-
- //set values to screen saver needed to preview
- if ( previewSsType == KPslnSsText )
- {
- // Load the default text.
- if ( iScreenSaverInfo->iScreenSaverTxt->Length() == 0 )
- {
- HBufC* screensaverText = HBufC::NewLC( KPslnMaxNumberOfScreenSaverText );
- TPtr ptr = screensaverText->Des();
-
- GetDefaultTextToScreensaverL( ptr );
- CleanupStack::PopAndDestroy(screensaverText);
- }
- }
- }
- else
- {
- User::Leave( KErrNotSupported );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Dynamically loads browser launcher dll to memory.
-// ---------------------------------------------------------------------------
-//
-void CPslnModel::LoadBrowserLaunchL()
- {
- // Browser launch dll loading.
- if( iInternalState.IsClear( EPslnModelStateBrowserLaunchDllLoaded ) )
- {
- PSLN_TRACE_DEBUG("CPslnModel::LoadBrowserLaunchL about load");
- if( iBrowserLaunchDll.Load( KPslnBrowserLaunchLoaderName ) == KErrNone )
- {
- PSLN_TRACE_DEBUG("CPslnModel::LoadBrowserLaunchL loaded");
- iInternalState.Set( EPslnModelStateBrowserLaunchDllLoaded );
- // Request the entry function
- NewBrowserLauncherL browserLaucnher =
- (NewBrowserLauncherL) iBrowserLaunchDll.Lookup( KPslnDllEntryPoint );
- if( browserLaucnher )
- {
- PSLN_TRACE_DEBUG("CPslnModel::LoadBrowserLaunchL create");
- // Create the class
- iBrowserLauncher =
- (CPslnBrowserLaunchLoader*) (*browserLaucnher)();
- }
- }
- }
- if ( !iBrowserLauncher )
- {
- User::Leave( KErrNotFound );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnModel::SkinFileExist
-// -----------------------------------------------------------------------------
-//
-TBool CPslnModel::SkinFileExist( const TInt& aIndex )
- {
- if( !IsThemeOnMemoryCard(aIndex) )
- {
- return ETrue;
- }
-
- TFileName fullname;
- fullname = GetSkinFullName( aIndex );
-
- TInt filehandle = 0;
- TInt fileserverhandle = iSkinSrvSession.OpenBitmapFile( fullname, filehandle );
-
- RFile file;
- TInt errorcode = file.AdoptFromServer( fileserverhandle, filehandle );
- file.Close();
-
- if ( errorcode == KErrNone )
- {
- return ETrue;
- }
-
- return EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// Used to notify the client about changes for integer value keys.
-// ---------------------------------------------------------------------------
-//
-void CPslnModel::HandleNotifyInt(TUint32 aId, TInt aNewValue)
- {
- if( aId == KThemesTransitionEffects )
- {
- iTransitionEffectValue = aNewValue;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Gets transition effect value and initialize CenRep notify handler.
-// ---------------------------------------------------------------------------
-//
-void CPslnModel::InitTransitionEffectVauleL()
- {
- iTransitionEffectValue = KErrNone;
-
- TInt error = iThemesAppRepository->Get( KThemesTransitionEffects, iTransitionEffectValue );
- if ( error != KErrNone || iTransitionEffectValue < 0 )
- {
- iTransitionEffectValue = KErrNotFound;
- }
-
- iThemesAppCenRepNotifyHandler =
- CCenRepNotifyHandler::NewL(*this, *iThemesAppRepository,
- CCenRepNotifyHandler::EIntKey, KThemesTransitionEffects);
- iThemesAppCenRepNotifyHandler->StartListeningL();
-
- }
-
-// -----------------------------------------------------------------------------
-// Get screen saver object type from index.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnModel::GetScreensaverTypeByIndex(TInt aIndex)
- {
- if(aIndex < 0 || aIndex >= iScreensaverFilenameArr->MdcaCount())
- {
- return KErrNotFound;
- }
-
- TPtrC ptr = iScreensaverFilenameArr->MdcaPoint(aIndex);
- if(ptr.Compare(KPslnScreenSaverTypeNone) == 0)
- {
- return KPslnSsNone;
- }
- if(ptr.Compare(KPslnScreenSaverTypeDateTime) == 0)
- {
- return KPslnSsDate;
- }
- if(ptr.Compare(KPslnScreenSaverTypeText) == 0)
- {
- return KPslnSsText;
- }
-
- return KPslnSsObject;
- }
-
-// ---------------------------------------------------------------------------
-// Get screensaver item index from filename
-// ---------------------------------------------------------------------------
-//
-TInt CPslnModel::GetScreenSaverIndexByFileName(const TDesC &aFileName) const
- {
- for( TInt i = 0; i < iScreensaverFilenameArr->MdcaCount(); i++ )
- {
- if( aFileName.Compare((*iScreensaverFilenameArr)[i]) == 0 )
- {
- return i;
- }
- }
- return KErrNotFound;
- }
-
-// ---------------------------------------------------------------------------
-// Get if the "None" screen saver is supported.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnModel::IsSupportScreenSaverNoneOption() const
- {
- return PslnFeatures::IsSupported( KPslnSupportScreenSaverSupportNoneOption );
- }
-
-
-
-// End of File
-
--- a/psln/pslnengine/src/PslnSkinEntry.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
-* Copyright (c) 2004-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: One skin entry in skin store.
-*
-*/
-
-
-#include <AknsSkinUID.h>
-
-#include "PslnConst.h"
-#include "PslnSkinEntry.h"
-#include "PslnDebug.h"
-
-// ============================ MEMBER FUNCTIONS =============================
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinEntry* CPslnSkinEntry::NewL( CAknsSrvSkinInformationPkg* aInfo )
- {
- CleanupStack::PushL( aInfo );
-
- CPslnSkinEntry* self = new( ELeave ) CPslnSkinEntry;
-
- self->iInfo = aInfo;
- self->iProtection = aInfo->ProtectionType();
- CleanupStack::Pop( aInfo );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinEntry::~CPslnSkinEntry()
- {
- delete iInfo;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::GetSkinPath
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CPslnSkinEntry::GetSkinPath( TDes& aDst ) const
- {
- CopyHonoringSize( aDst, iInfo->Directory() );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::IsCorrupted
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnSkinEntry::IsCorrupted() const
- {
- return iInfo->IsCorrupted();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::IsSupportAnimBg
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnSkinEntry::IsSupportAnimBg() const
- {
- return iInfo->IsSupportAnimBg();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::Protection
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TAknsSkinSrvSkinProtectionType CPslnSkinEntry::Protection() const
- {
- return iProtection;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::FullName
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TDesC& CPslnSkinEntry::FullName() const
- {
- return iInfo->FullName();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::IsOnMassDrive
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnSkinEntry::IsOnMassDrive() const
- {
- return iInternalState.IsSet( EPslnSkinEntryStateMassDrive );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::IsOnMemoryCard
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CPslnSkinEntry::IsOnMemoryCard() const
- {
- return iInternalState.IsSet( EPslnSkinEntryStateMemoryCard );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::GetIniPath
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinEntry::GetIniPath( TDes& aDst ) const
- {
- CopyHonoringSize( aDst, iInfo->IniFileDirectory() );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::SetProtection
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinEntry::SetProtection(
- const TAknsSkinSrvSkinProtectionType aProtection )
- {
- iProtection = aProtection;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::SetDeleteFlag
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinEntry::SetDeleteFlag( const TBool& aValue )
- {
- if ( aValue && iInternalState.IsClear( EPslnSkinEntryStateDeleted ) )
- {
- iInternalState.Set( EPslnSkinEntryStateDeleted );
- }
- else if ( !aValue && iInternalState.IsSet( EPslnSkinEntryStateDeleted ) )
- {
- iInternalState.Clear( EPslnSkinEntryStateDeleted );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::IsDeleteFlag
-// -----------------------------------------------------------------------------
-//
-TBool CPslnSkinEntry::IsDeleteFlag() const
- {
- return iInternalState.IsSet( EPslnSkinEntryStateDeleted );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::LinearOrder
-// -----------------------------------------------------------------------------
-//
-TInt CPslnSkinEntry::LinearOrder(
- const CPslnSkinEntry& aFirst,
- const CPslnSkinEntry& aSecond )
- {
- return CPslnSkinNameEntry::LinearOrder( aFirst, aSecond );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::SetMemoryCardFlag
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinEntry::SetMemoryCardFlag( const TBool& aValue )
- {
- if ( aValue && iInternalState.IsClear( EPslnSkinEntryStateMemoryCard ) )
- {
- iInternalState.Set( EPslnSkinEntryStateMemoryCard );
- }
- else if ( !aValue && iInternalState.IsSet( EPslnSkinEntryStateMemoryCard ) )
- {
- iInternalState.Clear( EPslnSkinEntryStateMemoryCard );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinEntry::SetMassDriveFlag
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinEntry::SetMassDriveFlag( const TBool& aValue )
- {
- if ( aValue && iInternalState.IsClear( EPslnSkinEntryStateMassDrive ) )
- {
- iInternalState.Set( EPslnSkinEntryStateMassDrive );
- }
- else if ( !aValue && iInternalState.IsSet( EPslnSkinEntryStateMassDrive ) )
- {
- iInternalState.Clear( EPslnSkinEntryStateMassDrive );
- }
- }
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinEntry::CPslnSkinEntry()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinEntry::ConstructL()
- {
- BaseConstructL( iInfo );
- }
-
-// End of File
--- a/psln/pslnengine/src/PslnSkinNameEntry.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
-* 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: Class defining a specific skin within Psln.
-*
-*/
-
-
-#include <AknsSkinUID.h>
-
-#include "PslnSkinNameEntry.h"
-#include "PslnConst.h"
-#include "PslnDebug.h"
-
-#ifdef RD_MULTIPLE_DRIVE
-#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
-
-// Compares Unicode values based on the value itself AND character identity
-// AND accent AND case.
-const TInt KPslnCollationLvl3 = 3;
-
-// ======== MEMBER FUNCTIONS ========
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinNameEntry* CPslnSkinNameEntry::NewL()
- {
- CPslnSkinNameEntry* self = new( ELeave ) CPslnSkinNameEntry;
- CleanupStack::PushL( self );
- self->BaseConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinNameEntry::~CPslnSkinNameEntry()
- {
- delete iName;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::GetName
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinNameEntry::GetName( TDes& aDst ) const
- {
- CopyHonoringSize( aDst, iName );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::SetNameL
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinNameEntry::SetNameL( const TDesC& aName )
- {
- HBufC* name = aName.AllocL();
- delete iName;
- iName = name;
- name = NULL;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::Location
-// -----------------------------------------------------------------------------
-//
-TAknSkinSrvSkinPackageLocation CPslnSkinNameEntry::Location() const
- {
- return iLocation;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::SetLocation
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinNameEntry::SetLocation(
- const TAknSkinSrvSkinPackageLocation aLocation )
- {
- iLocation = aLocation;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::PkgID
-// -----------------------------------------------------------------------------
-//
-TAknsPkgID CPslnSkinNameEntry::PkgID() const
- {
- return iPID;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::SetPkgID
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinNameEntry::SetPkgID( const TAknsPkgID& aPID )
- {
- iPID = aPID;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::LinearOrder
-// -----------------------------------------------------------------------------
-//
-TInt CPslnSkinNameEntry::LinearOrder(
- const CPslnSkinNameEntry& aFirst,
- const CPslnSkinNameEntry& aSecond )
- {
- // Default system skin is always less than anything else
- if( aFirst.iPID != aSecond.iPID )
- {
- if( aFirst.iPID == KAknsPIDProductDefaultSkin )
- {
- return -1;
- }
- if( aSecond.iPID == KAknsPIDProductDefaultSkin )
- {
- return 1;
- }
- }
-
- // If there are empty names, they are less than something else
- if( !aFirst.iName && aSecond.iName )
- {
- return -1;
- }
- if( aFirst.iName && !aSecond.iName )
- {
- return 1;
- }
- if( !aFirst.iName && !aSecond.iName )
- {
- return 0;
- }
-
- // Otherwise, compare names (they are NULL-checked at this point)
- PSLN_TRACE_DEBUG2("CPslnSkinNameEntry: Comparing \"%S\" and \"%S\"",
- aFirst.iName, aSecond.iName );
- return aFirst.iName->CompareC( *aSecond.iName, KPslnCollationLvl3, NULL );
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::LocationFromPath
-// -----------------------------------------------------------------------------
-//
-TAknSkinSrvSkinPackageLocation CPslnSkinNameEntry::LocationFromPath(
- const TDesC& aPath )
- {
-#ifndef RD_MULTIPLE_DRIVE
- TBuf<1> driveLetterBuf;
- driveLetterBuf.CopyUC( aPath.Left(1) );
- if( driveLetterBuf.Compare( KPslnMMCDriveLetter ) == 0 )
- {
- return EAknsSrvMMC;
- }
- return EAknsSrvPhone;
-#else
- RFs fs;
- if ( KErrNone != fs.Connect() )
- {
- // not sure the default value if failed
- return EAknsSrvPhone;
- }
-
- TInt drive = EDriveC;
- TUint driveStatus = 0;
- TAknSkinSrvSkinPackageLocation skinLoc = EAknsSrvPhone;
- TInt err = RFs::CharToDrive( aPath[0], drive );
- err = DriveInfo::GetDriveStatus( fs, drive, driveStatus );
- if ( driveStatus & DriveInfo::EDriveExternallyMountable )
- {
- skinLoc = EAknsSrvMMC;
- }
-
- fs.Close();
- return skinLoc;
-#endif // RD_MULTIPLE_DRIVE
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::CopyHonoringSize
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinNameEntry::CopyHonoringSize( TDes& aDst, const TDesC* aSrc )
- {
- if( aSrc )
- {
- CopyHonoringSize( aDst, *aSrc );
- }
- else
- {
- aDst.Zero();
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinNameEntry::CopyHonoringSize
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinNameEntry::CopyHonoringSize( TDes& aDst, const TDesC& aSrc )
- {
- aDst.Copy( aSrc.Left( aDst.MaxLength() ) );
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinNameEntry::BaseConstructL( CAknsSrvSkinInformationPkg* aInfo )
- {
- if ( aInfo )
- {
- SetLocation( LocationFromPath( aInfo->IniFileDirectory() ) );
- SetPkgID( aInfo->PID() );
- SetNameL( aInfo->Name() );
- }
- }
-
-// -----------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinNameEntry::CPslnSkinNameEntry()
- : iLocation( EAknsSrvPhone ), iPID( KAknsNullPkgID )
- {
- }
-
-// End of File.
-
-
--- a/psln/pslnengine/src/PslnSkinStore.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,381 +0,0 @@
-/*
-* Copyright (c) 2004-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: Skin store.
-*
-*/
-
-
-// INCLUDE FILES
-
-// Psln specific.
-#include "PslnSkinStore.h"
-#include "PslnModel.h"
-#include "PslnSkinEntry.h"
-#include "PslnDebug.h"
-
-// Repository
-#include <centralrepository.h>
-#include <AknSkinsInternalCRKeys.h>
-#include <AknsSkinUID.h>
-
-#ifdef RD_MULTIPLE_DRIVE
-#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
-
-void CleanupDeleteArray( TAny* aArray )
- {
- static_cast<RPointerArray<CPslnSkinNameEntry>*>
- (aArray)->ResetAndDestroy();
- delete aArray;
- aArray = NULL;
- }
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinStore::CPslnSkinStore()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinStore::ConstructL( CPslnModel* aModel )
- {
- iModel = aModel;
-
- CRepository* repository = CRepository::NewLC( KCRUidPersonalisation );
- TInt value = KAknsNullPkgID.iNumber;
- iDefaultSkinPID.Set( KAknsPIDS60DefaultSkin );
- TBuf<32> buf;
- TAknsPkgID defaultSkin = KAknsNullPkgID;
-
- TInt err = repository->Get( KPslnDefaultSkinUID, buf );
- if ( err != KErrNone || buf.Length() == 0 )
- {
- err = repository->Get( KPslnDefaultSkinID, value );
- if( err == KErrNone )
- {
- defaultSkin.Set( TUid::Uid( value ) );
- }
- }
- else
- {
- TInt bufLength = buf.Length();
- // If its 8 characters long, its UID.
- // PIDs are 16 characters (8 ID + 8 timestamp)
- if ( bufLength == 8 )
- {
- // Let's try to set it directly as Hex.
- TLex hexLex( buf );
- TUint pid;
- err = hexLex.Val( pid, EHex );
- if (!err)
- {
- // UIDs have no timestamp.
- defaultSkin.Set( 0, pid );
- }
- }
- else
- {
- // The skin PID is set in CenRep in format <PID1><PID2> and
- // values are in hex.
- TLex lex ( buf.Left( 8 ) );
- TLex lex2 ( buf.Right( 8 ) );
- TUint pid;
- TUint timeStamp;
- err = lex.Val( pid, EHex );
- if ( !err )
- {
- err = lex2.Val( timeStamp, EHex );
- }
- if ( !err )
- {
- defaultSkin.Set( timeStamp, pid );
- }
- }
- }
- iDefaultSkinPID = defaultSkin;
- CleanupStack::PopAndDestroy( repository );
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinStore* CPslnSkinStore::NewL( CPslnModel* aModel )
- {
- PSLN_TRACE_DEBUG("CPslnSkinStore::NewL");
-
- CPslnSkinStore* self = new( ELeave ) CPslnSkinStore;
- CleanupStack::PushL( self );
- self->ConstructL( aModel );
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSkinStore::~CPslnSkinStore()
- {
- iSkinArray.ResetAndDestroy();
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinStore::UpdateAllSkinsL
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinStore::UpdateAllSkinsL( RFs& aFsSession )
- {
- PSLN_TRACE_DEBUG("CPslnSkinStore::UpdateAllSkinsL");
-
- TInt i = KErrNone;
-
- // Mark all the existing skins
- for( ; i < iSkinArray.Count(); i++ )
- {
- CPslnSkinEntry* entry = iSkinArray[i];
- entry->SetDeleteFlag( ETrue );
- }
- UpdateAllSkinsL( EAknsSrvAll, aFsSession );
-
- // Remove any skins that haven't existed (they no longer exist)
- TInt skinCount = iSkinArray.Count() - 1;
- for( i = skinCount; i >= 0; i-- )
- {
- CPslnSkinEntry* entry = iSkinArray[i];
- if( entry && entry->IsDeleteFlag() )
- {
- delete entry;
- iSkinArray.Remove( i );
- }
- }
-
- // Then sort the array
- iSkinArray.Sort( CPslnSkinEntry::LinearOrder );
-
- // Finally, move default skin as first item in the array.
- i = KErrNotFound;
- skinCount = iSkinArray.Count() - 1;
- CPslnSkinEntry* entry = NULL;
- for( i = skinCount; i >= 0; i-- )
- {
- entry = iSkinArray[i];
- // move default theme first, if it is not already there.
- if ( ( entry->PkgID() == iDefaultSkinPID ) && ( i != 0 ) )
- {
- // Default skin found.
- iSkinArray.Remove( i );
- iSkinArray.Insert( entry, 0 );
- entry = NULL; // this is not owned by us.
- break;
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinStore::Find
-// -----------------------------------------------------------------------------
-//
-CPslnSkinEntry* CPslnSkinStore::Find( const TAknsPkgID& aPID,
- TAknSkinSrvSkinPackageLocation aLocation )
- {
- PSLN_TRACE_DEBUG("CPslnSkinStore::Find");
- TBool allLocations = ( aLocation == EAknsSrvAll );
- CPslnSkinEntry* entry = NULL;
-
- for( TInt i = 0; i < iSkinArray.Count(); i++ )
- {
- entry = iSkinArray[i];
-
- // If PID matches AND
- // location mathes (or is looking from all locations).
- if( ( entry && entry->PkgID() == aPID ) &&
- ( ( allLocations ) ||
- ( entry->Location() == aLocation ) ) )
- {
- // this entry is the one we are looking for.
- break;
- }
- else
- {
- entry = NULL;
- }
- }
-
- return entry;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinStore::UpdateOrAddL
-// -----------------------------------------------------------------------------
-//
-CPslnSkinEntry* CPslnSkinStore::UpdateOrAddL(
- CAknsSrvSkinInformationPkg* aInfo, RFs& aFsSession )
- {
- PSLN_TRACE_DEBUG("CPslnSkinStore::UpdateOrAddL");
-
- if( !aInfo )
- {
- User::Leave( KErrArgument );
- }
- CleanupStack::PushL( aInfo );
-
- CPslnSkinEntry* entry = Find( aInfo->PID(),
- CPslnSkinEntry::LocationFromPath( aInfo->IniFileDirectory() ) );
-
-#ifdef RD_MULTIPLE_DRIVE
- TInt drive = EDriveC;
- TUint driveStatus = 0;
- TFileName fileName;
-#endif // RD_MULTIPLE_DRIVE
-
- if( entry )
- {
-#ifdef RD_MULTIPLE_DRIVE
- entry->GetSkinPath( fileName );
- User::LeaveIfError( RFs::CharToDrive( fileName[0], drive ) );
- User::LeaveIfError( DriveInfo::GetDriveStatus(
- aFsSession, drive, driveStatus ) );
- if ( driveStatus & DriveInfo::EDriveExternallyMountable &&
- driveStatus & DriveInfo::EDriveRemovable )
- {
- entry->SetMemoryCardFlag( ETrue );
- }
- else if ( driveStatus & DriveInfo::EDriveExternallyMountable )
- {
- entry->SetMassDriveFlag( ETrue );
- }
-#endif // RD_MULTIPLE_DRIVE
-
- entry->SetProtection( aInfo->ProtectionType() );
- CleanupStack::PopAndDestroy( aInfo );
- }
- else
- {
- // Ownership of aInfo is transferred to CPslnSkinEntry.
- entry = CPslnSkinEntry::NewL( aInfo );
- CleanupStack::Pop( aInfo );
- CleanupStack::PushL( entry );
-
-#ifdef RD_MULTIPLE_DRIVE
- entry->GetSkinPath( fileName );
- User::LeaveIfError( RFs::CharToDrive( fileName[0], drive ) );
- User::LeaveIfError( DriveInfo::GetDriveStatus(
- aFsSession, drive, driveStatus ) );
- if ( driveStatus & DriveInfo::EDriveExternallyMountable &&
- driveStatus & DriveInfo::EDriveRemovable )
- {
- entry->SetMemoryCardFlag( ETrue );
- }
- else if ( driveStatus & DriveInfo::EDriveExternallyMountable )
- {
- entry->SetMassDriveFlag( ETrue );
- }
-#endif // RD_MULTIPLE_DRIVE
-
- // Using Append instead of InsertInOrderAllowRepeats, since localized
- // names are not fetched yet for all the items.
- User::LeaveIfError( iSkinArray.Append( entry ) );
- CleanupStack::Pop( entry );
- }
-
- return entry;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinStore::CreateNameArray
-// -----------------------------------------------------------------------------
-//
-RPointerArray<CPslnSkinNameEntry>* CPslnSkinStore::CreateNameArrayL()
- {
- PSLN_TRACE_DEBUG("CPslnSkinStore::CreateNameArray");
- RPointerArray<CPslnSkinNameEntry>* array =
- new RPointerArray<CPslnSkinNameEntry>();
-
- CleanupStack::PushL( TCleanupItem( CleanupDeleteArray, array ) );
-
- for( TInt i = 0; i < iSkinArray.Count(); i++ )
- {
- AppendEntryL( *array, i );
- }
- CleanupStack::Pop(); // TCleanupItem
-
- return array;
- }
-
-// -----------------------------------------------------------------------------
-// CPslnSkinStore::UpdateAllSkinsL
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinStore::UpdateAllSkinsL(
- TAknSkinSrvSkinPackageLocation aLocation, RFs& aFsSession )
- {
- PSLN_TRACE_DEBUG("CPslnSkinStore::UpdateAllSkinsL");
- CArrayPtr<CAknsSrvSkinInformationPkg>* srvArray =
- iModel->SkinSrvSession().EnumerateSkinPackagesL( aLocation );
-
- while( srvArray && srvArray->Count() )
- {
- CAknsSrvSkinInformationPkg* info = srvArray->At( 0 );
- TRAP_IGNORE( UpdateOrAddL( info, aFsSession )->SetDeleteFlag( EFalse ) );
- srvArray->Delete( 0 );
- }
-
- if ( srvArray )
- {
- srvArray->ResetAndDestroy();
- }
- delete srvArray;
- }
-
-// -----------------------------------------------------------------------------
-// Appends entry to array.
-// -----------------------------------------------------------------------------
-//
-void CPslnSkinStore::AppendEntryL(
- RPointerArray<CPslnSkinNameEntry>& aArray, const TInt aIndex )
- {
- PSLN_TRACE_DEBUG("CPslnSkinStore::AppendEntryL");
- // Get entry.
- CPslnSkinEntry* entry = iSkinArray[aIndex];
-
- // Get name entry.
- CPslnSkinNameEntry* nameEntry = NULL;
- nameEntry = CPslnSkinNameEntry::NewL();
- nameEntry->SetPkgID( entry->PkgID() );
- nameEntry->SetLocation( entry->Location() );
- PSLN_TRACE_DEBUG("CPslnSkinStore::AppendEntryL.2");
-
- // Get name for the entry.
- HBufC* skinName = HBufC::NewLC( KMaxName );
- TPtr skinNamePtr = skinName->Des();
- entry->GetName( skinNamePtr );
- nameEntry->SetNameL( skinNamePtr );
- CleanupStack::PopAndDestroy( skinName );
-
- if( aArray.Append( nameEntry ) )
- {
- User::Leave( KErrGeneral );
- }
- }
-
-// End of File
--- a/psln/pslnslidesetdialog/data/102823AC.rss Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 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: Resource definitions for project ?myapp
-*
-*/
-
-
-#include <ecom/registryinfov2.rh>
-
-RESOURCE REGISTRY_INFO theInfo
- {
- resource_format_version = RESOURCE_FORMAT_VERSION_2;
-
- dll_uid = 0x102823AC;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x102823AD;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x102823AE;
- version_no = 1;
- display_name = "Wallpaper";
- default_data = "0";
- opaque_data = "0";
- // This implementation CANNOT be overridden by a RAM-based plug-in
- rom_only = 1;
- },
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x102823AF;
- version_no = 1;
- display_name = "Screensaver";
- default_data = "0";
- opaque_data = "0";
- // This implementation CANNOT be overridden by a RAM-based plug-in
- rom_only = 1;
- }
- };
- }
- };
- }
-
-// End of File
--- a/psln/pslnslidesetdialog/data/pslnslidesetdialogrsc.rss Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,535 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource definitions for project pslnslidesetdialog.
-*
-*/
-
-NAME PSSD
-
-#include <psln.loc>
-#include <avkon.loc>
-#include <drmcommon.loc>
-#include <avkon.mbg>
-#include <avkon.rsg>
-#include <eikcore.rsg>
-#include <uikon.rh>
-#include <avkon.rh>
-#include <eikon.rh>
-#include "pslnslidesetdialog.hrh"
-#include "pslnslidesetdialog.rh"
-#include <pslnslidesetdialog.loc>
-
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF { buf=""; }
-
-// COMMON FOR ALL SLIDE SETS
-
-// ---------------------------------------------------------
-//
-// r_psln_settings_dialog
-// Slide set settings dialog.
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_psln_settings_dialog
- {
- flags = EAknDialogSelectionList;
- buttons = R_AVKON_SOFTKEYS_SELECTION_LIST;
- items =
- {
- DLG_LINE
- {
- type = EAknCtSettingListBox;
- id = ESelectionListControl;
- control = LISTBOX
- {
- flags = EAknListBoxSelectionList;
- };
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slide_dialog_menubar
-// Menu bar for slide set settings.
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_psln_slide_dialog_menubar
- {
- titles =
- {
- MENU_TITLE
- {
- menu_pane = r_psln_slide_dialog_menu;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slide_dialog_menu
-// Options menu items.
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_slide_dialog_menu
- {
- items =
- {
- MENU_ITEM
- {
- command = EPslnSlideSetCmdChange;
- txt = qtn_sanim_option_change;
- flags = EEikMenuItemAction;
- },
- MENU_ITEM
- {
- command = EAknCmdHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_options_exit;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_msk_change
-// Middle softkey label: change.
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_msk_change
- {
- buf = qtn_msk_change;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_setting_listbox
-// Slide set type selection listbox.
-// -----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_psln_setting_listbox
- {
- flags = EEikListBoxMultipleSelection;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_property_menubar
-// Setting page menubar.
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_psln_property_menubar
- {
- titles =
- {
- MENU_TITLE
- {
- menu_pane = r_psln_slide_dialog_menu;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_image_selection_setting_page
-// Slide set type (random/image list) selection setting page.
-// Bad name as this can be used as a general setting page editor.
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_psln_image_selection_setting_page
- {
- menubar = r_psln_property_menubar;
- number = EAknSettingPageNoOrdinalDisplayed;
- softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- type = EAknSetListBox;
- editor_resource_id = r_psln_setting_listbox;
- }
-
-// SCREENSAVER SLIDE SET SPECIFIC
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_screensaver_slide_setting_lbx
-// Screen saver slide set settings listbox.
-// -----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_psln_screensaver_slide_setting_lbx
- {
- array_id = r_psln_screensaver_slide_setting_lbx_items;
- flags = EEikListBoxMultipleSelection;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_screensaver_slide_setting_lbx_items
-// Screen saver slide set setting items.
-// -----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_psln_screensaver_slide_setting_lbx_items
- {
- items =
- {
- LBUF
- {
- txt = "\t"qtn_sanim_list_slide_images"\t\t";
- },
- LBUF
- {
- txt = "\t"qtn_sanim_list_anim_timeout"\t\t";
- },
- LBUF
- {
- txt = "\t"qtn_sanim_list_light_timeout"\t\t";
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slideset_screensaver_dialog_title
-// Title for screensaver settings.
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_slideset_screensaver_dialog_title
- {
- buf = qtn_sanim_title_settings;
- }
-
-//----------------------------------------------------
-//
-// r_backlight_slider
-// Backlight slider setting page.
-//----------------------------------------------------
-//
-RESOURCE SLIDER r_psln_backlight_slider
- {
- layout = EAknSettingsItemSliderLayout;
- minvalue = 0;
- maxvalue = 30;
- step = 1;
- valuetype = EAknSliderValueBareFigure;
- singular_valuelabel = qtn_sanim_duration_slider_ykcur;
- minlabel = qtn_sanim_slider_off;
- maxlabel = qtn_sanim_slider_max_secs;
- valuelabel = qtn_sanim_slider_context_value_secs;
- }
-
-//----------------------------------------------------
-//
-// r_psln_duration_slider
-// Duration slider setting page.
-//----------------------------------------------------
-//
-RESOURCE SLIDER r_psln_duration_slider
- {
- layout = EAknSettingsItemSliderLayout;
- minvalue = 1;
- maxvalue = 60;
- step = 1;
- valuetype = EAknSliderValueBareFigure;
- singular_valuelabel = qtn_sanim_duration_slider_ykcur;
- minlabel = qtn_sanim_duration_slider_min;
- maxlabel = qtn_sanim_duration_slider_max;
- valuelabel = qtn_sanim_duration_slider_cur;
- }
-
-//----------------------------------------------------
-//
-// r_psln_duration_slide_page_title
-// Title for screensaver duration setting page.
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_duration_slide_page_title
- {
- buf = qtn_sanim_list_anim_timeout;
- }
-
-//----------------------------------------------------
-//
-// r_psln_images_slide_ss_page_title
-// Title for screensaver images setting page.
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_images_slide_ss_page_title
- {
- buf = qtn_sanim_list_slide_images;
- }
-
-//----------------------------------------------------
-//
-// r_psln_images_slide_page_title
-// Title for screensaver timeout setting page.
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_backlight_slide_page_title
- {
- buf = qtn_sanim_list_light_timeout;
- }
-
-
-// WALLPAPER SLIDE SET SPECIFIC
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_wallpaper_slide_setting_lbx
-// Wallpaper slide set settings listbox.
-// -----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_psln_wallpaper_slide_setting_lbx
- {
- array_id = r_psln_wallpaper_slide_setting_lbx_items;
- flags = EEikListBoxMultipleSelection;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_wallpaper_slide_setting_lbx_items
-// Wallpaper slide set setting items.
-// -----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_psln_wallpaper_slide_setting_lbx_items
- {
- items =
- {
- LBUF
- {
- txt = "\t"qtn_skins_list_wp_images"\t\t";
- },
- LBUF
- {
- txt = "\t"qtn_skins_list_wp_interval"\t\t";
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slideset_wallpaper_dialog_title
-// Title for wallpaper settings.
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_slideset_wallpaper_dialog_title
- {
- buf = qtn_skins_title_settings;
- }
-
-//----------------------------------------------------
-//
-// r_psln_images_slide_wp_page_title
-// Title for wallpaper images setting page.
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_images_slide_wp_page_title
- {
- buf = qtn_skins_list_wp_images;
- }
-
-//----------------------------------------------------
-//
-// r_psln_interval_slide_page_title
-// Title for wallpaper interval setting page.
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_interval_slide_page_title
- {
- buf = qtn_skins_list_wp_interval;
- }
-
-//----------------------------------------------------
-//
-// r_psln_slide_set_image_corrupted
-// Text for corrupted image error note.
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_slide_set_image_corrupted
- {
- buf = qtn_skins_image_format_wrong;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slide_set_drm_error
-// Text for DRM error note.
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_slide_set_drm_error
- {
- buf = qtn_drm_prev_rights_set;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slide_set_wp_images
-// Text for wallpaper images.
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_slide_set_wp_images
- {
- buf = qtn_skins_wp_nimages;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slide_set_ss_images
-// Text for screensaver images.
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_slide_set_ss_images
- {
- buf = qtn_sanim_slide_set_nimages;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slide_set_wp_image
-// Text for wallpaper image.
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_slide_set_wp_image
- {
- buf = qtn_skins_wp_image;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_psln_slide_set_ss_image
-// Text for screensaver image.
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_slide_set_ss_image
- {
- buf = qtn_sanim_slide_set_image;
- }
-
-//----------------------------------------------------
-//
-// r_psln_slideset_type_wp_setting_page_lbx
-// Setting page items for slide set type.
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_psln_slideset_type_wp_setting_page_lbx
- {
- items =
- {
- LBUF
- {
- txt = qtn_skins_wp_user_defined;
- },
- LBUF
- {
- txt = qtn_skins_wp_random;
- }
- };
- }
-
-//----------------------------------------------------
-//
-// r_psln_slideset_type_ss_setting_page_lbx
-// Setting page items for slide set type.
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_psln_slideset_type_ss_setting_page_lbx
- {
- items =
- {
- LBUF
- {
- txt = qtn_sanim_slide_set_user_defined;
- },
- LBUF
- {
- txt = qtn_sanim_slide_set_random;
- }
- };
- }
-
-//----------------------------------------------------
-//
-// r_psln_slideset_interval_1_minute
-// Interval duration text - 1 minute.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_slideset_interval_1_minute
- {
- buf = qtn_skins_wp_minute;
- }
-
-//----------------------------------------------------
-//
-// r_psln_slideset_interval_10_minute
-// Interval duration text - 10 minutes.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_slideset_interval_10_minute
- {
- buf = qtn_skins_wp_ten_minutes;
- }
-
-//----------------------------------------------------
-//
-// r_psln_slideset_interval_30_minute
-// Interval duration text - 30 minutes.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_slideset_interval_30_minute
- {
- buf = qtn_skins_wp_minutes;
- }
-
-//----------------------------------------------------
-//
-// r_psln_slideset_interval_1_hour
-// Interval duration text - 1 hour.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_slideset_interval_1_hour
- {
- buf = qtn_skins_wp_hour;
- }
-
-//----------------------------------------------------
-//
-// r_psln_slideset_interval_1_day
-// Interval duration text - 1 day.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_slideset_interval_1_day
- {
- buf = qtn_skins_wp_day;
- }
-
-//----------------------------------------------------
-//
-// r_psln_sanim_slider_off
-// Backlight Off text.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_psln_sanim_slider_off
- {
- buf = qtn_sanim_slider_off;
- }
-
-//End of File
-
--- a/psln/pslnslidesetdialog/group/bld.inf Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project pslnslidesetdialog.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// Loc file exports
-../loc/pslnslidesetdialog.loc MW_LAYER_LOC_EXPORT_PATH(pslnslidesetdialog.loc)
-
-PRJ_MMPFILES
-pslnslidesetdialog.mmp
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
--- a/psln/pslnslidesetdialog/group/pslnslidesetdialog.mmp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project pslnslidesetdialog.
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET pslnslidesetdialog.dll
-TARGETTYPE PLUGIN
-UID 0x10009D8D 0x102823AC
-
-CAPABILITY CAP_ECOM_PLUGIN
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE pslnslidesetdialog.cpp
-SOURCE pslnslidesetimplementationtable.cpp
-SOURCE pslnslidesetwallpaperdialog.cpp
-SOURCE pslnslidesetscreensaverdialog.cpp
-SOURCE pslnslidesetmodel.cpp
-SOURCE pslnslidesetdrmverifier.cpp
-
-SOURCEPATH ../data
-START RESOURCE 102823AC.rss
-TARGET pslnslidesetdialog.rsc
-END
-
-START RESOURCE pslnslidesetdialogrsc.rss
-HEADER
-TARGETPATH RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE ../inc
-USERINCLUDE ../data
-USERINCLUDE ../../Inc
-
-// This is a SYSTEMINCLUDE macro containing the application
-// layer specific include directories
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY bafl.lib
-LIBRARY euser.lib
-LIBRARY ecom.lib
-LIBRARY avkon.lib
-LIBRARY eikcoctl.lib
-LIBRARY eikctl.lib
-LIBRARY eikcore.lib
-LIBRARY eikdlg.lib
-LIBRARY featmgr.lib
-LIBRARY cone.lib
-LIBRARY efsrv.lib
-LIBRARY commonengine.lib
-LIBRARY cdlengine.lib
-LIBRARY centralrepository.lib
-LIBRARY drmhelper.lib
-LIBRARY hlplch.lib
-LIBRARY mgfetch.lib
-LIBRARY aknskinsrv.lib
-LIBRARY aknswallpaperutils.lib
-
-// End of File
\ No newline at end of file
--- a/psln/pslnslidesetdialog/inc/pslnslidesetconst.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 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: Constant definitions for Slide set dialog.
-*
-*/
-
-
-#ifndef PSLNSLIDESETCONST_H
-#define PSLNSLIDESETCONST_H
-
-// Image selection: index for Image selection.
-const TInt KPslnSlideSetImageSelImageSet = 0;
-
-// Image selection: index for Random
-const TInt KPslnSlideSetRandomIndex = 1;
-
-// UID of Personlisation application
-const TUid KUidPsln = { 0x10005A32 };
-
-// Feature IDs.
-enum
- {
- // Random slide set selection.
- EPslnSlideSetFeatureRandom,
- // Remove Back Light Setting
- EPslnSlideSetBacklightRemoved,
-
- /*Intert new item here*/
-
- // last feature should be max value
- KPslnMaxFeatureID
- };
-
-
-#endif // PSLNSLIDESETCONST_H
--- a/psln/pslnslidesetdialog/inc/pslnslidesetconst.hrh Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 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: Resource headers for project pslnslidesetdialog
-*
-*/
-
-
-#ifndef PSLNSLIDESET_HRH
-#define PSLNSLIDESET_HRH
-
-// Slide set interval values for wallpaper slide sets.
-enum TPslnSlideSetInterval
- {
- EPslnSlideSetInterval1Min = 0,
- EPslnSlideSetInterval10Min,
- EPslnSlideSetInterval30Min,
- EPslnSlideSetInterval1Hour,
- EPslnSlideSetInterval1Day,
- };
-
-#endif // PSLNSLIDESET_HRH
--- a/psln/pslnslidesetdialog/inc/pslnslidesetdialog.hrh Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 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: Resource headers for project PslnSlideSetDialog
-*
-*/
-
-
-#ifndef PSLNSLIDESETDIALOG_HRH
-#define PSLNSLIDESETDIALOG_HRH
-
-// Listbox item ids.
-// EPslnSlideSetImagesId and EPslnSlideSetDurationId are used by both wallpaper
-// and screensaver dialogs, but EPslnSlideSetBacklightId is screensaver dialog
-// specific.
-enum TPslnSlideSetSettingListItemIDs
- {
- EPslnSlideSetImagesId = 0,
- EPslnSlideSetDurationId,
- EPslnSlideSetBacklightId,
- EPslnSlideSetIntervalId
- };
-
-// Menu commands
-enum TPslnSlideSetSettingMenuCommands
- {
- EPslnSlideSetCmdChange = 5001,
- EPslnCmdAppSetScreenSaver,
- EPslnCmdAppSetWallpaper,
- EPslnCmdNone
- };
-
-// Define custom control data.
-enum { EPslnSlideSetDialogCustomControlData = 1 };
-
-//
-enum { EPslnSlideSetCustControl = 5001 };
-
-enum { EPslnSettingImage = 1,
- EPsknSettingDuration,
- EPslnSettingInterval,
- EPslnSetingBacklight };
-
-#endif // PSLNSLIDESETDIALOG_HRH
-
-// End of file.
--- a/psln/pslnslidesetdialog/inc/pslnslidesetdialog.rh Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 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:
-*
-*/
-
-
-#ifndef PSLNSLIDESETDIALOG_RH
-#define PSLNSLIDESETDIALOG_RH
-
-// STRUCTURE DEFINITIONS
-
-// -----------------------------------------------------------------------------
-// PSLN_SLIDE_SET_CUST_CONTROL
-//
-// -----------------------------------------------------------------------------
-//
-
-STRUCT PSLN_SLIDE_SET_CUST_CONTROL
- {
- }
-#endif // PSLNSLIDESETDIALOG_RH
-
-// End of File
--- a/psln/pslnslidesetdialog/inc/pslnslidesetdrmverifier.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 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: Verifies that selected files are valid from DRM point of view.
-*
-*/
-
-
-#ifndef C_PSLNSLIDESETDRMVERIFIER_H
-#define C_PSLNSLIDESETDRMVERIFIER_H
-
-
-#include <e32base.h>
-#include <badesca.h>
-#include <MMGFetchVerifier.h>
-
-class CDRMHelper;
-
-/**
- * Verifies that selected files are correct from DRM point of view.
- *
- * @lib pslnslidesetdialog.dll
- * @since S60 3.2
-*/
-NONSHARABLE_CLASS( CPslnSlideSetDRMVerifier ) :
- public CBase, public MMGFetchVerifier
- {
-public:
-
- /**
- * Two-phased constructor.
- * @param aType type of dialog.
- * @return new instance of CPslnSlideSetDRMVerifier.
- */
- static CPslnSlideSetDRMVerifier* NewL( TInt aType );
-
- /**
- * Destructor.
- */
- ~CPslnSlideSetDRMVerifier();
-
- /**
- * From MFLDFileObserver.
- */
- TBool VerifySelectionL( const MDesCArray* aSelectedFiles );
-
-private:
-
- // Shows error note.
- void ShowErrorNoteL( TInt aResourceId ) const;
-
- /**
- * C++ constructor.
- */
- CPslnSlideSetDRMVerifier( TInt aType );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
-private: // Data
-
- /**
- * DRM helper.
- * Own.
- */
- CDRMHelper* iDRMHelper;
-
- /**
- * Type of slide set (wallpaper / screensaver).
- */
- TInt iType;
- };
-
-
-#endif // C_PSLNSLIDESETDRMVERIFIER_H
--- a/psln/pslnslidesetdialog/inc/pslnslidesetmodel.h Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slide set settings model.
-*
-*/
-
-
-#ifndef C_PSLNSLIDESETMODEL_H
-#define C_PSLNSLIDESETMODEL_H
-
-#include <e32base.h>
-#include <badesca.h>
-
-class CRepository;
-
-/**
- * This is model class for slide set settings.
- *
- * It stores and retrieves setting values.
- *
- * @lib pslnslidesetsettings.lib
- * @since S60 v3.2
- */
-NONSHARABLE_CLASS( CPslnSlideSetModel ): public CBase
- {
-public:
-
- /**
- * Symbian OS two-phased constructor
- * @return CPslnSlideSetModel instance.
- */
- static CPslnSlideSetModel* NewL();
-
- /**
- * Symbian OS two-phased constructor
- * @return CPslnSlideSetModel instance.
- */
- static CPslnSlideSetModel* NewLC();
-
- /**
- * Destructor.
- */
- virtual ~CPslnSlideSetModel();
-
- /**
- * Returns current selection for slide set type: random / image set.
- *
- * @param aSlideSetType slide set type: wallpaper / screensaver.
- * @return current value for slide set type. In case of error,
- * default value is returned.
- */
- TInt GetSlideSetType( const TInt aSlideSetType ) const;
-
- /**
- * Stores new slide set image selection type value to repository
- *
- * @param aSlideSetType slide set type: wallpaper / screensaver.
- * @param aValue new value for slide set image selection type.
- * @return KErrNone, if operation is successful; otherwise either
- * repository given error code, or if the aValue is not
- * valid, KErrArgument.
- */
- TInt SetSlideSetType( const TInt aSlideSetType, const TInt aValue );
-
- /**
- * Returns current selection for screensaver slide set duration.
- *
- * @return current value for slide set type. In case of error,
- * default value is returned.
- */
- TInt GetSlideSetDuration() const;
-
- /**
- * Stores new slide set duration value to repository.
- *
- * @param aValue new value for slide set duration.
- * @return KErrNone, if operation is successful; otherwise either
- * repository given error code, or if the aValue is not
- * valid, KErrArgument.
- */
- TInt SetSlideSetDuration( const TInt aValue );
-
- /**
- * Returns current selection for screensaver slide set backlight period.
- *
- * @return current value for slide set backlight period. In case of error,
- * default value is returned.
- */
- TInt GetSlideSetBacklight() const;
-
- /**
- * Stores new slide set backlight period value to repository.
- *
- * @param aValue new value for slide set backlight period.
- * @return KErrNone, if operation is successful; otherwise either
- * repository given error code, or if the aValue is not
- * valid, KErrArgument.
- */
- TInt SetSlideSetBacklight( const TInt aValue );
-
- /**
- * Returns current selection for screensaver slide set image interval.
- *
- * @return current value for slide set image interval. In case of error,
- * default value is returned.
- */
- TInt GetSlideSetInterval() const;
-
- /**
- * Stores new slide set image interval value to repository.
- *
- * @param aValue new value for slide set image interval.
- * @return KErrNone, if operation is successful; otherwise either
- * repository given error code, or if the aValue is not
- * valid, KErrArgument.
- */
- TInt SetSlideSetInterval( const TInt aValue );
-
- /**
- * Stores list of image filenames to be used as slide set image set.
- *
- * @param aSelectedFiles list of files to set as wallpaper slide set.
- */
- void SetImageListL(
- const TInt aSlideSetType,
- CDesCArray& aSelectedFiles,
- const TInt aLaunchMode );
-
- /**
- * Checks if the slide set file exists.
- *
- * @param aSlideSetType type of slide set (wallpaper/screensaver).
- * @return ETrue if file exists, otherwise EFalse.
- */
- TBool SlideSetImageFileExistsL( const TInt aSlideSetType ) const;
-
- /**
- * Checks if there has been changes to image list.
- *
- * @return ETrue if image list has been changed, EFalse otherwise.
- */
- TBool HasDialogUpdatedValues() const;
-
- /**
- * Count the number of images in the image file.
- * @param aSlideSetType type of slide set (wallpaper/screensaver).
- * @return number of images in the file, or zero if no file exists.
- */
- TInt GetImageCountInSlideSetL( const TInt aSlideSetType ) const;
-
- /**
- * Sets feature support - see pslnslidesetconst.h for feature list.
- * @param aFeatureBitFlags feature support bitflags.
- */
- void GetFeatureSupportL( TBitFlags& aFeatureBitFlags ) const;
-
-private:
-
- /**
- * C++ constructor.
- */
- CPslnSlideSetModel();
-
- /**
- * Symbian 2nd phase constructor.
- */
- void ConstructL();
-
- /**
- * Stores image list to a file.
- */
- void StoreImageListToFileL(
- const TInt aSlideSetType, CDesCArray& aSelectedFiles ) const;
-
- /**
- * Opens image list file for operations.
- */
- void OpenImageFileL( RFile& aImageFile, const TInt aSlideSetType ) const;
-
-private: // data
-
- /**
- * Central repository object. Used for storing and retrieving data.
- * Own.
- */
- CRepository* iRepository;
-
- /**
- * Indicates if the slide set image list has been changed.
- */
- TBool iImageListChanged;
-
- /**
- * Coe environment reference.
- * Own.
- */
- CCoeEnv* iCoeEnv;
- };
-
-
-#endif // C_PSLNSLIDESETMODEL_H
--- a/psln/pslnslidesetdialog/loc/pslnslidesetdialog.loc Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +0,0 @@
-/*
-* Copyright (c) 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: Localization strings for project pslnslidesetdialog.
-*
-*/
-
-
-/*
- The syntax of a logical name entry in this file is the following:
-
- // d:context description (line 1)
- // d:context description (line N)
- // l:layout id
- // w:
- // r:release information
- //
- #define qtn_<?feature_or_application>_?freetext "?text"
-
- where
- "qtn_" starts a logical name. Note: "text_" has been used in
- old logical names, but is deprecated.
- "?feature/application" is 2-5 lower-case characters and/or numbers
- identifying the larger context of the display text.
- "?freetext" is the free text portion of the logical name.
- It may contain only lower-case letters ('a' to 'z'), numbers
- ('0' to '9'), and the underscore ('_'). The total length of
- the logical name does must not exceed 50 characters.
- "d:" Starts a description line clarifying the entry's context with
- information like:
- - Is a word a verb in imperative or is it a noun? (For instance,
- what does "Set" mean?)
- - What will replace %U (unicode text parameter) or %N (number
- parameter) included in texts? (For instance, is it a phone
- number or an e-mail address?)
- "l:" Starts a layout id information (one line).
- "P" and "No" are symbols in LAF's information table
- - "P" is parent pane or current pane
- - "No" is reference number in table
- "r:" Starts a release information: one line indicating in which
- S60 release the text was used for the first time.
-
- Refer to the S60 localization instructions for more information.
-
-*/
-
-// COMMON
-
-// d:Slide set settings command in options menu.
-// d:Opens settings view for the slide set.
-// l:list_single_popup_menu_pane_1
-// r:3.2
-//
-#define qtn_sanim_option_change "Change"
-
-// SCREENSAVER SLIDE SET
-
-// d:Text in title pane when slide set screensaver settings
-// d:are defined.
-// l:title_pane_1
-// r:3.2
-//
-#define qtn_sanim_title_settings "Settings"
-
-// d:Text of a list item in slide set dialog's list.
-// d:Item opens Images setting view.
-// l:list_setting_pane_1
-// r:3.2
-//
-#define qtn_sanim_list_slide_images "Images"
-
-// d:Text of a list item in slide set dialog's list.
-// d:Item opens Duration setting view.
-// l:list_setting_pane_1
-// r:3.2
-//
-#define qtn_sanim_list_anim_timeout "Duration"
-
-// d:Text of a list item in slide set dialog's list.
-// d:Item opens Backlight setting view.
-// l:list_setting_pane_1
-// r:3.2
-//
-#define qtn_sanim_list_light_timeout "Backlight"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Images setting.
-// l:list_set_graphic_pane_t1
-// r:3.2
-//
-#define qtn_skins_wp_nimages "%N images"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Images setting.
-// l:list_set_graphic_pane_t1
-// r:3.2
-//
-#define qtn_skins_wp_image "1 image"
-
-// d:Text in slider control.
-// d:Minimum setting value for Slide set duration.
-// l:slider_set_pane_2
-// r:3.2
-//
-#define qtn_sanim_duration_slider_min "1 sec."
-
-// d:Text in slider control.
-// d:Maximum setting value for Slide set duration.
-// l:slider_set_pane_2
-// r:3.2
-//
-#define qtn_sanim_duration_slider_max "60 sec."
-
-// d:Text in setting list item's current value field
-// d:Context specific text for singular current value.
-// d: %U will be replaced by the slider setting page's
-// d: minimum value (=1)
-// l:list_setting_pane_2
-// r:3.2
-//
-#define qtn_sanim_duration_slider_ykcur "%U second"
-
-// d:Text in setting list item's current value field
-// d:Context specific text for plural current value.
-// d: %U will be replaced by the slider setting page's
-// d: current value.
-// l:list_setting_pane_2
-// r:3.2
-//
-#define qtn_sanim_duration_slider_cur "%U seconds"
-
-// d:Text in slider control.
-// d:Minimum setting value for Slide set Backlight.
-// d:Backlight is turned off.
-// l:slider_set_pane_2
-// r:3.2
-//
-#define qtn_sanim_slider_off "Off"
-
-// d:Text in slider control.
-// d:Maximum setting value for Slide set Backlight.
-// l:slider_set_pane_2
-// r:3.2
-//
-#define qtn_sanim_slider_max_secs "30 secs."
-
-// d:Text in setting list item's current value field
-// d:Context specific text for current value.
-// d: %U will be replaced by the slider setting page's
-// d: current value.
-// l:list_setting_pane_2
-// r:3.2
-//
-#define qtn_sanim_slider_context_value_secs "%U seconds"
-
-// WALLPAPER SLIDE SET
-
-// d:Text in title pane when slide set wallpaper settings
-// d:are defined.
-// l:title_pane_1
-// r:3.2
-//
-#define qtn_skins_title_settings "Settings"
-
-// d:Text of a list item in slide set dialog's list.
-// d:Item opens Images setting view.
-// l:list_setting_pane_1
-// r:3.2
-//
-#define qtn_skins_list_wp_images "Images"
-
-// d:Text of a list item in slide set dialog's list.
-// d:Item opens Interval setting view.
-// l:list_setting_pane_1
-// r:3.2
-//
-#define qtn_skins_list_wp_interval "Interval"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Images setting.
-// l:list_set_graphic_pane_t1
-// r:3.2
-//
-#define qtn_sanim_slide_set_nimages "%N images"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Images setting.
-// l:list_set_graphic_pane_t1
-// r:3.2
-//
-#define qtn_sanim_slide_set_image "1 image"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Interval period.
-// l:list_setting_pane_2
-// r:3.2
-//
-#define qtn_skins_wp_minute "1 minute"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Interval period.
-// l:list_setting_pane_2
-// r:3.2
-//
-#define qtn_skins_wp_ten_minutes "10 minutes"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Interval period.
-// l:list_setting_pane_2
-// r:3.2
-//
-#define qtn_skins_wp_minutes "30 minutes"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Interval period.
-// l:list_setting_pane_2
-// r:3.2
-//
-#define qtn_skins_wp_hour "1 hour"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for slide set Interval period.
-// l:list_setting_pane_2
-// r:3.2
-//
-#define qtn_skins_wp_day "1 day"
-
-// d:Text in setting list item's current value field
-// d:Setting value for Slide set Image type.
-// d: Opens multi-selection image fetch dialog.
-// l:list_set_graphic_pane_t1
-// r:3.2
-//
-#define qtn_sanim_slide_set_user_defined "User Defined"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for Slide set Image type.
-// d:Sets image selection as random.
-// l:list_set_graphic_pane_t1
-// r:3.2
-//
-#define qtn_sanim_slide_set_random "Random"
-
-// d:Text in setting list item's current value field
-// d:Setting value for Slide set Image type.
-// d: Opens multi-selection image fetch dialog.
-// l:list_set_graphic_pane_t1
-// r:3.2
-//
-#define qtn_skins_wp_user_defined "User Defined"
-
-// d:Text in setting list item's current value field.
-// d:Setting value for Slide set Image type.
-// d:Sets image selection as random.
-// l:list_set_graphic_pane_t1
-// r:3.2
-//
-#define qtn_skins_wp_random "Random"
--- a/psln/pslnslidesetdialog/src/pslnslidesetdialog.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,996 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slide set dialog base class.
-*
-*/
-
-
-// General.
-#include <e32std.h>
-#include <barsread.h>
-#include <data_caging_path_literals.hrh>
-#include <hlplch.h>
-
-// UI components.
-#include <avkon.hrh>
-#include <AknUtils.h>
-#include <aknappui.h>
-#include <aknnavi.h>
-#include <akntitle.h>
-#include <aknlists.h>
-#include <aknradiobuttonsettingpage.h>
-#include <aknslidersettingpage.h>
-#include <AknsSrvClient.h>
-
-#include <AknsWallpaperUtils.h>
-#include <centralrepository.h>
-#include <AknSkinsInternalCRKeys.h>
-
-// Other services.
-#include <MGFetch.h>
-#include <StringLoader.h>
-#include <featmgr.h>
-
-// Psln slide set specific.
-#include "pslnslidesetdialog.h"
-#include "pslnslidesetmodel.h"
-#include "pslnslidesetdrmverifier.h"
-#include "pslnslidesetconst.h"
-
-// Local resources and definitions.
-#include "pslnslidesetdialog.hrh"
-#include <pslnslidesetdialogrsc.rsg>
-#include <bautils.h>
-
-// CONSTANTS
-// Image fetch granularity.
-const TInt KPslnSlideSetImagesGranualarity = 6;
-// Middle softkey command ID
-const TInt KPslnMSKControlID = 3;
-// Size of ending '\t' in string.
-const TInt KPslnStringEndMarkSize = 2;
-// Length of setting item value.
-const TInt KPslnSettingItemLength = 64;
-
-// Path to compiled resource file.
-_LIT( KPslnSlideSetDialogResourceFileName,
- "z:pslnslidesetdialogrsc.rsc" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-void CPslnSlidesetDialog::BaseConstructL( const TInt aType )
- {
- FeatureManager::InitializeLibL();
-
- // Validate type parameter.
- if ( aType != EPslnScreensaverDialog &&
- aType != EPslnWallpaperDialog )
- {
- User::Leave( KErrArgument );
- }
- iType = aType;
-
- iModel = CPslnSlideSetModel::NewL();
- // Feature support should only be read once. It should not change run-time.
- iModel->GetFeatureSupportL( iFeaturesSupport );
-
- // Find the resource file:
- TParse* parse = new (ELeave) TParse;
- CleanupStack::PushL( parse );
- parse->Set(
- KPslnSlideSetDialogResourceFileName,
- &KDC_RESOURCE_FILES_DIR, NULL );
-
- TFileName* fileName = new (ELeave) TFileName( parse->FullName() );
- CleanupStack::PushL( fileName );
-
- // Open resource file:
- RFs& fs = iEikonEnv->FsSession();
- BaflUtils::NearestLanguageFile( fs, *fileName );
- iResourceOffset = iEikonEnv->AddResourceFileL( *fileName );
-
- CleanupStack::PopAndDestroy( 2, parse );
-
- CAknDialog::ConstructL( R_PSLN_SLIDE_DIALOG_MENUBAR );
-
- // Remove tab group (if applicable).
- ToggleDefaultNaviPaneL( ETrue );
-
- // Retrieve previous title so that we can set it back when
- // dialog exits.
- if ( iAvkonAppUi )
- {
- CEikStatusPane* sp = iAvkonAppUi->StatusPane();
- if ( sp )
- {
- CAknTitlePane* title = static_cast<CAknTitlePane*>(
- sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-
- if ( title )
- {
- const TDesC* prevTitle = title->Text();
- iPreviousTitleTxt = prevTitle->AllocL();
- }
- }
- }
- iMGFetchRunning = EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnSlidesetDialog::CPslnSlidesetDialog()
- {
- }
-
-// Destructor
-CPslnSlidesetDialog::~CPslnSlidesetDialog()
- {
- if ( this->IsFocused() )
- {
- CEikDialog::ButtonGroupContainer().RemoveCommandObserver( KPslnMSKControlID );
- }
-
- // Remove empty navi pane.
- TRAP_IGNORE( ToggleDefaultNaviPaneL( EFalse ) );
-
- iEikonEnv->EikAppUi()->RemoveFromStack( this );
-
- delete iListBox;
- delete iItems;
- delete iModel;
- delete iPreviousTitleTxt;
- delete iSlideSetTypeItems;
-
- if ( iResourceOffset != 0 )
- {
- iEikonEnv->DeleteResourceFile( iResourceOffset );
- }
-
- FeatureManager::UnInitializeLib();
- }
-
-// ---------------------------------------------------------------------------
-// Gets current item.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlidesetDialog::CurrentItemIndex() const
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ---------------------------------------------------------------------------
-// Sets current item and re-draws the listbox.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::SetCurrentItemIndexAndDraw( TInt aNewIndex )
- {
- if( ( aNewIndex >= 0 ) &&
- ( aNewIndex < iListBox->Model()->NumberOfItems() ) )
- {
- iListBox->SetCurrentItemIndexAndDraw( aNewIndex );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Checks if feature is supported.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnSlidesetDialog::IsFeatureSupported( TInt aFeatureID )
- {
- if ( ( aFeatureID >= 0 ) && ( aFeatureID < KPslnMaxFeatureID ) )
- {
- return iFeaturesSupport.IsSet( aFeatureID );
- }
- else
- {
- // invalid feature value.
- return EFalse;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Sets title pane text.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::SetTitlePaneL( const TInt aResourceId )
- {
- CEikStatusPane* sp = iAvkonAppUi->StatusPane();
- CAknTitlePane* titlePane =
- static_cast<CAknTitlePane*> (
- sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
- if ( titlePane )
- {
- HBufC* titleBuf = StringLoader::LoadLC( aResourceId );
- titlePane->SetTextL( *titleBuf );
- CleanupStack::PopAndDestroy( titleBuf );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Creates a specific setting item.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::MakeItemL( const TInt aIndex )
- {
- // Check that parameter is valid.
- if ( aIndex > iItems->Count() || aIndex < 0 )
- {
- User::Leave( KErrArgument );
- }
- TInt currentValue = KErrNotFound;
- switch( aIndex )
- {
- case EPslnSlideSetImagesId:
- {
- if ( IsFeatureSupported( EPslnSlideSetFeatureRandom ) &&
- ( iType == EPslnScreensaverDialog ) )
- {
- currentValue = iModel->GetSlideSetType( iType );
- SetSettingPageValueToListL(
- *iSlideSetTypeItems,
- aIndex,
- currentValue,
- EFalse );
- }
- else
- {
- // Get number of images.
- HBufC* item = (*iItems)[aIndex].AllocL();
- TInt slideSetFileType = EAknsSrvInifileSSWP;
- if ( iType == EPslnScreensaverDialog )
- {
- slideSetFileType = EAknsSrvInifileSSSS;
- }
- currentValue =
- iModel->GetImageCountInSlideSetL( slideSetFileType );
-
- // If there are images already selected, the number of images
- // needs to be shown in the setting page.
- if ( currentValue > 0 )
- {
- TInt resourceId =
- SelectResourceStringForImages( currentValue );
- HBufC* valueStr = NULL;
- // Use singular form, if only one image.
- if ( currentValue == 1 )
- {
- valueStr = StringLoader::LoadLC( resourceId );
- }
- // Otherwise plural.
- else
- {
- valueStr = StringLoader::LoadLC(
- resourceId,
- currentValue );
- }
- // for A&H number conversion
- TPtr bufPtr = valueStr->Des();
- if( AknTextUtils::DigitModeQuery(
- AknTextUtils::EDigitModeShownToUser ) )
- {
- AknTextUtils::LanguageSpecificNumberConversion( bufPtr );
- }
- // make room for value and end mark.
- item = item->ReAllocL(
- item->Length() +
- bufPtr.Length() +
- KPslnStringEndMarkSize );
- TPtr expandedPtr = item->Des();
- expandedPtr.Insert( item->Length(), bufPtr );
- CleanupStack::PopAndDestroy( valueStr );
- }
- else
- {
- if ( iType == EPslnWallpaperDialog )
- {
- TInt type = KErrNone;
- CRepository* rep = CRepository::NewL( KCRUidPersonalisation );
- rep->Get( KPslnWallpaperType,type );
- const TInt SlideSetWPType = 2;
- if ( type == SlideSetWPType )
- {
- AknsWallpaperUtils::SetIdleWallpaper( KNullDesC, NULL );
- }
- delete rep;
- }
- }
- CleanupStack::PushL( item );
- TPtr ptr = item->Des();
- iItemArray->InsertL( aIndex, ptr );
- CleanupStack::PopAndDestroy( item );
- }
- }
- break;
- case EPslnSlideSetDurationId:
- {
- if ( iType == EPslnScreensaverDialog )
- {
- currentValue = iModel->GetSlideSetDuration();
-
- SetSliderValueToListL(
- aIndex,
- currentValue,
- R_PSLN_DURATION_SLIDER );
- }
- else
- {
- currentValue = iModel->GetSlideSetInterval();
-
- // Last parameter is whether or not A&H numeric conversion should be done.
- SetSettingPageValueToListL(
- *iIntervalItems,
- aIndex,
- currentValue,
- ETrue );
- }
- }
- break;
- case EPslnSlideSetBacklightId:
- {
- currentValue = iModel->GetSlideSetBacklight();
-
- SetSliderValueToListL(
- aIndex,
- currentValue,
- R_PSLN_BACKLIGHT_SLIDER );
- }
- break;
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Sets middle softkey label.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::SetMiddleSoftKeyLabelL(
- const TInt aResourceId, const TInt aCommandId )
- {
- HBufC* middleSKText = StringLoader::LoadLC( aResourceId );
- TPtr mskPtr = middleSKText->Des();
- CEikDialog::ButtonGroupContainer().AddCommandToStackL(
- KPslnMSKControlID,
- aCommandId,
- mskPtr );
- CEikDialog::ButtonGroupContainer().UpdateCommandObserverL(
- KPslnMSKControlID,
- *this );
- CleanupStack::PopAndDestroy( middleSKText );
- }
-
-// -----------------------------------------------------------------------------
-// Layouts dialog before it is visible.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::PreLayoutDynInitL()
- {
- iEikonEnv->EikAppUi()->AddToStackL( this, ECoeStackPriorityDialog );
- CreateSettingsListL();
- CEikDialog::PreLayoutDynInitL();
- }
-
-// -----------------------------------------------------------------------------
-// Reimplements CAknDialog::ProcessCommandL inorder to handle dialog menu
-// commands.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::ProcessCommandL( TInt aCommandId )
- {
- CAknDialog::ProcessCommandL( aCommandId );
- switch ( aCommandId )
- {
- case EPslnCmdAppSetWallpaper: // Fallthrough
- case EPslnCmdAppSetScreenSaver: // Fallthrough
- case EPslnSlideSetCmdChange:
- if ( iListBox )
- {
- HandleListBoxSelectionL();
- }
- break;
- case EAknCmdHelp:
- HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
- iAvkonAppUi->AppHelpContextL() );
- break;
- case EAknSoftkeyBack: // -Fallthrough
- // Remove empty navi pane.
- ToggleDefaultNaviPaneL( EFalse );
- case EEikCmdExit: // -Fallthrough
- case EAknCmdExit:
- // Close this dialog
- TryExitL( aCommandId );
- iAvkonAppUi->ProcessCommandL( aCommandId );
- break;
- default:
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// Reimplements CAknDialog::OkToExitL.
-// -----------------------------------------------------------------------------
-//
-TBool CPslnSlidesetDialog::OkToExitL( TInt aButtonId )
- {
- //Check if MGFetch is running.
- if( iMGFetchRunning )
- {
- return EFalse;
- }
-
- if ( iPreviousTitleTxt &&
- iPreviousTitleTxt->Length() > 0 &&
- aButtonId != EAknSoftkeyOptions )
- {
- if ( iAvkonAppUi )
- {
- CEikStatusPane* sp = iAvkonAppUi->StatusPane();
- if ( sp )
- {
- CAknTitlePane* title = static_cast<CAknTitlePane*>(
- sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-
- if ( title )
- {
- title->SetTextL( *iPreviousTitleTxt );
- }
- }
- }
- }
- return CAknDialog::OkToExitL( aButtonId );
- }
-
-// -----------------------------------------------------------------------------
-// Reimplements CAknDialog::DynInitMenuPaneL inorder to support dynamic hiding
-// of menu items based on current state of the viewer.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- if ( aResourceId == R_PSLN_SLIDE_DIALOG_MENU &&
- !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- // Disable help if not supported
- aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Reimplements CAknDialog::SizeChanged inorder to support the resize of the
-// dialog when functions such as SetRect, SetExtent are called on the dialog.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::SizeChanged()
- {
- CAknDialog::SizeChanged();
- if ( iListBox )
- {
- // Get size from main pane, place from this rect
- TRect mainPaneRect;
- AknLayoutUtils::LayoutMetricsRect(
- AknLayoutUtils::EMainPane,
- mainPaneRect );
-
- iListBox->SetExtent( Rect().iTl, mainPaneRect.Size() );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Handles Key events by reimplementing CCoeControl::OfferKeyEventL.
-// -----------------------------------------------------------------------------
-//
-TKeyResponse CPslnSlidesetDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- switch ( aKeyEvent.iCode )
- {
- case EKeyLeftArrow: // -Fallthrough
- case EKeyRightArrow:
- // Listbox takes all event even if it doesn't use them
- if ( !iMGFetchRunning )
- {
- return EKeyWasConsumed;
- }
- break;
- default:
- break;
- }
- // If MGFetch is running, do not give key events to listbox.
- if ( iListBox && !iMGFetchRunning )
- {
- iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- return CAknDialog::OfferKeyEventL( aKeyEvent, aType );
- }
-
-// -----------------------------------------------------------------------------
-// Handles setting page events.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::HandleSettingPageEventL(
- CAknSettingPage* aSettingPage,
- TAknSettingPageEvent aEventType )
- {
- TInt settingPageId = aSettingPage->SettingId();
- TInt current = KErrNotFound;
- if ( aEventType == EEventSettingOked )
- {
- switch( settingPageId )
- {
- case EPslnSlideSetImagesId:
- if ( IsFeatureSupported( EPslnSlideSetFeatureRandom ) )
- {
- current = static_cast<CAknRadioButtonSettingPage*>(
- aSettingPage)->ListBoxControl()->CurrentItemIndex();
- // If images is selected, start MGFetch.
- if ( current != KPslnSlideSetRandomIndex )
- {
- HandleLaunchMGFetchL();
- }
- else
- {
- iModel->SetSlideSetType( iType, current );
- }
- }
- break;
-
- case EPslnSlideSetDurationId:
- current = static_cast<CAknSliderSettingPage*>
- (aSettingPage)->SliderControl()->Value();
- iModel->SetSlideSetDuration( current );
- break;
- case EPslnSlideSetBacklightId:
- current = static_cast<CAknSliderSettingPage*>
- (aSettingPage)->SliderControl()->Value();
- iModel->SetSlideSetBacklight( current );
- break;
- case EPslnSlideSetIntervalId:
- current = static_cast<CAknRadioButtonSettingPage*>(
- aSettingPage)->ListBoxControl()->CurrentItemIndex();
- iModel->SetSlideSetInterval( current );
- // interval is regarded as duration
- settingPageId = EPslnSlideSetDurationId;
- break;
- default:
- break;
- }
- UpdateDialogL( settingPageId );
- }
- }
-
-// -----------------------------------------------------------------------------
-// Handles change of skin/Layout
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::HandleResourceChange( TInt aType )
- {
- CAknDialog::HandleResourceChange( aType );
- if ( iListBox )
- {
- iListBox->HandleResourceChange( aType );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Handles list animation events.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::FocusChanged( TDrawNow aDrawNow )
- {
- CAknDialog::FocusChanged( aDrawNow );
- if( iListBox )
- {
- iListBox->SetFocus( IsFocused(), aDrawNow );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Count components.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlidesetDialog::CountComponentControls() const
- {
- return iListBox ? 1 : 0;
- }
-
-// ---------------------------------------------------------------------------
-// Give pointer to component matching to the index.
-// ---------------------------------------------------------------------------
-//
-CCoeControl* CPslnSlidesetDialog::ComponentControl( TInt aIndex ) const
- {
- return ( aIndex == 0 ) ? iListBox : NULL;
- }
-
-// ---------------------------------------------------------------------------
-// Handle listbox event.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::HandleListBoxEventL(
- CEikListBox* /*aListBox*/, TListBoxEvent aEventType )
- {
- switch ( aEventType )
- {
- case EEventEnterKeyPressed: // Fallthrough
- case EEventItemDoubleClicked:
- case EEventItemSingleClicked:
- HandleListBoxSelectionL();
- break;
- default:
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// Create setting items.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::CreateSettingsListL()
- {
- // Create settings listbox.
- iListBox = new (ELeave) CAknSettingStyleListBox;
- iListBox->ConstructL( this, EAknListBoxSelectionList );
-
- // Create listbox items.
- iItemArray = static_cast<CDesCArray*>
- ( iListBox->Model()->ItemTextArray() );
- iListBox->SetContainerWindowL( *this );
- iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
-
- iListBox->CreateScrollBarFrameL( ETrue );
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
- iListBox->SetListBoxObserver( this );
- iListBox->SetMopParent( this );
- iListBox->MakeVisible( ETrue );
-
- CreateListBoxItemsL();
- iListBox->HandleItemAdditionL();
-
- SetRect( iAvkonAppUi->ClientRect() );
- ActivateL();
- }
-
-// ---------------------------------------------------------------------------
-// CPslnSlidesetDialog::HandleListBoxSelectionL()
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::HandleListBoxSelectionL()
- {
- TInt index = iListBox->CurrentItemIndex();
-
- switch ( index )
- {
- case EPslnSlideSetImagesId:
- if( iMGFetchRunning )
- {
- return;
- }
- if ( IsFeatureSupported( EPslnSlideSetFeatureRandom )
- && ( iType == EPslnScreensaverDialog ) )
- {
- ShowSlideSetTypeSelectionL();
- }
- else
- {
- ShowSlideSetImageListL();
- }
- break;
- case EPslnSlideSetDurationId:
- if ( iType == EPslnScreensaverDialog )
- {
- ShowDurationSliderL();
- }
- else
- {
- ShowIntervalListL();
- }
- break;
- case EPslnSlideSetBacklightId:
- ShowBacklightSliderL();
- break;
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Show slide set type setting page. Since it is used by both slide sets
-// (wallpaper and screen saver), the default implementation is in the base
-// class.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::ShowSlideSetTypeSelectionL()
- {
- // Retrieve title txt.
- TInt titleResourceID = R_PSLN_IMAGES_SLIDE_SS_PAGE_TITLE;
- if ( iType != EPslnScreensaverDialog )
- {
- titleResourceID = R_PSLN_IMAGES_SLIDE_WP_PAGE_TITLE;
- }
- HBufC* titleText = StringLoader::LoadLC( titleResourceID );
-
- // Retrieve current setting page value.
- TInt currentValue = iModel->GetSlideSetType( iType );
-
- // Create & show the setting page.
- CAknRadioButtonSettingPage* dlg =
- new( ELeave ) CAknRadioButtonSettingPage(
- titleText,
- EAknSettingPageNoOrdinalDisplayed,
- EAknCtSettingPage,
- 0,
- R_PSLN_IMAGE_SELECTION_SETTING_PAGE,
- currentValue,
- iSlideSetTypeItems );
- dlg->SetSettingId( EPslnSlideSetImagesId );
- dlg->SetSettingPageObserver( this );
- dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted );
-
- CleanupStack::PopAndDestroy( titleText );
- }
-
-// ---------------------------------------------------------------------------
-// Shows backlight slider setting page.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::ShowBacklightSliderL()
- {
- // Empty implementation to be overloaded.
- }
-
-// ---------------------------------------------------------------------------
-// Shows duration slider setting page.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::ShowDurationSliderL()
- {
- // Empty implementation to be overloaded.
- }
-
-// ---------------------------------------------------------------------------
-// Show wallpaper slide set's interval selection.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::ShowIntervalListL()
- {
- // Empty implementation to be overloaded.
- }
-
-// ---------------------------------------------------------------------------
-// Starts image fetch.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnSlidesetDialog::ShowSlideSetImageListL()
- {
- CDesCArrayFlat* files =
- new (ELeave) CDesCArrayFlat( KPslnSlideSetImagesGranualarity );
- CleanupStack::PushL( files );
-
- CPslnSlideSetDRMVerifier* verifier = CPslnSlideSetDRMVerifier::NewL( iType );
- CleanupStack::PushL( verifier );
-
- iMGFetchRunning = ETrue;
- TBool selected = EFalse;
- TRAPD( err,selected = MGFetch::RunL( *files, EImageFile, ETrue, verifier ) );
- iMGFetchRunning = EFalse;
- User::LeaveIfError( err );
- CleanupStack::PopAndDestroy( verifier );
-
- // Handle selection
- if ( selected && ( files->MdcaCount() > 0 ) )
- {
- iModel->SetImageListL( iType, *files, iLaunchMode );
- iModel->SetSlideSetType( iType, 0 );
- UpdateDialogL( EPslnSlideSetImagesId );
- }
- // else - either: User made a selection, but all the images had issues with DRM.
- // or: MGFetch was cancelled
- else
- {
- selected = EFalse;
- }
-
- CleanupStack::PopAndDestroy( files );
- return selected;
- }
-
-// ---------------------------------------------------------------------------
-// Toggles navi pane to default and back.
-// ---------------------------------------------------------------------------
-//
-#ifdef RD_CONTROL_PANEL
-void CPslnSlidesetDialog::ToggleDefaultNaviPaneL( const TBool /*aNaviPaneToggle*/ )
-#else
-void CPslnSlidesetDialog::ToggleDefaultNaviPaneL( const TBool aNaviPaneToggle )
-#endif // RD_CONTROL_PANEL
- {
- // Remove tab group (if applicable).
- CEikStatusPane* sp = iAvkonAppUi->StatusPane();
- // Fetch pointer to the default navi pane control
- CAknNavigationControlContainer* naviPane =
- (CAknNavigationControlContainer*)sp->ControlL(
- TUid::Uid(EEikStatusPaneUidNavi));
- // Show again previous navipane
- if ( naviPane )
- {
-#ifndef RD_CONTROL_PANEL
- if ( !aNaviPaneToggle )
- {
- naviPane->Pop();
- }
- // Show default navi pane.
- else
-#endif // !RD_CONTROL_PANEL
- {
- naviPane->PushDefaultL();
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// Updates dialog based on new value of setting item.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::UpdateDialogL( const TInt aSettingId )
- {
- if ( aSettingId >= 0 &&
- aSettingId < iItemArray->Count() )
- {
- iItemArray->Delete( aSettingId );
- MakeItemL( aSettingId );
- iListBox->HandleItemAdditionL();
- }
- }
-
-// -----------------------------------------------------------------------------
-// Updates dialog based on new value of setting item.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::SetSettingPageValueToListL(
- const CDesCArrayFlat& aArray,
- const TInt aCurrentIndex,
- const TInt aCurrentValue,
- const TBool aNumericConversionNeeded )
- {
- if ( aCurrentIndex >= iItems->Count() )
- {
- User::Leave( KErrArgument );
- }
- HBufC* item = (*iItems)[aCurrentIndex].AllocL();
- HBufC* settingItemValue = HBufC::NewLC( KPslnSettingItemLength );
- TPtr valuePtr ( settingItemValue->Des() );
- valuePtr = aArray[ aCurrentValue ];
-
- // A&H conversion.
- if( aNumericConversionNeeded &&
- AknTextUtils::DigitModeQuery( AknTextUtils::EDigitModeShownToUser ) )
- {
- AknTextUtils::LanguageSpecificNumberConversion( valuePtr );
- }
-
- // Re-allocate string, so that setting item name and current value fit.
- item = item->ReAllocL(
- item->Length() + valuePtr.Length() + KPslnStringEndMarkSize );
- TPtr expandedPtr = item->Des();
-
- expandedPtr.Insert( item->Length(), valuePtr );
- CleanupStack::PopAndDestroy( settingItemValue );
- CleanupStack::PushL( item );
-
- TPtr ptr = item->Des();
- iItemArray->InsertL( aCurrentIndex, ptr );
- CleanupStack::PopAndDestroy( item );
- }
-
-// -----------------------------------------------------------------------------
-// Updates dialog based on new value of setting item.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::SetSliderValueToListL(
- const TInt aCurrentIndex,
- const TInt aCurrentValue,
- const TInt aResourceID )
- {
- if ( aCurrentIndex >= iItems->Count() )
- {
- User::Leave( KErrArgument );
- }
-
- HBufC* item = (*iItems)[aCurrentIndex].AllocL();
- // If minimum value for backlight, use "Off".
- if ( aResourceID == R_PSLN_BACKLIGHT_SLIDER && aCurrentValue == 0 )
- {
- HBufC* settingItem = StringLoader::LoadLC( R_PSLN_SANIM_SLIDER_OFF );
- TPtr bufPtr = settingItem->Des();
- item = item->ReAllocL(
- item->Length() + bufPtr.Length() + KPslnStringEndMarkSize );
- TPtr expandedPtr = item->Des();
-
- expandedPtr.Insert( item->Length(), bufPtr );
- CleanupStack::PopAndDestroy( settingItem );
-
- }
- else
- {
- HBufC* settingItem = CAknSlider::CreateValueTextInHBufCL(
- aCurrentValue,
- aResourceID );
- CleanupStack::PushL( settingItem );
-
- // for A&H number conversion
- TPtr bufPtr = settingItem->Des();
- if( AknTextUtils::DigitModeQuery( AknTextUtils::EDigitModeShownToUser ) )
- {
- AknTextUtils::LanguageSpecificNumberConversion( bufPtr );
- }
- item = item->ReAllocL(
- item->Length() + bufPtr.Length() + KPslnStringEndMarkSize );
- TPtr expandedPtr = item->Des();
-
- expandedPtr.Insert( item->Length(), bufPtr );
- CleanupStack::PopAndDestroy( settingItem );
- }
- CleanupStack::PushL( item );
- TPtr ptr = item->Des();
- iItemArray->InsertL( aCurrentIndex, ptr );
- CleanupStack::PopAndDestroy( item );
- }
-
-// -----------------------------------------------------------------------------
-// Select appropriate resource text for setting item value.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnSlidesetDialog::SelectResourceStringForImages( TInt aCurrentValue )
- {
- TInt resourceId = R_PSLN_SLIDE_SET_WP_IMAGES;
- if ( aCurrentValue == 1 )
- {
- if ( iType == EPslnScreensaverDialog )
- {
- resourceId = R_PSLN_SLIDE_SET_SS_IMAGE;
- }
- else
- {
- resourceId = R_PSLN_SLIDE_SET_WP_IMAGE;
- }
- }
- else
- {
- if ( iType == EPslnScreensaverDialog )
- {
- resourceId = R_PSLN_SLIDE_SET_SS_IMAGES;
- }
- }
- return resourceId;
- }
-
-// -----------------------------------------------------------------------------
-// Handles idle time. Starts MGFetch.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetDialog::HandleLaunchMGFetchL()
- {
- TBool selected = ShowSlideSetImageListL();
- if ( !selected )
- {
- ShowSlideSetTypeSelectionL();
- }
- }
-
-// End of File
--- a/psln/pslnslidesetdialog/src/pslnslidesetdrmverifier.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
-* Copyright (c) 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: DRM Verifier for slide set image sets.
-*
-*/
-
-
-// INCLUDE FILES
-#include "pslnslidesetdrmverifier.h"
-#include <pslnslidesetdialogrsc.rsg>
-#include <pslnslidesetdialoginterface.h>
-
-#include <DRMHelper.h>
-#include <aknnotewrappers.h>
-#include <StringLoader.h>
-
-const TInt KPslnDrmVerifyLimit = 50;
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnSlideSetDRMVerifier::CPslnSlideSetDRMVerifier( TInt aType )
- : iType ( aType )
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlideSetDRMVerifier::ConstructL()
- {
- iDRMHelper = CDRMHelper::NewL( *CCoeEnv::Static() );
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSlideSetDRMVerifier* CPslnSlideSetDRMVerifier::NewL( TInt aType )
- {
- CPslnSlideSetDRMVerifier* self =
- new( ELeave ) CPslnSlideSetDRMVerifier( aType );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSlideSetDRMVerifier::~CPslnSlideSetDRMVerifier()
- {
- delete iDRMHelper;
- }
-
-// -----------------------------------------------------------------------------
-// Verifies user selected images. Used by MGFetch.
-// -----------------------------------------------------------------------------
-//
-TBool CPslnSlideSetDRMVerifier::VerifySelectionL( const MDesCArray* aSelectedFiles )
- {
- if ( aSelectedFiles )
- {
- if( aSelectedFiles->MdcaCount() < 1 )
- {
- // Download item
- return ETrue;
- }
- }
- else
- {
- // no aSelectedFiles.
- return EFalse;
- }
-
- TInt res = KErrNone;
- TBool canBeAutomated = EFalse;
- if ( iDRMHelper )
- {
- if ( iType == EPslnWallpaperDialog )
- {
- res = iDRMHelper->SetAutomatedType(
- CDRMHelper::EAutomatedTypeWallpaper );
- }
- else
- {
- res = iDRMHelper->SetAutomatedType(
- CDRMHelper::EAutomatedTypeScreenSaver );
- }
- if ( res != KErrNone )
- {
- ShowErrorNoteL( R_PSLN_SLIDE_SET_DRM_ERROR );
- }
- else
- {
- // Go through the selected files.
- TInt fileCount = aSelectedFiles->MdcaCount() - 1;
- if ( fileCount > KPslnDrmVerifyLimit )
- {
- fileCount = KPslnDrmVerifyLimit;
- }
- for ( TInt index = fileCount; index >= 0; index-- )
- {
- // First check DRM issues.
- res = iDRMHelper->CanSetAutomated(
- aSelectedFiles->MdcaPoint( index ),
- canBeAutomated );
- if ( !res && !canBeAutomated )
- {
- ShowErrorNoteL( R_PSLN_SLIDE_SET_DRM_ERROR );
- }
- else if( res == KErrUnderflow )
- {
- ShowErrorNoteL( R_PSLN_SLIDE_SET_IMAGE_CORRUPTED );
- }
- else if ( ( res != KErrNone ) || !canBeAutomated )
- {
- if ( iDRMHelper )
- {
- iDRMHelper->HandleErrorL(
- res,
- aSelectedFiles->MdcaPoint( index ) );
- }
- }
- else
- {
- // Empty.
- }
- }
- }
- }
- return canBeAutomated;
- }
-
-// -----------------------------------------------------------------------------
-// Shows error note.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlideSetDRMVerifier::ShowErrorNoteL( TInt aResourceId ) const
- {
- HBufC* errorText = StringLoader::LoadLC( aResourceId );
- CAknInformationNote* note = new( ELeave ) CAknInformationNote( EFalse );
- note->ExecuteLD( *errorText );
- CleanupStack::PopAndDestroy( errorText );
- }
-
-// End of file
-
--- a/psln/pslnslidesetdialog/src/pslnslidesetimplementationtable.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM proxy table for PslnApplicationShellPlugin.
-*
-*/
-
-
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-#include "pslnslidesetscreensaverdialog.h"
-#include "pslnslidesetwallpaperdialog.h"
-
-// CONSTANTS
-// Define two entries - one for each type of dialog.
-const TImplementationProxy KPslnApplicationShellPluginImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( 0x102823AE, CPslnWallpaperSlidesetDialog::NewL ),
- IMPLEMENTATION_PROXY_ENTRY( 0x102823AF, CPslnSlidesetScreensaverDialog::NewL )
- };
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-//
-// Gate/factory function
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
- {
- aTableCount = sizeof( KPslnApplicationShellPluginImplementationTable )
- / sizeof( TImplementationProxy );
- return KPslnApplicationShellPluginImplementationTable;
- }
-
-
-// ---------------------------------------------------------------------------
-// E32Dll
-// EKA1 entry point
-//
-// ---------------------------------------------------------------------------
-//
-#ifndef EKA2
-GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
- {
- return( KErrNone );
- }
-#endif
-
--- a/psln/pslnslidesetdialog/src/pslnslidesetmodel.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,531 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Model class for slide set dialog.
-*
-*/
-
-
-// Central repository.
-#include <centralrepository.h>
-#include <pslninternalcrkeys.h>
-#include "PslnVariationPrivateCRKeys.h"
-#include "PslnVariant.hrh"
-#include <AknSkinsInternalCRKeys.h>
-
-// Notes & Dialogs
-#include <AknGlobalNote.h>
-#include <aknnotewrappers.h>
-
-// Skin server.
-#include <AknsWallpaperUtils.h>
-#include <AknsSrvClient.h>
-
-// Generic.
-#include <bautils.h>
-
-// Psln Slide set specific.
-#include <pslnslidesetdialoginterface.h>
-#include "pslnslidesetmodel.h"
-#include "pslnslidesetconst.hrh"
-#include "pslnslidesetconst.h"
-#include <pslnslidesetdialogrsc.rsg>
-
-// Slide set duration default value: 5 seconds.
-const TInt KPslnSlideSetDefaultDuration = 5;
-// Slide set backlight default value: off.
-const TInt KPslnSlideSetBacklightOff = 0;
-// Slide set interval default value: 10min.
-const TInt KPslnSlideSetDefaultInterval = EPslnSlideSetInterval10Min;
-// Slide set minimum duration is 1 second.
-const TInt KPslnSlideSetMinDuration = 1;
-// Slide set maximum duration is 60 seconds.
-const TInt KPslnSlideSetMaxDuration = 60;
-// Slide set maximum backlight period is 30secs.
-const TInt KPslnSlideSetMaxBacklight = 30;
-// Slide set minimum interval period is 1 min.
-const TInt KPslnSlideSetMinInterval = EPslnSlideSetInterval1Min;
-// Slide set maximum interval period is 1 day.
-const TInt KPslnSlideSetMaxInterval = EPslnSlideSetInterval1Day;
-
-
-// ======== MEMBER FUNCTIONS ========
-// ---------------------------------------------------------------------------
-// C++ constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CPslnSlideSetModel::CPslnSlideSetModel() : iImageListChanged ( EFalse )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlideSetModel::ConstructL()
- {
- iRepository = CRepository::NewL( KCRUidThemes );
- iCoeEnv = CCoeEnv::Static();
- }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CPslnSlideSetModel* CPslnSlideSetModel::NewL()
- {
- CPslnSlideSetModel* self = CPslnSlideSetModel::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor. Same as above, but leaves object to the
-// cleanup stack.
-// ---------------------------------------------------------------------------
-//
-CPslnSlideSetModel* CPslnSlideSetModel::NewLC()
- {
- CPslnSlideSetModel* self = new( ELeave ) CPslnSlideSetModel;
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CPslnSlideSetModel::~CPslnSlideSetModel()
- {
- delete iRepository;
- }
-
-// ---------------------------------------------------------------------------
-// Returns current selection for slide set type: random / image set.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::GetSlideSetType( const TInt aSlideSetType ) const
- {
- TInt imageSelection = KErrNotFound;
-
- TInt error = KErrNone;
- if ( aSlideSetType == EPslnScreensaverDialog )
- {
- error = iRepository->Get(
- KThemesScreenSaverSlideSetType,
- imageSelection );
- }
- else
- {
- error = iRepository->Get(
- KThemesWallpaperSlideSetType,
- imageSelection );
- }
- // In case of error, or invalid value, just return default value.
- if ( error != KErrNone ||
- ( imageSelection != KPslnSlideSetRandomIndex &&
- imageSelection != KPslnSlideSetImageSelImageSet ) )
- {
- if ( aSlideSetType == EPslnScreensaverDialog )
- {
- return KPslnSlideSetRandomIndex;
- }
- else
- {
- return KPslnSlideSetImageSelImageSet;
- }
- }
- return imageSelection;
- }
-
-// ---------------------------------------------------------------------------
-// Sets slide set type (random/image set).
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::SetSlideSetType(
- const TInt aSlideSetType, const TInt aValue )
- {
- TInt error = KErrNone;
-
- TInt prevValue = KErrNone;
- if ( aSlideSetType == EPslnScreensaverDialog )
- {
- error = iRepository->Get( KThemesScreenSaverSlideSetType, prevValue );
- }
- else
- {
- error = iRepository->Get( KThemesWallpaperSlideSetType, prevValue );
- }
-
- // Validate that value is valid and changed.
- if ( ( aValue == KPslnSlideSetImageSelImageSet ||
- aValue == KPslnSlideSetRandomIndex ) &&
- ( prevValue != aValue ) )
- {
- // Store selection.
- if ( aSlideSetType == EPslnScreensaverDialog )
- {
- error = iRepository->Set( KThemesScreenSaverSlideSetType, aValue );
- }
- else
- {
- error = iRepository->Set( KThemesWallpaperSlideSetType, aValue );
- }
- }
- else
- {
- error = KErrArgument;
- }
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Returns current selection for screensaver slide set duration.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::GetSlideSetDuration() const
- {
- TInt slideSetDuration = KPslnSlideSetDefaultDuration;
- TInt error = KErrNone;
- error = iRepository->Get(
- KThemesScreenSaverSlideSetDuration,
- slideSetDuration );
- if ( error != KErrNone )
- {
- // return default value in case of error.
- return KPslnSlideSetDefaultDuration;
- }
- return slideSetDuration;
- }
-
-// ---------------------------------------------------------------------------
-// Sets screensaver slide set duration.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::SetSlideSetDuration( const TInt aValue )
- {
- TInt error = KErrNone;
- TInt prevValue = KErrNone;
- error = iRepository->Get( KThemesScreenSaverSlideSetDuration, prevValue );
-
- // Validate value and check that new value is different from previous
- // value.
- if ( ( aValue >= KPslnSlideSetMinDuration &&
- aValue <= KPslnSlideSetMaxDuration ) &&
- ( prevValue != aValue ) )
- {
- error = iRepository->Set(
- KThemesScreenSaverSlideSetDuration,
- aValue );
- }
- else
- {
- error = KErrArgument;
- }
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Returns current selection for screensaver slide set backlight period.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::GetSlideSetBacklight() const
- {
- TInt slideSetBacklight = KPslnSlideSetBacklightOff;
- TInt error = KErrNone;
- error = iRepository->Get(
- KThemesScreenSaverSlideSetBacklight,
- slideSetBacklight );
- if ( error != KErrNone )
- {
- // return default value in case of error.
- return KPslnSlideSetBacklightOff;
- }
- return slideSetBacklight;
- }
-
-// ---------------------------------------------------------------------------
-// Sets screensaver slide set backlight period.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::SetSlideSetBacklight( const TInt aValue )
- {
- TInt error = KErrNone;
- TInt prevValue = KErrNone;
- error = iRepository->Get( KThemesScreenSaverSlideSetBacklight, prevValue );
-
- if ( ( aValue >= KPslnSlideSetBacklightOff ||
- aValue <= KPslnSlideSetMaxBacklight ) &&
- ( prevValue != aValue ) )
- {
- error = iRepository->Set(
- KThemesScreenSaverSlideSetBacklight,
- aValue );
- }
- else
- {
- error = KErrArgument;
- }
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Returns current selection for wallpaper slide set image change interval.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::GetSlideSetInterval() const
- {
- TInt slideSetInterval = KPslnSlideSetDefaultInterval;
- TInt error = KErrNone;
- error = iRepository->Get(
- KThemesWallpaperSlideSetInterval,
- slideSetInterval );
- if ( error != KErrNone )
- {
- // return default value in case of error.
- return KPslnSlideSetDefaultInterval;
- }
- return slideSetInterval;
- }
-
-// ---------------------------------------------------------------------------
-// Sets wallpaper slide set image change period.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::SetSlideSetInterval( const TInt aValue )
- {
- TInt error = KErrNone;
- TInt prevValue = KErrNone;
- error = iRepository->Get( KThemesWallpaperSlideSetInterval, prevValue );
-
- if ( ( aValue >= KPslnSlideSetMinInterval ||
- aValue <= KPslnSlideSetMaxInterval ) &&
- ( prevValue != aValue ) )
- {
- error = iRepository->Set( KThemesWallpaperSlideSetInterval, aValue );
- }
- else
- {
- error = KErrArgument;
- }
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Stores list of image filenames to be used as slide set image set.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlideSetModel::SetImageListL( const TInt aSlideSetType,
- CDesCArray& aSelectedFiles, const TInt aLaunchMode )
- {
- if ( aSlideSetType == EPslnWallpaperDialog )
- {
- if ( aLaunchMode == CPslnSlidesetDialogInterface::EPslnNormal )
- {
- TInt retVal =
- AknsWallpaperUtils::SetSlidesetWallpaper( aSelectedFiles, NULL );
- if ( retVal != KErrNone )
- {
- // Show information note about image
- HBufC* prompt = iCoeEnv->AllocReadResourceLC(
- R_PSLN_SLIDE_SET_IMAGE_CORRUPTED );
- CAknInformationNote* note =
- new (ELeave) CAknInformationNote( ETrue );
- note->ExecuteLD( *prompt );
- CleanupStack::PopAndDestroy( prompt );
- }
- }
- // Write file names to file, if configuring only.
- else
- {
- TInt fileType = EAknsSrvInifileSSWP;
- StoreImageListToFileL( fileType, aSelectedFiles );
- }
- }
- else
- {
- TInt fileType = EAknsSrvInifileSSSS;
- StoreImageListToFileL( fileType, aSelectedFiles );
- }
- iImageListChanged = ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// Check if the image file exists.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnSlideSetModel::SlideSetImageFileExistsL(
- const TInt aSlideSetType ) const
- {
- // Get file from server.
- RFile imgFile;
- OpenImageFileL( imgFile, aSlideSetType );
- CleanupClosePushL( imgFile );
-
- // Check if the file exists.
- TInt fileSize = 0;
- TBool retValue = EFalse;
- User::LeaveIfError( imgFile.Size( fileSize ) );
-
- // If file has size, then it exists.
- if ( fileSize > 0 )
- {
- retValue = ETrue;
- }
-
- CleanupStack::PopAndDestroy(); // imgFile
- return retValue;
- }
-
-// ---------------------------------------------------------------------------
-// Indicates whether or not setting values have been updated.
-// ---------------------------------------------------------------------------
-//
-TBool CPslnSlideSetModel::HasDialogUpdatedValues() const
- {
- return iImageListChanged;
- }
-
-// ---------------------------------------------------------------------------
-// Counts how many images have been selected.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnSlideSetModel::GetImageCountInSlideSetL(
- const TInt aSlideSetType ) const
- {
- // Get file from server.
- RFile imgFile;
- OpenImageFileL( imgFile, aSlideSetType );
- CleanupClosePushL( imgFile );
-
- TInt fileSize = 0;
- TInt imageCount = 0;
- User::LeaveIfError( imgFile.Size( fileSize ) );
-
- // If file size is zero => no images.
- if ( fileSize > 0 )
- {
- TFileText textFile;
- textFile.Set( imgFile );
- textFile.Seek( ESeekStart );
-
- RFs& fs = CCoeEnv::Static()->FsSession();
- // Count images from file.
- FOREVER
- {
- TFileName filename;
- if( textFile.Read( filename ) != KErrNone )
- {
- break;
- }
- if ( BaflUtils::FileExists(fs, filename) )
- {
- imageCount++;
- }
- }
- }
- CleanupStack::PopAndDestroy(); // imgFile
- return imageCount;
- }
-
-// ---------------------------------------------------------------------------
-// Sets feature support - see pslnslidesetconst.h for feature list.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlideSetModel::GetFeatureSupportL( TBitFlags& aFeatureBitFlags ) const
- {
- CRepository* featureRep = CRepository::NewLC( KCRUidThemesVariation );
- TInt value = KErrNone;
- featureRep->Get( KThemesLocalVariation, value );
-
- aFeatureBitFlags.ClearAll();
-
- //map value to feature flags
- if ( value & KPslnRandomSlideSets )
- {
- aFeatureBitFlags.Set( EPslnSlideSetFeatureRandom );
- }
- if ( value & KPslnRemoveSlideSetTimeout )
- {
- aFeatureBitFlags.Set( EPslnSlideSetBacklightRemoved );
- }
-
- CleanupStack::PopAndDestroy( featureRep );
- }
-
-// ---------------------------------------------------------------------------
-// Stores slide set image file names to file.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlideSetModel::StoreImageListToFileL(
- const TInt aSlideSetType, CDesCArray& aSelectedFiles ) const
- {
- // Get file from server.
- RFile imgFile;
- OpenImageFileL( imgFile, aSlideSetType );
- CleanupClosePushL( imgFile );
- User::LeaveIfError( imgFile.SetSize( 0 ) ); // possibly wipe existing file
-
- // Finally, write image filenames to the file.
- TFileText textFile;
- textFile.Set( imgFile );
- textFile.Seek( ESeekStart );
-
- for ( TInt imgCount = 0; imgCount < aSelectedFiles.Count(); imgCount++ )
- {
- User::LeaveIfError(
- textFile.Write( aSelectedFiles.MdcaPoint( imgCount ) ) );
- }
- imgFile.Flush();
-
- CleanupStack::PopAndDestroy(); // imgFile
- }
-
-// ---------------------------------------------------------------------------
-// Open image list file for operations.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlideSetModel::OpenImageFileL( RFile& aImageFile, const TInt aSlideSetType ) const
- {
- // First, connect to skin server.
- RAknsSrvSession skinsrv;
- User::LeaveIfError( skinsrv.Connect() );
- CleanupClosePushL( skinsrv );
-
- // Then get file handle.
- TInt fileserverhandle = 0;
- TInt filehandle = 0;
- // Validate type and open image file.
- if ( aSlideSetType == EAknsSrvInifileSSWP )
- {
- fileserverhandle =
- skinsrv.OpenImageInifile( EAknsSrvInifileSSWP, filehandle );
- }
- else
- {
- fileserverhandle =
- skinsrv.OpenImageInifile( EAknsSrvInifileSSSS, filehandle );
-
- }
- if ( fileserverhandle <= 0 || filehandle == 0 )
- {
- User::Leave( fileserverhandle );
- }
-
- // Finally adopt file from server.
- User::LeaveIfError( aImageFile.AdoptFromServer( fileserverhandle, filehandle ) );
- CleanupStack::PopAndDestroy(); // skinsrv
- }
-
-// End of file
--- a/psln/pslnslidesetdialog/src/pslnslidesetscreensaverdialog.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Screensaver slide set settings dialog.
-*
-*/
-
-
-// General
-#include <e32std.h>
-#include <StringLoader.h>
-#include <e32property.h>
-#include <csxhelp/skins.hlp.hrh>
-
-// From AVKON
-#include <avkon.hrh>
-#include <aknappui.h>
-#include <aknslidersettingpage.h>
-#include <AknsSrvClient.h>
-
-// Psln Slide set specific.
-#include "pslnslidesetscreensaverdialog.h"
-#include "pslnslidesetdialog.hrh"
-#include "pslnslidesetmodel.h"
-#include "pslnslidesetconst.h"
-
-// Resources
-#include <pslnslidesetdialogrsc.rsg>
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnSlidesetScreensaverDialog::CPslnSlidesetScreensaverDialog()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetScreensaverDialog::ConstructL()
- {
-#ifndef RD_SLIDESHOW_SCREENSAVER
- User::Leave( KErrNotSupported );
-#endif // RD_SLIDESHOW_SCREENSAVER
- BaseConstructL(
- GetDialogFlag( CPslnSlidesetDialogInterface::EPslnDialogType ) );
-
- iSlideSetTypeItems = iCoeEnv->ReadDesC16ArrayResourceL(
- R_PSLN_SLIDESET_TYPE_SS_SETTING_PAGE_LBX );
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSlidesetScreensaverDialog* CPslnSlidesetScreensaverDialog::NewL()
- {
- CPslnSlidesetScreensaverDialog* self = NewLC();
- CleanupStack::Pop(); // Self
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnSlidesetScreensaverDialog* CPslnSlidesetScreensaverDialog::NewLC()
- {
- CPslnSlidesetScreensaverDialog* self =
- new ( ELeave ) CPslnSlidesetScreensaverDialog();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor
-CPslnSlidesetScreensaverDialog::~CPslnSlidesetScreensaverDialog()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Executes dialog.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnSlidesetScreensaverDialog::ExecuteDialogLD()
- {
- return CAknDialog::ExecuteLD( R_PSLN_SETTINGS_DIALOG );
- }
-
-// -----------------------------------------------------------------------------
-// Configures dialog.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetScreensaverDialog::SetDialogFlag(
- const TInt aFlag, const TInt aValue )
- {
- switch( aFlag )
- {
- case CPslnSlidesetDialogInterface::EPslnConfigurability:
- case CPslnSlidesetDialogInterface::EPslnDialogType:
- // Cannot be changed dynamically.
- break;
- case CPslnSlidesetDialogInterface::EPslnLaunchMode:
- if ( aValue == CPslnSlidesetDialogInterface::EPslnNormal ||
- aValue == CPslnSlidesetDialogInterface::EPslnConfigureOnly )
- {
- iLaunchMode = aValue;
- }
- break;
- default:
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// Queries for dialog parameter.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnSlidesetScreensaverDialog::GetDialogFlag( const TInt aFlag )
- {
- TInt flagValue = KErrNotFound;
- switch( aFlag )
- {
- case CPslnSlidesetDialogInterface::EPslnDialogType:
- flagValue = EPslnScreensaverDialog;
- break;
- case CPslnSlidesetDialogInterface::EPslnLaunchMode:
- // Configuring Screensaver is handled using screensaver framework.
- flagValue = iLaunchMode;
- break;
- case CPslnSlidesetDialogInterface::EPslnConfigurability:
- // Activation is handled by screensaver framework and Psln application.
- flagValue = CPslnSlidesetDialogInterface::EPslnUnknown;
- break;
- default:
- break;
- }
- return flagValue;
- }
-
-// -----------------------------------------------------------------------------
-// Layouts dialog before showing it.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetScreensaverDialog::PreLayoutDynInitL()
- {
- // Set title pane text.
- SetTitlePaneL( R_PSLN_SLIDESET_SCREENSAVER_DIALOG_TITLE );
- // Set middle softkey as Change.
- CPslnSlidesetDialog::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_CHANGE,
- EPslnCmdAppSetScreenSaver );
- CPslnSlidesetDialog::PreLayoutDynInitL();
- }
-
-// -----------------------------------------------------------------------------
-// Reimplements CAknDialog::OkToExitL inorder to indicate to the
-// screensaver that new settings have been defined.
-// -----------------------------------------------------------------------------
-//
-TBool CPslnSlidesetScreensaverDialog::OkToExitL( TInt aButtonId )
- {
- return CPslnSlidesetDialog::OkToExitL( aButtonId );
- }
-
-// -----------------------------------------------------------------------------
-// Adds setting list items to listbox.
-// -----------------------------------------------------------------------------
-//
-void CPslnSlidesetScreensaverDialog::CreateListBoxItemsL()
- {
- iItems = iCoeEnv->ReadDesC16ArrayResourceL(
- R_PSLN_SCREENSAVER_SLIDE_SETTING_LBX_ITEMS );
- CPslnSlidesetDialog::MakeItemL( EPslnSlideSetImagesId );
- CPslnSlidesetDialog::MakeItemL( EPslnSlideSetDurationId );
-
- if ( !IsFeatureSupported( EPslnSlideSetBacklightRemoved ) )
- {
- CPslnSlidesetDialog::MakeItemL( EPslnSlideSetBacklightId );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Gets help context for Help application.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetScreensaverDialog::GetHelpContext(
- TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KUidPsln;
- aContext.iContext = KSKINS_HLP_SCREENS_SETTINGS;
- }
-
-// ---------------------------------------------------------------------------
-// Shows duration slider setting page.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetScreensaverDialog::ShowDurationSliderL()
- {
- TInt currentValue = iModel->GetSlideSetDuration();
-
- // Retrieve title txt.
- HBufC* sliderTitle = StringLoader::LoadLC( R_PSLN_DURATION_SLIDE_PAGE_TITLE );
-
- // Instantiate setting page.
- CAknSliderSettingPage* dlg = new( ELeave ) CAknSliderSettingPage(
- sliderTitle,
- EAknSettingPageNoOrdinalDisplayed,
- EAknCtSlider,
- R_PSLN_DURATION_SLIDER,
- R_PSLN_IMAGE_SELECTION_SETTING_PAGE,
- currentValue );
-
- dlg->SetSettingId( EPslnSlideSetDurationId );
- dlg->SetSettingPageObserver( this );
- dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged );
- // New value is stored in base class to CenRep.
-
- CleanupStack::PopAndDestroy( sliderTitle );
- }
-
-// ---------------------------------------------------------------------------
-// Shows backlight slider setting page.
-// ---------------------------------------------------------------------------
-//
-void CPslnSlidesetScreensaverDialog::ShowBacklightSliderL()
- {
- // Empty implementation to be overloaded.
- TInt currentValue = iModel->GetSlideSetBacklight();
-
- // Retrieve title txt.
- HBufC* sliderTitle = StringLoader::LoadLC( R_PSLN_BACKLIGHT_SLIDE_PAGE_TITLE );
-
- CAknSliderSettingPage* dlg = new( ELeave ) CAknSliderSettingPage(
- sliderTitle,
- EAknSettingPageNoOrdinalDisplayed,
- EAknCtSlider,
- R_PSLN_BACKLIGHT_SLIDER,
- R_PSLN_IMAGE_SELECTION_SETTING_PAGE,
- currentValue );
-
- dlg->SetSettingId( EPslnSlideSetBacklightId );
- dlg->SetSettingPageObserver( this );
- dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged );
- // New value is stored in base class to CenRep.
-
- CleanupStack::PopAndDestroy( sliderTitle );
- }
-
-// End of File
--- a/psln/pslnslidesetdialog/src/pslnslidesetwallpaperdialog.cpp Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,318 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wallpaper slide set setting dialog.
-*
-*/
-
-
-// General
-#include <e32std.h>
-#include <StringLoader.h>
-#include <csxhelp/skins.hlp.hrh>
-
-// Central repository.
-#include <centralrepository.h>
-#include <AknSkinsInternalCRKeys.h>
-#include <pslninternalcrkeys.h>
-
-// From AVKON
-#include <avkon.hrh>
-#include <aknappui.h>
-#include <aknradiobuttonsettingpage.h>
-#include <AknsSrvClient.h>
-
-// Psln Slide set specific.
-#include "pslnslidesetwallpaperdialog.h"
-#include "pslnslidesetdialog.hrh"
-#include "pslnslidesetmodel.h"
-#include "pslnslidesetconst.h"
-
-// Resources
-#include <pslnslidesetdialogrsc.rsg>
-
-const TInt KPslnSsSettingsItemArray = 6;
-const TInt KPslnSsSlideSetType = 2;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CPslnWallpaperSlidesetDialog::CPslnWallpaperSlidesetDialog()
- {
- }
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperSlidesetDialog::ConstructL()
- {
-#ifndef RD_SLIDESHOW_WALLPAPER
- User::Leave( KErrNotSupported );
-#endif // RD_SLIDESHOW_WALLPAPER
- BaseConstructL(
- GetDialogFlag( CPslnSlidesetDialogInterface::EPslnDialogType ) );
-
- iSlideSetTypeItems = iCoeEnv->ReadDesC16ArrayResourceL(
- R_PSLN_SLIDESET_TYPE_WP_SETTING_PAGE_LBX );
-
- // Add each line separately, since it needs language-dependant conversion.
- iIntervalItems = new( ELeave ) CDesCArrayFlat( KPslnSsSettingsItemArray );
- AppendIntervalItemL( R_PSLN_SLIDESET_INTERVAL_1_MINUTE );
- AppendIntervalItemL( R_PSLN_SLIDESET_INTERVAL_10_MINUTE );
- AppendIntervalItemL( R_PSLN_SLIDESET_INTERVAL_30_MINUTE );
- AppendIntervalItemL( R_PSLN_SLIDESET_INTERVAL_1_HOUR );
- AppendIntervalItemL( R_PSLN_SLIDESET_INTERVAL_1_DAY );
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnWallpaperSlidesetDialog* CPslnWallpaperSlidesetDialog::NewL()
- {
- CPslnWallpaperSlidesetDialog* self = NewLC();
- CleanupStack::Pop(); // Self
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPslnWallpaperSlidesetDialog* CPslnWallpaperSlidesetDialog::NewLC()
- {
- CPslnWallpaperSlidesetDialog* self =
- new ( ELeave ) CPslnWallpaperSlidesetDialog();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor
-CPslnWallpaperSlidesetDialog::~CPslnWallpaperSlidesetDialog()
- {
- // base class destroys iSlideSetTypeItems.
- delete iIntervalItems;
- }
-
-// -----------------------------------------------------------------------------
-// Executes dialog.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnWallpaperSlidesetDialog::ExecuteDialogLD()
- {
- return CAknDialog::ExecuteLD( R_PSLN_SETTINGS_DIALOG );
- }
-
-// -----------------------------------------------------------------------------
-// Configures dialog.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperSlidesetDialog::SetDialogFlag(
- const TInt aFlag, const TInt aValue )
- {
- switch( aFlag )
- {
- case CPslnSlidesetDialogInterface::EPslnDialogType:
- // Cannot be changed.
- break;
- case CPslnSlidesetDialogInterface::EPslnLaunchMode:
- if ( aValue == CPslnSlidesetDialogInterface::EPslnNormal ||
- aValue == CPslnSlidesetDialogInterface::EPslnConfigureOnly )
- {
- iLaunchMode = aValue;
- }
- break;
- default:
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// Queries for dialog parameters.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnWallpaperSlidesetDialog::GetDialogFlag( const TInt aFlag )
- {
- TInt flagValue = KErrNotFound;
- switch( aFlag )
- {
- case CPslnSlidesetDialogInterface::EPslnDialogType:
- flagValue = EPslnWallpaperDialog;
- break;
- case CPslnSlidesetDialogInterface::EPslnLaunchMode:
- flagValue = iLaunchMode;
- break;
- case CPslnSlidesetDialogInterface::EPslnConfigurability:
- TRAP_IGNORE( flagValue = DeduceActivationModeL() );
- break;
- default:
- break;
- }
- return flagValue;
- }
-
-// -----------------------------------------------------------------------------
-// Layouts dialog before showing it.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperSlidesetDialog::PreLayoutDynInitL()
- {
- // Set title pane text.
- SetTitlePaneL( R_PSLN_SLIDESET_WALLPAPER_DIALOG_TITLE );
- // Set middle softkey as Change.
- CPslnSlidesetDialog::SetMiddleSoftKeyLabelL(
- R_PSLN_MSK_CHANGE,
- EPslnCmdAppSetWallpaper );
- CPslnSlidesetDialog::PreLayoutDynInitL();
- }
-
-// -----------------------------------------------------------------------------
-// Process command.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperSlidesetDialog::ProcessCommandL( TInt aCommandId )
- {
- CPslnSlidesetDialog::ProcessCommandL( aCommandId );
- }
-
-// -----------------------------------------------------------------------------
-// Reimplements CAknDialog::OkToExitL.
-// Possibly stores wallpaper type to cenrep.
-// -----------------------------------------------------------------------------
-//
-TBool CPslnWallpaperSlidesetDialog::OkToExitL( TInt aButtonId )
- {
- if ( CPslnSlidesetDialog::IsFeatureSupported( EPslnSlideSetFeatureRandom ) )
- {
- CRepository* repository = CRepository::NewL( KCRUidThemes );
- TInt slideSetType = KErrNotFound;
- repository->Get( KThemesWallpaperSlideSetType, slideSetType );
- delete repository;
- // If Random is selected, then set slide type wallpaper active.
- if ( ( slideSetType == KPslnSlideSetRandomIndex ) &&
- ( iLaunchMode == CPslnSlidesetDialogInterface::EPslnNormal ) )
- {
- CRepository* repository2 =
- CRepository::NewL( KCRUidPersonalisation );
- repository2->Set(
- KPslnWallpaperType,
- KPslnSsSlideSetType );
- delete repository2;
- }
- }
- return CPslnSlidesetDialog::OkToExitL( aButtonId );
- }
-
-
-// -----------------------------------------------------------------------------
-// Adds setting list items to listbox.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperSlidesetDialog::CreateListBoxItemsL()
- {
- iItems = iCoeEnv->ReadDesC16ArrayResourceL(
- R_PSLN_WALLPAPER_SLIDE_SETTING_LBX_ITEMS );
- CPslnSlidesetDialog::MakeItemL( EPslnSlideSetImagesId );
- CPslnSlidesetDialog::MakeItemL( EPslnSlideSetDurationId ); // regard as interval
- }
-
-// ---------------------------------------------------------------------------
-// Gets help context for Help application.
-// ---------------------------------------------------------------------------
-//
-void CPslnWallpaperSlidesetDialog::GetHelpContext(
- TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KUidPsln;
- aContext.iContext = KSCREENSAVER_HLP_WP_SETTINGS;
- }
-
-// -----------------------------------------------------------------------------
-// Show slide set image interval peridod setting page.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperSlidesetDialog::ShowIntervalListL()
- {
- // Retrieve title txt.
- TInt titleResourceID = R_PSLN_INTERVAL_SLIDE_PAGE_TITLE;
- HBufC* titleText = StringLoader::LoadLC( titleResourceID );
-
- // Retrieve current setting page value.
- TInt currentValue = iModel->GetSlideSetInterval();
-
- // Create & show the setting page.
- CAknRadioButtonSettingPage* dlg =
- new( ELeave ) CAknRadioButtonSettingPage(
- titleText,
- EAknSettingPageNoOrdinalDisplayed,
- EAknCtSettingPage,
- 0,
- R_PSLN_IMAGE_SELECTION_SETTING_PAGE,
- currentValue,
- iIntervalItems );
- dlg->SetSettingId( EPslnSlideSetIntervalId );
- dlg->SetSettingPageObserver( this );
- dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted );
- // Base class stores new value to CenRep.
-
- CleanupStack::PopAndDestroy( titleText );
- }
-
-// -----------------------------------------------------------------------------
-// Deduce if the slide set can be activated without showing the dialog.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnWallpaperSlidesetDialog::DeduceActivationModeL()
- {
- TInt retValue = CPslnSlidesetDialogInterface::EPslnNeedsToBeConfigured;
- if ( CPslnSlidesetDialog::IsFeatureSupported( EPslnSlideSetFeatureRandom ) )
- {
- CRepository* repository = CRepository::NewL( KCRUidThemes );
- TInt slideSetType = KErrNotFound;
- repository->Get( KThemesWallpaperSlideSetType, slideSetType );
- delete repository;
- // If selection type is set to random, then direct activation
- // is possible.
- if ( slideSetType == KPslnSlideSetRandomIndex )
- {
- return CPslnSlidesetDialogInterface::EPslnDirectActivationPossible;
- }
- }
- // If slide set image list file exists, direct activation is allowed.
- if ( iModel->SlideSetImageFileExistsL( EAknsSrvInifileSSWP ) &&
- iModel->GetImageCountInSlideSetL( EAknsSrvInifileSSWP ) > 1 )
- {
- retValue = CPslnSlidesetDialogInterface::EPslnDirectActivationPossible;
- }
- return retValue;
- }
-
-// -----------------------------------------------------------------------------
-// Append one line to interval setting list - make language dependant conversion.
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperSlidesetDialog::AppendIntervalItemL( TInt aResourceText )
- {
- HBufC* text = iCoeEnv->AllocReadResourceLC( aResourceText );
- TPtr ptr = text->Des();
- AknTextUtils::LanguageSpecificNumberConversion( ptr );
- iIntervalItems->AppendL( ptr );
- CleanupStack::PopAndDestroy(); // textFromResourceFile
- }
-
-// End of File
--- a/psln/rom/PslnResources.iby Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2002-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: Personalisation application localised resource IBY
-*
-*/
-
-
-#ifndef PSLNRESOURCES_IBY
-#define PSLNRESOURCES_IBY
-
-// Application resource file
-S60_APP_RESOURCE(psln)
-
-// Skin names resource
-S60_APP_RESOURCE2(psln, pslnskinnames)
-
-data=DATAZ_\APP_RESOURCE_DIR\pslncommon.rsc APP_RESOURCE_DIR\pslncommon.rsc
-
-// Application caption resource
-S60_APP_CAPTION(psln)
-
-#ifdef RD_GS_RENOVATION
-
-// Psln GS Plugin resources
-data=DATAZ_\RESOURCE_FILES_DIR\pslngspluginrsc.rsc RESOURCE_FILES_DIR\pslngspluginrsc.rsc
-
-#endif // RD_GS_RENOVATION
-
-#if defined(RD_SLIDESHOW_WALLPAPER) || defined(RD_SLIDESHOW_SCREENSAVER)
-data=DATAZ_\RESOURCE_FILES_DIR\pslnslidesetdialogrsc.rsc RESOURCE_FILES_DIR\pslnslidesetdialogrsc.rsc
-#endif // #if defined(RD_SLIDESHOW_WALLPAPER) || defined(RD_SLIDESHOW_SCREENSAVER)
-
-
-#endif // PSLNRESOURCES_IBY
--- a/psln/rom/psln.iby Fri Jun 25 18:53:58 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Image description file for project psln
-*
-*/
-
-
-#ifndef PSLN_IBY
-#define PSLN_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-// Psln bitmaps
-S60_APP_BITMAP2( psln, pslnicon )
-
-// Application icon
-S60_APP_AIF_ICONS( psln )
-
-// Psln Framework
-file=ABI_DIR\BUILD_DIR\pslnframework.dll SHARED_LIB_DIR\pslnframework.dll
-
-// Psln DLL loaders
-file=ABI_DIR\BUILD_DIR\pslnprofilesettingsloader.dll SHARED_LIB_DIR\pslnprofilesettingsloader.dll
-//file=ABI_DIR\BUILD_DIR\pslnxnclientloader.dll SHARED_LIB_DIR\pslnxnclientloader.dll
-file=ABI_DIR\BUILD_DIR\pslnwallpaperutilsloader.dll SHARED_LIB_DIR\pslnwallpaperutilsloader.dll
-file=ABI_DIR\BUILD_DIR\pslnbrowserlaunchloader.dll SHARED_LIB_DIR\pslnbrowserlaunchloader.dll
-
-// Psln slideset dialog ECOM plugin
-ECOM_PLUGIN( pslnslidesetdialog.dll, 102823ac.rsc )
-
-// Backup
-data=DATAZ_\private\10005A32\backup_registration.xml private\10005A32\backup_registration.xml
-
-// PowerSaveModeConfig
-data=DATAZ_\private\2000B187\cenrep\101F8770.xml private\2000B187\cenrep\101F8770.xml
-data=DATAZ_\private\2000B187\cenrep\102818E8.xml private\2000B187\cenrep\102818E8.xml
-
-#endif // PSLN_IBY