Change callback definitions to function pointer
authorDongsun Lee <ds73.lee@samsung.com>
Wed, 3 Jan 2024 04:47:37 +0000 (13:47 +0900)
committer이동선/Security&Privacy팀(SR)/삼성전자 <ds73.lee@samsung.com>
Wed, 3 Jan 2024 04:52:00 +0000 (13:52 +0900)
include/webauthn-types.h

index e17c58a5902ccad5c394c6fe5ae6f57d422164f1..3efc51bc3c52392e759d0981c8ceb8297da2ae15 100644 (file)
@@ -557,7 +557,7 @@ typedef struct __wauthn_client_data {
  * @see #wauthn_mc_callbacks_s()
  * @see #wauthn_ga_callbacks_s()
  */
-typedef void wauthn_cb_display_qrcode(const char *qr_contents, void *user_data);
+typedef void (*wauthn_cb_display_qrcode)(const char *qr_contents, void *user_data);
 
 /**
  * @brief Invoked when the response for the make credential request need to be returned.
@@ -571,7 +571,7 @@ typedef void wauthn_cb_display_qrcode(const char *qr_contents, void *user_data);
  * @see #wauthn_mc_callbacks_s
  * @see #wauthn_pubkey_credential_attestaion_s
  */
-typedef void wauthn_cb_mc_on_response(const wauthn_pubkey_credential_attestaion_s *pubkey_cred,
+typedef void (*wauthn_cb_mc_on_response)(const wauthn_pubkey_credential_attestaion_s *pubkey_cred,
                                       wauthn_error_e result,
                                       void *user_data);
 
@@ -587,7 +587,7 @@ typedef void wauthn_cb_mc_on_response(const wauthn_pubkey_credential_attestaion_
  * @see #wauthn_ga_callbacks_s
  * @see #wauthn_pubkey_credential_assertion_s
  */
-typedef void wauthn_cb_ga_on_response(const wauthn_pubkey_credential_assertion_s *pubkey_cred,
+typedef void (*wauthn_cb_ga_on_response)(const wauthn_pubkey_credential_assertion_s *pubkey_cred,
                                       wauthn_error_e result,
                                       void *user_data);
 
@@ -599,8 +599,8 @@ typedef void wauthn_cb_ga_on_response(const wauthn_pubkey_credential_assertion_s
  * @see wauthn_cb_mc_on_response()
  */
 typedef struct __wauthn_mc_callbacks {
-    wauthn_cb_display_qrcode *qrcode_callback; /**< call back function for displaying QR code*/
-    wauthn_cb_mc_on_response *response_callback; /**< call back function for getting the final response*/
+    wauthn_cb_display_qrcode qrcode_callback; /**< call back function for displaying QR code*/
+    wauthn_cb_mc_on_response response_callback; /**< call back function for getting the final response*/
     void *user_data; /**< user data to be passed to qrcode_callback and response_callback*/
 } wauthn_mc_callbacks_s;
 
@@ -612,8 +612,8 @@ typedef struct __wauthn_mc_callbacks {
  * @see wauthn_cb_ga_on_response()
  */
 typedef struct __wauthn_ga_callbacks {
-    wauthn_cb_display_qrcode *qrcode_callback; /**< call back function for displaying QR code*/
-    wauthn_cb_ga_on_response *response_callback; /**< call back function for getting the final response*/
+    wauthn_cb_display_qrcode qrcode_callback; /**< call back function for displaying QR code*/
+    wauthn_cb_ga_on_response response_callback; /**< call back function for getting the final response*/
     void *user_data; /**< user data to be passed to qrcode_callback and response_callback*/
 } wauthn_ga_callbacks_s;