diff --git a/swilib/include/swilib/explorer.h b/swilib/include/swilib/explorer.h index 3cace868..48da0c54 100644 --- a/swilib/include/swilib/explorer.h +++ b/swilib/include/swilib/explorer.h @@ -173,6 +173,18 @@ __swi_begin(0x2DB) void MediaSendCSM_Open(const WSHDR *file, const WSHDR *path) __swi_end(0x2DB, MediaSendCSM_Open, (file, path)); +/** + * Open menu for setting resource as Wallpaper, Logo, Ringtone, etc.. + * @param file_name name of the file, example "beans_recipe.jpg" + * @param dir directory of the file, example "0:\\Pictures" + * @param flag 0 or 2 + * @param open_mode unknown param, set 0 + * @return CSM ID + * */ +__swi_begin(0x3CC) +int PersMenuCSM_Open(const WSHDR *file_name, const WSHDR *dir, int flag, int open_mode) +__swi_end(0x3CC, PersMenuCSM_Open, (file_name, dir, flag, open_mode)); + /** * Open NativeExplorer. * @param data options for the opening explorer @@ -250,6 +262,17 @@ __swi_begin(0x1F1) int ExplorerSetTransferState(char transfer_id, int state) __swi_end(0x1F1, ExplorerSetTransferState, (transfer_id, state)); +/** + * Get MIME type + * @param uid file uid, see #GetExtUid_ws, #GetExtUidByFileName_ws + * @param[out] mime_type pointer to WSHDR string + * @param unk_0 unknown param, set to 0 + * @return 1: success, 0: error + * */ +__swi_begin(0x3C8) +int GetMimeType(int uid, WSHDR *mime_type, int unk_0) +__swi_end(0x3C8, GetMimeType, (uid, mime_type, unk_0)); + __swilib_end /** @} */ diff --git a/swilib/include/swilib/wstring.h b/swilib/include/swilib/wstring.h index 3a3361fc..587d5cbc 100644 --- a/swilib/include/swilib/wstring.h +++ b/swilib/include/swilib/wstring.h @@ -223,6 +223,19 @@ __swi_begin(0x2E2) int wstrcmp(WSHDR *str1, WSHDR *str2) __swi_end(0x2E2, wstrcmp, (str1, str2)); +/** + * Compare two WSHDR strings, up to a specific length + * @param ws1 WSHDR to be compared + * @param ws2 WSHDR to be compared + * @param n length + * @return <0 - the first character that does not match has a lower value in ws1 than in ws2 + * @return 0 - the contents of both strings are equal + * @return >0 - the first character that does not match has a greater value in ws1 than in ws2 + * */ +__swi_begin(0x3C9) +int wstrncmp(const WSHDR *ws1, const WSHDR *ws2, size_t n) +__swi_end(0x3C9, wstrncmp, (ws1, ws2, n)); + /** * Get WSHDR length. * @param str pointer to the WSHDR