Home | History | Annotate | Download | only in Library
      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 #include <Protocol/FileExplorer.h>
     20 
     21 /**
     22   Choose a file in the specified directory.
     23 
     24   If user input NULL for the RootDirectory, will choose file in the system.
     25 
     26   If user input *File != NULL, function will return the allocate device path
     27   info for the choosed file, caller has to free the memory after use it.
     28 
     29   @param  RootDirectory    Pointer to the root directory.
     30   @param  FileType         The file type need to choose.
     31   @param  ChooseHandler    Function pointer to the extra task need to do
     32                            after choose one file.
     33   @param  File             Return the device path for the last time chosed file.
     34 
     35   @retval EFI_SUCESS       Choose the file success.
     36   @retval Other errors     Choose the file failed.
     37 **/
     38 EFI_STATUS
     39 EFIAPI
     40 ChooseFile (
     41   IN  EFI_DEVICE_PATH_PROTOCOL  *RootDirectory,
     42   IN  CHAR16                    *FileType,  OPTIONAL
     43   IN  CHOOSE_HANDLER            ChooseHandler,  OPTIONAL
     44   OUT EFI_DEVICE_PATH_PROTOCOL  **File  OPTIONAL
     45   );
     46 
     47 #endif
     48