|
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 MWspCOPushInvoker.h |
|
18 @warning : This file contains Rose Model ID comments - please do not delete |
|
19 */ |
|
20 |
|
21 #ifndef __MWSPCOPUSHINVOKER_H__ |
|
22 #define __MWSPCOPUSHINVOKER_H__ |
|
23 |
|
24 // System includes |
|
25 #include <e32std.h> |
|
26 #include <wsp/wsptypes.h> |
|
27 |
|
28 // Forward declarations |
|
29 class MWspCOPushCallback; |
|
30 |
|
31 |
|
32 class MWspCOPushInvoker |
|
33 /** |
|
34 @class MWspCOPushInvoker |
|
35 @since 7.0 |
|
36 The MWspCOPushInvoker and MWspCOPushCallback form the API that provides the |
|
37 WSP Connection-Orientated Session Servise Push and Confirmed Push facilities, |
|
38 as decribed in the WSP Specification, July 2001. |
|
39 |
|
40 The MWspCOPsuhInvoker interface is supplied by the Provider entity. The |
|
41 MWspCOPsuhCallback interface is supplied by the Client entity. The Provider |
|
42 implements the communications necessary to send the primitives issued by the |
|
43 Client to the Server, and from the Server to the Client. |
|
44 |
|
45 The use of the Push and Confirmed Push facilities during the lifetime of the |
|
46 WSP Session is dependent on these being successfully negotiated capabilities |
|
47 for that session. |
|
48 |
|
49 The Push MOR is also negotiated with the Server, and defines the number of |
|
50 outstanding confirmed push invocations that can be active at one time. |
|
51 |
|
52 The object that implements the call-back API MWspCOPushCallback encapsulates |
|
53 the concept of a Push transaction. The Provider associates each of these |
|
54 objects with a Push Id used to distinguish between push transactions during |
|
55 a WSP session. |
|
56 |
|
57 The sending of Push information is initiated by the Server, but for this |
|
58 information to be passed onto the Client, the Provider must be informed that |
|
59 the Client is ready to receive Push transactions. This is achieved by |
|
60 supplying the Provider with Push transaction objects that are prepared to |
|
61 receive Push information - listening Push transaction objects. |
|
62 |
|
63 In the case of the Confirmed Push facility, the exact number of these objects |
|
64 that the Client supplies to the Provider is determined by the negotiated Push MOR. |
|
65 |
|
66 Furthermore, if the Push facility has been successfully negotiated, the Client |
|
67 must supply one additional Push transaction object. |
|
68 @publishedAll |
|
69 @deprecated |
|
70 */ |
|
71 { |
|
72 public: // Methods |
|
73 |
|
74 /** |
|
75 @fn PushListen(MWspCOPushCallback& aPushCallback) =0 |
|
76 Intended Usage : Provides a Push transaction to the Provider. Also, informs |
|
77 the Provider that the Client can receive Push information. |
|
78 The Provider uses this call-back object to pass Push and |
|
79 Confirmed Push transactions to the Client. |
|
80 @since 7.0 |
|
81 @param aPushCallback A reference to an instance of the call-back |
|
82 API MWspCOPushCallback.It uniquely identifies |
|
83 this method transaction for the lifetime of |
|
84 the transaction. |
|
85 @pre The WSP session is in the Connecting, Connected or Resuming |
|
86 state. Either the Push facility, Confirmed Push facility or |
|
87 both have been successfully negotiated with the Server. |
|
88 @post Increases the number of listening Push transactions by one. |
|
89 */ |
|
90 virtual void PushListen(MWspCOPushCallback& aPushCallback) =0; |
|
91 |
|
92 /** |
|
93 @fn CancelPushListen(MWspCOPushCallback& aPushCallback) =0 |
|
94 Intended Usage : Removes a listening Push transaction. The Client no longer |
|
95 wishes to receive Push information via the specified Push |
|
96 transaction call-back object. |
|
97 @since 7.0 |
|
98 @param aPushCallback A reference to an instance of the call-back |
|
99 API MWspCOPushCallback.It uniquely identifies |
|
100 this method transaction for the lifetime of |
|
101 the transaction. |
|
102 @pre The Push transaction object exists. |
|
103 @post Reduces the number of listening Push transactions by one. |
|
104 */ |
|
105 virtual void CancelPushListen(MWspCOPushCallback& aPushCallback) =0; |
|
106 |
|
107 /** |
|
108 @fn PushAbortReq(MWspCOPushCallback& aPushCallback, TWspReason aReason) =0 |
|
109 Intended Usage : This represents the S-PushAbort.req primitive. The Client |
|
110 issues this when it has received Confirmed Push |
|
111 information that it wishes to reject.The Client expects |
|
112 the S-PushAbort.ind to be issued by the Provider. |
|
113 @since 7.0 |
|
114 @param aPushCallback A reference to an instance of the call-back |
|
115 API MWspCOPushCallback.It uniquely identifies |
|
116 this method transaction for the lifetime of |
|
117 the transaction. |
|
118 @param aReason A parameter that indicates the cause of the |
|
119 abort.The value maps to the Reason type |
|
120 defined in the July 2001 WSP Specification. |
|
121 @pre The call-back reference aPushCallback represents a Confirmed |
|
122 Push transaction. The WSP push transaction is in the Receiving |
|
123 state. |
|
124 @post The WSP push tranasaction is in the Aborting state. |
|
125 */ |
|
126 virtual void PushAbortReq( |
|
127 MWspCOPushCallback& aPushCallback, |
|
128 TWspReason aReason |
|
129 ) =0; |
|
130 |
|
131 /** |
|
132 @fn ConfirmedPushRes(MWspCOPushCallback& aPushCallback, const TDesC8& aAckHeaders) =0 |
|
133 Intended Usage : This represents the S-ConfirmedPush.res primitive. The |
|
134 Protocol Handler issues this primitive to acknowledge |
|
135 the receipt of Confirmed Push information. The call-back |
|
136 pointer is no longer valid after this call. |
|
137 @since 7.0 |
|
138 @param aPushCallback A reference to an instance of the call-back |
|
139 API MWspCOPushCallback.It uniquely identifies |
|
140 this method transaction for the lifetime of |
|
141 the transaction. This is no longer valid once |
|
142 this call returns. |
|
143 @param aAckHeaders A buffer that contains the optional set of |
|
144 headers containing some information to return |
|
145 to the Server. |
|
146 @pre The WSP push transaction is in the Receiving state. |
|
147 @post The WSP push transaction is in the Null state. The call-back |
|
148 object aPushCallback is no longer valid. |
|
149 */ |
|
150 virtual void ConfirmedPushRes( |
|
151 MWspCOPushCallback& aPushCallback, |
|
152 const TDesC8& aAckHeaders |
|
153 ) =0; |
|
154 |
|
155 }; |
|
156 |
|
157 #endif // __MWSPCOPUSHINVOKER_H__ |