--- a/appinstall_plat/sifui_api/bwins/sifuiu.def Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstall_plat/sifui_api/bwins/sifuiu.def Thu Sep 02 20:34:03 2010 +0300
@@ -1,33 +1,35 @@
EXPORTS
- ?NewL@CSifUiAppInfo@@SAPAV1@ABVTDesC16@@0ABVTVersion@@HPBVCApaMaskedBitmap@@@Z @ 1 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewL(class TDesC16 const &, class TDesC16 const &, class TVersion const &, int, class CApaMaskedBitmap const *)
- ?NewL@CSifUiCertificateInfo@@SAPAV1@AAVCCertificateInfo@Swi@@@Z @ 2 NONAME ; class CSifUiCertificateInfo * CSifUiCertificateInfo::NewL(class Swi::CCertificateInfo &)
- ?ShowConfirmationL@CSifUi@@QAEHABVCSifUiAppInfo@@@Z @ 3 NONAME ; int CSifUi::ShowConfirmationL(class CSifUiAppInfo const &)
- ?ShowCompleteL@CSifUi@@QAEXXZ @ 4 NONAME ; void CSifUi::ShowCompleteL(void)
- ?ExternalizeL@CSifUiAppInfo@@QBEXAAVRWriteStream@@@Z @ 5 NONAME ; void CSifUiAppInfo::ExternalizeL(class RWriteStream &) const
- ?NewLC@CSifUiCertificateInfo@@SAPAV1@AAVCCertificateInfo@Swi@@@Z @ 6 NONAME ; class CSifUiCertificateInfo * CSifUiCertificateInfo::NewLC(class Swi::CCertificateInfo &)
- ?Bitmaps@CSifUiAppInfo@@QBEPBVCApaMaskedBitmap@@XZ @ 7 NONAME ; class CApaMaskedBitmap const * CSifUiAppInfo::Bitmaps(void) const
- ?IncreaseProgressBarValueL@CSifUi@@QAEXH@Z @ 8 NONAME ; void CSifUi::IncreaseProgressBarValueL(int)
- ?ShowFailedL@CSifUi@@QAEXHABVTDesC16@@0@Z @ 9 NONAME ; void CSifUi::ShowFailedL(int, class TDesC16 const &, class TDesC16 const &)
- ?ExternalizeL@CSifUiCertificateInfo@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; void CSifUiCertificateInfo::ExternalizeL(class RWriteStream &) const
- ?IsCancelled@CSifUi@@QAEHXZ @ 11 NONAME ; int CSifUi::IsCancelled(void)
- ?Name@CSifUiAppInfo@@QBEABVTDesC16@@XZ @ 12 NONAME ; class TDesC16 const & CSifUiAppInfo::Name(void) const
- ?NewLC@CSifUiErrorInfo@@SAPAV1@W4TErrorCategory@Usif@@HHABVTDesC16@@1@Z @ 13 NONAME ; class CSifUiErrorInfo * CSifUiErrorInfo::NewLC(enum Usif::TErrorCategory, int, int, class TDesC16 const &, class TDesC16 const &)
- ?NewL@CSifUi@@SAPAV1@XZ @ 14 NONAME ; class CSifUi * CSifUi::NewL(void)
- ?NewL@CSifUiAppInfo@@SAPAV1@ABV1@@Z @ 15 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewL(class CSifUiAppInfo const &)
- ?Version@CSifUiAppInfo@@QBEABVTVersion@@XZ @ 16 NONAME ; class TVersion const & CSifUiAppInfo::Version(void) const
- ?NewL@CSifUiErrorInfo@@SAPAV1@W4TErrorCategory@Usif@@HHABVTDesC16@@1@Z @ 17 NONAME ; class CSifUiErrorInfo * CSifUiErrorInfo::NewL(enum Usif::TErrorCategory, int, int, class TDesC16 const &, class TDesC16 const &)
- ?SetCertificateInfoL@CSifUi@@QAEXABV?$RPointerArray@VCSifUiCertificateInfo@@@@@Z @ 18 NONAME ; void CSifUi::SetCertificateInfoL(class RPointerArray<class CSifUiCertificateInfo> const &)
- ?Size@CSifUiAppInfo@@QBEHXZ @ 19 NONAME ; int CSifUiAppInfo::Size(void) const
- ?SetMemorySelectionL@CSifUi@@QAEXABV?$RArray@H@@@Z @ 20 NONAME ; void CSifUi::SetMemorySelectionL(class RArray<int> const &)
- ?NewLC@CSifUiAppInfo@@SAPAV1@ABVTDesC16@@0ABVTVersion@@HPBVCApaMaskedBitmap@@@Z @ 21 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewLC(class TDesC16 const &, class TDesC16 const &, class TVersion const &, int, class CApaMaskedBitmap const *)
- ?Vendor@CSifUiAppInfo@@QBEABVTDesC16@@XZ @ 22 NONAME ; class TDesC16 const & CSifUiAppInfo::Vendor(void) const
- ?ShowGrantCapabilitiesL@CSifUi@@QAEHABVTCapabilitySet@@@Z @ 23 NONAME ; int CSifUi::ShowGrantCapabilitiesL(class TCapabilitySet const &)
- ?ShowProgressL@CSifUi@@QAEXABVCSifUiAppInfo@@HW4TInstallingPhase@1@@Z @ 24 NONAME ; void CSifUi::ShowProgressL(class CSifUiAppInfo const &, int, enum CSifUi::TInstallingPhase)
- ?ShowPreparingL@CSifUi@@QAEXXZ @ 25 NONAME ; void CSifUi::ShowPreparingL(void)
- ?SetButtonVisible@CSifUi@@QAEXW4TOptionalButton@1@H@Z @ 26 NONAME ; void CSifUi::SetButtonVisible(enum CSifUi::TOptionalButton, int)
- ?ShowSingleSelectionL@CSifUi@@QAEHABVTDesC16@@ABVMDesC16Array@@AAH@Z @ 27 NONAME ; int CSifUi::ShowSingleSelectionL(class TDesC16 const &, class MDesC16Array const &, int &)
- ?ShowFailedL@CSifUi@@QAEXABVCSifUiErrorInfo@@@Z @ 28 NONAME ; void CSifUi::ShowFailedL(class CSifUiErrorInfo const &)
- ?ShowMultiSelectionL@CSifUi@@QAEHABVTDesC16@@ABVMDesC16Array@@AAV?$RArray@H@@@Z @ 29 NONAME ; int CSifUi::ShowMultiSelectionL(class TDesC16 const &, class MDesC16Array const &, class RArray<int> &)
- ?SelectedDrive@CSifUi@@QAEHAAH@Z @ 30 NONAME ; int CSifUi::SelectedDrive(int &)
- ?NewLC@CSifUi@@SAPAV1@XZ @ 31 NONAME ; class CSifUi * CSifUi::NewLC(void)
+ ?ExternalizeL@CSifUiAppInfo@@QBEXAAVRWriteStream@@@Z @ 1 NONAME ; void CSifUiAppInfo::ExternalizeL(class RWriteStream &) const
+ ?IncreaseProgressBarValueL@CSifUi@@QAEXH@Z @ 2 NONAME ; void CSifUi::IncreaseProgressBarValueL(int)
+ ?NewL@CSifUiAppInfo@@SAPAV1@ABV1@@Z @ 3 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewL(class CSifUiAppInfo const &)
+ ?Version@CSifUiAppInfo@@QBEABVTVersion@@XZ @ 4 NONAME ; class TVersion const & CSifUiAppInfo::Version(void) const
+ ?ShowSelectOptionsL@CSifUi@@QAEHABVMDesC16Array@@AAV?$RArray@H@@@Z @ 5 NONAME ; int CSifUi::ShowSelectOptionsL(class MDesC16Array const &, class RArray<int> &)
+ ?SetCertificateInfoL@CSifUi@@QAEXABV?$RPointerArray@VCSifUiCertificateInfo@@@@@Z @ 6 NONAME ; void CSifUi::SetCertificateInfoL(class RPointerArray<class CSifUiCertificateInfo> const &)
+ ?Size@CSifUiAppInfo@@QBEHXZ @ 7 NONAME ; int CSifUiAppInfo::Size(void) const
+ ?ShowGrantCapabilitiesL@CSifUi@@QAEHABVTCapabilitySet@@@Z @ 8 NONAME ; int CSifUi::ShowGrantCapabilitiesL(class TCapabilitySet const &)
+ ?ShowProgressL@CSifUi@@QAEXABVCSifUiAppInfo@@HW4TInstallingPhase@1@@Z @ 9 NONAME ; void CSifUi::ShowProgressL(class CSifUiAppInfo const &, int, enum CSifUi::TInstallingPhase)
+ ?SetButtonVisible@CSifUi@@QAEXW4TOptionalButton@1@H@Z @ 10 NONAME ; void CSifUi::SetButtonVisible(enum CSifUi::TOptionalButton, int)
+ ?ShowMultiSelectionL@CSifUi@@QAEHABVTDesC16@@ABVMDesC16Array@@AAV?$RArray@H@@@Z @ 11 NONAME ; int CSifUi::ShowMultiSelectionL(class TDesC16 const &, class MDesC16Array const &, class RArray<int> &)
+ ?SelectedDrive@CSifUi@@QAEHAAH@Z @ 12 NONAME ; int CSifUi::SelectedDrive(int &)
+ ?NewL@CSifUiAppInfo@@SAPAV1@ABVTDesC16@@0ABVTVersion@@HPBVCApaMaskedBitmap@@@Z @ 13 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewL(class TDesC16 const &, class TDesC16 const &, class TVersion const &, int, class CApaMaskedBitmap const *)
+ ?NewL@CSifUiCertificateInfo@@SAPAV1@AAVCCertificateInfo@Swi@@@Z @ 14 NONAME ; class CSifUiCertificateInfo * CSifUiCertificateInfo::NewL(class Swi::CCertificateInfo &)
+ ?ShowCompleteL@CSifUi@@QAEXXZ @ 15 NONAME ; void CSifUi::ShowCompleteL(void)
+ ?ShowConfirmationL@CSifUi@@QAEHABVCSifUiAppInfo@@@Z @ 16 NONAME ; int CSifUi::ShowConfirmationL(class CSifUiAppInfo const &)
+ ?Bitmaps@CSifUiAppInfo@@QBEPBVCApaMaskedBitmap@@XZ @ 17 NONAME ; class CApaMaskedBitmap const * CSifUiAppInfo::Bitmaps(void) const
+ ?NewLC@CSifUiCertificateInfo@@SAPAV1@AAVCCertificateInfo@Swi@@@Z @ 18 NONAME ; class CSifUiCertificateInfo * CSifUiCertificateInfo::NewLC(class Swi::CCertificateInfo &)
+ ?IsCancelled@CSifUi@@QAEHXZ @ 19 NONAME ; int CSifUi::IsCancelled(void)
+ ?ExternalizeL@CSifUiCertificateInfo@@QBEXAAVRWriteStream@@@Z @ 20 NONAME ; void CSifUiCertificateInfo::ExternalizeL(class RWriteStream &) const
+ ?ShowFailedL@CSifUi@@QAEXHABVTDesC16@@0@Z @ 21 NONAME ; void CSifUi::ShowFailedL(int, class TDesC16 const &, class TDesC16 const &)
+ ?Name@CSifUiAppInfo@@QBEABVTDesC16@@XZ @ 22 NONAME ; class TDesC16 const & CSifUiAppInfo::Name(void) const
+ ?NewL@CSifUi@@SAPAV1@XZ @ 23 NONAME ; class CSifUi * CSifUi::NewL(void)
+ ?NewLC@CSifUiErrorInfo@@SAPAV1@W4TErrorCategory@Usif@@HHABVTDesC16@@1@Z @ 24 NONAME ; class CSifUiErrorInfo * CSifUiErrorInfo::NewLC(enum Usif::TErrorCategory, int, int, class TDesC16 const &, class TDesC16 const &)
+ ?ShowSelectLanguageL@CSifUi@@QAEHABV?$RArray@W4TLanguage@@@@@Z @ 25 NONAME ; int CSifUi::ShowSelectLanguageL(class RArray<enum TLanguage> const &)
+ ?NewL@CSifUiErrorInfo@@SAPAV1@W4TErrorCategory@Usif@@HHABVTDesC16@@1@Z @ 26 NONAME ; class CSifUiErrorInfo * CSifUiErrorInfo::NewL(enum Usif::TErrorCategory, int, int, class TDesC16 const &, class TDesC16 const &)
+ ?NewLC@CSifUiAppInfo@@SAPAV1@ABVTDesC16@@0ABVTVersion@@HPBVCApaMaskedBitmap@@@Z @ 27 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewLC(class TDesC16 const &, class TDesC16 const &, class TVersion const &, int, class CApaMaskedBitmap const *)
+ ?SetMemorySelectionL@CSifUi@@QAEXABV?$RArray@H@@@Z @ 28 NONAME ; void CSifUi::SetMemorySelectionL(class RArray<int> const &)
+ ?Vendor@CSifUiAppInfo@@QBEABVTDesC16@@XZ @ 29 NONAME ; class TDesC16 const & CSifUiAppInfo::Vendor(void) const
+ ?ShowPreparingL@CSifUi@@QAEXXZ @ 30 NONAME ; void CSifUi::ShowPreparingL(void)
+ ?ShowSingleSelectionL@CSifUi@@QAEHABVTDesC16@@ABVMDesC16Array@@AAH@Z @ 31 NONAME ; int CSifUi::ShowSingleSelectionL(class TDesC16 const &, class MDesC16Array const &, int &)
+ ?ShowFailedL@CSifUi@@QAEXABVCSifUiErrorInfo@@@Z @ 32 NONAME ; void CSifUi::ShowFailedL(class CSifUiErrorInfo const &)
+ ?NewLC@CSifUi@@SAPAV1@XZ @ 33 NONAME ; class CSifUi * CSifUi::NewLC(void)
--- a/appinstall_plat/sifui_api/eabi/sifuiu.def Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstall_plat/sifui_api/eabi/sifuiu.def Thu Sep 02 20:34:03 2010 +0300
@@ -15,29 +15,31 @@
_ZN6CSifUi14ShowPreparingLEv @ 14 NONAME
_ZN6CSifUi16SetButtonVisibleENS_15TOptionalButtonEi @ 15 NONAME
_ZN6CSifUi17ShowConfirmationLERK13CSifUiAppInfo @ 16 NONAME
- _ZN6CSifUi19SetCertificateInfoLERK13RPointerArrayI21CSifUiCertificateInfoE @ 17 NONAME
- _ZN6CSifUi19SetMemorySelectionLERK6RArrayIiE @ 18 NONAME
- _ZN6CSifUi19ShowMultiSelectionLERK7TDesC16RK12MDesC16ArrayR6RArrayIiE @ 19 NONAME
- _ZN6CSifUi20ShowSingleSelectionLERK7TDesC16RK12MDesC16ArrayRi @ 20 NONAME
- _ZN6CSifUi22ShowGrantCapabilitiesLERK14TCapabilitySet @ 21 NONAME
- _ZN6CSifUi25IncreaseProgressBarValueLEi @ 22 NONAME
- _ZN6CSifUi4NewLEv @ 23 NONAME
- _ZN6CSifUi5NewLCEv @ 24 NONAME
- _ZNK13CSifUiAppInfo12ExternalizeLER12RWriteStream @ 25 NONAME
- _ZNK13CSifUiAppInfo4NameEv @ 26 NONAME
- _ZNK13CSifUiAppInfo4SizeEv @ 27 NONAME
- _ZNK13CSifUiAppInfo6VendorEv @ 28 NONAME
- _ZNK13CSifUiAppInfo7BitmapsEv @ 29 NONAME
- _ZNK13CSifUiAppInfo7VersionEv @ 30 NONAME
- _ZNK21CSifUiCertificateInfo12ExternalizeLER12RWriteStream @ 31 NONAME
- _ZTI13CSifUiAppInfo @ 32 NONAME
- _ZTI13CSifUiPrivate @ 33 NONAME
- _ZTI15CSifUiErrorInfo @ 34 NONAME
- _ZTI21CSifUiCertificateInfo @ 35 NONAME
- _ZTI6CSifUi @ 36 NONAME
- _ZTV13CSifUiAppInfo @ 37 NONAME
- _ZTV13CSifUiPrivate @ 38 NONAME
- _ZTV15CSifUiErrorInfo @ 39 NONAME
- _ZTV21CSifUiCertificateInfo @ 40 NONAME
- _ZTV6CSifUi @ 41 NONAME
+ _ZN6CSifUi18ShowSelectOptionsLERK12MDesC16ArrayR6RArrayIiE @ 17 NONAME
+ _ZN6CSifUi19SetCertificateInfoLERK13RPointerArrayI21CSifUiCertificateInfoE @ 18 NONAME
+ _ZN6CSifUi19SetMemorySelectionLERK6RArrayIiE @ 19 NONAME
+ _ZN6CSifUi19ShowMultiSelectionLERK7TDesC16RK12MDesC16ArrayR6RArrayIiE @ 20 NONAME
+ _ZN6CSifUi19ShowSelectLanguageLERK6RArrayI9TLanguageE @ 21 NONAME
+ _ZN6CSifUi20ShowSingleSelectionLERK7TDesC16RK12MDesC16ArrayRi @ 22 NONAME
+ _ZN6CSifUi22ShowGrantCapabilitiesLERK14TCapabilitySet @ 23 NONAME
+ _ZN6CSifUi25IncreaseProgressBarValueLEi @ 24 NONAME
+ _ZN6CSifUi4NewLEv @ 25 NONAME
+ _ZN6CSifUi5NewLCEv @ 26 NONAME
+ _ZNK13CSifUiAppInfo12ExternalizeLER12RWriteStream @ 27 NONAME
+ _ZNK13CSifUiAppInfo4NameEv @ 28 NONAME
+ _ZNK13CSifUiAppInfo4SizeEv @ 29 NONAME
+ _ZNK13CSifUiAppInfo6VendorEv @ 30 NONAME
+ _ZNK13CSifUiAppInfo7BitmapsEv @ 31 NONAME
+ _ZNK13CSifUiAppInfo7VersionEv @ 32 NONAME
+ _ZNK21CSifUiCertificateInfo12ExternalizeLER12RWriteStream @ 33 NONAME
+ _ZTI13CSifUiAppInfo @ 34 NONAME
+ _ZTI13CSifUiPrivate @ 35 NONAME
+ _ZTI15CSifUiErrorInfo @ 36 NONAME
+ _ZTI21CSifUiCertificateInfo @ 37 NONAME
+ _ZTI6CSifUi @ 38 NONAME
+ _ZTV13CSifUiAppInfo @ 39 NONAME
+ _ZTV13CSifUiPrivate @ 40 NONAME
+ _ZTV15CSifUiErrorInfo @ 41 NONAME
+ _ZTV21CSifUiCertificateInfo @ 42 NONAME
+ _ZTV6CSifUi @ 43 NONAME
--- a/appinstall_plat/sifui_api/inc/sifui.h Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstall_plat/sifui_api/inc/sifui.h Thu Sep 02 20:34:03 2010 +0300
@@ -240,31 +240,28 @@
IMPORT_C TBool ShowGrantCapabilitiesL( const TCapabilitySet& aCapabilities );
/**
- * Displays a selection dialog with radio-buttons in a pop-up window,
- * and waits for user response. Other displayed installation dialogs
- * (like progress note) are not affected. Returns boolean that indicates
- * if the user cancelled the query. Selected item index is returned in
- * aSelectedIndex parameter (KErrNotFound if cancelled).
- * @param aTitle - selection dialog title
- * @param aSelectableItems - array of selectable items
- * @param aSelectedIndex - returns selected item index
- * @return TBool - ETrue if the user accepted the query, EFalse otherwise
+ * Displays pop-up language selection dialog with radio-buttons, and
+ * waits for user response. Other displayed installation dialogs (like
+ * progress note) are not affected. Returns integer that is the index
+ * of the selected language in given langauge array, or error code.
+ * Return value is KErrCancel if the user cancelled the query.
+ * @param aLanguages - array of selectable languages
+ * @return The selected item index to aLangauges array, or error code.
*/
- IMPORT_C TBool ShowSingleSelectionL( const TDesC& aTitle,
- const MDesCArray& aSelectableItems, TInt& aSelectedIndex );
+ IMPORT_C TInt ShowSelectLanguageL( const RArray<TLanguage>& aLanguages );
/**
- * Displays a multi-selection dialog with checkboxes in a pop-up window,
- * and waits for user response. Other displayed installation dialogs
- * (like progress note) are not affected. Returns user selected indices,
- * in aSelectedIndexes array (empty if cancelled).
- * @param aTitle - multi-selection dialog title
- * @param aSelectableItems - array of selectable items
+ * Displays multi-selection pop-up dialog with checkboxes, and waits
+ * for user response. Other displayed installation dialogs (like progress
+ * note) are not affected. Returns ETrue if the user made the selection,
+ * EFalse if the user cancelled the query. Selected indices are returned
+ * in aSelectedIndexes array.
+ * @param aSelectableItems - array of selectable items displayed
* @param aSelectedIndexes - returns the selected item indices
* @return TBool - ETrue if the user accepted the query, EFalse otherwise
*/
- IMPORT_C TBool ShowMultiSelectionL( const TDesC& aTitle,
- const MDesCArray& aSelectableItems, RArray<TInt>& aSelectedIndexes );
+ IMPORT_C TBool ShowSelectOptionsL( const MDesCArray& aSelectableItems,
+ RArray<TInt>& aSelectedIndexes );
//=================================================
@@ -274,6 +271,10 @@
// DEPRECATED, WILL BE REMOVED, DO NOT USE
IMPORT_C void ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
const TDesC& aErrorDetails = KNullDesC );
+ IMPORT_C TBool ShowSingleSelectionL( const TDesC& aTitle,
+ const MDesCArray& aSelectableItems, TInt& aSelectedIndex );
+ IMPORT_C TBool ShowMultiSelectionL( const TDesC& aTitle,
+ const MDesCArray& aSelectableItems, RArray<TInt>& aSelectedIndexes );
private: // new functions
--- a/appinstall_plat/sifui_api/inc/sifuidefs.h Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstall_plat/sifui_api/inc/sifuidefs.h Thu Sep 02 20:34:03 2010 +0300
@@ -79,5 +79,13 @@
// Variant map keys for "grant capabilities" dialog parameters
_LIT( KSifUiGrantCapabilities, "grcap" ); // binary (TCapabilitySet)
+// Variant map keys for "select language" dialog parameters
+_LIT( KSifUiSelectableLanguages, "lang" ); // binary (TPckg< RArray<TLanguage> >)
+_LIT( KSifUiSelectedLanguageIndex, "langind" ); // integer
+
+// Variant map keys for "select options" dialog parameters
+_LIT( KSifUiSelectableOptions, "opts" ); // descriptor array
+_LIT( KSifUiSelectedOptions, "optsind" ); // binary (TPckg< RArray<TInt> >)
+
#endif // SIFUIDEFS_H
--- a/appinstall_plat/sifui_api/inc/sifuiprivate.h Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstall_plat/sifui_api/inc/sifuiprivate.h Thu Sep 02 20:34:03 2010 +0300
@@ -59,10 +59,9 @@
void ShowFailedL( const CSifUiErrorInfo& aErrorInfo );
void SetButtonVisible( CSifUi::TOptionalButton aButton, TBool aIsVisible );
TBool ShowGrantCapabilitiesL( const TCapabilitySet& aCapabilities );
- TBool ShowSingleSelectionL( const TDesC& aTitle, const MDesCArray& aSelectableItems,
- TInt& aSelectedIndex );
- TBool ShowMultiSelectionL( const TDesC& aTitle, const MDesCArray& aSelectableItems,
- RArray<TInt>& aSelectedIndexes );
+ TInt ShowSelectLanguageL( const RArray<TLanguage>& aLanguages );
+ TBool ShowSelectOptionsL( const MDesCArray& aSelectableItems,
+ RArray<TInt>& aSelectedIndexes );
protected: // from CActive
void DoCancel();
@@ -83,8 +82,9 @@
void ChangeNoteTypeL( TInt aType );
void AddParamL( const TDesC& aKey, TInt aValue );
void AddParamL( const TDesC& aKey, const TDesC& aValue );
+ void AddParamListL( const TDesC& aKey, const MDesCArray& aList );
void AddParamBinaryL( const TDesC& aKey, const CBufBase& aBinary );
- void AddParamListL( const TDesC& aKey, const MDesCArray& aList );
+ void AddParamPckgL( const TDesC& aKey, const TDesC8& aPckg );
void AddParamsAppInfoL( const CSifUiAppInfo& aAppInfo );
void AddParamsCertificatesL();
void AddParamsHiddenButtonsL();
@@ -123,6 +123,8 @@
TBool iNoCancelProgressButton;
TBool iNoShowInAppLibButton;
TBool iNoErrorDetailsButton;
+ TInt iSelectedLanguage;
+ RArray<TInt> iSelectedOptions;
};
--- a/appinstall_plat/sifui_api/src/sifui.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstall_plat/sifui_api/src/sifui.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -165,41 +165,60 @@
}
// ---------------------------------------------------------------------------
-// CSifUi::ShowSingleSelectionL()
+// CSifUi::ShowSelectLanguageL()
// ---------------------------------------------------------------------------
//
-EXPORT_C TBool CSifUi::ShowSingleSelectionL( const TDesC& aTitle,
- const MDesCArray& aSelectableItems, TInt& aSelectedIndex )
+EXPORT_C TInt CSifUi::ShowSelectLanguageL( const RArray<TLanguage>& aLanguages )
{
- return iPrivate->ShowSingleSelectionL( aTitle, aSelectableItems, aSelectedIndex );
+ return iPrivate->ShowSelectLanguageL( aLanguages );
}
// ---------------------------------------------------------------------------
-// CSifUi::ShowMultiSelectionL()
+// CSifUi::ShowSelectOptionsL()
// ---------------------------------------------------------------------------
//
-EXPORT_C TBool CSifUi::ShowMultiSelectionL( const TDesC& aTitle,
- const MDesCArray& aSelectableItems, RArray<TInt>& aSelectedIndexes )
+EXPORT_C TBool CSifUi::ShowSelectOptionsL( const MDesCArray& aSelectableItems,
+ RArray<TInt>& aSelectedIndexes )
{
- return iPrivate->ShowMultiSelectionL( aTitle, aSelectableItems, aSelectedIndexes );
+ return iPrivate->ShowSelectOptionsL( aSelectableItems, aSelectedIndexes );
}
// ---------------------------------------------------------------------------
-// CSifUi::ShowFailedL()
+// DEPRECATED: CSifUi::ShowFailedL()
// ---------------------------------------------------------------------------
//
// TODO: This function is deprecated, remove it completely.
-EXPORT_C void CSifUi::ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
- const TDesC& aErrorDetails )
+EXPORT_C void CSifUi::ShowFailedL( TInt /*aErrorCode*/, const TDesC& /*aErrorMessage*/,
+ const TDesC& /*aErrorDetails*/ )
+ {
+ User::Invariant();
+ }
+
+// ---------------------------------------------------------------------------
+// DEPRECATED: CSifUi::ShowSingleSelectionL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CSifUi::ShowSingleSelectionL( const TDesC& /*aTitle*/,
+ const MDesCArray& /*aSelectableItems*/, TInt& /*aSelectedIndex*/ )
{
- CSifUiErrorInfo* errorInfo = CSifUiErrorInfo::NewLC( Usif::EUnknown, aErrorCode,
- 0, aErrorMessage, aErrorDetails );
- iPrivate->ShowFailedL( *errorInfo );
- CleanupStack::PopAndDestroy( errorInfo );
+ User::Invariant();
+ return EFalse; // for compiler
}
// ---------------------------------------------------------------------------
+// DEPRECATED: CSifUi::ShowMultiSelectionL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CSifUi::ShowMultiSelectionL( const TDesC& /*aTitle*/,
+ const MDesCArray& /*aSelectableItems*/, RArray<TInt>& /*aSelectedIndexes*/ )
+ {
+ User::Invariant();
+ return EFalse; // for compiler
+ }
+
+
+// ---------------------------------------------------------------------------
// CSifUi::CSifUi()
// ---------------------------------------------------------------------------
//
--- a/appinstall_plat/sifui_api/src/sifuiprivate.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstall_plat/sifui_api/src/sifuiprivate.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -314,45 +314,53 @@
//
TBool CSifUiPrivate::ShowGrantCapabilitiesL( const TCapabilitySet& aCapabilities )
{
+ TPckg<TCapabilitySet> capabilitySetPckg( aCapabilities );
+ AddParamPckgL( KSifUiGrantCapabilities, capabilitySetPckg );
+ UpdateDialogAndWaitForResponseL();
+ return( iDialogReturnValue == KErrNone );
+ }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowSelectLanguageL()
+// ---------------------------------------------------------------------------
+//
+TInt CSifUiPrivate::ShowSelectLanguageL( const RArray<TLanguage>& aLanguages )
+ {
CBufFlat* buffer = CBufFlat::NewL( KBufferGranularity );
CleanupStack::PushL( buffer );
RBufWriteStream writeStream( *buffer );
CleanupClosePushL( writeStream );
- TPckg<TCapabilitySet> capabilitySetPackage( aCapabilities );
- writeStream.WriteL( capabilitySetPackage );
+ TPckg< const RArray<TLanguage> > languagesPckg( aLanguages );
+ writeStream.WriteL( languagesPckg );
writeStream.CommitL();
CleanupStack::PopAndDestroy( &writeStream );
- AddParamBinaryL( KSifUiGrantCapabilities, *buffer );
+ AddParamBinaryL( KSifUiSelectableLanguages, *buffer );
+ CleanupStack::PopAndDestroy( buffer );
UpdateDialogAndWaitForResponseL();
-
- CleanupStack::PopAndDestroy( buffer );
- return( iDialogReturnValue == KErrNone );
+ if( iDialogReturnValue == KErrNone )
+ {
+ return iSelectedLanguage;
+ }
+ return iDialogReturnValue;
}
// ---------------------------------------------------------------------------
-// CSifUiPrivate::ShowSingleSelectionL()
+// CSifUiPrivate::ShowSelectOptionsL()
// ---------------------------------------------------------------------------
//
-TBool CSifUiPrivate::ShowSingleSelectionL( const TDesC& /*aTitle*/,
- const MDesCArray& /*aSelectableItems*/, TInt& aSelectedIndex )
+TBool CSifUiPrivate::ShowSelectOptionsL( const MDesCArray& aSelectableItems,
+ RArray<TInt>& aSelectedIndexes )
{
- // TODO: implement
- aSelectedIndex = 0;
- return ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// CSifUiPrivate::ShowMultiSelectionL()
-// ---------------------------------------------------------------------------
-//
-TBool CSifUiPrivate::ShowMultiSelectionL( const TDesC& /*aTitle*/,
- const MDesCArray& /*aSelectableItems*/, RArray<TInt>& aSelectedIndexes )
- {
- // TODO: implement
- aSelectedIndexes.Reset();
- return ETrue;
+ AddParamListL( KSifUiSelectableOptions, aSelectableItems );
+ iSelectedOptions.Reset();
+ UpdateDialogAndWaitForResponseL();
+ if( iSelectedOptions.Count() )
+ {
+ aSelectedIndexes = iSelectedOptions;
+ }
+ return( iDialogReturnValue == KErrNone );
}
// ---------------------------------------------------------------------------
@@ -362,10 +370,23 @@
void CSifUiPrivate::DoCancel()
{
FLOG( _L("CSifUiPrivate::DoCancel") );
+ if( iDeviceDialog )
+ {
+ iDeviceDialog->Cancel(); // Closes the device dialog.
+ }
- if( iWait && iWait->IsStarted() && iWait->CanStopNow() )
+ // Cancelled device dialog does not call DeviceDialogClosed() hence have
+ // to complete the request now. CActive::Cancel() waits until the request
+ // is completed.
+ TRequestStatus* status( &iStatus );
+ User::RequestComplete( status, KErrCancel );
+
+ // Normally User::RequestComplete() invokes RunL(), but not now, because
+ // the object is not active any more (after it has been cancelled). Hence,
+ // have to stop CActiveSchedulerWait too.
+ iWaitCompletionCode = KErrCancel;
+ if( iWait && iWait->IsStarted() )
{
- iWaitCompletionCode = KErrCancel;
iWait->AsyncStop();
}
}
@@ -378,7 +399,7 @@
{
FLOG_1( _L("CSifUiPrivate::RunL, iStatus.Int()=%d"), iStatus.Int() );
- if( iWait )
+ if( iWait && iWait->IsStarted() )
{
iWait->AsyncStop();
}
@@ -400,6 +421,26 @@
FLOG_1( _L("CSifUiPrivate::DataReceived, iSelectedDrive=%d"), (TUint)iSelectedDrive );
}
+ const CHbSymbianVariant* selectedLangVariant = aData.Get( KSifUiSelectedLanguageIndex );
+ if( selectedLangVariant )
+ {
+ iSelectedLanguage = *( selectedLangVariant->Value<TInt>() );
+ FLOG_1( _L("CSifUiPrivate::DataReceived, iSelectedLanguage=%d"), iSelectedLanguage );
+ }
+
+ const CHbSymbianVariant* selectedOptsVariant = aData.Get( KSifUiSelectedOptions );
+ if( selectedOptsVariant )
+ {
+ const TDesC8 *dataPtr = reinterpret_cast< const TDesC8* >( selectedOptsVariant->Data() );
+ RMemReadStream readStream( selectedOptsVariant->Data(), dataPtr->Size() );
+ CleanupClosePushL( readStream );
+ TPckg< RArray<TInt> > selectedOptionsPckg( iSelectedOptions );
+ readStream.ReadL( selectedOptionsPckg );
+ CleanupStack::PopAndDestroy( &readStream );
+ FLOG_1( _L("CSifUiPrivate::DataReceived, iSelectedOptions.Count()=%d"),
+ iSelectedOptions.Count() );
+ }
+
const CHbSymbianVariant* variant = aData.Get( KSifUiQueryReturnValue );
if( variant )
{
@@ -568,6 +609,17 @@
}
// ---------------------------------------------------------------------------
+// CSifUiPrivate::AddParamPckgL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::AddParamPckgL( const TDesC& aKey, const TDesC8& aPckg )
+ {
+ CHbSymbianVariant* variant = NULL;
+ variant = CHbSymbianVariant::NewL( &aPckg, CHbSymbianVariant::EBinary );
+ User::LeaveIfError( VariantMapL()->Add( aKey, variant ) );
+ }
+
+// ---------------------------------------------------------------------------
// CSifUiPrivate::AddParamsAppInfoL()
// ---------------------------------------------------------------------------
//
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialog.h Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialog.h Thu Sep 02 20:34:03 2010 +0300
@@ -68,17 +68,22 @@
void updateButtons(const QVariantMap ¶meters);
void prepareForErrorDetails(const QVariantMap ¶meters);
bool displayAdditionalQuery(const QVariantMap ¶meters);
+ bool displayGrantCapabilitiesQuery(const QVariantMap ¶meters);
+ bool displaySelectLanguageQuery(const QVariantMap ¶meters);
+ bool displaySelectOptionsQuery(const QVariantMap ¶meters);
void sendResult(SifUiDeviceDialogReturnValue value);
private slots:
- void handleAccepted();
- void handleCancelled();
+ void handleInstallAccepted();
+ void handleInstallCancelled();
void handleMemorySelectionChanged(const QChar &driveLetter);
void handleHidePressed();
void handleShowInstalled();
void handleErrorDetails();
void handleCapabilitiesGranted();
- void handleCapabilitiesDenied();
+ void handleAdditionalDialogClosed();
+ void handleLanguageSelected(int index);
+ void handleOptionsDialogClosed(int code);
private:
Q_DISABLE_COPY(SifUiDialog)
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogdefinitions.h Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogdefinitions.h Thu Sep 02 20:34:03 2010 +0300
@@ -81,5 +81,13 @@
// Variant map keys for "grant capabilities" dialog parameters
const QString KSifUiGrantCapabilities = "grcap"; // binary (TCapabilitySet)
+// Variant map keys for "select language" dialog parameters
+const QString KSifUiSelectableLanguages = "lang"; // binary (TPckg< RArray<TLanguage> >)
+const QString KSifUiSelectedLanguageIndex = "langind"; // integer
+
+// Variant map keys for "select options" dialog parameters
+const QString KSifUiSelectableOptions = "opts"; // descriptor array
+const QString KSifUiSelectedOptions = "optsind"; // binary (TPckg< RArray<TInt> >)
+
#endif // SIFUIDIALOGDEFINITIONS_H
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialoggrantcapabilities.h Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialoggrantcapabilities.h Thu Sep 02 20:34:03 2010 +0300
@@ -30,7 +30,7 @@
Q_OBJECT
public: // constructor and destructor
- SifUiDialogGrantCapabilities(const QString& applicationName,
+ SifUiDialogGrantCapabilities(const QString &applicationName,
const QVariant &capabilities, QGraphicsItem *parent = 0);
virtual ~SifUiDialogGrantCapabilities();
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialoggrantcapabilitiescontent.h Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialoggrantcapabilitiescontent.h Thu Sep 02 20:34:03 2010 +0300
@@ -29,7 +29,7 @@
Q_OBJECT
public: // constructor and destructor
- SifUiDialogGrantCapabilitiesContent(const QString& applicationName,
+ SifUiDialogGrantCapabilitiesContent(const QString &applicationName,
const QVariant &capabilities, QGraphicsItem *parent = 0);
virtual ~SifUiDialogGrantCapabilitiesContent();
@@ -43,9 +43,9 @@
private: // new functions
void setCapabilities(const QVariant &capabilities);
#ifdef Q_OS_SYMBIAN
- void setCapabilitiesSymbianL( const TDesC8& aBuf );
+ void setCapabilitiesSymbianL( const TDesC8 &aBuf );
QString capabilityName( const TCapability aCapability );
-#endif
+#endif // Q_OS_SYMBIAN
private: // data
QStringList mCapabilities;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogselectlanguage.h Thu Sep 02 20:34:03 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2010 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: Language selection dialog in SifUi
+*
+*/
+
+#ifndef SIFUIDIALOGSELECTLANGUAGE_H
+#define SIFUIDIALOGSELECTLANGUAGE_H
+
+#include <HbDialog>
+
+class HbRadioButtonList;
+
+
+/**
+ * SifUi dialog requesting the user to select language. This
+ * dialog is displayed only if the languages in the sis-file
+ * do not match the languages that are supported by the mobile
+ * phone.
+ */
+class SifUiDialogSelectLanguage : public HbDialog
+{
+ Q_OBJECT
+
+public: // constructor and destructor
+ SifUiDialogSelectLanguage(const QVariant &languages, QGraphicsItem *parent = 0);
+ ~SifUiDialogSelectLanguage();
+
+signals:
+ void languageSelected(int index);
+ void languageSelectionCancelled();
+
+public: // new functions
+ int selectedLanguageIndex() const;
+
+private: // new functions
+ QStringList languageNames(const QVariant &languages);
+
+private slots:
+ void handleAccepted();
+ void handleRejected();
+
+private: // data
+ HbRadioButtonList *mRadioButtonList;
+ HbAction *mOkAction;
+};
+
+#endif // SIFUIDIALOGSELECTLANGUAGE_H
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.pro Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.pro Thu Sep 02 20:34:03 2010 +0300
@@ -34,7 +34,8 @@
inc/sifuidialogcertificateinfo.h \
inc/sifuidialogcertificatedetails.h \
inc/sifuidialoggrantcapabilities.h \
- inc/sifuidialoggrantcapabilitiescontent.h
+ inc/sifuidialoggrantcapabilitiescontent.h \
+ inc/sifuidialogselectlanguage.h
SOURCES += src/sifuidevicedialogplugin.cpp \
src/sifuidialog.cpp \
@@ -43,14 +44,17 @@
src/sifuidialogcertificateinfo.cpp \
src/sifuidialogcertificatedetails.cpp \
src/sifuidialoggrantcapabilities.cpp \
- src/sifuidialoggrantcapabilitiescontent.cpp
+ src/sifuidialoggrantcapabilitiescontent.cpp \
+ src/sifuidialogselectlanguage.cpp
symbian: {
TARGET.EPOCALLOWDLLDATA = 1
TARGET.CAPABILITY = CAP_GENERAL_DLL
TARGET.UID3 = 0x2002C3AC
- SOURCES += src/sifuidialogtitlewidget_symbian.cpp
+ SOURCES += src/sifuidialogtitlewidget_symbian.cpp \
+ src/sifuidialogselectlanguage_symbian.cpp \
+ src/sifuidialogselectoptions_symbian.cpp
pluginstub.sources = sifuidevicedialogplugin.dll
pluginstub.path = /resource/plugins/devicedialogs
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidevicedialogplugin.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidevicedialogplugin.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -28,6 +28,8 @@
};
+// ======== MEMBER FUNCTIONS ========
+
// ----------------------------------------------------------------------------
// SifUiDeviceDialogPlugin::SifUiDeviceDialogPlugin()
// ----------------------------------------------------------------------------
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -19,14 +19,16 @@
#include "sifuidialogtitlewidget.h" // SifUiDialogTitleWidget
#include "sifuidialogcontentwidget.h" // SifUiDialogContentWidget
#include "sifuidialoggrantcapabilities.h" // SifUiDialogGrantCapabilities
-#include "sifuiinstallindicatorparams.h"
+#include "sifuidialogselectlanguage.h" // SifUiDialogSelectLanguage
+#include "sifuiinstallindicatorparams.h" // KSifUiInstallIndicatorType
#include <QFile>
-#include <hblabel.h>
-#include <hbaction.h>
-#include <hbindicator.h>
-#include <hbtranslator.h>
-#include <hbmessagebox.h>
-#include <qvaluespacesubscriber.h>
+#include <HbLabel>
+#include <HbAction>
+#include <HbIndicator>
+#include <HbTranslator>
+#include <HbMessageBox>
+#include <HbSelectionDialog>
+#include <QValueSpaceSubscriber>
#include <xqappmgr.h> // XQApplicationManager
QTM_USE_NAMESPACE
@@ -37,6 +39,30 @@
const QString KSwiErrorsFile = "c:\\temp\\swierrors.txt";
const QString KSwiErrorFormat = " (%1)";
+#ifdef Q_OS_SYMBIAN
+QByteArray ConvertOptionalComponentIndexesL( const QList<QVariant> &aIndexes );
+#endif // Q_OS_SYMBIAN
+
+
+// ======== LOCAL FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// convertOptionalComponentIndexes()
+// ----------------------------------------------------------------------------
+//
+QVariant convertOptionalComponentIndexes(const QList<QVariant> &selections)
+{
+#ifdef Q_OS_SYMBIAN
+ QByteArray byteArray;
+ QT_TRAP_THROWING( byteArray = ConvertOptionalComponentIndexesL( selections ) );
+ return QVariant( byteArray );
+#else
+ return QVariant();
+#endif
+}
+
+
+// ======== MEMBER FUNCTIONS ========
// ----------------------------------------------------------------------------
// SifUiDialog::SifUiDialog()
@@ -237,7 +263,7 @@
mPrimaryAction = new HbAction(hbTrId("txt_common_button_ok"));
addAction(mPrimaryAction);
disconnect(mPrimaryAction, SIGNAL(triggered()), this, SLOT(close()));
- connect(mPrimaryAction, SIGNAL(triggered()), this, SLOT(handleAccepted()));
+ connect(mPrimaryAction, SIGNAL(triggered()), this, SLOT(handleInstallAccepted()));
break;
case SifUiProgressNote:
if (!parameters.contains(KSifUiProgressNoteIsHideButtonHidden)) {
@@ -283,7 +309,8 @@
mSecondaryAction = new HbAction(hbTrId("txt_common_button_cancel"));
addAction(mSecondaryAction);
disconnect(mSecondaryAction, SIGNAL(triggered()), this, SLOT(close()));
- connect(mSecondaryAction, SIGNAL(triggered()), this, SLOT(handleCancelled()));
+ connect(mSecondaryAction, SIGNAL(triggered()),
+ this, SLOT(handleInstallCancelled()));
}
break;
case SifUiCompleteNote:
@@ -328,12 +355,46 @@
//
bool SifUiDialog::displayAdditionalQuery(const QVariantMap ¶meters)
{
+ if (displayGrantCapabilitiesQuery(parameters) ||
+ displaySelectLanguageQuery(parameters) ||
+ displaySelectOptionsQuery(parameters)) {
+ return true;
+ }
+ return false;
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialog::displayGrantCapabilitiesQuery()
+// ----------------------------------------------------------------------------
+//
+bool SifUiDialog::displayGrantCapabilitiesQuery(const QVariantMap ¶meters)
+{
if (parameters.contains(KSifUiGrantCapabilities)) {
SifUiDialogGrantCapabilities *dlg = new SifUiDialogGrantCapabilities(
mContent->applicationName(), parameters.value(KSifUiGrantCapabilities));
+ dlg->setAttribute(Qt::WA_DeleteOnClose, true);
connect(dlg, SIGNAL(accepted()), this, SLOT(handleCapabilitiesGranted()));
- connect(dlg, SIGNAL(declined()), this, SLOT(handleCapabilitiesDenied()));
+ connect(dlg, SIGNAL(rejected()), this, SLOT(handleAdditionalDialogClosed()));
+ dlg->open();
+ return true;
+ }
+ return false;
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialog::displaySelectLanguageQuery()
+// ----------------------------------------------------------------------------
+//
+bool SifUiDialog::displaySelectLanguageQuery(const QVariantMap ¶meters)
+{
+ if (parameters.contains(KSifUiSelectableLanguages)) {
+ SifUiDialogSelectLanguage *dlg = new SifUiDialogSelectLanguage(
+ parameters.value(KSifUiSelectableLanguages));
dlg->setAttribute(Qt::WA_DeleteOnClose, true);
+ connect(dlg, SIGNAL(languageSelected(int)),
+ this, SLOT(handleLanguageSelected(int)));
+ connect(dlg, SIGNAL(languageSelectionCancelled()),
+ this, SLOT(handleAdditionalDialogClosed()));
dlg->open();
return true;
}
@@ -341,6 +402,29 @@
}
// ----------------------------------------------------------------------------
+// SifUiDialog::displaySelectOptionsQuery()
+// ----------------------------------------------------------------------------
+//
+bool SifUiDialog::displaySelectOptionsQuery(const QVariantMap ¶meters)
+{
+ if (parameters.contains(KSifUiSelectableOptions)) {
+ HbSelectionDialog *dlg = new HbSelectionDialog;
+ dlg->setAttribute(Qt::WA_DeleteOnClose, true);
+
+ // TODO: localized UI string needed
+ HbLabel *title = new HbLabel("Items to install:");
+ dlg->setHeadingWidget(title);
+
+ dlg->setStringItems(parameters.value(KSifUiSelectableOptions).toStringList());
+ dlg->setSelectionMode(HbAbstractItemView::MultiSelection);
+
+ dlg->open(this, SLOT(handleOptionsDialogClosed(int)));
+ return true;
+ }
+ return false;
+}
+
+// ----------------------------------------------------------------------------
// SifUiDialog::sendResult()
// ----------------------------------------------------------------------------
//
@@ -351,20 +435,20 @@
}
// ----------------------------------------------------------------------------
-// SifUiDialog::handleAccepted()
+// SifUiDialog::handleInstallAccepted()
// ----------------------------------------------------------------------------
//
-void SifUiDialog::handleAccepted()
+void SifUiDialog::handleInstallAccepted()
{
mContent->changeType(SifUiProgressNote);
sendResult(SifUiContinue);
}
// ----------------------------------------------------------------------------
-// SifUiDialog::handleCancelled()
+// SifUiDialog::handleInstallCancelled()
// ----------------------------------------------------------------------------
//
-void SifUiDialog::handleCancelled()
+void SifUiDialog::handleInstallCancelled()
{
sendResult(SifUiCancel);
close();
@@ -439,11 +523,37 @@
}
// ----------------------------------------------------------------------------
-// SifUiDialog::handleCapabilitiesDenied()
+// SifUiDialog::handleAdditionalDialogClosed()
// ----------------------------------------------------------------------------
//
-void SifUiDialog::handleCapabilitiesDenied()
+void SifUiDialog::handleAdditionalDialogClosed()
{
sendResult(SifUiCancel);
}
+// ----------------------------------------------------------------------------
+// SifUiDialog::handleLanguageSelected()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialog::handleLanguageSelected(int index)
+{
+ mResultMap[KSifUiSelectedLanguageIndex] = QVariant(index);
+ sendResult(SifUiContinue);
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialog::handleOptionsDialogClosed()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialog::handleOptionsDialogClosed(int code)
+{
+ if (code == HbDialog::Accepted) {
+ HbSelectionDialog *dlg = reinterpret_cast<HbSelectionDialog*>(sender());
+ QList<QVariant> selections = dlg->selectedItems();
+ mResultMap[KSifUiSelectedOptions] = convertOptionalComponentIndexes(selections);
+ sendResult(SifUiContinue);
+ } else {
+ sendResult(SifUiCancel);
+ }
+}
+
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialoggrantcapabilities.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialoggrantcapabilities.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -15,11 +15,13 @@
*
*/
-#include <sifuidialoggrantcapabilities.h> // SifUiDialogGrantCapabilities
-#include <sifuidialoggrantcapabilitiescontent.h> // SifUiDialogGrantCapabilitiesContent
+#include "sifuidialoggrantcapabilities.h" // SifUiDialogGrantCapabilities
+#include "sifuidialoggrantcapabilitiescontent.h" // SifUiDialogGrantCapabilitiesContent
#include <HbLabel>
+// ======== MEMBER FUNCTIONS ========
+
// ----------------------------------------------------------------------------
// SifUiDialogGrantCapabilities::SifUiDialogGrantCapabilities()
// ----------------------------------------------------------------------------
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialoggrantcapabilitiescontent.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialoggrantcapabilitiescontent.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -15,22 +15,21 @@
*
*/
-#include <sifuidialoggrantcapabilitiescontent.h> // SifUiDialogGrantCapabilitiesContent
+#include "sifuidialoggrantcapabilitiescontent.h" // SifUiDialogGrantCapabilitiesContent
#include <QGraphicsLinearLayout>
#include <HbLabel>
#include <HbPushButton>
#include <HbScrollArea>
#include <HbAction>
#include <HbDialog>
-#ifdef Q_OS_SYMBIAN
-#include <s32mem.h> // TMemBuf
-#endif // Q_OS_SYMBIAN
const QString KDetailsTextHtmlBeginList = "<html>%1<ul>";
const QString KDetailsTextHtmlListItem = "<li>%1</li>";
const QString KDetailsTextHtmlEndList = "</ul></html>";
+// ======== MEMBER FUNCTIONS ========
+
// ----------------------------------------------------------------------------
// SifUiDialogGrantCapabilitiesContent::~SifUiDialogGrantCapabilitiesContent()
// ----------------------------------------------------------------------------
@@ -135,8 +134,9 @@
//
void SifUiDialogGrantCapabilitiesContent::setCapabilities(const QVariant &capabilities)
{
+ QByteArray byteArray = capabilities.toByteArray();
+
#ifdef Q_OS_SYMBIAN
- QByteArray byteArray = capabilities.toByteArray();
const TPtrC8 ptr(reinterpret_cast<const TText8*>(byteArray.constData()), byteArray.length());
QT_TRAP_THROWING(setCapabilitiesSymbianL(ptr));
#endif // Q_OS_SYMBIAN
@@ -153,15 +153,8 @@
//
void SifUiDialogGrantCapabilitiesContent::setCapabilitiesSymbianL( const TDesC8& aBuf )
{
- TMemBuf buf;
- TUint8* ptr = const_cast<TUint8*>(aBuf.Ptr());
- buf.Set(ptr, ptr + aBuf.Size(), MStreamBuf::ERead);
- RReadStream readStream(&buf);
- CleanupClosePushL(readStream);
- TCapabilitySet capabilitySet;
- TPckg<TCapabilitySet> capabilitySetPackage( capabilitySet );
- readStream.ReadL(capabilitySetPackage);
- CleanupStack::PopAndDestroy(&readStream);
+ const TPckgC<TCapabilitySet>& capabilitySetPckg( reinterpret_cast< const TPckgC<TCapabilitySet>& >( aBuf ) );
+ const TCapabilitySet& capabilitySet( capabilitySetPckg() );
mIsCapabilitiesValid = true;
for( TInt i = 0; i < ECapability_HardLimit && mIsCapabilitiesValid; i++ ) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogselectlanguage.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2010 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: Language selection dialog in SifUi
+*
+*/
+
+#include "sifuidialogselectlanguage.h" // SifUiDialogSelectLanguage
+#include <HbLabel>
+#include <HbRadioButtonList>
+#include <HbAction>
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// SifUiDialogSelectLanguage::SifUiDialogSelectLanguage()
+// ----------------------------------------------------------------------------
+//
+SifUiDialogSelectLanguage::SifUiDialogSelectLanguage(const QVariant &languages,
+ QGraphicsItem *parent) : HbDialog(parent), mRadioButtonList(0), mOkAction(0)
+{
+ setTimeout(HbPopup::NoTimeout);
+ setDismissPolicy(HbPopup::NoDismiss);
+ setModal(true);
+
+ HbLabel *title = new HbLabel(hbTrId("txt_installer_title_select_language"));
+ setHeadingWidget(title);
+
+ Q_ASSERT( mRadioButtonList == 0 );
+ mRadioButtonList = new HbRadioButtonList(this);
+ mRadioButtonList->setItems(languageNames(languages));
+ setContentWidget(mRadioButtonList);
+
+ HbAction *okAction = new HbAction(QString(hbTrId("txt_common_button_ok")), this);
+ disconnect(okAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(okAction, SIGNAL(triggered()), this, SLOT(handleAccepted()));
+ addAction(okAction);
+
+ HbAction *cancelAction = new HbAction(QString(hbTrId("txt_common_button_cancel")), this);
+ disconnect(cancelAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(cancelAction, SIGNAL(triggered()), this, SLOT(handleRejected()));
+ addAction(cancelAction);
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogSelectLanguage::~SifUiDialogSelectLanguage()
+// ----------------------------------------------------------------------------
+//
+SifUiDialogSelectLanguage::~SifUiDialogSelectLanguage()
+{
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogSelectLanguage::selectedLanguageIndex()
+// ----------------------------------------------------------------------------
+//
+int SifUiDialogSelectLanguage::selectedLanguageIndex() const
+{
+ if (mRadioButtonList) {
+ return mRadioButtonList->selected();
+ }
+ return -1;
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogSelectLanguage::handleAccepted()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogSelectLanguage::handleAccepted()
+{
+ int index = selectedLanguageIndex();
+ emit languageSelected(index);
+ close();
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogSelectLanguage::handleRejected()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogSelectLanguage::handleRejected()
+{
+ emit languageSelectionCancelled();
+ close();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogselectlanguage_symbian.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -0,0 +1,217 @@
+/*
+* Copyright (c) 2010 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: Symbian-specific part of the language selection dialog in SifUi
+*
+*/
+
+#include "sifuidialogselectlanguage.h" // SifUiDialogSelectLanguage
+#include <languages.hrh> // S60 language definitions
+#include <hb/hbcore/hblocaleutil.h> // HbLocaleUtil
+#include <s32mem.h> // RMemReadStream
+
+//
+// String array to convert Symbian TLanguage enums to ISO 639-1 language codes.
+//
+struct SLangString
+ {
+ TInt iId;
+ const TText8* iCode;
+ };
+
+const TInt KLangCodeLength = 2;
+const SLangString KLangStrings[] =
+ {
+ { ELangEnglish, _S8( "en" ) },
+ { ELangFrench, _S8( "fr" ) },
+ { ELangGerman, _S8( "de" ) },
+ { ELangSpanish, _S8( "es" ) },
+ { ELangItalian, _S8( "it" ) },
+ { ELangSwedish, _S8( "sv" ) },
+ { ELangDanish, _S8( "da" ) },
+ { ELangNorwegian, _S8( "no" ) },
+ { ELangFinnish, _S8( "fi" ) },
+ { ELangAmerican, _S8( "en" ) },
+ { ELangSwissFrench, _S8( "fr" ) },
+ { ELangSwissGerman, _S8( "de" ) },
+ { ELangPortuguese, _S8( "pt" ) },
+ { ELangTurkish, _S8( "tr" ) },
+ { ELangIcelandic, _S8( "is" ) },
+ { ELangRussian, _S8( "ru" ) },
+ { ELangHungarian, _S8( "hu" ) },
+ { ELangDutch, _S8( "nl" ) },
+ { ELangBelgianFlemish, _S8( "nl" ) },
+ { ELangAustralian, _S8( "en" ) },
+ { ELangBelgianFrench, _S8( "fr" ) },
+ { ELangAustrian, _S8( "de" ) },
+ { ELangNewZealand, _S8( "en" ) },
+ { ELangInternationalFrench, _S8( "fr" ) },
+ { ELangCzech, _S8( "cs" ) },
+ { ELangSlovak, _S8( "sk" ) },
+ { ELangPolish, _S8( "pl" ) },
+ { ELangSlovenian, _S8( "sl" ) },
+ { ELangTaiwanChinese, _S8( "zh" ) },
+ { ELangHongKongChinese, _S8( "zh" ) },
+ { ELangPrcChinese, _S8( "zh" ) },
+ { ELangJapanese, _S8( "ja" ) },
+ { ELangThai, _S8( "th" ) },
+ { ELangAfrikaans, _S8( "af" ) },
+ { ELangAlbanian, _S8( "sq" ) },
+ { ELangAmharic, _S8( "am" ) },
+ { ELangArabic, _S8( "ar" ) },
+ { ELangArmenian, _S8( "hy" ) },
+ { ELangTagalog, _S8( "tl" ) },
+ { ELangBelarussian, _S8( "be" ) },
+ { ELangBengali, _S8( "bn" ) },
+ { ELangBulgarian, _S8( "bg" ) },
+ { ELangBurmese, _S8( "my" ) },
+ { ELangCatalan, _S8( "ca" ) },
+ { ELangCroatian, _S8( "hr" ) },
+ { ELangCanadianEnglish, _S8( "en" ) },
+ { ELangInternationalEnglish, _S8( "en" ) },
+ { ELangSouthAfricanEnglish, _S8( "en" ) },
+ { ELangEstonian, _S8( "et" ) },
+ { ELangFarsi, _S8( "fa" ) },
+ { ELangCanadianFrench, _S8( "fr" ) },
+ { ELangScotsGaelic, _S8( "gd" ) },
+ { ELangGeorgian, _S8( "ka" ) },
+ { ELangGreek, _S8( "el" ) },
+ { ELangCyprusGreek, _S8( "el" ) },
+ { ELangGujarati, _S8( "gu" ) },
+ { ELangHebrew, _S8( "he" ) },
+ { ELangHindi, _S8( "hi" ) },
+ { ELangIndonesian, _S8( "id" ) },
+ { ELangIrish, _S8( "ga" ) },
+ { ELangSwissItalian, _S8( "it" ) },
+ { ELangKannada, _S8( "kn" ) },
+ { ELangKazakh, _S8( "kk" ) },
+ { ELangKhmer, _S8( "km" ) },
+ { ELangKorean, _S8( "ko" ) },
+ { ELangLao, _S8( "lo" ) },
+ { ELangLatvian, _S8( "lv" ) },
+ { ELangLithuanian, _S8( "lt" ) },
+ { ELangMacedonian, _S8( "mk" ) },
+ { ELangMalay, _S8( "ms" ) },
+ { ELangMalayalam, _S8( "ml" ) },
+ { ELangMarathi, _S8( "mr" ) },
+ { ELangMoldavian, _S8( "mo" ) },
+ { ELangMongolian, _S8( "mn" ) },
+ { ELangNorwegianNynorsk, _S8( "nn" ) },
+ { ELangBrazilianPortuguese, _S8( "pt" ) },
+ { ELangPunjabi, _S8( "pa" ) },
+ { ELangRomanian, _S8( "ro" ) },
+ { ELangSerbian, _S8( "sr" ) },
+ { ELangSinhalese, _S8( "si" ) },
+ { ELangSomali, _S8( "so" ) },
+ { ELangInternationalSpanish, _S8( "es" ) },
+ { ELangLatinAmericanSpanish, _S8( "es" ) },
+ { ELangSwahili, _S8( "sw" ) },
+ { ELangFinlandSwedish, _S8( "sv" ) },
+ { ELangReserved1, _S8( "en" ) },
+ { ELangTamil, _S8( "ta" ) },
+ { ELangTelugu, _S8( "te" ) },
+ { ELangTibetan, _S8( "bo" ) },
+ { ELangTigrinya, _S8( "ti" ) },
+ { ELangCyprusTurkish, _S8( "tr" ) },
+ { ELangTurkmen, _S8( "tk" ) },
+ { ELangUkrainian, _S8( "uk" ) },
+ { ELangUrdu, _S8( "ur" ) },
+ { ELangReserved2, _S8( "en" ) },
+ { ELangVietnamese, _S8( "vi" ) },
+ { ELangWelsh, _S8( "cy" ) },
+ { ELangZulu, _S8( "zu" ) },
+ { KLangTaiwanEnglish, _S8( "en" ) },
+ { KLangHongKongEnglish, _S8( "en" ) },
+ { KLangPrcEnglish, _S8( "en" ) },
+ { KLangJapaneseEnglish, _S8( "en" ) },
+ { KLangThaiEnglish, _S8( "en" ) }
+ };
+
+#define KNUMLANGSTRINGS ( sizeof( KLangStrings ) / sizeof( SLangString ) )
+
+
+// ======== LOCAL FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// LanguageCode()
+// ----------------------------------------------------------------------------
+//
+QString LanguageCode( const TLanguage aLanguage )
+{
+ for( TInt index = 0; index < KNUMLANGSTRINGS; ++index )
+ {
+ SLangString lang = KLangStrings[ index ];
+ if( lang.iId == aLanguage )
+ {
+ return QString::fromAscii( reinterpret_cast<const char*>( lang.iCode ),
+ KLangCodeLength );
+ }
+ }
+ return QString("");
+}
+
+// ----------------------------------------------------------------------------
+// LanguageName()
+// ----------------------------------------------------------------------------
+//
+QString LanguageName( const TLanguage aLanguage )
+{
+ QString langCode = LanguageCode( aLanguage );
+ if( langCode.isEmpty() ) {
+ return hbTrId("txt_installer_list_unknown_language");
+ }
+ QString langName = HbLocaleUtil::localisedLanguageName( langCode );
+ if( langName.isEmpty() ) {
+ return hbTrId("txt_installer_list_unknown_language");
+ }
+ return langName;
+}
+
+// ----------------------------------------------------------------------------
+// LanguageNamesL()
+// ----------------------------------------------------------------------------
+//
+QStringList LanguageNamesL( const TDesC8& aBuf )
+{
+ RMemReadStream readStream( aBuf.Ptr(), aBuf.Size() );
+ CleanupClosePushL( readStream );
+ RArray<TLanguage> langArray;
+ TPckg< RArray<TLanguage> > langArrayPckg( langArray );
+ readStream.ReadL( langArrayPckg );
+ CleanupStack::PopAndDestroy( &readStream );
+
+ QStringList langNames;
+ for( TInt index = 0; index < langArray.Count(); index++ ) {
+ QT_TRYCATCH_LEAVING( langNames.append( LanguageName( langArray[index] ) ) );
+ }
+ return langNames;
+}
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// SifUiDialogSelectLanguage::languageNames()
+// ----------------------------------------------------------------------------
+//
+QStringList SifUiDialogSelectLanguage::languageNames(const QVariant& languages)
+{
+ QByteArray byteArray = languages.toByteArray();
+ QStringList names;
+
+ const TPtrC8 ptr(reinterpret_cast<const TText8*>(byteArray.constData()), byteArray.length());
+ QT_TRAP_THROWING( names = LanguageNamesL( ptr ) );
+
+ return names;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogselectoptions_symbian.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2010 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: Symbian specific functions in optional components selection dialog
+*
+*/
+
+#include <QList>
+#include <QVariant>
+#include <s32mem.h> // RDesWriteStream
+
+const TInt KBufferGranularity = 4;
+
+
+// ----------------------------------------------------------------------------
+// ConvertOptionalComponentIndexesL()
+// ----------------------------------------------------------------------------
+//
+QByteArray ConvertOptionalComponentIndexesL( const QList<QVariant> &aIndexes )
+{
+ // Get aIndexes into symbianArray
+ RArray<TInt> symbianArray;
+ CleanupClosePushL( symbianArray );
+ QListIterator<QVariant> iter( aIndexes );
+ while( iter.hasNext() ) {
+ QVariant item = iter.next();
+ int i;
+ bool ok;
+ i = item.toInt( &ok );
+ if( ok ) {
+ symbianArray.AppendL( i );
+ }
+ }
+
+ // Write symbianArray to a package buffer
+ CBufFlat* buffer = CBufFlat::NewL( KBufferGranularity );
+ CleanupStack::PushL( buffer );
+ RBufWriteStream writeStream( *buffer );
+ CleanupClosePushL( writeStream );
+ TPckg< const RArray<TInt> > indexesPckg( symbianArray );
+ writeStream.WriteL( indexesPckg );
+ writeStream.CommitL();
+ CleanupStack::PopAndDestroy( &writeStream );
+
+ // Create byte array (copies data) from the package buffer
+ const TInt KFromTheBeginning = 0;
+ TPtr8 ptr = buffer->Ptr(KFromTheBeginning);
+ QByteArray byteArray( reinterpret_cast<const char*>( ptr.Ptr() ), ptr.Length() );
+ CleanupStack::PopAndDestroy( buffer );
+
+ CleanupStack::PopAndDestroy( &symbianArray );
+ return byteArray;
+}
+
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -27,7 +27,6 @@
#include <bautils.h> // BaflUtils
#include <driveinfo.h> // DriveInfo
#include <featmgr.h> // FeatureManager
-//#include <csxhelp/am.hlp.hrh> // Help IDs
using namespace Usif;
@@ -189,7 +188,6 @@
const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/ )
{
FLOG( _L("CSisxSifPluginUiHandler::DisplayInstallL") );
-
iOperationPhase = EInstalling;
return ETrue;
}
@@ -202,10 +200,7 @@
const TCapabilitySet& aCapabilitySet )
{
FLOG( _L("CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL") );
- TBool okToContinue = EFalse;
-
- okToContinue = iSifUi->ShowGrantCapabilitiesL( aCapabilitySet );
-
+ TBool okToContinue = iSifUi->ShowGrantCapabilitiesL( aCapabilitySet );
return okToContinue;
}
@@ -214,11 +209,11 @@
// ---------------------------------------------------------------------------
//
TInt CSisxSifPluginUiHandler::DisplayLanguageL( const Swi::CAppInfo& /*aAppInfo*/,
- const RArray<TLanguage>& /*aLanguages*/ )
+ const RArray<TLanguage>& aLanguages )
{
FLOG( _L("CSisxSifPluginUiHandler::DisplayLanguageL") );
-
- return 0;
+ TInt langIndex = iSifUi->ShowSelectLanguageL( aLanguages );
+ return langIndex;
}
// ---------------------------------------------------------------------------
@@ -274,11 +269,29 @@
// ---------------------------------------------------------------------------
//
TBool CSisxSifPluginUiHandler::DisplayOptionsL( const Swi::CAppInfo& /*aAppInfo*/,
- const RPointerArray<TDesC>& /*aOptions*/, RArray<TBool>& /*aSelections*/ )
+ const RPointerArray<TDesC>& aOptions, RArray<TBool>& aSelections )
{
FLOG( _L("CSisxSifPluginUiHandler::DisplayOptionsL") );
+ TInt optionCount = aOptions.Count();
+ CPtrCArray* selectableItems = new( ELeave ) CPtrC16Array( optionCount );
+ CleanupStack::PushL( selectableItems );
+ for( TInt index = 0; index < optionCount; index++ )
+ {
+ selectableItems->AppendL( *aOptions[ index ] );
+ }
- return ETrue;
+ RArray<TInt> selectedIndexes;
+ TBool isSelected = iSifUi->ShowSelectOptionsL( *selectableItems, selectedIndexes );
+ if( isSelected && selectedIndexes.Count() )
+ {
+ TInt selectionsCount = aSelections.Count();
+ __ASSERT_DEBUG( selectionsCount == optionCount, User::Invariant() );
+ for( TInt index = 0; index < selectionsCount; index++ )
+ {
+ aSelections[ index ] = ( selectedIndexes.Find( index ) != KErrNotFound );
+ }
+ }
+ return isSelected;
}
// ---------------------------------------------------------------------------
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -95,10 +95,13 @@
installLayout->addItem(installOld);
HbPushButton *launchApp = new HbPushButton(tr("Install by opening file"));
installLayout->addItem(launchApp);
+ HbPushButton *cancelInstall = new HbPushButton(tr("Cancel installing"));
+ installLayout->addItem(cancelInstall);
installLayout->addStretch();
connect(installNew, SIGNAL(clicked()), this, SLOT(installUsingNewApi()));
connect(installOld, SIGNAL(clicked()), this, SLOT(installUsingOldApi()));
connect(launchApp, SIGNAL(clicked()), this, SLOT(installByOpeningFile()));
+ connect(cancelInstall, SIGNAL(clicked()), this, SLOT(cancelInstalling()));
HbToolBar *installToolBar = new HbToolBar();
installToolBar->addAction(tr("RemoveView"), this, SLOT(removeViewActivated()));
@@ -229,6 +232,17 @@
}
}
+void TestInstaller::cancelInstalling()
+{
+ if (mRunner) {
+ delete mRunner;
+ mRunner = 0;
+ HbMessageBox::warning(tr("Running operation deleted"));
+ } else {
+ HbMessageBox::warning(tr("No operation running"));
+ }
+}
+
void TestInstaller::removeUsingNewApi()
{
if (isFileSelected() && createRunner(true)) {
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.h Wed Aug 18 09:55:45 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.h Thu Sep 02 20:34:03 2010 +0300
@@ -49,6 +49,7 @@
void installUsingNewApi();
void installUsingOldApi();
void installByOpeningFile();
+ void cancelInstalling();
void removeUsingNewApi();
void removeUsingOldApi();
void handleComplete();
--- a/iaupdate/IAD/launcher/iaupdatelauncher.pro Wed Aug 18 09:55:45 2010 +0300
+++ b/iaupdate/IAD/launcher/iaupdatelauncher.pro Thu Sep 02 20:34:03 2010 +0300
@@ -21,6 +21,8 @@
symbian {
TARGET.UID3 = 0x2001FE2F
TARGET.CAPABILITY = CAP_APPLICATION
+ SKINICON = qtg_large_swupdate
+ TRANSLATIONS = swupdate.ts
}
DEPENDPATH += .
DEPENDPATH += ./src
--- a/iaupdate/IAD/launcher/src/iaupdatelauncherclient.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/iaupdate/IAD/launcher/src/iaupdatelauncherclient.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -48,11 +48,13 @@
void IAUpdateLauncherClient::launch()
{
IAUPDATE_TRACE("[IAUPDATE] IAUpdateLauncherClient::launch() begin");
- mServiceRequest = new XQServiceRequest("com.nokia.services.swupdate.swupdate_interface","startedByLauncher(bool)",false);
+ mServiceRequest = new XQServiceRequest("com.nokia.services.swupdate.swupdate_interface","startedByLauncher(QString)",false);
XQRequestInfo requestInfo;
requestInfo.setEmbedded(true);
mServiceRequest->setInfo(requestInfo);
+ QString stringRefreshFromNetworkDenied("0");
+ *mServiceRequest << stringRefreshFromNetworkDenied;
bool ret = mServiceRequest->send();
IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateLauncherClient::launch() ret %d", ret );
if (!ret)
--- a/iaupdate/IAD/ui/iaupdate.pro Wed Aug 18 09:55:45 2010 +0300
+++ b/iaupdate/IAD/ui/iaupdate.pro Thu Sep 02 20:34:03 2010 +0300
@@ -24,6 +24,7 @@
TARGET.CAPABILITY = CAP_APPLICATION TrustedUI PowerMgmt
rssrules = "hidden = KAppIsHidden;"
RSS_RULES += rssrules
+ TRANSLATIONS = swupdate.ts
}
DEPENDPATH += .
--- a/iaupdate/IAD/ui/inc/iaupdatemainview.h Wed Aug 18 09:55:45 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatemainview.h Thu Sep 02 20:34:03 2010 +0300
@@ -35,6 +35,7 @@
class IAUpdateEngine;
class IAUpdateDialogUtil;
class TIAUpdateVersion;
+class HbTranslator;
class IAUpdateMainView : public HbView
@@ -117,6 +118,7 @@
bool mMark;
bool mSelectionUpdate;
bool mSelectionConnect;
+ HbTranslator *mTranslator;
};
--- a/iaupdate/IAD/ui/inc/iaupdateserviceprovider.h Wed Aug 18 09:55:45 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateserviceprovider.h Thu Sep 02 20:34:03 2010 +0300
@@ -65,7 +65,7 @@
~IAUpdateServiceProvider();
public slots:
- void startedByLauncher(bool refreshFromNetworkDenied);
+ void startedByLauncher(QString refreshFromNetworkDenied);
void checkUpdates(QString stringWgId,
QString stringUid,
QString searchCriteria,
--- a/iaupdate/IAD/ui/src/iaupdatemainview.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatemainview.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -34,6 +34,7 @@
#include <hblabel.h>
#include <hbgroupbox.h>
#include <hbdataform.h>
+#include <hbtranslator.h>
#include "iaupdatemainview.h"
#include "iaupdateengine.h"
@@ -49,6 +50,8 @@
const int KKiloByte = 1024;
const int KMegaByte = 1024 * 1024;
const int KMaxShownInKiloBytes = 10 * KMegaByte;
+const QString KTranslationsPath = "/resource/qt/translations/";
+const QString KTranslationsFile = "swupdate";
IAUpdateMainView::IAUpdateMainView(IAUpdateEngine *engine):
@@ -65,6 +68,9 @@
mNode = NULL;
mSelectionUpdate = false;
mSelectionConnect = false;
+ mTranslator = NULL;
+
+ //mTranslator = new HbTranslator(KTranslationsPath, KTranslationsFile);
HbDocumentLoader loader;
bool ok = false;
@@ -116,6 +122,8 @@
mSelections = new HbGroupBox(dockContainer);
mSelections->setHeading("Selected 0/0 (0 kB)");
+ //QString selectedString = QString(hbTrId("txt_software_subhead_selected_1l_2l_3l_kb")).arg(0).arg(0).arg(0);
+ //mSelections->setHeading(selectedString);
dockLayout->addItem( mSelections);
@@ -132,7 +140,7 @@
IAUpdateMainView::~IAUpdateMainView()
{
IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::~IAUpdateMainView() begin");
-
+ //delete mTranslator;
IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::~IAUpdateMainView() end");
}
@@ -166,6 +174,7 @@
if (error == KErrNone)
{
formText = QString("Applications are up to date");
+ //formText = hbTrId("txt_software_formlabel_applications_are_up_to_date");
}
else
{
@@ -204,7 +213,7 @@
}
if (mDialogUtil)
{
- HbAction *primaryAction = new HbAction("OK");
+ HbAction *primaryAction = new HbAction(hbTrId("txt_common_button_ok"));
mDialogUtil->showAgreement(primaryAction);
}
IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleDisclaimer() end");
--- a/iaupdate/IAD/ui/src/iaupdateserviceprovider.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateserviceprovider.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -42,11 +42,11 @@
IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::~IAUpdateServiceProvider()");
}
-void IAUpdateServiceProvider::startedByLauncher(bool refreshFromNetworkDenied)
+void IAUpdateServiceProvider::startedByLauncher(QString refreshFromNetworkDenied)
{
IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::startedByLauncher() begin");
mAsyncReqId = setCurrentRequestAsync();
- mEngine->StartedByLauncherL(refreshFromNetworkDenied);
+ mEngine->StartedByLauncherL(refreshFromNetworkDenied.toInt());
IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::startedByLauncher() end");
}
--- a/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -340,9 +340,11 @@
if ( mDialogUtil )
{
mPrimaryAction = NULL;
- mPrimaryAction = new HbAction("Accept");
+ //mPrimaryAction = new HbAction(hbTrId("txt_software_button_accept"));
+ mPrimaryAction = new HbAction("Accept");
HbAction *secondaryAction = NULL;
- secondaryAction = new HbAction("Decline");
+ //secondaryAction = new HbAction(hbTrId("txt_software_button_decline"));
+ secondaryAction = new HbAction("Decline");
mDialogUtil->showAgreement(mPrimaryAction,secondaryAction);
iDialogState = EAgreement;
}
@@ -460,8 +462,9 @@
if ( mDialogUtil )
{
mPrimaryAction = NULL;
- mPrimaryAction = new HbAction("OK");
- mDialogUtil->showInformation(QString("Insufficient memory. Free some memory and try again."), mPrimaryAction);
+ mPrimaryAction = new HbAction(hbTrId("txt_common_button_ok"));
+ //mDialogUtil->showInformation(hbTrId("txt_software_info_insufficient_memory_free_some_m"), mPrimaryAction);
+ mDialogUtil->showInformation(QString("Insufficient memory. Free some memory and try again."), mPrimaryAction);
iDialogState = EInsufficientMemory;
}
}
--- a/installationservices/swcomponentregistry/group/bld.inf Wed Aug 18 09:55:45 2010 +0300
+++ b/installationservices/swcomponentregistry/group/bld.inf Thu Sep 02 20:34:03 2010 +0300
@@ -109,6 +109,7 @@
../test/tscr/scripts/data/scr-newerminordbversion.db z:/tusif/tscr/data/scr-newerminordbversion.db
../test/tscr/scripts/data/scr-oldermajordbversion.db z:/tusif/tscr/data/scr-oldermajordbversion.db
../test/tscr/scripts/data/scr-multiapp.db z:/tusif/tscr/data/scr-multiapp.db
+../test/tscr/scripts/data/scr-nodefaultvalues.db z:/tusif/tscr/data/scr-nodefaultvalues.db
../test/testdb/scr.db z:/sys/install/scr/provisioned/scr.db
--- a/installationservices/swcomponentregistry/source/client/scrclientsubsessions.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/installationservices/swcomponentregistry/source/client/scrclientsubsessions.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -643,7 +643,7 @@
{
applicationRegistration = CApplicationRegistrationData::NewLC();
TBool isApplicationRegistrationDataPresent = EFalse;
- DEBUG_PRINTF(_L("Sending the request to retrieve the next Application Info from the AppInfo view."));
+ DEBUG_PRINTF(_L("Sending the request to retrieve the next application details from the Application Registration view."));
TIpcArgs args;
TInt argNum = 1;
isApplicationRegistrationDataPresent = GetObjectL(*this, *applicationRegistration, EGetApplicationRegistrationSize, EGetApplicationRegistrationData, argNum, args);
--- a/installationservices/swcomponentregistry/source/server/scrrequestimpl.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/installationservices/swcomponentregistry/source/server/scrrequestimpl.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -4541,7 +4541,7 @@
if(stmt->ProcessNextRowL())
{
aApplicationRegistration.iAppUid = TUid::Uid(stmt->IntColumnL(0));
- HBufC* appFile = stmt->StrColumnL(2).AllocLC();
+ HBufC* appFile = stmt->StrColumnL(2).AllocL();
DeleteObjectZ(aApplicationRegistration.iAppFile);
aApplicationRegistration.iAppFile = appFile;
aApplicationRegistration.iTypeId = stmt->IntColumnL(3);
@@ -4562,8 +4562,7 @@
DEBUG_PRINTF2(_L("The Launch for this App is %d "), aApplicationRegistration.iCharacteristics.iLaunchInBackground);
DEBUG_PRINTF2(_L("The Group Name for this App is %S "), &(aApplicationRegistration.iCharacteristics.iGroupName));
DEBUG_PRINTF2(_L("The Default screen number for this App is %d "), aApplicationRegistration.iDefaultScreenNumber);
-
- CleanupStack::Pop(1);
+
}
else
{
@@ -4677,7 +4676,7 @@
}
else
{
- DEBUG_PRINTF(_L8("No Nearest locale found for AppUid %d in the SCR"));
+ DEBUG_PRINTF2(_L("No Nearest locale found for AppUid 0x%x in the SCR"), aAppUid);
}
}
@@ -4696,30 +4695,37 @@
if((aSubsessionContext->iAppRegIndex < aSubsessionContext->iAppUids.Count()))
{
TUid appUid = aSubsessionContext->iAppUids[aSubsessionContext->iAppRegIndex];
-
+
//Populate the Application Registration Info
- if(GetApplicationRegistrationInfoL(*aApplicationRegistration,appUid))
+ TBool retVal = EFalse;
+ TRAPD(err, retVal = GetApplicationRegistrationInfoL(*aApplicationRegistration, appUid));
+
+ //Check if we have a valid application
+ if((KErrNone == err) && retVal)
{
- //Populate File ownership info
- GetFileOwnershipInfoL(*aApplicationRegistration,appUid);
-
+ TRAP(err,
+ //Populate File ownership info
+ GetFileOwnershipInfoL(*aApplicationRegistration, appUid);
//Populate service info
GetServiceInfoL(*aApplicationRegistration, appUid, aSubsessionContext->iLanguage);
-
//Populate localizable appinfo including caption and icon info
- //and view data and its caption and icon info.
- GetLocalizableAppInfoL(*aApplicationRegistration,appUid, aSubsessionContext->iLanguage);
-
- GetAppRegOpaqueDataL(*aApplicationRegistration,appUid, aSubsessionContext->iLanguage);
+ //and view data and its caption and icon info.
+ GetLocalizableAppInfoL(*aApplicationRegistration, appUid, aSubsessionContext->iLanguage);
+
+ GetAppRegOpaqueDataL(*aApplicationRegistration, appUid, aSubsessionContext->iLanguage);
- GetAppPropertiesInfoL(*aApplicationRegistration,appUid, aSubsessionContext->iLanguage);
+ GetAppPropertiesInfoL(*aApplicationRegistration, appUid, aSubsessionContext->iLanguage); );
+
dataFound = ETrue;
}
else
{
DeleteObjectZ(aApplicationRegistration);
}
-
+
+ if(KErrNone != err)
+ DEBUG_PRINTF2(_L8("Error while reading the app registration info 0x%x. Ignoring current application details."), appUid);
+
//Incrementing the index
aSubsessionContext->iAppRegIndex++;
Binary file installationservices/swcomponentregistry/test/tscr/scripts/data/scr-nodefaultvalues.db has changed
--- a/installationservices/swi/source/sisregistry/server/sisregistryserversession.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryserversession.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -1133,7 +1133,7 @@
if (a[0] == '!')
{
TChar driveChar;
- iFs.DriveToChar(EDriveZ, driveChar);
+ User::LeaveIfError(iFs.DriveToChar(EDriveZ, driveChar));
a[0] = driveChar;
}
@@ -1216,7 +1216,7 @@
if (a[0] == '!')
{
TChar driveChar;
- iFs.DriveToChar(EDriveZ, driveChar);
+ User::LeaveIfError(iFs.DriveToChar(EDriveZ, driveChar));
a[0] = driveChar;
}
@@ -1328,7 +1328,11 @@
{
// First boot detected. Add the first boot marker file as well as the format marker on the drive.
SisRegistryUtil::CreateFileWithAttributesL(iFs, firstBootMarkerFilePath);
- SisRegistryUtil::CreateFileWithAttributesL(iFs, formatMarkerPath, fileAttributes);
+ TRAPD(err,SisRegistryUtil::CreateFileWithAttributesL(iFs, formatMarkerPath, fileAttributes);)
+ if (err != KErrNone && err != KErrAlreadyExists)
+ {
+ User::Leave(err);
+ }
}
else
{
--- a/ncdengine/engine/engine.pro Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/engine.pro Thu Sep 02 20:34:03 2010 +0300
@@ -33,6 +33,9 @@
TARGET.VID = VID_DEFAULT
TARGET.UID3 = 0x20019119
TARGET.EPOCALLOWDLLDATA = 1
+ rssrules = "hidden = KAppIsHidden;"
+ RSS_RULES += rssrules
+
INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
@@ -55,4 +58,5 @@
LIBS += -lhttpfiltercommon -lecom -lhttp -lesock -lcommdb -lsysutil -lhash -lestlib -lestor -lbafl -lplatformenv
LIBS += -lXmlEngineUtils -lXmlEngineDOM -lXmlEngine -lXmlInterface -lxmlframework -lcharconv -ledbms -lefsrv
LIBS += -lncdutils_20019119 -lncddevicemgmt_20019119
+ LIBS += -lxqutils
}
--- a/ncdengine/engine/inc/catalogsclientserverserver.h Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/inc/catalogsclientserverserver.h Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -33,6 +33,10 @@
{
public:
+ /**
+ * Static constructor, leaves pointer on cleanup stack
+ */
+ static CCatalogsClientServerServer* NewL();
/**
* Static constructor, leaves pointer on cleanup stack
--- a/ncdengine/engine/src/catalogsclientserverserver.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/src/catalogsclientserverserver.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -15,6 +15,7 @@
*
*/
+#include <QCoreApplication>
#include "catalogsclientserverserver.h"
#include "catalogsclientserverserversession.h"
@@ -60,6 +61,16 @@
//
// ---------------------------------------------------------------------------
//
+CCatalogsClientServerServer* CCatalogsClientServerServer::NewL()
+ {
+ CCatalogsClientServerServer* self = CCatalogsClientServerServer::NewLC();
+ CleanupStack::Pop( self );
+ return self;
+ }
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
CCatalogsClientServerServer* CCatalogsClientServerServer::NewLC()
{
CCatalogsClientServerServer* self = new( ELeave )
@@ -201,7 +212,7 @@
// No more clients, shutdown
if ( iSessionCount <= 0 )
{
- CActiveScheduler::Stop();
+ QCoreApplication::exit(0);
}
}
@@ -292,78 +303,6 @@
}
}
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CCatalogsClientServerServer::ThreadFunctionL()
- {
- DLTRACEIN((""));
- DCHECK_HEAP
- // Construct an active scheduler for the server
-
- DLINFO(( "Creating active schduler" ));
- CActiveScheduler* activeScheduler = new (ELeave) CActiveScheduler;
- CleanupStack::PushL( activeScheduler );
-
- // Install active scheduler
- // No need to check whether an active scheduler is already installed
- // as this is a new thread, so there won't be one
- DLINFO(( "Installing active schduler" ));
- CActiveScheduler::Install( activeScheduler );
-
- // Construct our server
- CCatalogsClientServerServer::NewLC(); // anonymous
-
- DLINFO(( "Opening semaphore" ));
- RSemaphore semaphore;
- User::LeaveIfError(
- semaphore.OpenGlobal( KCatalogsServerSemaphoreName ));
-
- DLINFO(( "Signalling and closing semaphore" ));
- // Semaphore opened ok
- semaphore.Signal();
- semaphore.Close();
-
- // Start handling requests, operation will stop here until
- // the server dies
- CActiveScheduler::Start();
-
- DLINFO(("Server has shut down"));
-
- // The server has been shut down, clean up
- CleanupStack::PopAndDestroy( 2, activeScheduler );
- DLTRACEOUT((""));
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CCatalogsClientServerServer::ThreadFunction( TAny* /*aNone*/ )
- {
-#ifdef CATALOGS_BUILD_CONFIG_HEAP_MARKS
- __UHEAP_MARK;
-#endif
- DLINIT;
-
- DLTRACEIN((""));
-
- CTrapCleanup* cleanupStack = CTrapCleanup::New();
- TRAPD( err, ThreadFunctionL() );
-
- DLTRACE(( "err: %d", err ));
- delete cleanupStack;
- cleanupStack = NULL;
-
- DLTRACEOUT((""));
-
- DLUNINIT;
-#ifdef CATALOGS_BUILD_CONFIG_HEAP_MARKS
- __UHEAP_MARKEND;
-#endif
- return err;
- }
// ---------------------------------------------------------------------------
//
@@ -440,17 +379,48 @@
{
// WINS DLL entry-point. Just return the real thread function
// cast to TInt
- return reinterpret_cast<TInt>(
- &CCatalogsClientServerServer::ThreadFunction );
+ return 0;
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
-GLDEF_C TInt E32Main()
+int main(int argc, char *argv[])
{
- return CCatalogsClientServerServer::ThreadFunction( NULL );
+ DLINIT;
+ DCHECK_HEAP
+ int err = KErrNone;
+#ifdef CATALOGS_BUILD_CONFIG_HEAP_MARKS
+ __UHEAP_MARK;
+#endif
+ {
+ QCoreApplication app(argc, argv);
+ CCatalogsClientServerServer* server = NULL;
+ TRAP( err, server = CCatalogsClientServerServer::NewL() );
+ if ( err == KErrNone )
+ {
+ DLINFO(( "Opening semaphore" ));
+ RSemaphore semaphore;
+ err = semaphore.OpenGlobal( KCatalogsServerSemaphoreName );
+ if (err == KErrNone )
+ {
+ DLINFO(( "Signalling and closing semaphore" ));
+ // Semaphore opened ok
+ semaphore.Signal();
+ semaphore.Close();
+ err = app.exec();
+ }
+ delete server;
+ }
+
+ DLINFO(("Server has shut down"));
+ }
+#ifdef CATALOGS_BUILD_CONFIG_HEAP_MARKS
+ __UHEAP_MARKEND;
+#endif
+ DLUNINIT;
+ return err;
}
--- a/ncdengine/engine/transport/inc/catalogshttpdownload.h Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpdownload.h Thu Sep 02 20:34:03 2010 +0300
@@ -579,8 +579,8 @@
public:
CCatalogsHttpQTDownload(CCatalogsHttpDownload* aHttpDownload,Download* aDownload);
public slots:
- void downloadEvent(WRT::DownloadEvent*);
- void downloadError(WRT::Error);
+ void downloadEventHandler(DownloadEvent*);
+ void downloadErrorHandler(Error);
public:
CCatalogsHttpDownload* iCatalogsHttpDownload;
Download* iDownload; // Platform download
--- a/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -215,7 +215,7 @@
TInt NewDownloadId();
WRT::Download& CreatePlatformDownloadL( const TDesC8& aUrl );
- void downloadMgrEventRecieved(WRT::DownloadEvent* dlmEvent);
+ void downloadMgrEventRecieved(DownloadManagerEvent* dlmEvent);
@@ -362,7 +362,7 @@
public:
CCatalogsHttpQTDownloadManager(CCatalogsHttpDownloadManager* aDownloadManager,DownloadManager* aDmgr);
public slots:
- void downloadMgrEventRecieved(WRT::DownloadEvent*);
+ void downloadMgrEventRecieved(DownloadManagerEvent*);
public:
CCatalogsHttpDownloadManager* iDownloadManager;
DownloadManager* iDmgr ;
--- a/ncdengine/engine/transport/inc/catalogshttpsessionmanager.h Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpsessionmanager.h Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -42,7 +42,7 @@
* @param aOperation The operation
* @return
*/
- virtual TInt StartOperation( MCatalogsHttpOperation* aOperation ) = 0;
+ virtual TInt StartOperation( MCatalogsHttpOperation* aOperation, TBool aConnect ) = 0;
virtual TInt PauseOperation( MCatalogsHttpOperation* aOperation ) = 0;
virtual TInt CompleteOperation( MCatalogsHttpOperation* aOperation ) = 0;
--- a/ncdengine/engine/transport/inc/catalogshttpsessionmanagerimpl.h Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpsessionmanagerimpl.h Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -79,7 +79,7 @@
/**
* @see MCatalogsHttpSessionManager::StartOperation()
*/
- TInt StartOperation( MCatalogsHttpOperation* aOperation );
+ TInt StartOperation( MCatalogsHttpOperation* aOperation, TBool aConnect );
/**
--- a/ncdengine/engine/transport/src/catalogshttpdownload.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpdownload.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -24,11 +24,13 @@
#include <apmstd.h> // TDataType
#include <escapeutils.h>
#include <downloadmanager.h>
-
-#include <uri8.h> // HLa
+#include <cmmanager.h>
+#include <cmdestination.h>
+#include <uri8.h>
+#include <QtGlobal>
+#include <QStringList>
+#include <xqconversions.h>
-
-#include <QtGlobal>
#include "catalogshttpdownloadmanagerimpl.h"
#include "catalogshttpobserver.h"
#include "catalogshttpconfigimpl.h"
@@ -692,8 +694,7 @@
// client-server communication with the Download manager server
if ( iDownload && iContentSize <= 0 )
{
-
- int downloadbytes = iDownload->attribute(DownloadedSize).toInt();
+ iContentSize = iDownload->attribute(TotalSize).toInt();
DLTRACE(("Content size from download: %i", iContentSize ));
}
return iContentSize;
@@ -864,12 +865,28 @@
break;
+ case DownloadEvent::Error:
case DownloadEvent::Failed:
+ case DownloadEvent::NetworkLoss:
+ case DownloadEvent::ConnectionNeeded:
+ case DownloadEvent::ConnectionDisconnected:
{
- TInt32 errorId = -1;
+ TInt32 errorId = -1;
+ if ( aEvent.type() == DownloadEvent::NetworkLoss ||
+ aEvent.type() == DownloadEvent::ConnectionNeeded ||
+ aEvent.type() == DownloadEvent::ConnectionDisconnected )
+ {
+ errorId = WRT::ConnectionFailed;
+ }
SetTransferring( EFalse );
errorId = iDownload->attribute(LastError).toInt();
- if ( ( errorId == ConnectionFailed ||
+ if ( errorId > 0 )
+ {
+ // Symbian error codes are always negative numbers
+ errorId = -1 * errorId;
+ }
+
+ /*if ( ( errorId == ConnectionFailed ||
errorId == TransactionFailed ))
{
DLTRACE(("Try to reconnect"));
@@ -885,8 +902,45 @@
iDownload->cancel();
iDownload->start();
break;
+ }*/
+ iState.iOperationState = ECatalogsHttpOpFailed;
+
+ TBool deleted = EFalse;
+ if ( iObserver )
+ {
+ // Determine whether failure was due to a HTTP error or some
+ // other error.
+ //if ( errorId >= 400 )
+ // {
+ // deleted = iObserver->HandleHttpError(
+ // *this, TCatalogsHttpError(
+ // ECatalogsHttpErrorHttp,
+ // errorId ) );
+ // }
+ // else
+ {
+ AddRef();
+ //iOwner.ConnectionManager().ReportConnectionError(
+ // TCatalogsConnectionMethod(), errorId );
+
+ if ( iRefCount > 1 )
+ {
+ deleted = iObserver->HandleHttpError(
+ *this, TCatalogsHttpError(
+ ECatalogsHttpErrorGeneral, errorId ) );
+ }
+ else
+ {
+ deleted = ETrue;
+ }
+ Release();
+ }
}
-
+ if ( !deleted )
+ {
+ iOwner.CompleteOperation( this );
+ iState.iProgressState = ECatalogsHttpDone;
+ }
}
break;
@@ -903,11 +957,8 @@
UpdateContentType();
}
break;
-
- case DownloadEvent::NetworkLoss:
-
- break;
-
+
+
case DownloadEvent::Completed:
{
// move/rename temp file as the target file
@@ -923,13 +974,27 @@
DLTRACE(("Deleting download"));
DeletePlatformDownload();
}
+ iState.iProgressState = ECatalogsHttpDone;
+ iOwner.CompleteOperation( this );
+ iState.iOperationState = ECatalogsHttpOpCompleted;
+
+ if ( iObserver )
+ {
+ iObserver->HandleHttpEventL( *this, iState );
+ }
}
break;
case DownloadEvent::InProgress:
-
- break;
+ {
+ iTransferredSize = iDownload->attribute(DownloadedSize).toInt();
+ if ( iObserver )
+ {
+ iObserver->HandleHttpEventL( *this, iState );
+ }
+ }
+ break;
default:
{
@@ -2367,7 +2432,25 @@
TRAPD( err,
{
- iOwner.SetConnectionL( *iConnection );
+ if ( Config().ConnectionMethod().iType == ECatalogsConnectionMethodTypeDestination )
+ {
+ RCmManager cmManager;
+ CleanupClosePushL( cmManager );
+ cmManager.OpenL();
+ RCmDestination dest = cmManager.DestinationL( Config().ConnectionMethod().iId );
+ CleanupClosePushL( dest );
+ HBufC* temp = dest.NameLC();
+ QString destname;
+ destname = XQConversions::s60DescToQString( *temp );
+ CleanupStack::PopAndDestroy( temp );
+ CleanupStack::PopAndDestroy( &dest );
+ CleanupStack::PopAndDestroy( &cmManager );
+ if ( iOwner.GetDownloadManager() )
+ {
+ iOwner.GetDownloadManager()->attribute(AccessPoints).toStringList();
+ iOwner.GetDownloadManager()->setAttribute(AccessPoint, destname);
+ }
+ }
// Update the configuration
if ( iState.iProgressState == ECatalogsHttpNone )
@@ -2704,8 +2787,10 @@
UpdateRequestHeadersL();
}
- // Check if the download has been set progressive
- TBool progressive = EFalse;
+ // Check if the
+ //download has been set progressive
+ /* MTA
+ * TBool progressive = EFalse;
try
{
progressive =iDownload->attribute(Progressive).toBool();
@@ -2750,11 +2835,15 @@
{
qt_symbian_exception2LeaveL(exception);
}
-
+**/
if ( !iFileIsSet )
{
DLTRACE(("Setting filehandle to download"));
// User::LeaveIfError( iDownload->SetFileHandleAttribute( file ) );
+ file.Close();
+ TInt ret = BaflUtils::DeleteFile( iFs, *iTempFilename );
+ iDownload->setAttribute(DestinationPath,XQConversions::s60DescToQString(iConfig->Directory()));
+ iDownload->setAttribute(FileName, XQConversions::s60DescToQString(*iTempFilename));
iFileIsSet = ETrue;
}
@@ -2834,14 +2923,17 @@
{
iCatalogsHttpDownload = aHttpDownload;
iDownload = aDownload;
- connect(iDownload, SIGNAL(downloadEvent(DownloadManagerEvent*)), this,SLOT(downloadEvent(DownloadEvent*)));
+ connect(iDownload, SIGNAL(downloadEvent(DownloadEvent*)), this,SLOT(downloadEventHandler(DownloadEvent*)));
+ connect(iDownload, SIGNAL(downloadError(Error)), this,SLOT(downloadErrorHandler(Error)));
}
-void CCatalogsHttpQTDownload::downloadEvent(WRT::DownloadEvent* aEvent)
+void CCatalogsHttpQTDownload::downloadEventHandler(DownloadEvent* aEvent)
{
iCatalogsHttpDownload->HandledownloadEventL(*aEvent);
}
-void CCatalogsHttpQTDownload::downloadError(WRT::Error)
+void CCatalogsHttpQTDownload::downloadErrorHandler(Error)
{
//iCatalogsHttpDownload->HandledownloadEventL(*aEvent);
- }
\ No newline at end of file
+ }
+
+
--- a/ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -32,10 +32,11 @@
#include "catalogsconnection.h"
#include "catalogsdebug.h"
-#include <QString.h>
-#include <QVector.h>
-#include <QList.h>
+#include <QString>
+#include <QVector>
+#include <QList>
#include <downloadevent.h>
+#include <xqconversions.h>
// ======== MEMBER FUNCTIONS ========
// ---------------------------------------------------------------------------
@@ -174,7 +175,7 @@
{
DLTRACEIN((""));
// Create a new download
- QString Url = QString::fromRawData( reinterpret_cast<const QChar*>(aUrl.Ptr()),aUrl.Length());
+ QString Url = XQConversions::s60Desc8ToQString(aUrl);
iDownload = iDmgr->createDownload( Url );
CCatalogsHttpDownload* dl = CCatalogsHttpDownload::NewLC(
@@ -477,7 +478,7 @@
// Handles download manager events
// ---------------------------------------------------------------------------
//
- void CCatalogsHttpDownloadManager::downloadMgrEventRecieved(WRT::DownloadEvent* dlmEvent)
+ void CCatalogsHttpDownloadManager::downloadMgrEventRecieved(WRT::DownloadManagerEvent* dlmEvent)
{
switch(dlmEvent ->type())
@@ -739,7 +740,7 @@
{
DLTRACEIN(( "" ));
DASSERT( aOperation );
- TInt err = iManager.StartOperation( aOperation );
+ TInt err = iManager.StartOperation( aOperation, EFalse );
if ( err == KErrNone || err == KCatalogsHttpOperationQueued )
{
TInt err2 = MoveRestoredDlToCurrentDls( *aOperation );
@@ -992,10 +993,10 @@
{
iDownloadManager = aDownloadManager;
iDmgr = aDmgr;
- connect(iDmgr, SIGNAL(downloadManagerEvent(WRT::DownloadManagerEvent*)), this,SLOT(downloadMgrEventRecieved(WRT::DownloadEvent*)));
+ connect(iDmgr, SIGNAL(downloadManagerEvent(DownloadManagerEvent*)), this,SLOT(downloadMgrEventRecieved(DownloadManagerEvent*)));
}
-void CCatalogsHttpQTDownloadManager::downloadMgrEventRecieved(WRT::DownloadEvent* aEvent)
+void CCatalogsHttpQTDownloadManager::downloadMgrEventRecieved(DownloadManagerEvent* aEvent)
{
iDownloadManager->downloadMgrEventRecieved(aEvent);
}
\ No newline at end of file
--- a/ncdengine/engine/transport/src/catalogshttpsessionmanagerimpl.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpsessionmanagerimpl.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -126,7 +126,7 @@
// ---------------------------------------------------------------------------
//
TInt CCatalogsHttpSessionManager::StartOperation(
- MCatalogsHttpOperation* aOperation )
+ MCatalogsHttpOperation* aOperation, TBool aConnect )
{
DLTRACEIN((""));
DLINFO( ("Operation ID: %i, Type: %i",
@@ -140,25 +140,26 @@
// Make sure the download is removed from queue
RemoveFromQueue( aOperation );
-
- TBool isRunning = EFalse;
+
// Check if the operation can connect either by using the current AP
// or by opening a new one
- TRAPD( err, isRunning = ConnectL( *aOperation ) );
- if ( err != KErrNone )
+ if ( aConnect )
{
- DLTRACEOUT(("Error: %d, err"));
- return err;
+ TBool isRunning = EFalse;
+ TRAPD( err, isRunning = ConnectL( *aOperation ) );
+ if ( err != KErrNone )
+ {
+ DLTRACEOUT(("Error: %d, err"));
+ return err;
+ }
+ if ( !isRunning )
+ {
+ DLTRACEOUT(("Not running, adding to queue"));
+ return AddToQueue( aOperation );
+ }
}
-
- if ( !isRunning )
- {
- DLTRACEOUT(("Not running, adding to queue"));
- return AddToQueue( aOperation );
- }
-
- // Check whether operation belongs to general queue or not
+ // Check whether operation belongs to general queue or not
if ( aOperation->Config().Priority() > ECatalogsPriorityQueued )
{
// non-general queues
--- a/ncdengine/engine/transport/src/catalogshttptransactionmanagerimpl.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttptransactionmanagerimpl.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 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"
@@ -460,7 +460,7 @@
TInt CCatalogsHttpTransactionManager::StartOperation(
MCatalogsHttpOperation* aOperation )
{
- return iManager.StartOperation( aOperation );
+ return iManager.StartOperation( aOperation, ETrue );
}
--- a/ncdengine/provider/client/src/ncdsilentinstalloperationproxy.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/provider/client/src/ncdsilentinstalloperationproxy.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -74,6 +74,9 @@
CNcdSilentInstallOperationProxy::~CNcdSilentInstallOperationProxy()
{
DLTRACEIN(( "" ));
+
+ delete iInstallOptions;
+
// Cancel must be called here because base class will only call its own
// DoCancel()
Cancel();
--- a/ncdengine/provider/deviceinteraction/src/ncdsilentinstallactiveobserver.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/ncdengine/provider/deviceinteraction/src/ncdsilentinstallactiveobserver.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -126,66 +126,9 @@
{
iResults = Usif::COpaqueNamedParams::NewL();
}
- /*
- if (iResults)
- {
- delete (iResults);
- iResults = 0;
- }
- iResults = Usif::COpaqueNamedParams::NewL();
-
- if (iArguments)
- {
- delete (iArguments);
- iArguments = 0;
- }
- iArguments = Usif::COpaqueNamedParams::NewL();
-
- // Silent installation request
-
- TBool iSet = ETrue;
-
- enum TSifPolicy
- {
- EAllowed = 0,
- ENotAllowed = 1,
- EUserConfirm = 2
- };
-
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_InstallSilently, ETrue );
- else
- iArguments->AddIntL( Usif::KSifInParam_InstallSilently, EFalse );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_PerformOCSP, Usif::ENotAllowed );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_AllowUpgrade, Usif::EAllowed );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_AllowUntrusted, Usif::ENotAllowed );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_GrantCapabilities, Usif::ENotAllowed );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_InstallOptionalItems, Usif::EAllowed );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_IgnoreOCSPWarnings, Usif::EAllowed );
- //iArguments->AddIntL( Usif::KSifInParam_PackageInfo, ETrue );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_AllowAppShutdown, Usif::EAllowed );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_AllowDownload, Usif::EAllowed );
- if (iSet)
- iArguments->AddIntL( Usif::KSifInParam_AllowOverwrite, Usif::EAllowed );
-
-
- //iArguments->AddIntL(Usif::KSifInParam_InstallSilently, 1);
- //iArguments->AddIntL( Usif::KSifInParam_DisplayPackageInfo, ETrue );
-
- iInstaller.Install(aFile, *iArguments, *iResults, iStatus);
- */
iInstaller.Install( aFile, *aSilentInstallOptions, *iResults, iStatus );
-
SetActive();
}
@@ -244,27 +187,6 @@
TInt CNcdSilentInstallActiveObserver::ConvertErrorCode( TInt aErrorCode )
{
- /*
- switch ( aErrorCode )
- {
- case SwiUI::KSWInstErrUserCancel:
- // To simplify the cancel response and cancel handling,
- // convert the error code to normal cancel error code.
- aErrorCode = KErrCancel;
- break;
-
- case SwiUI::KSWInstErrInsufficientMemory:
- // To simplify the insufficient memory response and its handling,
- // convert the error code to normal no memory code.
- aErrorCode = KErrNoMemory;
- break;
-
- default:
- // Nothing to do here.
- break;
- }
- */
-
return aErrorCode;
}
--- a/secureswitools/swisistools/group/bld.inf Wed Aug 18 09:55:45 2010 +0300
+++ b/secureswitools/swisistools/group/bld.inf Thu Sep 02 20:34:03 2010 +0300
@@ -1582,6 +1582,7 @@
../test/tinterpretsisinteg/scripts/int_nr_option-37.script /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-37.script
../test/tinterpretsisinteg/scripts/int_nr_option-38.script /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-38.script
../test/tinterpretsisinteg/scripts/int_nr_option-39.script /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-39.script
+../test/tinterpretsisinteg/scripts/int_defaultvaluetest.script /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_defaultvaluetest.script
../test/tinterpretsisinteg/preq2525-interpretsis-01/argumentfile.ini /epoc32/winscw/c/tswi/tinterpretsisinteg/preq2525-interpretsis-01/argumentfile.ini
../test/tinterpretsisinteg/preq2525-interpretsis-02/argumentfile.ini /epoc32/winscw/c/tswi/tinterpretsisinteg/preq2525-interpretsis-02/argumentfile.ini
@@ -1900,6 +1901,7 @@
../test/tinterpretsisinteg/int_nr_option-37_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-37_db.bat
../test/tinterpretsisinteg/int_nr_option-38_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-38_db.bat
../test/tinterpretsisinteg/int_nr_option-39_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_nr_option-39_db.bat
+../test/tinterpretsisinteg/int_defaultvaluetest_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/int_defaultvaluetest_db.bat
../test/tinterpretsisinteg/parameters_file/testcasef009file_db.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/testcasef009file_db.txt
../test/tinterpretsisinteg/parameters_file/testcasei003file_db.txt /epoc32/winscw/c/tswi/tinterpretsisinteg/parameters_file/testcasei003file_db.txt
@@ -1917,8 +1919,8 @@
../test/tinterpretsisinteg/testdatascr/base_r.pkg /epoc32/winscw/c/tswi/tinterpretsisinteg/testdatascr/base_r.pkg
../test/tinterpretsisinteg/testdatascr/hiddensa.pkg /epoc32/winscw/c/tswi/tinterpretsisinteg/testdatascr/hiddensa.pkg
-../test/tinterpretsisinteg/TestElseIfData/TestElseIf.pkg /epoc32/winscw/c/tswi/tinterpretsisinteg/TestElseIfData/TestElseIf.pkg
-../test/tinterpretsisinteg/TestElseIfData/file0 /epoc32/winscw/c/tswi/tinterpretsisinteg/TestElseIfData/file0
+../test/tinterpretsisinteg/testelseifdata/testelseif.pkg /epoc32/winscw/c/tswi/tinterpretsisinteg/testelseifdata/testelseif.pkg
+../test/tinterpretsisinteg/testelseifdata/file0 /epoc32/winscw/c/tswi/tinterpretsisinteg/testelseifdata/file0
// exports for scrtool
../test/tscrtool/tscrtool.ini /epoc32/winscw/c/tswi/tscrtool/tscrtool.ini
@@ -1942,6 +1944,7 @@
../test/tscrtool/data/preprovision_noappattrib.xml /epoc32/winscw/c/tswi/tscrtool/data/preprovision_noappattrib.xml
../test/tscrtool/data/preprovision_nullappfile.xml /epoc32/winscw/c/tswi/tscrtool/data/preprovision_nullappfile.xml
../test/tscrtool/data/preprovision_nocaptioniconinfo.xml /epoc32/winscw/c/tswi/tscrtool/data/preprovision_nocaptioniconinfo.xml
+../test/tscrtool/data/preprovision_invalid_appproperty.xml /epoc32/winscw/c/tswi/tscrtool/data/preprovision_invalid_appproperty.xml
//script files for PREQ2525 installing equivalent language
../test/tinterpretsisinteg/api-inst-preq2525-interpretsis-01_db.bat /epoc32/winscw/c/tswi/tinterpretsisinteg/api-inst-preq2525-interpretsis-01_db.bat
--- a/secureswitools/swisistools/source/dbmanager/dblayer.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/secureswitools/swisistools/source/dbmanager/dblayer.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -21,7 +21,7 @@
#include "logs.h"
#include "util.h"
#include "symbiantypes.h"
-#include "../sisxlibrary/utility.h"
+#include "utility.h"
#include <string>
#include <vector>
@@ -680,6 +680,8 @@
//Assigning Default Values
TInt64 intVal = 0;
+ stmtAppAttribute->BindInt64(1, intVal); //AppUid
+ stmtAppAttribute->BindInt64(4, intVal); //TypeId
stmtAppAttribute->BindInt64(5, intVal); //Attributes
stmtAppAttribute->BindInt64(6, intVal); //Hidden
stmtAppAttribute->BindInt64(7, intVal); //Embeddable
@@ -687,6 +689,7 @@
stmtAppAttribute->BindInt64(9, intVal); //Launch
stmtAppAttribute->BindInt64(11, intVal); //DefaultScreenNumber
std::wstring strVal(L"");
+ stmtAppAttribute->BindStr(3, strVal); //AppFile
stmtAppAttribute->BindStr(10, strVal); //GroupName
int appUid = 0;
@@ -854,15 +857,22 @@
//Assigning default value
TInt64 intVal = 0;
stmtAppLocalizableInfo->BindInt64(4, intVal); //Locale
+ stmtAppLocalizableInfo->BindInt64(5, intVal); //CaptionAndIconId
std::wstring strVal(L"");
- stmtAppLocalizableInfo->BindStr(2, strVal); //ShortCaption
- stmtAppLocalizableInfo->BindStr(3, strVal); //GroupName
-
+ stmtAppLocalizableInfo->BindStr(2, strVal); //ShortCaption
+ stmtAppLocalizableInfo->BindStr(3, strVal); //GroupName
+
std::string insertCaptionAndIconInfo;
insertCaptionAndIconInfo = "INSERT INTO CaptionAndIconInfo(Caption,NumberOfIcons,IconFile) VALUES(?,?,?);";
std::auto_ptr<CStatement> stmtCaptionAndIconInfo(iScrDbHandler->PrepareStatement(insertCaptionAndIconInfo));
+ //Assigning default value
+ stmtCaptionAndIconInfo->BindStr(1, strVal); //Caption
+ stmtCaptionAndIconInfo->BindInt64(2, intVal); //NumberOfIcons
+ stmtCaptionAndIconInfo->BindStr(3, strVal); //IconFile
+
+
bool captionAndIconInfoPresent = 0;
//for every TLocalizableAttribute
stmtAppLocalizableInfo->BindInt64(1, aAppUid);
@@ -938,16 +948,22 @@
insertViewData = "INSERT INTO ViewData(LocalAppInfoId,Uid,ScreenMode,CaptionAndIconId) VALUES(?,?,?,?);";
std::auto_ptr<CStatement> stmtViewData(iScrDbHandler->PrepareStatement(insertViewData));
+
+ //Assigning Default Value
+ TInt64 intVal = 0;
+ stmtViewData->BindInt64(2, intVal); //Uid
+ stmtViewData->BindInt64(3, intVal); //ScreenMode
+ stmtViewData->BindInt64(4, intVal); //CaptionAndIconId
+
std::string insertCaptionAndIconInfo;
insertCaptionAndIconInfo = "INSERT INTO CaptionAndIconInfo(Caption,NumberOfIcons,IconFile) VALUES(?,?,?);";
std::auto_ptr<CStatement> stmtCaptionAndIconInfo(iScrDbHandler->PrepareStatement(insertCaptionAndIconInfo));
//Assigning Default Value
- TInt64 intVal = 0;
- stmtViewData->BindInt64(3, intVal); //ScreenMode
stmtCaptionAndIconInfo->BindInt64(2, intVal); //NumberOfIcons
std::wstring strVal(L"");
+ stmtCaptionAndIconInfo->BindStr(1, strVal); //Caption
stmtCaptionAndIconInfo->BindStr(3, strVal); //IconFile
bool captionAndIconInfoPresent = 0;
@@ -1020,9 +1036,10 @@
if(appPropertyIter->iIsStr8Bit)
{
- std::string str = wstring2string(appPropertyIter->iStrValue);
- std::string decodedString = Util::Base64Decode(str);
- stmtAppProperty->BindBinary(6, decodedString);
+ std::string str;
+ int len = appPropertyIter->iStrValue.length();
+ str.assign(appPropertyIter->iStrValue.c_str(),appPropertyIter->iStrValue.c_str()+len);
+ stmtAppProperty->BindBinary(6, str);
}
else
{
--- a/secureswitools/swisistools/source/interpretsislib/xmlgenerator.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/xmlgenerator.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -448,11 +448,13 @@
std::string temp = wstring2string(fileAppOpaqueDataType->iOpaqueData);
std::string binStrData = Util::Base64Encode(temp);
std::wstring binData = string2wstring(binStrData);
- AddChildElement(filePropValueRoot,aDocument, KData, binData.c_str());
+ XercesString opaqueBinData = WStringToXercesString(binData);
+ AddChildElement(filePropValueRoot,aDocument, KData, opaqueBinData.c_str());
}
else
{
- AddChildElement(filePropValueRoot,aDocument, KData, fileAppOpaqueDataType->iOpaqueData.c_str());
+ XercesString opaqueData = WStringToXercesString(fileAppOpaqueDataType->iOpaqueData);
+ AddChildElement(filePropValueRoot,aDocument, KData, opaqueData.c_str());
}
XercesString locale = IntegerToXercesString(fileAppOpaqueDataType->iLocale);
Binary file secureswitools/swisistools/source/scrtool/data/preprovision.dtd has changed
--- a/secureswitools/swisistools/source/xmlparser/xmlparser.cpp Wed Aug 18 09:55:45 2010 +0300
+++ b/secureswitools/swisistools/source/xmlparser/xmlparser.cpp Thu Sep 02 20:34:03 2010 +0300
@@ -29,6 +29,7 @@
#include "exception.h"
#include "utf8_wrapper.h"
#include "util.h"
+#include "utility.h"
#include <xercesc/sax2/XMLReaderFactory.hpp>
#include <xercesc/sax2/DefaultHandler.hpp>
@@ -894,9 +895,20 @@
appProperty.iLocale = opaqueDataType.iLocale;
appProperty.iName = L"OpaqueData";
appProperty.iIntValue = 0;
- appProperty.iIsStr8Bit = opaqueDataType.iIsBinary;
+ appProperty.iIsStr8Bit = true;
appProperty.iServiceUid = 0;
- appProperty.iStrValue = opaqueDataType.iOpaqueData;
+
+ if(opaqueDataType.iIsBinary == 1)
+ {
+ std::string str = wstring2string(opaqueDataType.iOpaqueData);
+ std::string decodedString = Util::Base64Decode(str);
+ int len = decodedString.length();
+ appProperty.iStrValue.assign(decodedString.c_str(),decodedString.c_str()+len);
+ }
+ else
+ {
+ appProperty.iStrValue = opaqueDataType.iOpaqueData;
+ }
appRegistrationInfo.iApplicationProperty.push_back(appProperty);
}
@@ -1144,10 +1156,18 @@
appProperty.iLocale = opaqueDataType.iLocale;
appProperty.iName = L"OpaqueData";
appProperty.iIntValue = 0;
- appProperty.iIsStr8Bit = opaqueDataType.iIsBinary;
+ appProperty.iIsStr8Bit = true;
appProperty.iServiceUid = appServiceInfo.iUid;
- appProperty.iStrValue = opaqueDataType.iOpaqueData;
-
+ if(opaqueDataType.iIsBinary == 1)
+ {
+ std::string str = wstring2string(opaqueDataType.iOpaqueData);
+ std::string decodedString = Util::Base64Decode(str);
+ appProperty.iStrValue = string2wstring(decodedString);
+ }
+ else
+ {
+ appProperty.iStrValue = opaqueDataType.iOpaqueData;
+ }
aAppRegistrationInfo.iApplicationProperty.push_back(appProperty);
}
@@ -1375,18 +1395,20 @@
const XMLCh* nam = name->item(0)->getTextContent();
appProperty.iName = XMLChToWString(nam);
}
-
+
if( intvalue->getLength() != 0)
{
const XMLCh* intval = intvalue->item(0)->getTextContent();
appProperty.iIntValue = XercesStringToInteger(intval);
}
-
- if( strvalue->getLength() != 0)
+ else if( strvalue->getLength() != 0)
{
const XMLCh* strval = strvalue->item(0)->getTextContent();
appProperty.iStrValue = XMLChToWString(strval);
}
+
+ appProperty.iIsStr8Bit = false;
+
LOGEXIT("CScrXmlParser::GetAppProperty()");
return appProperty;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/int_defaultvaluetest_db.bat Thu Sep 02 20:34:03 2010 +0300
@@ -0,0 +1,52 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@ECHO OFF
+REM INT_DefaultValueTest
+REM testcase INT_DefaultValueTest - Install sis and update a corrupt DB. This is a positive testcase
+
+if not exist .\cdrive mkdir .\cdrive > NUL
+if not exist .\romdrive mkdir .\romdrive > NUL
+
+REM xcopy /E /Y backup\cdrive cdrive > NUL
+REM xcopy /E /Y backup\romdrive romdrive > NUL
+
+
+REM Remove installation files from any previous tests
+if exist .\cdrive\Documents\InstTest\devlangsup*.txt del .\cdrive\Documents\InstTest\devlangsup*.txt > NUL
+
+if exist .\romdrive\sys\install\scr\provisioned\scr.db del .\romdrive\sys\install\scr\provisioned\scr.db > NUL
+if not exist .\romdrive\sys\install\scr\provisioned mkdir .\romdrive\sys\install\scr\provisioned > NUL
+copy \epoc32\release\winscw\udeb\z\tusif\tscr\data\scr-nodefaultvalues.db .\romdrive\sys\install\scr\provisioned\scr.db /Y > NUL
+
+if exist .\cdrive\sys\install\scr\scr.db del .\cdrive\sys\install\scr\scr.db > NUL
+if not exist .\cdrive\sys\install\scr mkdir .\cdrive\sys\install\scr > NUL
+copy \epoc32\release\winscw\udeb\z\tusif\tscr\data\scr-nodefaultvalues.db .\cdrive\sys\install\scr\scr.db /Y > NUL
+
+call interpretsis -z .\romdrive -c .\cdrive -s /epoc32/winscw/c/tswi/tsis/data/interpretsis_testcase.sis -w info -I /epoc32/winscw/c/tswi/tinterpretsisinteg/testcase-interpretsis-01/argumentfile.ini -l /epoc32/winscw/c/interpretsis_test_harness_db.txt > NUL
+
+copy .\romdrive\sys\install\scr\provisioned\scr.db \epoc32\winscw\c\sys\install\scr\scr.db /Y > NUL
+
+IF NOT EXIST .\backup\cdrive mkdir .\backup\cdrive > NUL
+IF NOT EXIST .\backup\romdrive mkdir .\backup\romdrive > NUL
+xcopy /E /Y cdrive backup\cdrive > NUL
+xcopy /E /Y romdrive backup\romdrive > NUL
+
+IF NOT %errorlevel%==0 GOTO LAST
+ECHO ***ERRORCODE*** %errorlevel% PASS>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+GOTO END
+:LAST
+ECHO ***ERRORCODE*** %errorlevel% FAIL>>/epoc32/winscw/c/interpretsis_test_harness_db.txt
+:END
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int_defaultvaluetest.script Thu Sep 02 20:34:03 2010 +0300
@@ -0,0 +1,43 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+PRINT Device supported language tests
+
+// Load Suite
+LOAD_SUITE tscr -SharedData
+SHARED_DATA z:\tusif\tscr\tscr.ini shared_data
+LOAD_SUITE tSisRegistryTest
+LOAD_SUITE tscrapparc
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID INT_DefaultValueTest
+//! @SYMTestCaseDesc Add an applications registration info to a corrupt DB
+//! @SYMPREQ PREQ1835
+//! @SYMTestStatus Released
+//! @SYMTestPriority High
+//! @SYMTestActions Check Adding an applications registration info to a corrupt DB.
+//! @SYMTestExpectedResults Positive TestCases
+//! @SYMTestType CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+START_TESTCASE INT_DefaultValueTest
+
+RUN_TEST_STEP 100 tscr SCRAddApplicationEntry c:\tswi\tinterpretsisinteg\scripts\ini.ini add_app_reg_info_sameappfile
+
+END_TESTCASE INT_DefaultValueTest
+
+
--- a/secureswitools/swisistools/test/tinterpretsisinteg/testinterpretsis_db.bat Wed Aug 18 09:55:45 2010 +0300
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/testinterpretsis_db.bat Thu Sep 02 20:34:03 2010 +0300
@@ -2746,8 +2746,8 @@
GOTO PASS_CLEAN
:TestElseIF
-call makesis \epoc32\winscw\c\tswi\tinterpretsisinteg\TestElseIfData\TestElseIf.pkg \epoc32\winscw\c\tswi\tinterpretsisinteg\sisfiles\TestElseIf.sis > NUL
-call interpretsis -z .\romdrive -c .\cdrive -s /epoc32/winscw/c/tswi/tinterpretsisinteg/sisfiles/TestElseIf.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt
+call makesis \epoc32\winscw\c\tswi\tinterpretsisinteg\testelseifdata\testelseif.pkg \epoc32\winscw\c\tswi\tinterpretsisinteg\sisfiles\testelseif.sis > NUL
+call interpretsis -z .\romdrive -c .\cdrive -s /epoc32/winscw/c/tswi/tinterpretsisinteg/sisfiles/testelseif.sis -w info -l /epoc32/winscw/c/interpretsis_test_harness_db.txt
if not %errorlevel%==0 GOTO LAST
set exist_file=.\cdrive\data\First_first.txt
--- a/secureswitools/swisistools/test/tinterpretsisinteg/testlistdb.xml Wed Aug 18 09:55:45 2010 +0300
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/testlistdb.xml Thu Sep 02 20:34:03 2010 +0300
@@ -1948,4 +1948,10 @@
<check type="result"/>
</test>
+<test id="INT_DefaultValueTest">
+ <title>INT_DefaultValueTest</title>
+ <command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\int_defaultvaluetest_db.bat INT_DefaultValueTest</command>
+ <check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_DefaultValueTest INT_DefaultValueTest 3 "positive" "both" "nouid" "nobatchfile" "int_defaultvaluetest.script" "int_defaultvaluetest.htm" "FAIL = 0" "FAIL = 0" </check>
+</test>
+
</testlist>
Binary file secureswitools/swisistools/test/tscrtool/data/preprovision.dtd has changed
Binary file secureswitools/swisistools/test/tscrtool/data/preprovision_appreginfo.xml has changed
Binary file secureswitools/swisistools/test/tscrtool/data/preprovision_invalid_appproperty.xml has changed
Binary file secureswitools/swisistools/test/tscrtool/data/preprovision_nocaptioniconinfo.xml has changed
Binary file secureswitools/swisistools/test/tscrtool/data/preprovision_nullappfile.xml has changed
Binary file secureswitools/swisistools/test/tscrtool/data/preprovision_nullappuid.xml has changed
--- a/secureswitools/swisistools/test/tscrtool/tscrtool.ini Wed Aug 18 09:55:45 2010 +0300
+++ b/secureswitools/swisistools/test/tscrtool/tscrtool.ini Thu Sep 02 20:34:03 2010 +0300
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
@@ -193,3 +193,8 @@
[sec/swi/scrtool/0033]
option = -c create.db -f %EPOCROOT%epoc32\winscw\c\tswi\tscrtool\data\update_db_test.xml -p %EPOCROOT%epoc32\winscw\c\tswi\tscrtool\data\preprovision_nocaptioniconinfo.xml
result=ENone
+
+# Negative case Usage of preprovision xml having both Strvalue and Intvalue in AppProperty Table
+[sec/swi/scrtool/0034]
+option = -c create.db -f %EPOCROOT%epoc32\winscw\c\tswi\tscrtool\data\update_db_test.xml -p %EPOCROOT%epoc32\winscw\c\tswi\tscrtool\data\preprovision_invalid_appproperty.xml
+result=EParseError
\ No newline at end of file