]>
Commit | Line | Data |
---|---|---|
e7c00761 ED |
1 | /** @file\r |
2 | \r | |
d1102dba | 3 | This file explorer protocol defines defines a set of interfaces for\r |
e7c00761 ED |
4 | how to do file explorer.\r |
5 | \r | |
d1102dba | 6 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
e7c00761 ED |
8 | \r |
9 | **/\r | |
10 | \r | |
11 | #ifndef __FILE_EXPLORER_H__\r | |
12 | #define __FILE_EXPLORER_H__\r | |
13 | \r | |
14 | #define EFI_FILE_EXPLORER_PROTOCOL_GUID \\r | |
15 | { 0x2C03C536, 0x4594, 0x4515, { 0x9E, 0x7A, 0xD3, 0xD2, 0x04, 0xFE, 0x13, 0x63 } }\r | |
16 | \r | |
17 | //\r | |
18 | // Forward reference for pure ANSI compatability\r | |
19 | //\r | |
20 | typedef struct _EFI_FILE_EXPLORER_PROTOCOL EFI_FILE_EXPLORER_PROTOCOL;\r | |
21 | \r | |
22 | /**\r | |
23 | Prototype for the next process after user chosed one file.\r | |
24 | \r | |
25 | @param[in] FilePath The device path of the find file.\r | |
26 | \r | |
27 | @retval TRUE Need exit file explorer after do the extra task.\r | |
28 | @retval FALSE Not need to exit file explorer after do the extra task.\r | |
29 | \r | |
30 | **/\r | |
31 | typedef\r | |
32 | BOOLEAN\r | |
33 | (EFIAPI *CHOOSE_HANDLER)(\r | |
34 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r | |
35 | );\r | |
36 | \r | |
37 | /**\r | |
d1102dba | 38 | Choose a file in the specified directory.\r |
e7c00761 ED |
39 | \r |
40 | If user input NULL for the RootDirectory, will choose file in the system.\r | |
41 | \r | |
42 | If user input *File != NULL, function will return the allocate device path\r | |
43 | info for the choosed file, caller has to free the memory after use it.\r | |
44 | \r | |
45 | @param RootDirectory Pointer to the root directory.\r | |
46 | @param FileType The file type need to choose.\r | |
47 | @param ChooseHandler Function pointer to the extra task need to do\r | |
48 | after choose one file.\r | |
49 | @param File Return the device path for the last time chosed file.\r | |
50 | \r | |
51 | @retval EFI_SUCESS Choose the file success.\r | |
52 | @retval Other errors Choose the file failed.\r | |
53 | **/\r | |
54 | typedef\r | |
55 | EFI_STATUS\r | |
56 | (EFIAPI *CHOOSE_FILE) (\r | |
57 | IN EFI_DEVICE_PATH_PROTOCOL *RootDirectory,\r | |
58 | IN CHAR16 *FileType, OPTIONAL\r | |
59 | IN CHOOSE_HANDLER ChooseHandler, OPTIONAL\r | |
60 | OUT EFI_DEVICE_PATH_PROTOCOL **File OPTIONAL\r | |
61 | );\r | |
62 | \r | |
63 | struct _EFI_FILE_EXPLORER_PROTOCOL {\r | |
64 | CHOOSE_FILE ChooseFile;\r | |
65 | };\r | |
66 | \r | |
67 | extern EFI_GUID gEfiFileExplorerProtocolGuid;\r | |
68 | \r | |
69 | #endif\r |