]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.h
ShellPkg/tftp: Convert from NULL class library to Dynamic Command
[mirror_edk2.git] / ShellPkg / DynamicCommand / TftpDynamicCommand / Tftp.h
1 /** @file
2 Header file for 'tftp' command functions.
3
4 Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>
5 Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
6
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #ifndef _TFTP_H_
18 #define _TFTP_H_
19
20 #include <Uefi.h>
21
22 #include <Protocol/HiiPackageList.h>
23 #include <Protocol/ServiceBinding.h>
24 #include <Protocol/Mtftp4.h>
25
26 #include <Library/BaseLib.h>
27 #include <Library/BaseMemoryLib.h>
28 #include <Library/DebugLib.h>
29 #include <Library/MemoryAllocationLib.h>
30 #include <Library/ShellLib.h>
31 #include <Library/UefiLib.h>
32 #include <Library/UefiRuntimeServicesTableLib.h>
33 #include <Library/UefiBootServicesTableLib.h>
34 #include <Library/HiiLib.h>
35 #include <Library/NetLib.h>
36 #include <Library/PrintLib.h>
37 #include <Library/UefiHiiServicesLib.h>
38
39 extern EFI_HANDLE mTftpHiiHandle;
40
41 typedef struct {
42 UINTN FileSize;
43 UINTN DownloadedNbOfBytes;
44 UINTN LastReportedNbOfBytes;
45 } DOWNLOAD_CONTEXT;
46
47 /**
48 Function for 'tftp' command.
49
50 @param[in] ImageHandle The image handle.
51 @param[in] SystemTable The system table.
52
53 @retval SHELL_SUCCESS Command completed successfully.
54 @retval SHELL_INVALID_PARAMETER Command usage error.
55 @retval SHELL_ABORTED The user aborts the operation.
56 @retval value Unknown error.
57 **/
58 SHELL_STATUS
59 RunTftp (
60 IN EFI_HANDLE ImageHandle,
61 IN EFI_SYSTEM_TABLE *SystemTable
62 );
63
64 /**
65 Retrive HII package list from ImageHandle and publish to HII database.
66
67 @param ImageHandle The image handle of the process.
68
69 @return HII handle.
70 **/
71 EFI_HANDLE
72 InitializeHiiPackage (
73 EFI_HANDLE ImageHandle
74 );
75 #endif // _TFTP_H_