changeset 55 | ac7f90a6ff4c |
parent 50 | c6e8afe0ba85 |
child 64 | 48c14c385b0e |
50:c6e8afe0ba85 | 55:ac7f90a6ff4c |
---|---|
445 { |
445 { |
446 if(compPropIter->iIsStr8Bit) |
446 if(compPropIter->iIsStr8Bit) |
447 { |
447 { |
448 std::string str = wstring2string(compPropIter->iValue); |
448 std::string str = wstring2string(compPropIter->iValue); |
449 std::string decodedString = Util::Base64Decode(str); |
449 std::string decodedString = Util::Base64Decode(str); |
450 stmtComponentProperty->BindBinary(4, str); |
450 stmtComponentProperty->BindBinary(4, decodedString); |
451 } |
451 } |
452 else |
452 else |
453 { |
453 { |
454 stmtComponentProperty->BindStr(4, compPropIter->iValue); |
454 stmtComponentProperty->BindStr(4, compPropIter->iValue); |
455 } |
455 } |
607 } |
607 } |
608 else |
608 else |
609 { |
609 { |
610 std::string str = wstring2string(filePropIter->iValue); |
610 std::string str = wstring2string(filePropIter->iValue); |
611 std::string decodedString = Util::Base64Decode(str); |
611 std::string decodedString = Util::Base64Decode(str); |
612 stmtFileProperty->BindBinary(3, str); |
612 stmtFileProperty->BindBinary(3, decodedString); |
613 stmtFileProperty->BindInt(4, 1); |
613 stmtFileProperty->BindInt(4, 1); |
614 } |
614 } |
615 |
615 |
616 stmtFileProperty->ExecuteStatement(); |
616 stmtFileProperty->ExecuteStatement(); |
617 stmtFileProperty->Reset(); |
617 stmtFileProperty->Reset(); |
675 |
675 |
676 insertAppAttributes = "INSERT INTO AppRegistrationInfo(AppUid,ComponentId,AppFile,TypeId,Attributes,Hidden,Embeddable,Newfile,Launch,GroupName,DefaultScreenNumber) VALUES(?,?,?,?,?,?,?,?,?,?,?);"; |
676 insertAppAttributes = "INSERT INTO AppRegistrationInfo(AppUid,ComponentId,AppFile,TypeId,Attributes,Hidden,Embeddable,Newfile,Launch,GroupName,DefaultScreenNumber) VALUES(?,?,?,?,?,?,?,?,?,?,?);"; |
677 std::auto_ptr<CStatement> stmtAppAttribute(iScrDbHandler->PrepareStatement(insertAppAttributes)); |
677 std::auto_ptr<CStatement> stmtAppAttribute(iScrDbHandler->PrepareStatement(insertAppAttributes)); |
678 |
678 |
679 stmtAppAttribute->BindInt64(2, aComponentId); |
679 stmtAppAttribute->BindInt64(2, aComponentId); |
680 |
|
681 //Assigning Default Values |
|
682 TInt64 intVal = 0; |
|
683 stmtAppAttribute->BindInt64(5, intVal); //Attributes |
|
684 stmtAppAttribute->BindInt64(6, intVal); //Hidden |
|
685 stmtAppAttribute->BindInt64(7, intVal); //Embeddable |
|
686 stmtAppAttribute->BindInt64(8, intVal); //Newfile |
|
687 stmtAppAttribute->BindInt64(9, intVal); //Launch |
|
688 stmtAppAttribute->BindInt64(11, intVal); //DefaultScreenNumber |
|
689 std::wstring strVal(L""); |
|
690 stmtAppAttribute->BindStr(10, strVal); //GroupName |
|
691 |
|
680 int appUid = 0; |
692 int appUid = 0; |
681 std::string appfile; |
693 std::string appfile; |
682 for(ApplicationAttributeIterator applicationAttributeIter = aAppAttribute.begin(); applicationAttributeIter != aAppAttribute.end() ; ++applicationAttributeIter ) |
694 for(ApplicationAttributeIterator applicationAttributeIter = aAppAttribute.begin(); applicationAttributeIter != aAppAttribute.end() ; ++applicationAttributeIter ) |
683 { |
695 { |
684 if (applicationAttributeIter->iName == L"AppUid") |
696 if (applicationAttributeIter->iName == L"AppUid") |
837 std::string insertAppLocalizableInfo; |
849 std::string insertAppLocalizableInfo; |
838 |
850 |
839 insertAppLocalizableInfo = "INSERT INTO LocalizableAppInfo(AppUid,ShortCaption,GroupName,Locale,CaptionAndIconId) VALUES(?,?,?,?,?);"; |
851 insertAppLocalizableInfo = "INSERT INTO LocalizableAppInfo(AppUid,ShortCaption,GroupName,Locale,CaptionAndIconId) VALUES(?,?,?,?,?);"; |
840 std::auto_ptr<CStatement> stmtAppLocalizableInfo(iScrDbHandler->PrepareStatement(insertAppLocalizableInfo)); |
852 std::auto_ptr<CStatement> stmtAppLocalizableInfo(iScrDbHandler->PrepareStatement(insertAppLocalizableInfo)); |
841 |
853 |
854 //Assigning default value |
|
855 TInt64 intVal = 0; |
|
856 stmtAppLocalizableInfo->BindInt64(4, intVal); //Locale |
|
857 std::wstring strVal(L""); |
|
858 stmtAppLocalizableInfo->BindStr(2, strVal); //ShortCaption |
|
859 stmtAppLocalizableInfo->BindStr(3, strVal); //GroupName |
|
860 |
|
842 std::string insertCaptionAndIconInfo; |
861 std::string insertCaptionAndIconInfo; |
843 |
862 |
844 insertCaptionAndIconInfo = "INSERT INTO CaptionAndIconInfo(Caption,NumberOfIcons,IconFile) VALUES(?,?,?);"; |
863 insertCaptionAndIconInfo = "INSERT INTO CaptionAndIconInfo(Caption,NumberOfIcons,IconFile) VALUES(?,?,?);"; |
845 std::auto_ptr<CStatement> stmtCaptionAndIconInfo(iScrDbHandler->PrepareStatement(insertCaptionAndIconInfo)); |
864 std::auto_ptr<CStatement> stmtCaptionAndIconInfo(iScrDbHandler->PrepareStatement(insertCaptionAndIconInfo)); |
846 |
865 |
921 |
940 |
922 std::string insertCaptionAndIconInfo; |
941 std::string insertCaptionAndIconInfo; |
923 |
942 |
924 insertCaptionAndIconInfo = "INSERT INTO CaptionAndIconInfo(Caption,NumberOfIcons,IconFile) VALUES(?,?,?);"; |
943 insertCaptionAndIconInfo = "INSERT INTO CaptionAndIconInfo(Caption,NumberOfIcons,IconFile) VALUES(?,?,?);"; |
925 std::auto_ptr<CStatement> stmtCaptionAndIconInfo(iScrDbHandler->PrepareStatement(insertCaptionAndIconInfo)); |
944 std::auto_ptr<CStatement> stmtCaptionAndIconInfo(iScrDbHandler->PrepareStatement(insertCaptionAndIconInfo)); |
945 |
|
946 //Assigning Default Value |
|
947 TInt64 intVal = 0; |
|
948 stmtViewData->BindInt64(3, intVal); //ScreenMode |
|
949 stmtCaptionAndIconInfo->BindInt64(2, intVal); //NumberOfIcons |
|
950 std::wstring strVal(L""); |
|
951 stmtCaptionAndIconInfo->BindStr(3, strVal); //IconFile |
|
926 |
952 |
927 bool captionAndIconInfoPresent = 0; |
953 bool captionAndIconInfoPresent = 0; |
928 //for every TViewData |
954 //for every TViewData |
929 stmtViewData->BindInt64(1, alocalAppInfoId); |
955 stmtViewData->BindInt64(1, alocalAppInfoId); |
930 |
956 |
992 stmtAppProperty->BindInt(4, appPropertyIter->iServiceUid); |
1018 stmtAppProperty->BindInt(4, appPropertyIter->iServiceUid); |
993 stmtAppProperty->BindInt(5, appPropertyIter->iIntValue); |
1019 stmtAppProperty->BindInt(5, appPropertyIter->iIntValue); |
994 |
1020 |
995 if(appPropertyIter->iIsStr8Bit) |
1021 if(appPropertyIter->iIsStr8Bit) |
996 { |
1022 { |
997 stmtAppProperty->BindBinary(6, appPropertyIter->iStrValue); |
1023 std::string str = wstring2string(appPropertyIter->iStrValue); |
1024 std::string decodedString = Util::Base64Decode(str); |
|
1025 stmtAppProperty->BindBinary(6, decodedString); |
|
998 } |
1026 } |
999 else |
1027 else |
1000 { |
1028 { |
1001 stmtAppProperty->BindStr(6, appPropertyIter->iStrValue); |
1029 stmtAppProperty->BindStr(6, appPropertyIter->iStrValue); |
1002 } |
1030 } |