]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Library/FileExplorerLib.h
MdeModulePkg FileExplorerLib: Create file explorer library.
[mirror_edk2.git] / MdeModulePkg / Include / Library / FileExplorerLib.h
CommitLineData
ba529e7e
ED
1/** @file
2
3 This library class defines a set of interfaces for how to do file explorer.
4
5Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
6This program and the accompanying materials are licensed and made available under
7the terms and conditions of the BSD License that accompanies this distribution.
8The full text of the license may be found at
9http://opensource.org/licenses/bsd-license.php.
10
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12WITHOUT 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**/
28typedef
29BOOLEAN
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**/
51EFI_STATUS
52EFIAPI
53ChooseFile (
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