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