|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Information about an alert notification. |
|
15 * |
|
16 */ |
|
17 /////////////////////////////////////////////////////////////////////////////// |
|
18 // SyncMLAlertInfo.h |
|
19 // |
|
20 // v09 |
|
21 // |
|
22 /////////////////////////////////////////////////////////////////////////////// |
|
23 #ifndef __SYNCMLALERTINFO_H__ |
|
24 #define __SYNCMLALERTINFO_H__ |
|
25 // |
|
26 #include <e32base.h> |
|
27 #include <syncmldef.h> |
|
28 // |
|
29 class RReadStream; |
|
30 class RWriteStream; |
|
31 // |
|
32 |
|
33 class CSmlAlertInfo : public CBase |
|
34 /** |
|
35 @publishedAll |
|
36 @released |
|
37 |
|
38 Information about an alert notification. |
|
39 |
|
40 Push message parsers are responsible for generating one (or more) of these objects |
|
41 as a result of parsing a message, whether the parse is successful or not. |
|
42 |
|
43 Not all details will be applicable to all alerts. |
|
44 |
|
45 If parsing is successful, and a profile ID is specified, the Agent uses |
|
46 this information to generate a job (based upon the 'job control' value specified), |
|
47 prompting the user first if neccessary |
|
48 . |
|
49 If parsing fails, parsers should try to fill in as much information |
|
50 as they can. |
|
51 |
|
52 @see KUidSyncMLPushMsgConfirmNotifier |
|
53 @see KUidSyncMLPushMsgInformNotifier |
|
54 */ |
|
55 { |
|
56 public: |
|
57 enum TJobControl |
|
58 /** |
|
59 Specifies whether a job should be created for an alert. |
|
60 */ |
|
61 { |
|
62 /** Do not create a job. */ |
|
63 EDoNotCreateJob, |
|
64 /** Create a job. */ |
|
65 ECreateJob, |
|
66 /** Inform the user that a job is being created. */ |
|
67 EInformJob, |
|
68 /** Get confirmation from the user that a job should be created. */ |
|
69 EConfirmJob |
|
70 }; |
|
71 public: |
|
72 IMPORT_C static CSmlAlertInfo* NewLC(); |
|
73 IMPORT_C CSmlAlertInfo(); |
|
74 IMPORT_C virtual ~CSmlAlertInfo(); |
|
75 IMPORT_C void InternalizeL(RReadStream&); |
|
76 IMPORT_C void ExternalizeL(RWriteStream&) const; |
|
77 public: |
|
78 IMPORT_C TInt ErrorCode() const; |
|
79 IMPORT_C TJobControl JobControl() const; |
|
80 IMPORT_C TSmlUsageType Protocol() const; |
|
81 IMPORT_C TInt SessionId() const; |
|
82 IMPORT_C TSmlProfileId Profile() const; |
|
83 IMPORT_C TSmlTransportId Transport() const; |
|
84 IMPORT_C TSmlConnectionId Connection() const; |
|
85 IMPORT_C const RArray<TInt>& TaskIds() const; |
|
86 IMPORT_C const RArray<TSmlSyncType>& TaskSyncTypes() const; |
|
87 IMPORT_C const TDesC8& VendorSpecificInfo() const; |
|
88 IMPORT_C TBool CreateSession() const; |
|
89 public: |
|
90 IMPORT_C void Reset(); |
|
91 IMPORT_C void SetErrorCode(TInt aError); |
|
92 IMPORT_C void SetJobControl(TJobControl); |
|
93 IMPORT_C void SetProtocolType(TSmlUsageType); |
|
94 IMPORT_C void SetSessionId(TInt aId); |
|
95 IMPORT_C void SetProfileId(TSmlProfileId); |
|
96 IMPORT_C void SetTransportId(TSmlTransportId); |
|
97 IMPORT_C void SetConnectionId(TSmlConnectionId); |
|
98 IMPORT_C RArray<TInt>& TaskIds(); |
|
99 IMPORT_C RArray<TSmlSyncType>& TaskSyncTypes(); |
|
100 IMPORT_C void SetVendorSpecificInfoL(const TDesC8&); |
|
101 IMPORT_C void SetConfirmation(TBool); |
|
102 IMPORT_C void SetUimode(TInt aUimode); |
|
103 IMPORT_C TInt GetUimode(); |
|
104 private: |
|
105 TInt iErrorCode; |
|
106 TJobControl iJobControl; |
|
107 TSmlUsageType iProtocol; |
|
108 TInt iSessionId; |
|
109 TSmlProfileId iProfile; |
|
110 TSmlTransportId iTransport; |
|
111 TSmlConnectionId iConnection; |
|
112 RArray<TInt> iTaskIds; |
|
113 RArray<TSmlSyncType> iTaskSyncTypes; |
|
114 HBufC8* iVendorSpecificInfo; |
|
115 TUint iFlags; |
|
116 TInt iUimode; |
|
117 }; |
|
118 |
|
119 /////////////////////////////////////////////////////////////////////////////// |
|
120 /////////////////////////////////////////////////////////////////////////////// |
|
121 /////////////////////////////////////////////////////////////////////////////// |
|
122 #endif |