|
SWILIB API (X75)
|
Functions for the files explorer.
Usage: #include <swilib.h> or #include <swilib/explorer.h>
Data Structures | |
| struct | NATIVE_EXPLORER_ITEM |
| Item structure of the NativeExplorer. More... | |
| struct | NativeExplorerData |
| NativeExplorer options. More... | |
| struct | REGEXPLEXT |
| Extension registration structure. More... | |
| struct | REGEXPLEXT_ARM_NEW |
| Native Explorer extension entry returned by get_regextpnt_by_uid on SG and X75. More... | |
Typedefs | |
| typedef enum ExplorerTransferStates | ExplorerTransferStates |
| typedef struct NATIVE_EXPLORER_ITEM | NATIVE_EXPLORER_ITEM |
| typedef struct NativeExplorerData | NativeExplorerData |
| typedef struct REGEXPLEXT | REGEXPLEXT |
| typedef struct REGEXPLEXT_ARM_NEW | REGEXPLEXT_ARM_NEW |
| typedef struct REGEXPLEXT_ARM_NEW | TREGEXPLEXT |
Enumerations | |
| enum | ExplorerTransferStates { EXPLORER_TRANSFER_STATE_STOP = 1 , EXPLORER_TRANSFER_STATE_RUNNING = 2 } |
| enum | NativeExplorerMode { NATIVE_EXPLORER_MODE_DEFAULT = 0x00 , NATIVE_EXPLORER_MODE_SELECT = 0x01 , NATIVE_EXPLORER_MODE_COPY = 0x09 , NATIVE_EXPLORER_MODE_MOVE = 0x0B } |
| Mode of the NativeExplorer. More... | |
Functions | |
| void | RegExplorerExt (const REGEXPLEXT *ext) |
| Register own extension in the NativeExplorer. | |
| int | UnRegExplorerExt (const REGEXPLEXT *ext) |
| Unregister extension from the NativeExplorer. | |
| void * | EXT_TOP (void) |
| Get a pointer to the explorer extensions. | |
| TREGEXPLEXT * | get_regextpnt_by_uid (int uid) |
| Get explorer extension definition by ID. | |
| int | GetExtUid_ws (const WSHDR *ext) |
| Get the ID of the registered extension by its name. | |
| int | GetExtUidByFileName_ws (const WSHDR *file) |
| Get the ID of the registered extension by path to the file. | |
| void | MediaSendCSM_Open (const WSHDR *file, const WSHDR *path) |
| Open menu for sending file. | |
| int | PersMenuCSM_Open (const WSHDR *file_name, const WSHDR *dir, int flag, int open_mode) |
| Open menu for setting resource as Wallpaper, Logo, Ringtone, etc. | |
| int | StartNativeExplorer (NativeExplorerData *data) |
| Open NativeExplorer. | |
| int | OpenExplorer (NativeExplorerData *data) |
| Open NativeExplorer. | |
| int | CardExplGetCurItem (void *csm) |
| Get current item in open Explorer. | |
| void | CardExplGetFName (void *csm, int index, WSHDR *filename) |
| Get filename of the item in the open Explorer. | |
| int | ExecuteFile (const WSHDR *filepath, const WSHDR *mime, void *param) |
| Execute file by the NativeExplorer. | |
| int | ExplorerCopyFile (const char *from, const char *to, int overwrite, char transfer_id, uint32_t *errp) |
| Copy file. | |
| void | ExplorerSetTransferState (char transfer_id, int state) |
| Set transfer state. | |
| int | GetMimeType (int uid, WSHDR *mime_type, int occurrence) |
| Get MIME type. | |
| int | BuildPath (WSHDR *path, const WSHDR *file_name, const WSHDR *dir) |
| Build a full path by a file name and a directory name. | |
| struct NATIVE_EXPLORER_ITEM |
| struct NativeExplorerData |
| struct REGEXPLEXT |
| struct REGEXPLEXT_ARM_NEW |
| typedef enum ExplorerTransferStates ExplorerTransferStates |
Definition at line 23 of file explorer.h.
| typedef struct NATIVE_EXPLORER_ITEM NATIVE_EXPLORER_ITEM |
Definition at line 25 of file explorer.h.
| typedef struct NativeExplorerData NativeExplorerData |
Definition at line 26 of file explorer.h.
| typedef struct REGEXPLEXT REGEXPLEXT |
Definition at line 27 of file explorer.h.
| typedef struct REGEXPLEXT_ARM_NEW REGEXPLEXT_ARM_NEW |
Definition at line 28 of file explorer.h.
| typedef struct REGEXPLEXT_ARM_NEW TREGEXPLEXT |
Definition at line 33 of file explorer.h.
| Enumerator | |
|---|---|
| EXPLORER_TRANSFER_STATE_STOP | |
| EXPLORER_TRANSFER_STATE_RUNNING | |
Definition at line 18 of file explorer.h.
| enum NativeExplorerMode |
Mode of the NativeExplorer.
| Enumerator | |
|---|---|
| NATIVE_EXPLORER_MODE_DEFAULT | Explore files, default mode. |
| NATIVE_EXPLORER_MODE_SELECT | Select file. |
| NATIVE_EXPLORER_MODE_COPY | Copy file mode. |
| NATIVE_EXPLORER_MODE_MOVE | Move file mode. |
Definition at line 39 of file explorer.h.
| void RegExplorerExt | ( | const REGEXPLEXT * | ext | ) |
Register own extension in the NativeExplorer.
| ext | extension definition structure, see REGEXPLEXT |
| int UnRegExplorerExt | ( | const REGEXPLEXT * | ext | ) |
Unregister extension from the NativeExplorer.
| ext | extension definition structure, see REGEXPLEXT |
| void * EXT_TOP | ( | void | ) |
Get a pointer to the explorer extensions.
| TREGEXPLEXT * get_regextpnt_by_uid | ( | int | uid | ) |
Get explorer extension definition by ID.
| uid | ID of the registered extension. |
Get the ID of the registered extension by its name.
| ext | name of the extension, for example: png |
Get the ID of the registered extension by path to the file.
| file | path to the file |
Open menu for sending file.
| file | name of the file, example: "beans_recipe.jpg" |
| path | path to the file, example: "0:\\Pictures\\" |
Open menu for setting resource as Wallpaper, Logo, Ringtone, etc.
| file_name | name of the file, example "beans_recipe.jpg" |
| dir | directory of the file, example "0:\\Pictures" |
| flag | 0 or 2 |
| open_mode | unknown param, set 0 |
| int StartNativeExplorer | ( | NativeExplorerData * | data | ) |
Open NativeExplorer.
| data | options for the opening explorer |
| int OpenExplorer | ( | NativeExplorerData * | data | ) |
Open NativeExplorer.
| data | options for the opening explorer |
| int CardExplGetCurItem | ( | void * | csm | ) |
Get current item in open Explorer.
| csm | pointer to the Explorer CSM |
| void CardExplGetFName | ( | void * | csm, |
| int | index, | ||
| WSHDR * | filename ) |
Get filename of the item in the open Explorer.
| csm | pointer to the Explorer CSM | |
| index | index of the item | |
| [out] | filename | item filename |
Execute file by the NativeExplorer.
| filepath | path to the file |
| mime | mime type of the file |
| param | custom param for the extension handler |
| int ExplorerCopyFile | ( | const char * | from, |
| const char * | to, | ||
| int | overwrite, | ||
| char | transfer_id, | ||
| uint32_t * | errp ) |
Copy file.
| from | source file path | |
| to | destination file path | |
| overwrite | allow overwrite if exists | |
| transfer_id | transfer ID (0 ... 31) | |
| [out] | errp | variable for error |
| void ExplorerSetTransferState | ( | char | transfer_id, |
| int | state ) |
Set transfer state.
| transfer_id | transfer ID (0 ... 31) |
| state | see ExplorerTransferStates |
| int GetMimeType | ( | int | uid, |
| WSHDR * | mime_type, | ||
| int | occurrence ) |
Get MIME type.
| uid | file uid, see GetExtUid_ws, GetExtUidByFileName_ws | |
| [out] | mime_type | output string, or NULL to only test whether the requested mapping exists |
| occurrence | zero-based index among entries matching uid; 0 selects the first match |
mime_type is non-NULL, the mapping is also copied Build a full path by a file name and a directory name.
| [out] | path | pointer to WSHDR string |
| file_name | pointer to WSHDR string, that contains a file name | |
| dir | pointer to WSHDR string, that contains a directory name |
path path must have enough capacity for the complete result; firmware does not check it.