23 #include "../apgrfx/APGPRIV.H" // KLitPathForNonNativeResourceAndIconFiles |
23 #include "../apgrfx/APGPRIV.H" // KLitPathForNonNativeResourceAndIconFiles |
24 #include "../apgrfx/apprivate.h" // KLitPathForNonNativeResourceAndIconFiles |
24 #include "../apgrfx/apprivate.h" // KLitPathForNonNativeResourceAndIconFiles |
25 #include "aplappinforeader.h" |
25 #include "aplappinforeader.h" |
26 #include <e32uid.h> |
26 #include <e32uid.h> |
27 |
27 |
|
28 #include "OstTraceDefinitions.h" |
|
29 #ifdef OST_TRACE_COMPILER_IN_USE |
|
30 #include "aplapplistitemTraces.h" |
|
31 #endif |
|
32 |
28 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
33 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
29 #include <usif/scr/appregentries.h> |
34 #include <usif/scr/appregentries.h> |
30 #endif |
35 #endif |
31 |
36 |
32 // Delays in the pseudo idle object that builds the application list |
37 // Delays in the pseudo idle object that builds the application list |
150 void CApaAppViewData::SetIconFileNameL(const TDesC& aFileName) |
155 void CApaAppViewData::SetIconFileNameL(const TDesC& aFileName) |
151 { |
156 { |
152 HBufC* fileName = aFileName.AllocL(); |
157 HBufC* fileName = aFileName.AllocL(); |
153 delete iIconFileName; // after the AllocL succeeds |
158 delete iIconFileName; // after the AllocL succeeds |
154 iIconFileName = fileName; |
159 iIconFileName = fileName; |
|
160 OstTraceDefExt1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_DETAILED, CAPAAPPVIEWDATA_SETICONFILENAMEL, "The icon file name is iIconFileName=%S", *iIconFileName ); |
155 } |
161 } |
156 |
162 |
157 void CApaAppViewData::SetNumOfViewIcons(TInt aNumOfViewIcons) |
163 void CApaAppViewData::SetNumOfViewIcons(TInt aNumOfViewIcons) |
158 { |
164 { |
159 iNumOfViewIcons = aNumOfViewIcons; |
165 iNumOfViewIcons = aNumOfViewIcons; |
|
166 OstTraceDef1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_DETAILED, CAPAAPPVIEWDATA_SETNUMOFVIEWICONS, "Number of view icons iNumOfViewIcons=%d", iNumOfViewIcons ); |
160 } |
167 } |
161 |
168 |
162 void CApaAppViewData::SetNonMbmIconFile(TBool aNonMbmIconFile) |
169 void CApaAppViewData::SetNonMbmIconFile(TBool aNonMbmIconFile) |
163 { |
170 { |
164 iNonMbmIconFile = aNonMbmIconFile; |
171 iNonMbmIconFile = aNonMbmIconFile; |
|
172 OstTraceDef1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_DETAILED, CAPAAPPVIEWDATA_SETNONMBMICONFILE, "Non Mbm icon file is iNonMbmIconFile=%d", iNonMbmIconFile ); |
|
173 |
165 } |
174 } |
166 |
175 |
167 EXPORT_C TUid CApaAppViewData::Uid() const |
176 EXPORT_C TUid CApaAppViewData::Uid() const |
168 { |
177 { |
169 return iUid; |
178 return iUid; |
310 iDefaultScreenNumber = appInfoReader->DefaultScreenNumber(); |
319 iDefaultScreenNumber = appInfoReader->DefaultScreenNumber(); |
311 |
320 |
312 delete iIconFileName; |
321 delete iIconFileName; |
313 iIconFileName = appInfoReader->IconFileName(); |
322 iIconFileName = appInfoReader->IconFileName(); |
314 iNonMbmIconFile = appInfoReader->NonMbmIconFile(); |
323 iNonMbmIconFile = appInfoReader->NonMbmIconFile(); |
|
324 OstTraceDef1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, DUP11_CAPAAPPDATA_READAPPLICATIONINFORMATIONFROMSCRL, "Is Icon file Non Mbm : iNonMbmIconFile=%d", iNonMbmIconFile ); |
|
325 |
315 iNumOfAppIcons = appInfoReader->NumOfAppIcons(); |
326 iNumOfAppIcons = appInfoReader->NumOfAppIcons(); |
|
327 OstTraceDef1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, DUP5_CAPAAPPDATA_READAPPLICATIONINFORMATIONFROMSCRL, "Number of icons : iNumOfAppIcons=%d", iNumOfAppIcons ); |
|
328 |
316 iApplicationLanguage = appInfoReader->AppLanguage(); |
329 iApplicationLanguage = appInfoReader->AppLanguage(); |
|
330 OstTraceDef1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, DUP6_CAPAAPPDATA_READAPPLICATIONINFORMATIONFROMSCRL, "Application language is : iApplicationLanguage=%d", iApplicationLanguage ); |
|
331 |
317 |
332 |
318 // views |
333 // views |
319 iViewDataArray->ResetAndDestroy(); |
334 iViewDataArray->ResetAndDestroy(); |
320 CArrayPtrFlat<CApaAppViewData>* viewDataArray = appInfoReader->Views(); |
335 CArrayPtrFlat<CApaAppViewData>* viewDataArray = appInfoReader->Views(); |
321 if (viewDataArray) |
336 if (viewDataArray) |
621 */ |
636 */ |
622 EXPORT_C TPtrC CApaAppData::RegistrationFileName() const |
637 EXPORT_C TPtrC CApaAppData::RegistrationFileName() const |
623 { |
638 { |
624 if (iRegistrationFile) |
639 if (iRegistrationFile) |
625 { |
640 { |
|
641 OstTraceDefExt1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, CAPAAPPDATA_REGISTRATIONFILENAME, "Registration File Name is iRegistrationFile=%S", iRegistrationFile ); |
626 return *iRegistrationFile; |
642 return *iRegistrationFile; |
627 } |
643 } |
628 else |
644 else |
629 { |
645 { |
630 return TPtrC(KNullDesC); |
646 return TPtrC(KNullDesC); |
639 */ |
655 */ |
640 EXPORT_C TPtrC CApaAppData::LocalisableResourceFileName() const |
656 EXPORT_C TPtrC CApaAppData::LocalisableResourceFileName() const |
641 { |
657 { |
642 if (iLocalisableResourceFileName) |
658 if (iLocalisableResourceFileName) |
643 { |
659 { |
|
660 OstTraceDefExt1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, CAPAAPPDATA_LOCALISABLERESOURCEFILENAME, "Localisable Resource filename is iLocalisableResourceFileName=%S", iLocalisableResourceFileName ); |
644 return *iLocalisableResourceFileName; |
661 return *iLocalisableResourceFileName; |
645 } |
662 } |
646 else |
663 else |
647 { |
664 { |
648 return TPtrC(KNullDesC); |
665 return TPtrC(KNullDesC); |
985 @param aDefaultIconsUsed On return, this indicates whether the default icons have been used |
1002 @param aDefaultIconsUsed On return, this indicates whether the default icons have been used |
986 */ |
1003 */ |
987 { |
1004 { |
988 aIconCount = iIcons->Count(); |
1005 aIconCount = iIcons->Count(); |
989 aDefaultIconsUsed = iIcons->DefaultIconsUsed(); |
1006 aDefaultIconsUsed = iIcons->DefaultIconsUsed(); |
|
1007 OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, CAPAAPPDATA_GETICONINFO, "aIconCount=%d and aDefaultIconsUsed=%d", aIconCount, aDefaultIconsUsed ); |
990 } |
1008 } |
991 |
1009 |
992 /** Gets the default screen number used by the application. |
1010 /** Gets the default screen number used by the application. |
993 |
1011 |
994 A device may have more than once screen. This function |
1012 A device may have more than once screen. This function |
1115 return result; |
1133 return result; |
1116 } |
1134 } |
1117 |
1135 |
1118 EXPORT_C void CApaAppData::SetShortCaptionL(const TDesC& aShortCaption) |
1136 EXPORT_C void CApaAppData::SetShortCaptionL(const TDesC& aShortCaption) |
1119 { |
1137 { |
|
1138 OstTraceDefExt1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_FLOW, CAPAAPPDATA_SETSHORTCAPTIONL_ENTRY, "CApaAppData::SetShortCaptionL : aShortCaption=%S", aShortCaption ); |
|
1139 |
1120 if(iShortCaption->Compare(aShortCaption) != 0) |
1140 if(iShortCaption->Compare(aShortCaption) != 0) |
1121 { |
1141 { |
1122 HBufC* newShortCaption=aShortCaption.AllocL(); |
1142 HBufC* newShortCaption=aShortCaption.AllocL(); |
1123 if (!iShortCaptionFromResourceFile) |
1143 if (!iShortCaptionFromResourceFile) |
1124 { // store the rsc file caption into iShortCaptionFromResourceFile so that it can be externalized. |
1144 { // store the rsc file caption into iShortCaptionFromResourceFile so that it can be externalized. |
1127 else |
1147 else |
1128 { |
1148 { |
1129 delete iShortCaption; |
1149 delete iShortCaption; |
1130 } |
1150 } |
1131 iShortCaption = newShortCaption; |
1151 iShortCaption = newShortCaption; |
|
1152 OstTraceDefExt1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, CAPAAPPDATA_SETSHORTCAPTIONL, "Short caption set is iShortCaption=%S", *iShortCaption ); |
|
1153 |
1132 } |
1154 } |
1133 } |
1155 } |
1134 |
1156 |
1135 /** Sets the caption of the application. If the caption is from central repository, |
1157 /** Sets the caption of the application. If the caption is from central repository, |
1136 it overrides tha value from the resource file. |
1158 it overrides tha value from the resource file. |
1137 */ |
1159 */ |
1138 EXPORT_C void CApaAppData::SetCaptionL(const TDesC& aCaption) |
1160 EXPORT_C void CApaAppData::SetCaptionL(const TDesC& aCaption) |
1139 { |
1161 { |
|
1162 OstTraceDefExt1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_FLOW, CAPAAPPDATA_SETCAPTIONL_ENTRY, "CApaAppData::SetCaptionL : aCaption=%S", aCaption ); |
|
1163 |
1140 if(iCaption->Compare(aCaption) != 0) |
1164 if(iCaption->Compare(aCaption) != 0) |
1141 { |
1165 { |
1142 HBufC* newCaption=aCaption.AllocL(); |
1166 HBufC* newCaption=aCaption.AllocL(); |
1143 if (!iCaptionFromResourceFile) |
1167 if (!iCaptionFromResourceFile) |
1144 { // store the rsc file caption into iCaptionFromResourceFile so that it can be externalized. |
1168 { // store the rsc file caption into iCaptionFromResourceFile so that it can be externalized. |
1147 else |
1171 else |
1148 { |
1172 { |
1149 delete iCaption; |
1173 delete iCaption; |
1150 } |
1174 } |
1151 iCaption = newCaption; |
1175 iCaption = newCaption; |
|
1176 OstTraceDefExt1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, CAPAAPPDATA_SETCAPTIONL, "Caption is set iCaption=%S", *iCaption ); |
1152 } |
1177 } |
1153 } |
1178 } |
1154 |
1179 |
1155 /** Sets the icon details of an application. If these details are from the central repository, |
1180 /** Sets the icon details of an application. If these details are from the central repository, |
1156 it overrides the value in the resource file and loads it. |
1181 it overrides the value in the resource file and loads it. |