]>
Commit | Line | Data |
---|---|---|
e7c00761 ED |
1 | /** @file\r |
2 | \r | |
3 | This file explorer protocol defines defines a set of interfaces for \r | |
4 | how to do file explorer.\r | |
5 | \r | |
6 | Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r | |
7 | This program and the accompanying materials are licensed and made available under \r | |
8 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
9 | The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php. \r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __FILE_EXPLORER_H__\r | |
18 | #define __FILE_EXPLORER_H__\r | |
19 | \r | |
20 | #define EFI_FILE_EXPLORER_PROTOCOL_GUID \\r | |
21 | { 0x2C03C536, 0x4594, 0x4515, { 0x9E, 0x7A, 0xD3, 0xD2, 0x04, 0xFE, 0x13, 0x63 } }\r | |
22 | \r | |
23 | //\r | |
24 | // Forward reference for pure ANSI compatability\r | |
25 | //\r | |
26 | typedef struct _EFI_FILE_EXPLORER_PROTOCOL EFI_FILE_EXPLORER_PROTOCOL;\r | |
27 | \r | |
28 | /**\r | |
29 | Prototype for the next process after user chosed one file.\r | |
30 | \r | |
31 | @param[in] FilePath The device path of the find file.\r | |
32 | \r | |
33 | @retval TRUE Need exit file explorer after do the extra task.\r | |
34 | @retval FALSE Not need to exit file explorer after do the extra task.\r | |
35 | \r | |
36 | **/\r | |
37 | typedef\r | |
38 | BOOLEAN\r | |
39 | (EFIAPI *CHOOSE_HANDLER)(\r | |
40 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r | |
41 | );\r | |
42 | \r | |
43 | /**\r | |
44 | Choose a file in the specified directory. \r | |
45 | \r | |
46 | If user input NULL for the RootDirectory, will choose file in the system.\r | |
47 | \r | |
48 | If user input *File != NULL, function will return the allocate device path\r | |
49 | info for the choosed file, caller has to free the memory after use it.\r | |
50 | \r | |
51 | @param RootDirectory Pointer to the root directory.\r | |
52 | @param FileType The file type need to choose.\r | |
53 | @param ChooseHandler Function pointer to the extra task need to do\r | |
54 | after choose one file.\r | |
55 | @param File Return the device path for the last time chosed file.\r | |
56 | \r | |
57 | @retval EFI_SUCESS Choose the file success.\r | |
58 | @retval Other errors Choose the file failed.\r | |
59 | **/\r | |
60 | typedef\r | |
61 | EFI_STATUS\r | |
62 | (EFIAPI *CHOOSE_FILE) (\r | |
63 | IN EFI_DEVICE_PATH_PROTOCOL *RootDirectory,\r | |
64 | IN CHAR16 *FileType, OPTIONAL\r | |
65 | IN CHOOSE_HANDLER ChooseHandler, OPTIONAL\r | |
66 | OUT EFI_DEVICE_PATH_PROTOCOL **File OPTIONAL\r | |
67 | );\r | |
68 | \r | |
69 | struct _EFI_FILE_EXPLORER_PROTOCOL {\r | |
70 | CHOOSE_FILE ChooseFile;\r | |
71 | };\r | |
72 | \r | |
73 | extern EFI_GUID gEfiFileExplorerProtocolGuid;\r | |
74 | \r | |
75 | #endif\r |