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