|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file MWspCOSessionCallback.h |
|
18 @warning : This file contains Rose Model ID comments - please do not delete |
|
19 */ |
|
20 |
|
21 #ifndef __MWSPCOSESSIONCALLBACK_H__ |
|
22 #define __MWSPCOSESSIONCALLBACK_H__ |
|
23 |
|
24 // System includes |
|
25 #include <e32std.h> |
|
26 #include <wsp/wsptypes.h> |
|
27 |
|
28 // Types used for arguments in this file (e.g. TWspBearer) are from the Wap namespace |
|
29 using namespace Wap; |
|
30 |
|
31 |
|
32 class MWspCOSessionCallback |
|
33 /** |
|
34 @class MWspCOSessionCallback |
|
35 @since 7.0 |
|
36 The MWspCOSessionInvoker and MWspCOSessionCallback form the API that provides |
|
37 the WSP Connection-Orientated Session Service Session Management, Session |
|
38 Resume and Exception Handling facilities, as described by the WSP |
|
39 Specification, July 2001. |
|
40 |
|
41 The MWspCOSessionInvoker interface is supplied by the Provider entity. The |
|
42 MWspCOSessionCallback interface is supplied by the Client entity. The Provider |
|
43 implements the communications necessary to send the primitives issued by the |
|
44 Client to the Server, and from the Server to the Client. |
|
45 |
|
46 The APIs that provide connection information, session headers and capabilities |
|
47 are supplied to the Provider from the Client during configuration. The Provider |
|
48 uses these APIs to return any Server session headers and the negotiated |
|
49 capabilities from the Server |
|
50 |
|
51 The use of the Session Resume facility during the lifetime of a WSP session is |
|
52 dependent on this being a successfully negotiated capability for that session. |
|
53 @publishedAll |
|
54 @deprecated |
|
55 */ |
|
56 { |
|
57 public: // Methods |
|
58 |
|
59 /** |
|
60 @fn ConnectCnf() =0 |
|
61 Intended Usage : This represents the S-Connect.cnf primitive. The Provider |
|
62 issues this primitive when a WSP session has been |
|
63 successfully established. Any Session Headers sent by the |
|
64 Server are passed to the Client. |
|
65 @since 7.0 |
|
66 @pre The WSP session is in the Connecting state. |
|
67 @post The WSP session is established with the Server. The WSP |
|
68 session is in the Connected state. |
|
69 */ |
|
70 virtual void ConnectCnf() =0; |
|
71 |
|
72 /** |
|
73 @fn ResumeCnf() =0 |
|
74 Intended Usage : This represents the S-Resume.cnf primitive. The Provider |
|
75 issues this primitive when a WSP session has been |
|
76 successfully resumed. This primitive can only be issued |
|
77 if the Session Resume facility has been successfully |
|
78 negotiated. Any Session Headers sent by the Server are |
|
79 passed to the Client. |
|
80 @since 7.0 |
|
81 @pre The Session Resume facitlity has been successfully negotiated |
|
82 for this WSP session. The WSP session is in the Resuming state. |
|
83 @post The WSP session is in the Connected state. |
|
84 */ |
|
85 virtual void ResumeCnf() =0; |
|
86 |
|
87 /** |
|
88 @fn DisconnectInd(TWspReason aReason, TBool aRedirectSecurity, TWspRedirectedAddress& aRedirectAddress, const TDesC8& aErrorHeaders, const TDesC8& aErrorBody) =0 |
|
89 Intended Usage : This represents the S-Disconnect.ind primitive. The |
|
90 Provider issues this primitive when the WSP session has |
|
91 been disconnected. Any incomplete method or push |
|
92 transactions have been aborted. If the aReasonCode |
|
93 indicates that the redirection is temporary, then the |
|
94 original address should be used in future connection |
|
95 attempts. If the redirection is permanent, then the Client |
|
96 should use the new address in all future connection |
|
97 attempts. |
|
98 @since 7.0 |
|
99 @param aReason A parameter that indicates the cause of |
|
100 the disconnection. The value maps to the |
|
101 Reason type defined in the WSP |
|
102 Specification, July 2001. |
|
103 @param aRedirectSecurity A flag to indicate that the current secure |
|
104 session may be reused with the redirected |
|
105 server address. |
|
106 @param aRedirectAddress An object containing an alternative address |
|
107 that must be used to establish a WSP session |
|
108 with the same service. |
|
109 @param aErrorHeaders Together with aErrorBody, this provides some |
|
110 meaningful information as to why the session |
|
111 was disconnected. |
|
112 @param aErrorBody See explanation of aErrorHeader. |
|
113 @pre The WSP session is in any state other than Null. |
|
114 @post The WSP session is in the Null state. |
|
115 */ |
|
116 virtual void DisconnectInd( |
|
117 TWspReason aReason, |
|
118 TBool aRedirectSecurity, |
|
119 TWspRedirectedAddress& aRedirectAddress, |
|
120 const TDesC8& aErrorHeader, |
|
121 const TDesC8& aErrorBody |
|
122 ) =0; |
|
123 |
|
124 /** |
|
125 @fn SuspendInd(TWspReason aReason) =0 |
|
126 Intended Usage : This represents the S-Suspend.ind primitive. The Provider |
|
127 issues this primitive when a WSP session has been |
|
128 suspended. This primitive is only issued if the Session |
|
129 Resume facility has been successfully negotiated. |
|
130 @since 7.0 |
|
131 @param aReason A parameter that indicates the cause of the suspension. |
|
132 The value maps to the Reason type defined in the WSP |
|
133 Specification, July 2001. |
|
134 @pre The Session Resume facitlity has been successfully negotiated |
|
135 for this WSP session. The WSP session is in either the Connected, |
|
136 Suspending or Resuming state. |
|
137 @post The WSP session is in the Suspended state. |
|
138 */ |
|
139 virtual void SuspendInd(TWspReason aReason) =0; |
|
140 |
|
141 /** |
|
142 @fn ExceptionInd(const TDesC8& aExceptionData) =0 |
|
143 Intended Usage : This represents the S-Exception.ind primitive. The |
|
144 Provider issues this when it receives an event from the |
|
145 Server that is not related to a transaction nor changes |
|
146 the state of the WSP session. |
|
147 @since 7.0 |
|
148 @param aExceptionData A buffer containing the information sent by |
|
149 the Server. |
|
150 @pre The WSP session is not in the Null or Suspended state. |
|
151 @post Unspecified |
|
152 */ |
|
153 virtual void ExceptionInd(const TDesC8& aExceptionData) =0; |
|
154 |
|
155 }; |
|
156 |
|
157 |
|
158 #endif // __MWSPCOSESSIONCALLBACK_H__ |