|
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 MWspCOPushCallback.h |
|
18 @warning : This file contains Rose Model ID comments - please do not delete |
|
19 */ |
|
20 |
|
21 #ifndef __MWSPCOPUSHCALLBACK_H__ |
|
22 #define __MWSPCOPUSHCALLBACK_H__ |
|
23 |
|
24 // System includes |
|
25 #include <e32base.h> |
|
26 |
|
27 // Forward declarations |
|
28 class MHTTPDataSupplier; |
|
29 |
|
30 |
|
31 class MWspCOPushCallback |
|
32 /** |
|
33 @class MWspCOPushCallback |
|
34 @since 7.0 |
|
35 The MWspCOPushInvoker and MWspCOPushCallback form the API that proides the |
|
36 WSP Connection-Orientated Session Servise Push and Confirmed Push facilities, |
|
37 as decribed in the WSP Specification, July 2001. |
|
38 |
|
39 The MWspCOPsuhInvoker interface is supplied by the Provider entity. The |
|
40 MWspCOPsuhCallback interface is supplied by the Client entity. The Provider |
|
41 implements the communications necessary to send the primitives issued by the |
|
42 Client to the Server, and from the Server to the Client. |
|
43 |
|
44 The use of the Push and Confirmed Push facilities during the lifetime of the |
|
45 WSP Session is dependent on these being successfully negotiated capabilities |
|
46 for that session. |
|
47 |
|
48 The Push MOR is also negotiated with the Server, and defines the number of |
|
49 outstanding confirmed push invocations that can be active at one time. |
|
50 |
|
51 The object that implements the call-back API MWspCOPushCallback encapsulates |
|
52 the concept of a Push transaction. The Provider associates each of these |
|
53 objects with a Push Id used to distinguish between push transactions during |
|
54 a WSP session. |
|
55 |
|
56 The sending of Push information is initiated by the Server, but for this |
|
57 information to be passed onto the Client, the Provider must be informed that |
|
58 the Client is ready to receive Push transactions. This is achieved by |
|
59 supplying the Provider with Push transaction objects that are prepared to |
|
60 receive Push information - listening Push transaction objects. |
|
61 |
|
62 In the case of the Confirmed Push facility, the number of these objects that |
|
63 the Client supplies to the Provider is decided by the negotiated Push MOR. |
|
64 If the Push facility has been successfully negotiated, the Client must supply |
|
65 a further Push transaction object. |
|
66 @publishedAll |
|
67 @deprecated |
|
68 */ |
|
69 { |
|
70 public: // Methods |
|
71 |
|
72 /** |
|
73 @fn PushInd(const TDesC8& aPushHeader, const TDesC8& aPushBody) =0 |
|
74 Intended Usage : This represents the S-Push.ind primitive. The Provider |
|
75 issues this when it receives unconfirmed Push information. |
|
76 The Client supplies a new listening Push transaction object, |
|
77 via the MWspCOPushInvoker API, to maintain the correct |
|
78 number of these objects in the Provider. |
|
79 @since 7.0 |
|
80 @param aPushHeader A buffer that contains the byte-encoded headers |
|
81 for the Push information. |
|
82 @param aPushBody A buffer that contains the body of the Push |
|
83 information. |
|
84 @pre There is a listening Push transaction object. |
|
85 @post The number of listening Push transaction objects are reduced |
|
86 by one. |
|
87 */ |
|
88 virtual void PushInd( |
|
89 const TDesC8& aPushHeader, |
|
90 const TDesC8& aPushBody |
|
91 ) =0; |
|
92 |
|
93 /** |
|
94 @fn ConfirmedPushInd(const TDesC8& aPushHeader, const TDesC8& aPushBody) =0 |
|
95 Intended Usage : This represents the S-ConfirmedPush.ind primitive. The |
|
96 Provider issues this when it receives Confirmed Push |
|
97 information. The Provider expects either the |
|
98 S-ConfirmedPush.res or the S-PushAbort.req primitives to |
|
99 be issued from the Client. |
|
100 @since 7.0 |
|
101 @param aPushHeader A buffer that contains the byte-encoded headers |
|
102 for the Push information. |
|
103 @param aPushBody A buffer that contains the body of the Push |
|
104 information. |
|
105 @pre The WSP push transaction is in the Null state. |
|
106 @post The WSP push transaction is in the Receiving state. |
|
107 */ |
|
108 virtual void ConfirmedPushInd( |
|
109 const TDesC8& aPushHeader, |
|
110 const TDesC8& aPushBody |
|
111 ) =0; |
|
112 |
|
113 /** |
|
114 @fn PushAbortInd(TWspReason aReason) =0 |
|
115 Intended Usage : This represents the S-PushAbort.ind primitive. This is |
|
116 issued when Confirmed Push information has been rejected. |
|
117 @since 7.0 |
|
118 @param aReason A parameter that indicates the cause of the abort. |
|
119 The value maps to the Reason type defined in the |
|
120 WSP Specification, July 2001. |
|
121 @pre The WSP push transaction is in the Receiving or Aborting state. |
|
122 @post The WSP push transaction is in the Null state. |
|
123 */ |
|
124 virtual void PushAbortInd(TWspReason aReason) =0; |
|
125 |
|
126 }; |
|
127 |
|
128 #endif // __MWSPCOPUSHCALLBACK_H__ |