120 * @return UTF-16 wstring, for example "ÄÄNESTÄ.EXE" |
120 * @return UTF-16 wstring, for example "ÄÄNESTÄ.EXE" |
121 * @throws ExceptionBase if UTF-8 to UTF-16 conversion fails |
121 * @throws ExceptionBase if UTF-8 to UTF-16 conversion fails |
122 */ |
122 */ |
123 OS_IMPORT static std::wstring percentDecode(const std::wstring& str); |
123 OS_IMPORT static std::wstring percentDecode(const std::wstring& str); |
124 |
124 |
|
125 /** |
|
126 * This function checks whether is it called during the first device boot |
|
127 * and stores the information to static data so that isFirstBoot() can |
|
128 * return it. |
|
129 * |
|
130 * Call this function always when the process is starting. |
|
131 * |
|
132 * This function creates a flag file to the private data cage / work directory |
|
133 * of the process. |
|
134 * |
|
135 * In Symbian this method can be called only from Java Installer or |
|
136 * Java MIDP processes. |
|
137 * |
|
138 * Return 0 if check was made successfully. Otherwise it returns errno |
|
139 * defined in STDLIBS errno.h |
|
140 */ |
|
141 OS_IMPORT static int initIsFirstBoot(); |
|
142 |
|
143 /** |
|
144 * This function returns true if it called during the first boot. |
|
145 * Otherwise it returns false. |
|
146 * |
|
147 * initIsFirstBoot() must be called before this function can be called. |
|
148 */ |
|
149 OS_IMPORT static bool isFirstBoot(); |
|
150 |
|
151 |
125 public: |
152 public: |
126 /** |
153 /** |
127 * Decodes one %<X><Y> sequence. |
154 * Decodes one %<X><Y> sequence. |
128 * @param first the character <X> |
155 * @param first the character <X> |
129 * @param sec the character <Y> |
156 * @param sec the character <Y> |
130 * @return decoded char value 0-255 |
157 * @return decoded char value 0-255 |
131 * @throws ExceptionBase if <X> and <Y> are not hexadecimal characters |
158 * @throws ExceptionBase if <X> and <Y> are not hexadecimal characters |
132 */ |
159 */ |
133 static char decodeOnePercentSeq(wchar_t first, wchar_t sec); |
160 static char decodeOnePercentSeq(wchar_t first, wchar_t sec); |
|
161 |
|
162 private: |
|
163 static bool mFirstBoot; |
|
164 |
134 }; |
165 }; |
135 |
166 |
136 // A simple class for storing char array that is deleted automatically |
167 // A simple class for storing char array that is deleted automatically |
137 // when going out of scope. |
168 // when going out of scope. |
138 class ScopedCharArray |
169 class ScopedCharArray |