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