//------------------------------------------------------------------------------
//     Copyright (c) Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------
namespace System.ServiceModel.Security
{
    using System;
    using System.IdentityModel.Tokens;
    using System.Runtime.InteropServices;
    using System.ServiceModel;
    using System.IdentityModel.Protocols.WSTrust;
    /// 
    /// A service contract that defines the methods which wrap the Message-oriented 
    /// operation contracts exposed by .
    /// 
    [ServiceContract]
    [ComVisible(false)]
    public interface IWSTrustChannelContract : IWSTrustContract
    {
        /// 
        /// Sends a WS-Trust Cancel message to an endpoint.
        /// 
        /// The  that represents the request to the STS.        
        /// The  representing the STS response.
        System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse Cancel(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request);
        /// 
        /// Asynchronously sends a WS-Trust Cancel message to an endpoint.
        /// 
        /// The  that represents the request to the STS.        
        /// An optional asynchronous callback, to be called when the send is complete.
        /// A user-provided object that distinguishes this particular asynchronous send 
        /// request from other requests.
        /// An  object that represents the asynchronous send, which could still 
        /// be pending. 
        IAsyncResult BeginCancel(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, AsyncCallback callback, object state);
        /// 
        /// Completes the asynchronous send operation initiated by .
        /// 
        /// A reference to the outstanding asynchronous send request.
        /// The  representing the STS response.
        void EndCancel(IAsyncResult result, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
        /// 
        /// Sends a WS-Trust Issue message to an endpoint STS
        /// 
        /// The  that represents the request to the STS.
        /// A  that represents the token issued by the STS.
        SecurityToken Issue(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request);
        /// 
        /// Sends a WS-Trust Issue message to an endpoint STS
        /// 
        /// The  that represents the request to the STS.
        /// The  that represents the response from 
        /// the STS.
        /// A  that represents the token issued by the STS.
        SecurityToken Issue(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
        /// 
        /// Asynchronously sends a WS-Trust Renew message to an endpoint.
        /// 
        /// The  that represents the request to the STS.        
        /// An optional asynchronous callback, to be called when the send is complete.
        /// A user-provided object that distinguishes this particular asynchronous send 
        /// request from other requests.
        /// An  object that represents the asynchronous send, which could still 
        /// be pending. 
        IAsyncResult BeginIssue(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, AsyncCallback callback, object asyncState);
        /// 
        /// Completes the asynchronous send operation initiated by .
        /// 
        /// A reference to the outstanding asynchronous send request.
        /// The  representing the STS response.
        /// A  that represents the token issued by the STS.
        SecurityToken EndIssue(IAsyncResult result, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
        /// 
        /// Sends a WS-Trust Renew message to an endpoint.
        /// 
        /// The  that represents the request to the STS.        
        /// The  representing the STS response.
        System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse Renew(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request);
        /// 
        /// Asynchronously sends a WS-Trust Renew message to an endpoint.
        /// 
        /// The  that represents the request to the STS.        
        /// An optional asynchronous callback, to be called when the send is complete.
        /// A user-provided object that distinguishes this particular asynchronous send 
        /// request from other requests.
        /// An  object that represents the asynchronous send, which could still 
        /// be pending. 
        IAsyncResult BeginRenew(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, AsyncCallback callback, object state);
        /// 
        /// Completes the asynchronous send operation initiated by .
        /// 
        /// A reference to the outstanding asynchronous send request.
        /// The  representing the STS response.
        void EndRenew(IAsyncResult result, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
        /// 
        /// Sends a WS-Trust Validate message to an endpoint.
        /// 
        /// The  that represents the request to the STS.        
        /// The  representing the STS response.
        System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse Validate(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request);
        /// 
        /// Asynchronously sends a WS-Trust Validate message to an endpoint.
        /// 
        /// The  that represents the request to the STS.        
        /// An optional asynchronous callback, to be called when the send is complete.
        /// A user-provided object that distinguishes this particular asynchronous send 
        /// request from other requests.
        /// An  object that represents the asynchronous send, which could still 
        /// be pending. 
        IAsyncResult BeginValidate(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, AsyncCallback callback, object state);
        /// 
        /// Completes the asynchronous send operation initiated by .
        /// 
        /// A reference to the outstanding asynchronous send request.
        /// The  representing the STS response.
        void EndValidate(IAsyncResult result, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
    }
}