]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/UserManager.h
Move the definitions defined for User Manager protocol from UserCredential.h to UserM...
[mirror_edk2.git] / MdePkg / Include / Protocol / UserManager.h
CommitLineData
2832b228 1/** @file\r
2 UEFI 2.2 User Manager Protocol definition.\r
3\r
4 This protocol manages user profiles.\r
5\r
75dad611 6 Copyright (c) 2009 - 2010, Intel Corporation \r
2832b228 7 All rights reserved. This program and the accompanying materials \r
8 are licensed and made available under the terms and conditions of the BSD License \r
9 which accompanies this distribution. The full text of the license may be found at \r
10 http://opensource.org/licenses/bsd-license.php \r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
14\r
15**/\r
16\r
17#ifndef __USER_MANAGER_H__\r
18#define __USER_MANAGER_H__\r
19\r
2832b228 20///\r
21/// Global ID for the User Manager Protocol\r
22///\r
23#define EFI_USER_MANAGER_PROTOCOL_GUID \\r
24 { \\r
25 0x6fd5b00c, 0xd426, 0x4283, { 0x98, 0x87, 0x6c, 0xf5, 0xcf, 0x1c, 0xb1, 0xfe } \\r
26 }\r
27\r
28#define EFI_EVENT_GROUP_USER_PROFILE_CHANGED \\r
29 { \\r
30 0xbaf1e6de, 0x209e, 0x4adb, { 0x8d, 0x96, 0xfd, 0x8b, 0x71, 0xf3, 0xf6, 0x83 } \\r
31 }\r
32\r
75dad611 33typedef VOID *EFI_USER_PROFILE_HANDLE;\r
34typedef VOID *EFI_USER_INFO_HANDLE;\r
35\r
36///\r
37/// The attributes of the user profile information.\r
38///\r
39typedef UINT16 EFI_USER_INFO_ATTRIBS;\r
40#define EFI_USER_INFO_STORAGE 0x000F\r
41#define EFI_USER_INFO_STORAGE_VOLATILE 0x0000\r
42#define EFI_USER_INFO_STORAGE_CREDENTIAL_NV 0x0001\r
43#define EFI_USER_INFO_STORAGE_PLATFORM_NV 0x0002\r
44\r
45#define EFI_USER_INFO_ACCESS 0x0070\r
46#define EFI_USER_INFO_PUBLIC 0x0010\r
47#define EFI_USER_INFO_PRIVATE 0x0020\r
48#define EFI_USER_INFO_PROTECTED 0x0030\r
49#define EFI_USER_INFO_EXCLUSIVE 0x0080\r
50\r
51///\r
52/// User information structure\r
53///\r
54typedef struct {\r
55 ///\r
56 /// The user credential identifier associated with this user information or else Nil if the \r
57 /// information is not associated with any specific credential.\r
58 ///\r
59 EFI_GUID Credential;\r
60 ///\r
61 /// The type of user information.\r
62 ///\r
63 UINT8 InfoType;\r
64 ///\r
65 /// Must be set to 0.\r
66 ///\r
67 UINT8 Reserved1;\r
68 ///\r
69 /// The attributes of the user profile information.\r
70 ///\r
71 EFI_USER_INFO_ATTRIBS InfoAttribs;\r
72 ///\r
73 /// The size of the user information, in bytes, including this header.\r
74 ///\r
75 UINT32 InfoSize;\r
76} EFI_USER_INFO;\r
77\r
78///\r
79/// User credential class GUIDs\r
80///\r
81#define EFI_USER_CREDENTIAL_CLASS_UNKNOWN \\r
82 { 0x5cf32e68, 0x7660, 0x449b, { 0x80, 0xe6, 0x7e, 0xa3, 0x6e, 0x3, 0xf6, 0xa8 } }\r
83#define EFI_USER_CREDENTIAL_CLASS_PASSWORD \\r
84 { 0xf8e5058c, 0xccb6, 0x4714, { 0xb2, 0x20, 0x3f, 0x7e, 0x3a, 0x64, 0xb, 0xd1 } }\r
85#define EFI_USER_CREDENTIAL_CLASS_SMART_CARD \\r
86 { 0x5f03ba33, 0x8c6b, 0x4c24, { 0xaa, 0x2e, 0x14, 0xa2, 0x65, 0x7b, 0xd4, 0x54 } }\r
87#define EFI_USER_CREDENTIAL_CLASS_FINGERPRINT \\r
88 { 0x32cba21f, 0xf308, 0x4cbc, { 0x9a, 0xb5, 0xf5, 0xa3, 0x69, 0x9f, 0x4, 0x4a } }\r
89#define EFI_USER_CREDENTIAL_CLASS_HANDPRINT \\r
90 { 0x5917ef16, 0xf723, 0x4bb9, { 0xa6, 0x4b, 0xd8, 0xc5, 0x32, 0xf4, 0xd8, 0xb5 } }\r
91#define EFI_USER_CREDENTIAL_CLASS_SECURE_CARD \\r
92 { 0x8a6b4a83, 0x42fe, 0x45d2, { 0xa2, 0xef, 0x46, 0xf0, 0x6c, 0x7d, 0x98, 0x52 } }\r
93\r
94typedef UINT64 EFI_CREDENTIAL_CAPABILITIES;\r
95#define EFI_CREDENTIAL_CAPABILITIES_ENROLL 0x0000000000000001\r
96\r
97///\r
98/// Credential logon flags \r
99///\r
100typedef UINT32 EFI_CREDENTIAL_LOGON_FLAGS;\r
101#define EFI_CREDENTIAL_LOGON_FLAG_AUTO 0x00000001\r
102#define EFI_CREDENTIAL_LOGON_FLAG_DEFAULT 0x00000002\r
103\r
104///\r
105/// User information record types\r
106///\r
107\r
108///\r
109/// No information.\r
110///\r
111#define EFI_USER_INFO_EMPTY_RECORD 0x00\r
112///\r
113/// Provide the user's name for the enrolled user.\r
114///\r
115#define EFI_USER_INFO_NAME_RECORD 0x01\r
116typedef CHAR16 *EFI_USER_INFO_NAME;\r
117///\r
118/// Provides the date and time when the user profile was created.\r
119///\r
120#define EFI_USER_INFO_CREATE_DATE_RECORD 0x02\r
121typedef EFI_TIME EFI_USER_INFO_CREATE_DATE;\r
122///\r
123/// Provides the date and time when the user profile was selected.\r
124///\r
125#define EFI_USER_INFO_USAGE_DATE_RECORD 0x03\r
126typedef EFI_TIME EFI_USER_INFO_USAGE_DATE;\r
127///\r
128/// Provides the number of times that the user profile has been selected.\r
129///\r
130#define EFI_USER_INFO_USAGE_COUNT_RECORD 0x04\r
131typedef UINT64 EFI_USER_INFO_USAGE_COUNT;\r
132///\r
133/// Provides a unique non-volatile user identifier for each enrolled user.\r
134///\r
135#define EFI_USER_INFO_IDENTIFIER_RECORD 0x05\r
136typedef UINT8 EFI_USER_INFO_IDENTIFIER[16];\r
137///\r
138/// Specifies the type of a particular credential associated with the user profile.\r
139///\r
140#define EFI_USER_INFO_CREDENTIAL_TYPE_RECORD 0x06\r
141typedef EFI_GUID EFI_USER_INFO_CREDENTIAL_TYPE;\r
142///\r
143/// Specifies the user-readable name of a particular credential type.\r
144///\r
145#define EFI_USER_INFO_CREDENTIAL_TYPE_NAME_RECORD 0x07\r
146typedef CHAR16 *EFI_USER_INFO_CREDENTIAL_TYPE_NAME;\r
147///\r
148/// Specifies the credential provider.\r
149///\r
150#define EFI_USER_INFO_CREDENTIAL_PROVIDER_RECORD 0x08\r
151typedef EFI_GUID EFI_USER_INFO_CREDENTIAL_PROVIDER;\r
152///\r
153/// Specifies the user-readable name of a particular credential's provider.\r
154///\r
155#define EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD 0x09\r
156typedef CHAR16 *EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME;\r
157///\r
158/// Provides PKCS#11 credential information from a smart card.\r
159///\r
160#define EFI_USER_INFO_PKCS11_RECORD 0x0A\r
161///\r
162/// Provides standard biometric information in the format specified by the ISO 19785 (Common \r
163/// Biometric Exchange Formats Framework) specification.\r
164///\r
165#define EFI_USER_INFO_CBEFF_RECORD 0x0B\r
166typedef VOID *EFI_USER_INFO_CBEFF;\r
167///\r
168/// Indicates how close of a match the fingerprint must be in order to be considered a match.\r
169///\r
170#define EFI_USER_INFO_FAR_RECORD 0x0C\r
171typedef UINT8 EFI_USER_INFO_FAR;\r
172///\r
173/// Indicates how many attempts the user has to with a particular credential before the system prevents \r
174/// further attempts.\r
175///\r
176#define EFI_USER_INFO_RETRY_RECORD 0x0D\r
177typedef UINT8 EFI_USER_INFO_RETRY;\r
178///\r
179/// Provides the user's pre-OS access rights.\r
180///\r
181#define EFI_USER_INFO_ACCESS_POLICY_RECORD 0x0E\r
182\r
183typedef struct {\r
184 UINT32 Type; ///< Specifies the type of user access control.\r
185 UINT32 Size; ///< Specifies the size of the user access control record, in bytes, including this header.\r
186} EFI_USER_INFO_ACCESS_CONTROL;\r
187\r
188typedef EFI_USER_INFO_ACCESS_CONTROL EFI_USER_INFO_ACCESS_POLICY;\r
189\r
190///\r
191/// User Information access types\r
192///\r
193\r
194///\r
195/// Forbids the user from booting or loading executables from the specified device path or any child \r
196/// device paths.\r
197///\r
198#define EFI_USER_INFO_ACCESS_FORBID_LOAD 0x00000001\r
199///\r
200/// Permits the user from booting or loading executables from the specified device path or any child \r
201/// device paths.\r
202/// Note: in-consistency between code and the UEFI 2.3 specification here.\r
203/// The definition EFI_USER_INFO_ACCESS_PERMIT_BOOT in the specification should be typo and wait for\r
204/// spec update.\r
205///\r
206#define EFI_USER_INFO_ACCESS_PERMIT_LOAD 0x00000002\r
207///\r
208/// Presence of this record indicates that a user can update enrollment information.\r
209///\r
210#define EFI_USER_INFO_ACCESS_ENROLL_SELF 0x00000003\r
211///\r
212/// Presence of this record indicates that a user can enroll new users.\r
213///\r
214#define EFI_USER_INFO_ACCESS_ENROLL_OTHERS 0x00000004\r
215///\r
216/// Presence of this record indicates that a user can update the user information of any user.\r
217///\r
218#define EFI_USER_INFO_ACCESS_MANAGE 0x00000005\r
219///\r
220/// Describes permissions usable when configuring the platform.\r
221///\r
222#define EFI_USER_INFO_ACCESS_SETUP 0x00000006\r
223///\r
224/// Standard GUIDs for access to configure the platform.\r
225///\r
226#define EFI_USER_INFO_ACCESS_SETUP_ADMIN_GUID \\r
227 { 0x85b75607, 0xf7ce, 0x471e, { 0xb7, 0xe4, 0x2a, 0xea, 0x5f, 0x72, 0x32, 0xee } }\r
228#define EFI_USER_INFO_ACCESS_SETUP_NORMAL_GUID \\r
229 { 0x1db29ae0, 0x9dcb, 0x43bc, { 0x8d, 0x87, 0x5d, 0xa1, 0x49, 0x64, 0xdd, 0xe2 } }\r
230#define EFI_USER_INFO_ACCESS_SETUP_RESTRICTED_GUID \\r
231 { 0xbdb38125, 0x4d63, 0x49f4, { 0x82, 0x12, 0x61, 0xcf, 0x5a, 0x19, 0xa, 0xf8 } }\r
232\r
233///\r
234/// Forbids UEFI drivers from being started from the specified device path(s) or any child device paths.\r
235///\r
236#define EFI_USER_INFO_ACCESS_FORBID_CONNECT 0x00000007\r
237///\r
238/// Permits UEFI drivers to be started on the specified device path(s) or any child device paths.\r
239///\r
240#define EFI_USER_INFO_ACCESS_PERMIT_CONNECT 0x00000008\r
241///\r
242/// Modifies the boot order.\r
243///\r
244#define EFI_USER_INFO_ACCESS_BOOT_ORDER 0x00000009\r
245typedef UINT32 EFI_USER_INFO_ACCESS_BOOT_ORDER_HDR;\r
246\r
247#define EFI_USER_INFO_ACCESS_BOOT_ORDER_MASK 0x0000000F\r
248///\r
249/// Insert new boot options at the beginning of the boot order.\r
250///\r
251#define EFI_USER_INFO_ACCESS_BOOT_ORDER_INSERT 0x00000000\r
252///\r
253/// Append new boot options to the end of the boot order.\r
254///\r
255#define EFI_USER_INFO_ACCESS_BOOT_ORDER_APPEND 0x00000001\r
256///\r
257/// Replace the entire boot order.\r
258///\r
259#define EFI_USER_INFO_ACCESS_BOOT_ORDER_REPLACE 0x00000002\r
260///\r
261/// The Boot Manager will not attempt find a default boot device \r
262/// when the default boot order is does not lead to a bootable device.\r
263///\r
264#define EFI_USER_INFO_ACCESS_BOOT_ORDER_NODEFAULT 0x00000010\r
265\r
266///\r
267/// Provides the expression which determines which credentials are required to assert user identity.\r
268///\r
269#define EFI_USER_INFO_IDENTITY_POLICY_RECORD 0x0F\r
270\r
271typedef struct {\r
272 UINT32 Type; ///< Specifies either an operator or a data item. \r
273 UINT32 Length; ///< The length of this block, in bytes, including this header.\r
274} EFI_USER_INFO_IDENTITY_POLICY;\r
275\r
276///\r
277/// User identity policy expression operators.\r
278///\r
279#define EFI_USER_INFO_IDENTITY_FALSE 0x00\r
280#define EFI_USER_INFO_IDENTITY_TRUE 0x01\r
281#define EFI_USER_INFO_IDENTITY_CREDENTIAL_TYPE 0x02\r
282#define EFI_USER_INFO_IDENTITY_CREDENTIAL_PROVIDER 0x03\r
283#define EFI_USER_INFO_IDENTITY_NOT 0x10\r
284#define EFI_USER_INFO_IDENTITY_AND 0x11\r
285#define EFI_USER_INFO_IDENTITY_OR 0x12\r
286\r
287///\r
288/// Provides placeholder for additional user profile information identified by a GUID.\r
289///\r
290#define EFI_USER_INFO_GUID_RECORD 0xFF\r
291typedef EFI_GUID EFI_USER_INFO_GUID;\r
292\r
293///\r
294/// User information table\r
295/// A collection of EFI_USER_INFO records, prefixed with this header.\r
296///\r
297typedef struct {\r
298 UINT64 Size; ///< Total size of the user information table, in bytes.\r
299} EFI_USER_INFO_TABLE;\r
300\r
2832b228 301typedef struct _EFI_USER_MANAGER_PROTOCOL EFI_USER_MANAGER_PROTOCOL;\r
302\r
303/**\r
304 Create a new user profile.\r
305\r
306 This function creates a new user profile with only a new user identifier attached and returns its \r
307 handle. The user profile is non-volatile, but the handle User can change across reboots.\r
308\r
309 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
310 @param[out] User On return, points to the new user profile handle. \r
311 The user profile handle is unique only during this boot.\r
312 \r
313 @retval EFI_SUCCESS User profile was successfully created.\r
314 @retval EFI_ACCESS_DENIED Current user does not have sufficient permissions to create a user profile.\r
315 @retval EFI_UNSUPPORTED Creation of new user profiles is not supported.\r
316 @retval EFI_INVALID_PARAMETER The User parameter is NULL.\r
317**/\r
318typedef\r
319EFI_STATUS\r
320(EFIAPI *EFI_USER_PROFILE_CREATE)(\r
321 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
322 OUT EFI_USER_PROFILE_HANDLE *User\r
323 );\r
324\r
325/**\r
326 Delete an existing user profile.\r
327\r
328 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
329 @param[in] User User profile handle. \r
330\r
331 @retval EFI_SUCCESS User profile was successfully deleted.\r
332 @retval EFI_ACCESS_DENIED Current user does not have sufficient permissions to delete a user\r
333 profile or there is only one user profile.\r
334 @retval EFI_UNSUPPORTED Deletion of new user profiles is not supported.\r
335 @retval EFI_INVALID_PARAMETER User does not refer to a valid user profile.\r
336**/\r
337typedef\r
338EFI_STATUS\r
339(EFIAPI *EFI_USER_PROFILE_DELETE)(\r
340 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
341 IN EFI_USER_PROFILE_HANDLE User\r
342 );\r
343\r
344/**\r
345 Enumerate all of the enrolled users on the platform.\r
346\r
347 This function returns the next enrolled user profile. To retrieve the first user profile handle, point \r
348 User at a NULL. Each subsequent call will retrieve another user profile handle until there are no \r
349 more, at which point User will point to NULL. \r
350\r
351 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
352 @param[in,out] User On entry, points to the previous user profile handle or NULL to \r
353 start enumeration. On exit, points to the next user profile handle\r
354 or NULL if there are no more user profiles.\r
355\r
356 @retval EFI_SUCCESS Next enrolled user profile successfully returned. \r
357 @retval EFI_ACCESS_DENIED Next enrolled user profile was not successfully returned.\r
358 @retval EFI_INVALID_PARAMETER The User parameter is NULL.\r
359**/\r
360typedef\r
361EFI_STATUS\r
362(EFIAPI *EFI_USER_PROFILE_GET_NEXT)(\r
363 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
364 IN OUT EFI_USER_PROFILE_HANDLE *User\r
365 );\r
366\r
367/**\r
368 Return the current user profile handle.\r
369\r
370 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
371 @param[out] CurrentUser On return, points to the current user profile handle.\r
372\r
373 @retval EFI_SUCCESS Current user profile handle returned successfully. \r
374 @retval EFI_INVALID_PARAMETER The CurrentUser parameter is NULL.\r
375**/\r
376typedef\r
377EFI_STATUS\r
378(EFIAPI *EFI_USER_PROFILE_CURRENT)(\r
379 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
380 OUT EFI_USER_PROFILE_HANDLE *CurrentUser\r
381 );\r
382\r
383/**\r
384 Identify a user.\r
385\r
386 Identify the user and, if authenticated, returns the user handle and changes the current user profile.\r
387 All user information marked as private in a previously selected profile is no longer available for \r
388 inspection. \r
389 Whenever the current user profile is changed then the an event with the GUID \r
390 EFI_EVENT_GROUP_USER_PROFILE_CHANGED is signaled.\r
391\r
392 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
393 @param[out] User On return, points to the user profile handle for the current user profile.\r
394\r
395 @retval EFI_SUCCESS User was successfully identified.\r
396 @retval EFI_ACCESS_DENIED User was not successfully identified.\r
397 @retval EFI_INVALID_PARAMETER The User parameter is NULL.\r
398**/\r
399typedef\r
400EFI_STATUS\r
401(EFIAPI *EFI_USER_PROFILE_IDENTIFY)(\r
402 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
403 OUT EFI_USER_PROFILE_HANDLE *User\r
404 );\r
405\r
406/**\r
407 Find a user using a user information record.\r
408\r
409 This function searches all user profiles for the specified user information record. The search starts \r
410 with the user information record handle following UserInfo and continues until either the \r
411 information is found or there are no more user profiles.\r
412 A match occurs when the Info.InfoType field matches the user information record type and the \r
413 user information record data matches the portion of Info passed the EFI_USER_INFO header.\r
414\r
415 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
416 @param[in,out] User On entry, points to the previously returned user profile handle or NULL to start \r
417 searching with the first user profile. On return, points to the user profile handle or \r
418 NULL if not found.\r
419 @param[in,out] UserInfo On entry, points to the previously returned user information handle or NULL to start \r
420 searching with the first. On return, points to the user information handle of the user \r
421 information record or NULL if not found. Can be NULL, in which case only one user \r
422 information record per user can be returned. \r
423 @param[in] Info Points to the buffer containing the user information to be compared to the user \r
424 information record. If NULL, then only the user information record type is compared. \r
425 If InfoSize is 0, then the user information record must be empty.\r
426\r
427 @param[in] InfoSize The size of Info, in bytes. \r
428\r
429 @retval EFI_SUCCESS User information was found. User points to the user profile handle and \r
430 UserInfo points to the user information handle.\r
431 @retval EFI_NOT_FOUND User information was not found. User points to NULL and UserInfo points to NULL.\r
432**/\r
433typedef\r
434EFI_STATUS\r
435(EFIAPI *EFI_USER_PROFILE_FIND)(\r
436 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
437 IN OUT EFI_USER_PROFILE_HANDLE *User,\r
438 IN OUT EFI_USER_INFO_HANDLE *UserInfo OPTIONAL,\r
439 IN CONST EFI_USER_INFO *Info,\r
440 IN UINTN InfoSize\r
441 );\r
442\r
443/**\r
444 Called by credential provider to notify of information change.\r
445\r
446 This function allows the credential provider to notify the User Identity Manager when user status has \r
447 changed while deselected.\r
448 If the User Identity Manager doesn't support asynchronous changes in credentials, then this function \r
449 should return EFI_UNSUPPORTED. \r
450 If the User Identity Manager supports this, it will call User() to get the user identifier and then \r
451 GetNextInfo() and GetInfo() in the User Credential Protocol to get all of the information \r
452 from the credential and add it.\r
453\r
454 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
455 @param[in] Changed Handle on which is installed an instance of the\r
456 EFI_USER_CREDENTIAL_PROTOCOL where the user has changed.\r
457\r
458 @retval EFI_SUCCESS The User Identity Manager has handled the notification.\r
459 @retval EFI_NOT_READY The function was called while the specified credential provider was not selected.\r
460 @retval EFI_UNSUPPORTED The User Identity Manager doesn't support asynchronous notifications.\r
461**/\r
462typedef\r
463EFI_STATUS\r
464(EFIAPI *EFI_USER_PROFILE_NOTIFY)(\r
465 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
466 IN EFI_HANDLE Changed\r
467 );\r
468\r
469/**\r
470 Return information attached to the user.\r
471\r
472 This function returns user information. The format of the information is described in User \r
473 Information. The function may return EFI_ACCESS_DENIED if the information is marked private \r
474 and the handle specified by User is not the current user profile. The function may return \r
475 EFI_ACCESS_DENIED if the information is marked protected and the information is associated \r
476 with a credential provider for which the user has not been authenticated.\r
477\r
478 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
479 @param[in] User Handle of the user whose profile will be retrieved. \r
480 @param[in] UserInfo Handle of the user information data record. \r
481 @param[out] Info On entry, points to a buffer of at least *InfoSize bytes. On exit, holds the user \r
482 information. If the buffer is too small to hold the information, then \r
483 EFI_BUFFER_TOO_SMALL is returned and InfoSize is updated to contain the \r
484 number of bytes actually required. \r
485 @param[in,out] InfoSize On entry, points to the size of Info. On return, points to the size of the user \r
486 information. \r
487\r
488 @retval EFI_SUCCESS Information returned successfully.\r
489 @retval EFI_ACCESS_DENIED The information about the specified user cannot be accessed by the current user.\r
490 @retval EFI_BUFFER_TOO_SMALL The number of bytes specified by *InfoSize is too small to hold \r
491 the returned data. The actual size required is returned in *InfoSize.\r
492**/ \r
493typedef\r
494EFI_STATUS\r
495(EFIAPI *EFI_USER_PROFILE_GET_INFO)(\r
496 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
497 IN EFI_USER_PROFILE_HANDLE User,\r
498 IN EFI_USER_INFO_HANDLE UserInfo,\r
499 OUT EFI_USER_INFO *Info,\r
500 IN OUT UINTN *InfoSize\r
501 );\r
502\r
503/**\r
504 Add or update user information.\r
505\r
506 This function changes user information. If NULL is pointed to by UserInfo, then a new user \r
507 information record is created and its handle is returned in UserInfo. Otherwise, the existing one is \r
508 replaced.\r
509 If EFI_USER_INFO_EXCLUSIVE is specified in Info and a user information record of the same \r
510 type already exists in the user profile, then EFI_ACCESS_DENIED will be returned and \r
511 UserInfo will point to the handle of the existing record.\r
512\r
513 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
514 @param[in] User Handle of the user whose profile will be retrieved. \r
515 @param[in,out] UserInfo Handle of the user information data record. \r
516 @param[in] Info On entry, points to a buffer of at least *InfoSize bytes. On exit, holds the user \r
517 information. If the buffer is too small to hold the information, then \r
518 EFI_BUFFER_TOO_SMALL is returned and InfoSize is updated to contain the \r
519 number of bytes actually required. \r
520 @param[in] InfoSize On entry, points to the size of Info. On return, points to the size of the user \r
521 information. \r
522\r
523 @retval EFI_SUCCESS Information returned successfully.\r
524 @retval EFI_ACCESS_DENIED The record is exclusive.\r
525 @retval EFI_SECURITY_VIOLATION The current user does not have permission to change the specified \r
526 user profile or user information record.\r
527**/ \r
528typedef\r
529EFI_STATUS\r
530(EFIAPI *EFI_USER_PROFILE_SET_INFO)(\r
531 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
532 IN EFI_USER_PROFILE_HANDLE User,\r
533 IN OUT EFI_USER_INFO_HANDLE *UserInfo,\r
534 IN CONST EFI_USER_INFO *Info,\r
535 IN UINTN InfoSize\r
536 );\r
537\r
538/**\r
539 Delete user information.\r
540\r
541 Delete the user information attached to the user profile specified by the UserInfo.\r
542\r
543 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
544 @param[in] User Handle of the user whose information will be deleted.\r
545 @param[in] UserInfo Handle of the user information to remove.\r
546\r
547 @retval EFI_SUCCESS User information deleted successfully.\r
548 @retval EFI_NOT_FOUND User information record UserInfo does not exist in the user profile.\r
549 @retval EFI_ACCESS_DENIED The current user does not have permission to delete this user information. \r
550**/ \r
551typedef\r
552EFI_STATUS\r
553(EFIAPI *EFI_USER_PROFILE_DELETE_INFO)(\r
554 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
555 IN EFI_USER_PROFILE_HANDLE User,\r
556 IN EFI_USER_INFO_HANDLE UserInfo\r
557 );\r
558\r
559/**\r
560 Enumerate user information of all the enrolled users on the platform.\r
561\r
562 This function returns the next user information record. To retrieve the first user information record \r
563 handle, point UserInfo at a NULL. Each subsequent call will retrieve another user information \r
564 record handle until there are no more, at which point UserInfo will point to NULL. \r
565\r
ea4220e3 566 Note: in-consistency between code and the UEFI 2.3 specification that the type of the User parameter\r
567 is EFI_USER_PROFILE_HANDLE. It should be spec error and wait for spec update.\r
568\r
2832b228 569 @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
570 @param[in] User Handle of the user whose information will be deleted.\r
571 @param[in,out] UserInfo Handle of the user information to remove.\r
572\r
573 @retval EFI_SUCCESS User information returned.\r
574 @retval EFI_NOT_FOUND No more user information found.\r
575**/ \r
576typedef\r
577EFI_STATUS\r
578(EFIAPI *EFI_USER_PROFILE_GET_NEXT_INFO)(\r
579 IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r
580 IN EFI_USER_PROFILE_HANDLE User,\r
581 IN OUT EFI_USER_INFO_HANDLE *UserInfo\r
582 );\r
583\r
584///\r
585/// This protocol provides the services used to manage user profiles.\r
586///\r
587struct _EFI_USER_MANAGER_PROTOCOL {\r
588 EFI_USER_PROFILE_CREATE Create;\r
589 EFI_USER_PROFILE_DELETE Delete;\r
590 EFI_USER_PROFILE_GET_NEXT GetNext;\r
591 EFI_USER_PROFILE_CURRENT Current;\r
592 EFI_USER_PROFILE_IDENTIFY Identify;\r
593 EFI_USER_PROFILE_FIND Find;\r
594 EFI_USER_PROFILE_NOTIFY Notify;\r
595 EFI_USER_PROFILE_GET_INFO GetInfo;\r
596 EFI_USER_PROFILE_SET_INFO SetInfo;\r
597 EFI_USER_PROFILE_DELETE_INFO DeleteInfo;\r
598 EFI_USER_PROFILE_GET_NEXT_INFO GetNextInfo;\r
599};\r
600\r
601extern EFI_GUID gEfiUserManagerProtocolGuid;\r
d14d2707 602extern EFI_GUID gEfiEventUserProfileChangedGuid;\r
75dad611 603extern EFI_GUID gEfiUserCredentialClassUnknownGuid;\r
604extern EFI_GUID gEfiUserCredentialClassPasswordGuid;\r
605extern EFI_GUID gEfiUserCredentialClassSmartCardGuid;\r
606extern EFI_GUID gEfiUserCredentialClassFingerprintGuid;\r
607extern EFI_GUID gEfiUserCredentialClassHandprintGuid;\r
608extern EFI_GUID gEfiUserCredentialClassSecureCardGuid;\r
609extern EFI_GUID gEfiUserInfoAccessSetupAdminGuid;\r
610extern EFI_GUID gEfiUserInfoAccessSetupNormalGuid;\r
611extern EFI_GUID gEfiUserInfoAccessSetupRestrictedGuid;\r
2832b228 612\r
613#endif\r