]>
Commit | Line | Data |
---|---|---|
90b24889 WF |
1 | /** @file\r |
2 | The file operation functions for WiFi Connection Manager.\r | |
3 | \r | |
4 | Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r | |
5 | \r | |
ecf98fbc | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
90b24889 WF |
7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef __EFI_WIFI_MGR_FILE_UTIL__\r | |
11 | #define __EFI_WIFI_MGR_FILE_UTIL__\r | |
12 | \r | |
13 | #include "WifiConnectionMgrDxe.h"\r | |
14 | \r | |
15 | /**\r | |
16 | Read file content into BufferPtr, the size of the allocate buffer\r | |
17 | is *FileSize plus AddtionAllocateSize.\r | |
18 | \r | |
19 | @param[in] FileHandle The file to be read.\r | |
20 | @param[in, out] BufferPtr Pointers to the pointer of allocated buffer.\r | |
21 | @param[out] FileSize Size of input file\r | |
22 | @param[in] AddtionAllocateSize Addtion size the buffer need to be allocated.\r | |
23 | In case the buffer need to contain others besides the file content.\r | |
24 | \r | |
25 | @retval EFI_SUCCESS The file was read into the buffer.\r | |
26 | @retval EFI_INVALID_PARAMETER A parameter was invalid.\r | |
27 | @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r | |
28 | @retval others Unexpected error.\r | |
29 | \r | |
30 | **/\r | |
31 | EFI_STATUS\r | |
32 | ReadFileContent (\r | |
33 | IN EFI_FILE_HANDLE FileHandle,\r | |
34 | IN OUT VOID **BufferPtr,\r | |
35 | OUT UINTN *FileSize,\r | |
36 | IN UINTN AddtionAllocateSize\r | |
37 | );\r | |
38 | \r | |
39 | /**\r | |
40 | Update the CA cert base on the input file path info.\r | |
41 | \r | |
42 | @param[in] Private The pointer to the global private data structure.\r | |
43 | @param[in] FilePath Point to the file path.\r | |
44 | \r | |
45 | @retval TRUE Exit caller function.\r | |
46 | @retval FALSE Not exit caller function.\r | |
47 | \r | |
48 | **/\r | |
49 | BOOLEAN\r | |
50 | UpdateCAFromFile (\r | |
51 | IN WIFI_MGR_PRIVATE_DATA *Private,\r | |
52 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r | |
53 | );\r | |
54 | \r | |
55 | /**\r | |
56 | Update the Private Key base on the input file path info.\r | |
57 | \r | |
58 | @param[in] Private The pointer to the global private data structure.\r | |
59 | @param[in] FilePath Point to the file path.\r | |
60 | \r | |
61 | @retval TRUE Exit caller function.\r | |
62 | @retval FALSE Not exit caller function.\r | |
63 | \r | |
64 | **/\r | |
65 | BOOLEAN\r | |
66 | UpdatePrivateKeyFromFile (\r | |
67 | IN WIFI_MGR_PRIVATE_DATA *Private,\r | |
68 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r | |
69 | );\r | |
70 | \r | |
71 | #endif\r |