]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.h
Update UID drivers to align with latest UEFI spec 2.3.1.
[mirror_edk2.git] / SecurityPkg / UserIdentification / UsbCredentialProviderDxe / UsbCredentialProvider.h
index d0295b8de4f27e54d8c3fb61b64364d8036c02c1..83f7f9e2ca4cc422547c337ae7c89a1b2d434bec 100644 (file)
@@ -24,7 +24,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Protocol/SimpleFileSystem.h>\r
 #include <Protocol/BlockIo.h>\r
-#include <Protocol/UserCredential.h>\r
+#include <Protocol/UserCredential2.h>\r
 #include <Protocol/UserManager.h>\r
 \r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
@@ -86,7 +86,7 @@ typedef struct {
   has changed. If an enrolled user does exist, delete the user on the credential \r
   provider.\r
 \r
-  @param[in] This                Points to this instance of EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in] This                Points to this instance of EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in] User                The user profile to enroll.\r
  \r
   @retval EFI_SUCCESS            User profile was successfully enrolled.\r
@@ -104,20 +104,18 @@ typedef struct {
 EFI_STATUS\r
 EFIAPI\r
 CredentialEnroll (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This,\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
   IN        EFI_USER_PROFILE_HANDLE             User\r
   );\r
 \r
 /**\r
   Returns the user interface information used during user identification.\r
 \r
-  This function returns information about the form used when interacting with the\r
-  user during user identification. The form is the first enabled form in the form-set\r
-  class EFI_HII_USER_CREDENTIAL_FORMSET_GUID installed on the HII handle HiiHandle. If \r
-  the user credential provider does not require a form to identify the user, then this\r
-  function should return EFI_NOT_FOUND.\r
+  This function enrolls a user on this credential provider. If the user exists on \r
+  this credential provider, update the user information on this credential provider; \r
+  otherwise delete the user information on credential provider.\r
 \r
-  @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] FormSetId  On return, holds the identifier of the form set which contains\r
                          the form used during user identification.\r
@@ -132,7 +130,7 @@ CredentialEnroll (
 EFI_STATUS\r
 EFIAPI\r
 CredentialForm (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This,\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
   OUT       EFI_HII_HANDLE                      *Hii,\r
   OUT       EFI_GUID                            *FormSetId,\r
   OUT       EFI_FORM_ID                         *FormId\r
@@ -145,7 +143,7 @@ CredentialForm (
   of pixels specified by Width and Height. If no such bitmap exists, then EFI_NOT_FOUND\r
   is returned. \r
 \r
-  @param[in]     This    Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in]     This    Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in, out] Width  On entry, points to the desired bitmap width. If NULL then no \r
                          bitmap information will be returned. On exit, points to the \r
                          width of the bitmap returned.\r
@@ -163,7 +161,7 @@ CredentialForm (
 EFI_STATUS\r
 EFIAPI\r
 CredentialTile (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This,\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
   IN OUT    UINTN                               *Width,\r
   IN OUT    UINTN                               *Height,\r
   OUT       EFI_HII_HANDLE                      *Hii,\r
@@ -176,7 +174,7 @@ CredentialTile (
   This function returns a string which describes the credential provider. If no\r
   such string exists, then EFI_NOT_FOUND is returned. \r
 \r
-  @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] String     On return, holds the HII string identifier.\r
  \r
@@ -188,7 +186,7 @@ CredentialTile (
 EFI_STATUS\r
 EFIAPI\r
 CredentialTitle (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This,\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
   OUT       EFI_HII_HANDLE                      *Hii,\r
   OUT       EFI_STRING_ID                       *String\r
   );\r
@@ -201,7 +199,7 @@ CredentialTitle (
   submitted on a form OR after a call to Default() has returned that this credential is\r
   ready to log on.\r
 \r
-  @param[in]  This           Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in]  This           Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in]  User           The user profile handle of the user profile currently being \r
                              considered by the user identity manager. If NULL, then no user\r
                              profile is currently under consideration.\r
@@ -218,7 +216,7 @@ CredentialTitle (
 EFI_STATUS\r
 EFIAPI\r
 CredentialUser (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This,\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
   IN        EFI_USER_PROFILE_HANDLE             User,\r
   OUT       EFI_USER_INFO_IDENTIFIER            *Identifier\r
   );\r
@@ -230,7 +228,7 @@ CredentialUser (
   AutoLogon returns FALSE, then the user interface will be constructed by the User\r
   Identity Manager. \r
 \r
-  @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] AutoLogon  On return, points to the credential provider's capabilities \r
                          after the credential provider has been selected by the user. \r
  \r
@@ -241,7 +239,7 @@ CredentialUser (
 EFI_STATUS\r
 EFIAPI\r
 CredentialSelect (\r
-  IN  CONST  EFI_USER_CREDENTIAL_PROTOCOL    *This,\r
+  IN  CONST  EFI_USER_CREDENTIAL2_PROTOCOL   *This,\r
   OUT        EFI_CREDENTIAL_LOGON_FLAGS      *AutoLogon\r
   );\r
 \r
@@ -250,7 +248,7 @@ CredentialSelect (
 \r
   This function is called when a credential provider is deselected by the user.\r
 \r
-  @param[in] This        Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in] This        Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
  \r
   @retval EFI_SUCCESS    Credential provider successfully deselected.\r
   \r
@@ -258,7 +256,7 @@ CredentialSelect (
 EFI_STATUS\r
 EFIAPI\r
 CredentialDeselect (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This\r
   );\r
 \r
 /**\r
@@ -266,7 +264,7 @@ CredentialDeselect (
 \r
   This function reports the default login behavior regarding this credential provider.  \r
 \r
-  @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] AutoLogon  On return, holds whether the credential provider should be used\r
                          by default to automatically log on the user.  \r
  \r
@@ -277,7 +275,7 @@ CredentialDeselect (
 EFI_STATUS\r
 EFIAPI\r
 CredentialDefault (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This,\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
   OUT       EFI_CREDENTIAL_LOGON_FLAGS          *AutoLogon\r
   );\r
 \r
@@ -286,7 +284,7 @@ CredentialDefault (
 \r
   This function returns user information. \r
 \r
-  @param[in]      This          Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in]      This          Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in]      UserInfo      Handle of the user information data record. \r
   @param[out]     Info          On entry, points to a buffer of at least *InfoSize bytes. On\r
                                 exit, holds the user information. If the buffer is too small\r
@@ -306,7 +304,7 @@ CredentialDefault (
 EFI_STATUS\r
 EFIAPI\r
 CredentialGetInfo (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This,\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
   IN        EFI_USER_INFO_HANDLE                UserInfo,\r
   OUT       EFI_USER_INFO                       *Info,\r
   IN OUT    UINTN                               *InfoSize\r
@@ -320,7 +318,7 @@ CredentialGetInfo (
   another user information record handle until there are no more, at which point UserInfo\r
   will point to NULL. \r
 \r
-  @param[in]      This     Points to this instance of the EFI_USER_CREDENTIAL_PROTOCOL.\r
+  @param[in]      This     Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in, out] UserInfo On entry, points to the previous user information handle or NULL\r
                            to start enumeration. On exit, points to the next user information\r
                            handle or NULL if there is no more user information.\r
@@ -333,8 +331,31 @@ CredentialGetInfo (
 EFI_STATUS\r
 EFIAPI\r
 CredentialGetNextInfo (\r
-  IN CONST  EFI_USER_CREDENTIAL_PROTOCOL        *This,\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
   IN OUT    EFI_USER_INFO_HANDLE                *UserInfo\r
   );\r
 \r
+/**\r
+  Delete a user on this credential provider.\r
+\r
+  This function deletes a user on this credential provider. \r
+\r
+  @param[in]     This            Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
+  @param[in]     User            The user profile handle to delete.\r
+\r
+  @retval EFI_SUCCESS            User profile was successfully deleted.\r
+  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle. \r
+                                 Either the user profile cannot delete on any user profile or cannot delete \r
+                                 on a user profile other than the current user profile. \r
+  @retval EFI_UNSUPPORTED        This credential provider does not support deletion in the pre-OS.\r
+  @retval EFI_DEVICE_ERROR       The new credential could not be deleted because of a device error.\r
+  @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CredentialDelete (\r
+  IN CONST  EFI_USER_CREDENTIAL2_PROTOCOL       *This,\r
+  IN        EFI_USER_PROFILE_HANDLE             User\r
+  );\r
+\r
 #endif\r