2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Information about an alert notification.
17 ///////////////////////////////////////////////////////////////////////////////
22 ///////////////////////////////////////////////////////////////////////////////
23 #ifndef __SYNCMLALERTINFO_H__
24 #define __SYNCMLALERTINFO_H__
27 #include <SyncMLDef.h>
33 class CSmlAlertInfo : public CBase
38 Information about an alert notification.
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.
43 Not all details will be applicable to all alerts.
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
49 If parsing fails, parsers should try to fill in as much information
52 @see KUidSyncMLPushMsgConfirmNotifier
53 @see KUidSyncMLPushMsgInformNotifier
59 Specifies whether a job should be created for an alert.
62 /** Do not create a job. */
66 /** Inform the user that a job is being created. */
68 /** Get confirmation from the user that a job should be created. */
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;
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;
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();
106 TJobControl iJobControl;
107 TSmlUsageType iProtocol;
109 TSmlProfileId iProfile;
110 TSmlTransportId iTransport;
111 TSmlConnectionId iConnection;
112 RArray<TInt> iTaskIds;
113 RArray<TSmlSyncType> iTaskSyncTypes;
114 HBufC8* iVendorSpecificInfo;
119 ///////////////////////////////////////////////////////////////////////////////
120 ///////////////////////////////////////////////////////////////////////////////
121 ///////////////////////////////////////////////////////////////////////////////