]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/ReadOnlyVariable2.h
Fix function comment to follows doxygen format.
[mirror_edk2.git] / MdePkg / Include / Ppi / ReadOnlyVariable2.h
CommitLineData
5879b875 1/** @file\r
2 This file declares Read-only Variable Service PPI\r
3\r
4 Copyright (c) 2006 - 2007, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
5879b875 13 @par Revision Reference:\r
14 This PPI is defined in PI\r
15 Version 1.00.\r
16\r
17**/\r
18\r
19#ifndef __PEI_READ_ONLY_VARIABLE2_PPI_H__\r
20#define __PEI_READ_ONLY_VARIABLE2_PPI_H__\r
21\r
22#define EFI_PEI_READ_ONLY_VARIABLE2_PPI_GUID \\r
00edb218 23 { 0x2ab86ef5, 0xecb5, 0x4134, { 0xb5, 0x56, 0x38, 0x54, 0xca, 0x1f, 0xe1, 0xb4 } }\r
5879b875 24\r
25\r
26typedef struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI EFI_PEI_READ_ONLY_VARIABLE2_PPI;\r
27\r
28/**\r
29 Read the specified variable from the UEFI variable store. If the Data \r
00edb218
A
30 buffer is too small to hold the contents of the variable, \r
31 the error EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the\r
32 required buffer size to obtain the data.\r
5879b875 33\r
00edb218 34 @param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.\r
5879b875 35\r
ac644614 36 @param VariableName A pointer to a null-terminated string that is the variable's name.\r
5879b875 37\r
ac644614 38 @param VendorGuid A pointer to an EFI_GUID that is the variable's GUID. The combination of\r
00edb218 39 VariableGuid and VariableName must be unique.\r
5879b875 40\r
ac644614 41 @param Attributes If non-NULL, on return, points to the variable's attributes. See "Related Definitons"\r
00edb218 42 below for possible attribute values.\r
5879b875 43\r
00edb218
A
44 @param DataSize On entry, points to the size in bytes of the Data buffer. On return, points to the size of\r
45 the data returned in Data.\r
5879b875 46\r
00edb218 47 @param Data Points to the buffer which will hold the returned variable value.\r
5879b875 48\r
49\r
50 @retval EFI_SUCCESS The function completed successfully.\r
51\r
52 @retval EFI_NOT_FOUND The variable was not found.\r
53\r
54 @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data. \r
00edb218
A
55 DataSize is updated with the size required for \r
56 the specified variable.\r
5879b875 57\r
58 @retval EFI_INVALID_PARAMETER VariableName, VariableGuid, DataSize or Data is NULL.\r
59\r
60 @retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error.\r
61\r
62**/\r
63typedef\r
64EFI_STATUS\r
65(EFIAPI *EFI_PEI_GET_VARIABLE2)(\r
00edb218
A
66 IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,\r
67 IN CONST CHAR16 *VariableName,\r
68 IN CONST EFI_GUID *VariableGuid,\r
69 OUT UINT32 *Attributes,\r
70 IN OUT UINTN *DataSize,\r
71 OUT VOID *Data\r
ba237732 72 );\r
5879b875 73\r
74\r
75/**\r
76 This function is called multiple times to retrieve the VariableName \r
00edb218
A
77 and VariableGuid of all variables currently available in the system. \r
78 On each call, the previous results are passed into the interface, \r
79 and, on return, the interface returns the data for the next \r
80 interface. When the entire variable list has been returned, \r
81 EFI_NOT_FOUND is returned.\r
5879b875 82\r
00edb218 83 @param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.\r
5879b875 84\r
00edb218 85 @param VariableNameSize On entry, points to the size of the buffer pointed to by VariableName.\r
5879b875 86\r
ac644614 87 @param VariableName On entry, a pointer to a null-terminated string that is the variable's name.\r
88 On return, points to the next variable's null-terminated name string.\r
5879b875 89\r
ac644614 90 @param VendorGuid On entry, a pointer to an UEFI _GUID that is the variable's GUID. \r
91 On return, a pointer to the next variable's GUID.\r
5879b875 92\r
93\r
94 @retval EFI_SUCCESS The variable was read successfully.\r
95\r
96 @retval EFI_NOT_FOUND The variable could not be found.\r
97\r
98 @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the resulting\r
00edb218
A
99 data. VariableNameSize is updated with the size\r
100 required for the specified variable.\r
5879b875 101\r
102 @retval EFI_INVALID_PARAMETER VariableName, VariableGuid or\r
00edb218 103 VariableNameSize is NULL.\r
5879b875 104\r
105 @retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error.\r
106\r
107**/\r
108typedef\r
109EFI_STATUS\r
8b13229b 110(EFIAPI *EFI_PEI_NEXT_VARIABLE_NAME2)(\r
00edb218
A
111 IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,\r
112 IN OUT UINTN *VariableNameSize,\r
113 IN OUT CHAR16 *VariableName,\r
114 IN OUT EFI_GUID *VariableGuid\r
ba237732 115 );\r
5879b875 116\r
117/**\r
118 This PPI provides a lightweight, read-only variant of the full EFI \r
119 variable services. \r
120\r
121 @param GetVariable\r
122 A service to ascertain a given variable name.\r
123\r
124 @param GetNextVariableName\r
125 A service to ascertain a variable based upon a given, known variable\r
126\r
127**/\r
128struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI {\r
00edb218
A
129 EFI_PEI_GET_VARIABLE2 GetVariable;\r
130 EFI_PEI_NEXT_VARIABLE_NAME2 NextVariableName;\r
5879b875 131};\r
132\r
133extern EFI_GUID gEfiPeiReadOnlyVariable2PpiGuid;\r
134\r
135#endif\r