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