equal
deleted
inserted
replaced
38 |
38 |
39 #include "toolsconf.h" |
39 #include "toolsconf.h" |
40 #include "symbiantypes.h" |
40 #include "symbiantypes.h" |
41 #include "utf8_wrapper.h" |
41 #include "utf8_wrapper.h" |
42 |
42 |
|
43 std::string ConvertOpaqueData(const std::string& opaqueData); |
|
44 |
43 // Xerces library uses XMLCh (UTF16 format) as its default character type. |
45 // Xerces library uses XMLCh (UTF16 format) as its default character type. |
44 // We can store the UTF16 returned form the xerces library in the following |
46 // We can store the UTF16 returned form the xerces library in the following |
45 // template class. |
47 // template class. |
46 typedef std::basic_string<XMLCh> XercesString; |
48 typedef std::basic_string<XMLCh> XercesString; |
47 |
49 |
133 |
135 |
134 int iLocale; |
136 int iLocale; |
135 std::wstring iName; |
137 std::wstring iName; |
136 }; |
138 }; |
137 |
139 |
138 class TCustomAcessList |
140 class TCustomAccessList |
139 { |
141 { |
140 public: |
142 public: |
141 TCustomAcessList() |
143 TCustomAccessList() |
142 :iAccessMode(1) |
144 :iAccessMode(1) |
143 {} |
145 {} |
144 |
146 |
145 int iSecureId; |
147 int iSecureId; |
146 int iAccessMode;; |
148 int iAccessMode;; |
148 |
150 |
149 std::wstring iUniqueSoftwareTypeName; |
151 std::wstring iUniqueSoftwareTypeName; |
150 std::vector<TLocalizedSoftwareTypeName> iLocalizedSoftwareTypeNames; |
152 std::vector<TLocalizedSoftwareTypeName> iLocalizedSoftwareTypeNames; |
151 int iSifPluginUid; |
153 int iSifPluginUid; |
152 std::wstring iLauncherExecutable; |
154 std::wstring iLauncherExecutable; |
153 std::vector<TCustomAcessList> iCustomAcessList; |
155 std::vector<TCustomAccessList> iCustomAccessList; |
154 std::vector<std::wstring> iMIMEDetails; |
156 std::vector<std::wstring> iMIMEDetails; |
155 }; // struct TScrEnvironmentDetails |
157 }; // struct TScrEnvironmentDetails |
156 |
158 |
157 |
159 |
158 class TScrPreProvisionDetail |
160 class TScrPreProvisionDetail |
335 iIsBinary(false) |
337 iIsBinary(false) |
336 {} |
338 {} |
337 int iLocale; |
339 int iLocale; |
338 int iServiceUid; |
340 int iServiceUid; |
339 bool iIsBinary; |
341 bool iIsBinary; |
340 std::wstring iOpaqueData; |
342 std::string iOpaqueData; |
341 }; |
343 }; |
342 |
344 |
343 class TAppServiceInfo |
345 class TAppServiceInfo |
344 { |
346 { |
345 public: |
347 public: |
403 {} |
405 {} |
404 int iLocale; |
406 int iLocale; |
405 std::wstring iName; |
407 std::wstring iName; |
406 int iServiceUid; |
408 int iServiceUid; |
407 int iIntValue; |
409 int iIntValue; |
408 std::wstring iStrValue; |
410 std::string iStrValue; |
409 bool iIsStr8Bit; |
411 bool iIsStr8Bit; |
410 }; |
412 }; |
411 |
413 |
412 std::vector<TAppAttribute> iApplicationAttribute; |
414 std::vector<TAppAttribute> iApplicationAttribute; |
413 std::vector<std::wstring> iFileOwnershipInfo; |
415 std::vector<std::wstring> iFileOwnershipInfo; |
513 |
515 |
514 XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppProperty GetAppProperty( const XERCES_CPP_NAMESPACE::DOMElement* aDOMElement); |
516 XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppProperty GetAppProperty( const XERCES_CPP_NAMESPACE::DOMElement* aDOMElement); |
515 |
517 |
516 XmlDetails::TScrEnvironmentDetails::TLocalizedSoftwareTypeName GetLocalizedSoftwareTypeName( const XERCES_CPP_NAMESPACE::DOMElement* aDOMElement); |
518 XmlDetails::TScrEnvironmentDetails::TLocalizedSoftwareTypeName GetLocalizedSoftwareTypeName( const XERCES_CPP_NAMESPACE::DOMElement* aDOMElement); |
517 |
519 |
518 XmlDetails::TScrEnvironmentDetails::TCustomAcessList GetCustomAcessList(const XERCES_CPP_NAMESPACE::DOMElement* aDOMElement); |
520 XmlDetails::TScrEnvironmentDetails::TCustomAccessList GetCustomAccessList(const XERCES_CPP_NAMESPACE::DOMElement* aDOMElement); |
519 |
521 |
520 void ConfigDomParser(xercesc::XercesDOMParser& aDomParser); |
522 void ConfigDomParser(xercesc::XercesDOMParser& aDomParser); |
521 }; |
523 }; |
522 |
524 |
523 |
525 |
594 inline std::wstring XercesStringToWString(const XercesString& aString) |
596 inline std::wstring XercesStringToWString(const XercesString& aString) |
595 { |
597 { |
596 wchar_t* buffer = new wchar_t[aString.length() + 1]; |
598 wchar_t* buffer = new wchar_t[aString.length() + 1]; |
597 const XMLCh* source = aString.c_str(); |
599 const XMLCh* source = aString.c_str(); |
598 |
600 |
599 // Using a temp variable in place of buffer as ConvertUTF16toUTF8 modifies the source pointer passed. |
601 // Using a temp variable in place of buffer as ConvertUTF16toUCS4 modifies the source pointer passed. |
600 wchar_t* temp = buffer; |
602 wchar_t* temp = buffer; |
601 |
603 |
602 ConvertUTF16toUCS4(&source, source + aString.length(), &temp, temp + aString.length()); |
604 ConvertUTF16toUCS4(&source, source + aString.length(), &temp, temp + aString.length()); |
603 |
605 |
604 // Appending NUL to the converted buffer. |
606 // Appending NUL to the converted buffer. |
605 *temp = 0; |
607 *temp = NULL; |
606 |
608 |
607 std::wstring result(buffer); |
609 std::wstring result(buffer); |
608 delete[] buffer; |
610 delete[] buffer; |
609 return result; |
611 return result; |
610 } |
612 } |