internal delegate void OnSigningCompleteCallback()

in aws-crt-auth/Signing.cs [162:247]


            internal delegate void OnSigningCompleteCallback(
                UInt64 id, 
                Int32 errorCode,
                [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=3)] byte[] signatureBuffer,
                UInt64 signatureBufferSize,
                [MarshalAs(UnmanagedType.LPStr)] string signedUri, 
                [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=6)] HttpHeader[] signedHeaders, 
                UInt32 signedHeaderCount);

            [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
            internal delegate void AwsDotnetAuthSignHttpRequest(
                                    [MarshalAs(UnmanagedType.LPStr)] string method,
                                    [MarshalAs(UnmanagedType.LPStr)] string uri,
                                    [In] HttpHeader[] headers,
                                    UInt32 header_count,
                                    [In] CrtStreamWrapper.DelegateTable stream_delegate_table,
                                    [In] AwsSigningConfigNative signing_config,
                                    UInt64 future_id,
                                    OnSigningCompleteCallback completion_callback_delegate);

            [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
            internal delegate void AwsDotnetAuthSignCanonicalRequest(
                                    [MarshalAs(UnmanagedType.LPStr)] string canonical_request,
                                    [In] AwsSigningConfigNative signing_config,
                                    UInt64 future_id,
                                    OnSigningCompleteCallback completion_callback_delegate);

            [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
            internal delegate void AwsDotnetAuthSignChunk(
                                    [In] CrtStreamWrapper.DelegateTable stream_delegate_table,
                                    [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2, ArraySubType=UnmanagedType.U1)] byte[] signature_buffer,
                                    UInt32 signature_buffer_length,
                                    [In] AwsSigningConfigNative signing_config,
                                    UInt64 future_id,
                                    OnSigningCompleteCallback completion_callback_delegate);

            internal delegate void AwsDotnetAuthSignTrailingHeaders(
                                    [In] HttpHeader[] headers,
                                    UInt32 header_count,
                                    [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2, ArraySubType=UnmanagedType.U1)] byte[] signature_buffer,
                                    UInt32 signature_buffer_length,
                                    [In] AwsSigningConfigNative signing_config,
                                    UInt64 future_id,
                                    OnSigningCompleteCallback completion_callback_delegate);

            [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
            internal delegate bool AwsDotnetAuthVerifyV4aCanonicalSigning(
                                    [MarshalAs(UnmanagedType.LPStr)] string canonical_request,
                                    [In] AwsSigningConfigNative signing_config,
                                    [MarshalAs(UnmanagedType.LPStr)] string signature,
                                    [MarshalAs(UnmanagedType.LPStr)] string ecc_pub_x,
                                    [MarshalAs(UnmanagedType.LPStr)] string ecc_pub_y);

            [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
            internal delegate bool AwsDotnetAuthVerifyV4aSignature(
                                    [MarshalAs(UnmanagedType.LPStr)] string string_to_sign,
                                    [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2, ArraySubType=UnmanagedType.U1)] byte[] signature_buffer,
                                    UInt32 signature_buffer_length,
                                    [MarshalAs(UnmanagedType.LPStr)] string ecc_pub_x,
                                    [MarshalAs(UnmanagedType.LPStr)] string ecc_pub_y);          
            
            public static AwsDotnetAuthSignHttpRequest SignRequestNative = NativeAPI.Bind<AwsDotnetAuthSignHttpRequest>("aws_dotnet_auth_sign_http_request");

            public static AwsDotnetAuthSignCanonicalRequest SignCanonicalRequestNative = NativeAPI.Bind<AwsDotnetAuthSignCanonicalRequest>("aws_dotnet_auth_sign_canonical_request");

            public static AwsDotnetAuthSignChunk SignChunkNative = NativeAPI.Bind<AwsDotnetAuthSignChunk>("aws_dotnet_auth_sign_chunk");

            public static AwsDotnetAuthSignTrailingHeaders SignTrailingHeadersNative = NativeAPI.Bind<AwsDotnetAuthSignTrailingHeaders>("aws_dotnet_auth_sign_trailing_headers");

            public static AwsDotnetAuthVerifyV4aCanonicalSigning VerifyV4aCanonicalSigningNative = NativeAPI.Bind<AwsDotnetAuthVerifyV4aCanonicalSigning>("aws_dotnet_auth_verify_v4a_canonical_signing");

            public static AwsDotnetAuthVerifyV4aSignature VerifyV4aSignatureNative = NativeAPI.Bind<AwsDotnetAuthVerifyV4aSignature>("aws_dotnet_auth_verify_v4a_signature");

            public static OnSigningCompleteCallback OnHttpRequestSigningComplete = AwsSigner.OnHttpRequestSigningComplete;

            public static OnSigningCompleteCallback OnCanonicalRequestSigningComplete = AwsSigner.OnCanonicalRequestSigningComplete;

            public static OnSigningCompleteCallback OnChunkSigningComplete = AwsSigner.OnChunkSigningComplete;

            public static OnSigningCompleteCallback OnTrailingHeadersSigningComplete = AwsSigner.OnTrailingHeadersSigningComplete;

            private static LibraryHandle library = new LibraryHandle();
        }

        private class HttpRequestSigningCallbackData
        {