1 //------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //------------------------------------------------------------
4 
5 namespace System.ServiceModel.Security
6 {
7     using System;
8     using System.IdentityModel.Protocols.WSTrust;
9     using System.ServiceModel;
10     using System.ServiceModel.Channels;
11 
12     /// <summary>
13     /// Defines the ServiceContract Asynchronous interface for a Trust Feb 2005 protocol.
14     /// </summary>
15     [ServiceContract( Name = WSTrustServiceContractConstants.Contracts.IWSTrustFeb2005Async, Namespace = WSTrustServiceContractConstants.Namespace )]
16     public interface IWSTrustFeb2005AsyncContract
17     {
18         /// <summary>
19         /// Definiton of Async RST/Cancel method for WS-Trust Feb 2005
20         /// </summary>
21         /// <param name="request">Request Message containing the RST.</param>
22         /// <param name="callback">AsyncCallback context.</param>
23         /// <param name="state">Asyn state.</param>
24         /// <returns>IAsyncResult result instance.</returns>
25         [OperationContract( Name = WSTrustServiceContractConstants.Operations.TrustFeb2005CancelAsync, AsyncPattern = true, Action = WSTrustFeb2005Constants.Actions.Cancel, ReplyAction = WSTrustFeb2005Constants.Actions.CancelResponse )]
BeginTrustFeb2005Cancel( Message request, AsyncCallback callback, object state )26         IAsyncResult BeginTrustFeb2005Cancel( Message request, AsyncCallback callback, object state );
27 
28         /// <summary>
29         /// Completes the Async RST/Cancel method.
30         /// </summary>
31         /// <param name="ar">The IAsyncResult result instance returned by the BeginCancel call.</param>
32         /// <returns>Message object that contains the RSTR.</returns>
EndTrustFeb2005Cancel( IAsyncResult ar )33         Message EndTrustFeb2005Cancel( IAsyncResult ar );
34 
35         /// <summary>
36         /// Definiton of Async RST/Issue method for WS-Trust Feb 2005
37         /// </summary>
38         /// <param name="request">Request Message containing the RST.</param>
39         /// <param name="callback">AsyncCallback context.</param>
40         /// <param name="state">Asyn state.</param>
41         /// <returns>IAsyncResult result instance.</returns>
42         [OperationContract( Name = WSTrustServiceContractConstants.Operations.TrustFeb2005IssueAsync, AsyncPattern = true, Action = WSTrustFeb2005Constants.Actions.Issue, ReplyAction = WSTrustFeb2005Constants.Actions.IssueResponse )]
BeginTrustFeb2005Issue( Message request, AsyncCallback callback, object state )43         IAsyncResult BeginTrustFeb2005Issue( Message request, AsyncCallback callback, object state );
44 
45         /// <summary>
46         /// Completes the Async RST/Issue method.
47         /// </summary>
48         /// <param name="ar">The IAsyncResult result instance returned by the BeginIssue call.</param>
49         /// <returns>Message object that contains the RSTR.</returns>
EndTrustFeb2005Issue( IAsyncResult ar )50         Message EndTrustFeb2005Issue( IAsyncResult ar );
51 
52         /// <summary>
53         /// Definiton of Async RST/Renew method for WS-Trust Feb 2005
54         /// </summary>
55         /// <param name="request">Request Message containing the RST.</param>
56         /// <param name="callback">AsyncCallback context.</param>
57         /// <param name="state">Asyn state.</param>
58         /// <returns>IAsyncResult result instance.</returns>
59         [OperationContract( Name = WSTrustServiceContractConstants.Operations.TrustFeb2005RenewAsync, AsyncPattern = true, Action = WSTrustFeb2005Constants.Actions.Renew, ReplyAction = WSTrustFeb2005Constants.Actions.RenewResponse )]
BeginTrustFeb2005Renew( Message request, AsyncCallback callback, object state )60         IAsyncResult BeginTrustFeb2005Renew( Message request, AsyncCallback callback, object state );
61 
62         /// <summary>
63         /// Completes the Async RST/Renew method.
64         /// </summary>
65         /// <param name="ar">The IAsyncResult result instance returned by the BeginRenew call.</param>
66         /// <returns>Message object that contains the RSTR.</returns>
EndTrustFeb2005Renew( IAsyncResult ar )67         Message EndTrustFeb2005Renew( IAsyncResult ar );
68 
69         /// <summary>
70         /// Definiton of Async RST/Validate method for WS-Trust Feb 2005
71         /// </summary>
72         /// <param name="request">Request Message containing the RST.</param>
73         /// <param name="callback">AsyncCallback context.</param>
74         /// <param name="state">Asyn state.</param>
75         /// <returns>IAsyncResult result instance.</returns>
76         [OperationContract( Name = WSTrustServiceContractConstants.Operations.TrustFeb2005ValidateAsync, AsyncPattern = true, Action = WSTrustFeb2005Constants.Actions.Validate, ReplyAction = WSTrustFeb2005Constants.Actions.ValidateResponse )]
BeginTrustFeb2005Validate( Message request, AsyncCallback callback, object state )77         IAsyncResult BeginTrustFeb2005Validate( Message request, AsyncCallback callback, object state );
78 
79         /// <summary>
80         /// Completes the Async RST/Validate method.
81         /// </summary>
82         /// <param name="ar">The IAsyncResult result instance returned by the BeginValidate call.</param>
83         /// <returns>Message object that contains the RSTR.</returns>
EndTrustFeb2005Validate( IAsyncResult ar )84         Message EndTrustFeb2005Validate( IAsyncResult ar );
85 
86         /// <summary>
87         /// Definiton of Async RSTR/Cancel method for WS-Trust Feb 2005
88         /// </summary>
89         /// <param name="request">Request Message containing the RST.</param>
90         /// <param name="callback">AsyncCallback context.</param>
91         /// <param name="state">Asyn state.</param>
92         /// <returns>IAsyncResult result instance.</returns>
93         [OperationContract( Name = WSTrustServiceContractConstants.Operations.TrustFeb2005CancelResponseAsync, AsyncPattern = true, Action = WSTrustFeb2005Constants.Actions.CancelResponse, ReplyAction = WSTrustFeb2005Constants.Actions.CancelResponse )]
BeginTrustFeb2005CancelResponse( Message request, AsyncCallback callback, object state )94         IAsyncResult BeginTrustFeb2005CancelResponse( Message request, AsyncCallback callback, object state );
95 
96         /// <summary>
97         /// Completes the Async RSTR/Cancel method.
98         /// </summary>
99         /// <param name="ar">The IAsyncResult result instance returned by the BeginCancelResponse call.</param>
100         /// <returns>Message object that contains the RSTR.</returns>
EndTrustFeb2005CancelResponse( IAsyncResult ar )101         Message EndTrustFeb2005CancelResponse( IAsyncResult ar );
102 
103         /// <summary>
104         /// Definiton of Async RSTR/Issue method for WS-Trust Feb 2005
105         /// </summary>
106         /// <param name="request">Request Message containing the RST.</param>
107         /// <param name="callback">AsyncCallback context.</param>
108         /// <param name="state">Asyn state.</param>
109         /// <returns>IAsyncResult result instance.</returns>
110         [OperationContract( Name = WSTrustServiceContractConstants.Operations.TrustFeb2005IssueResponseAsync, AsyncPattern = true, Action = WSTrustFeb2005Constants.Actions.IssueResponse, ReplyAction = WSTrustFeb2005Constants.Actions.IssueResponse )]
BeginTrustFeb2005IssueResponse( Message request, AsyncCallback callback, object state )111         IAsyncResult BeginTrustFeb2005IssueResponse( Message request, AsyncCallback callback, object state );
112 
113         /// <summary>
114         /// Completes the Async RSTR/Issue method.
115         /// </summary>
116         /// <param name="ar">The IAsyncResult result instance returned by the BeginIssueResponse call.</param>
117         /// <returns>Message object that contains the RSTR.</returns>
EndTrustFeb2005IssueResponse( IAsyncResult ar )118         Message EndTrustFeb2005IssueResponse( IAsyncResult ar );
119 
120         /// <summary>
121         /// Definiton of Async RSTR/Renew method for WS-Trust Feb 2005
122         /// </summary>
123         /// <param name="request">Request Message containing the RST.</param>
124         /// <param name="callback">AsyncCallback context.</param>
125         /// <param name="state">Asyn state.</param>
126         /// <returns>IAsyncResult result instance.</returns>
127         [OperationContract( Name = WSTrustServiceContractConstants.Operations.TrustFeb2005RenewResponseAsync, AsyncPattern = true, Action = WSTrustFeb2005Constants.Actions.RenewResponse, ReplyAction = WSTrustFeb2005Constants.Actions.RenewResponse )]
BeginTrustFeb2005RenewResponse( Message request, AsyncCallback callback, object state )128         IAsyncResult BeginTrustFeb2005RenewResponse( Message request, AsyncCallback callback, object state );
129 
130         /// <summary>
131         /// Completes the Async RSTR/Renew method.
132         /// </summary>
133         /// <param name="ar">The IAsyncResult result instance returned by the BeginRenewResponse call.</param>
134         /// <returns>Message object that contains the RSTR.</returns>
EndTrustFeb2005RenewResponse( IAsyncResult ar )135         Message EndTrustFeb2005RenewResponse( IAsyncResult ar );
136 
137         /// <summary>
138         /// Definiton of Async RSTR/Validate method for WS-Trust Feb 2005
139         /// </summary>
140         /// <param name="request">Request Message containing the RST.</param>
141         /// <param name="callback">AsyncCallback context.</param>
142         /// <param name="state">Asyn state.</param>
143         /// <returns>IAsyncResult result instance.</returns>
144         [OperationContract( Name = WSTrustServiceContractConstants.Operations.TrustFeb2005ValidateResponseAsync, AsyncPattern = true, Action = WSTrustFeb2005Constants.Actions.ValidateResponse, ReplyAction = WSTrustFeb2005Constants.Actions.ValidateResponse )]
BeginTrustFeb2005ValidateResponse( Message request, AsyncCallback callback, object state )145         IAsyncResult BeginTrustFeb2005ValidateResponse( Message request, AsyncCallback callback, object state );
146 
147         /// <summary>
148         /// Completes the Async RSTR/Validate method.
149         /// </summary>
150         /// <param name="ar">The IAsyncResult result instance returned by the BeginValidateResponse call.</param>
151         /// <returns>Message object that contains the RSTR.</returns>
EndTrustFeb2005ValidateResponse( IAsyncResult ar )152         Message EndTrustFeb2005ValidateResponse( IAsyncResult ar );
153     }
154 }
155