1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/SyncMLAlertInfo.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,122 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* 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
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Information about an alert notification.
1.18 +*
1.19 +*/
1.20 +///////////////////////////////////////////////////////////////////////////////
1.21 +// SyncMLAlertInfo.h
1.22 +//
1.23 +// v09
1.24 +//
1.25 +///////////////////////////////////////////////////////////////////////////////
1.26 +#ifndef __SYNCMLALERTINFO_H__
1.27 +#define __SYNCMLALERTINFO_H__
1.28 +//
1.29 +#include <e32base.h>
1.30 +#include <syncmldef.h>
1.31 +//
1.32 +class RReadStream;
1.33 +class RWriteStream;
1.34 +//
1.35 +
1.36 +class CSmlAlertInfo : public CBase
1.37 +/**
1.38 +@publishedAll
1.39 +@released
1.40 +
1.41 + Information about an alert notification.
1.42 +
1.43 + Push message parsers are responsible for generating one (or more) of these objects
1.44 + as a result of parsing a message, whether the parse is successful or not.
1.45 +
1.46 + Not all details will be applicable to all alerts.
1.47 +
1.48 + If parsing is successful, and a profile ID is specified, the Agent uses
1.49 + this information to generate a job (based upon the 'job control' value specified),
1.50 + prompting the user first if neccessary
1.51 + .
1.52 + If parsing fails, parsers should try to fill in as much information
1.53 + as they can.
1.54 +
1.55 + @see KUidSyncMLPushMsgConfirmNotifier
1.56 + @see KUidSyncMLPushMsgInformNotifier
1.57 +*/
1.58 + {
1.59 +public:
1.60 + enum TJobControl
1.61 + /**
1.62 + Specifies whether a job should be created for an alert.
1.63 + */
1.64 + {
1.65 + /** Do not create a job. */
1.66 + EDoNotCreateJob,
1.67 + /** Create a job. */
1.68 + ECreateJob,
1.69 + /** Inform the user that a job is being created. */
1.70 + EInformJob,
1.71 + /** Get confirmation from the user that a job should be created. */
1.72 + EConfirmJob
1.73 + };
1.74 +public:
1.75 + IMPORT_C static CSmlAlertInfo* NewLC();
1.76 + IMPORT_C CSmlAlertInfo();
1.77 + IMPORT_C virtual ~CSmlAlertInfo();
1.78 + IMPORT_C void InternalizeL(RReadStream&);
1.79 + IMPORT_C void ExternalizeL(RWriteStream&) const;
1.80 +public:
1.81 + IMPORT_C TInt ErrorCode() const;
1.82 + IMPORT_C TJobControl JobControl() const;
1.83 + IMPORT_C TSmlUsageType Protocol() const;
1.84 + IMPORT_C TInt SessionId() const;
1.85 + IMPORT_C TSmlProfileId Profile() const;
1.86 + IMPORT_C TSmlTransportId Transport() const;
1.87 + IMPORT_C TSmlConnectionId Connection() const;
1.88 + IMPORT_C const RArray<TInt>& TaskIds() const;
1.89 + IMPORT_C const RArray<TSmlSyncType>& TaskSyncTypes() const;
1.90 + IMPORT_C const TDesC8& VendorSpecificInfo() const;
1.91 + IMPORT_C TBool CreateSession() const;
1.92 +public:
1.93 + IMPORT_C void Reset();
1.94 + IMPORT_C void SetErrorCode(TInt aError);
1.95 + IMPORT_C void SetJobControl(TJobControl);
1.96 + IMPORT_C void SetProtocolType(TSmlUsageType);
1.97 + IMPORT_C void SetSessionId(TInt aId);
1.98 + IMPORT_C void SetProfileId(TSmlProfileId);
1.99 + IMPORT_C void SetTransportId(TSmlTransportId);
1.100 + IMPORT_C void SetConnectionId(TSmlConnectionId);
1.101 + IMPORT_C RArray<TInt>& TaskIds();
1.102 + IMPORT_C RArray<TSmlSyncType>& TaskSyncTypes();
1.103 + IMPORT_C void SetVendorSpecificInfoL(const TDesC8&);
1.104 + IMPORT_C void SetConfirmation(TBool);
1.105 + IMPORT_C void SetUimode(TInt aUimode);
1.106 + IMPORT_C TInt GetUimode();
1.107 +private:
1.108 + TInt iErrorCode;
1.109 + TJobControl iJobControl;
1.110 + TSmlUsageType iProtocol;
1.111 + TInt iSessionId;
1.112 + TSmlProfileId iProfile;
1.113 + TSmlTransportId iTransport;
1.114 + TSmlConnectionId iConnection;
1.115 + RArray<TInt> iTaskIds;
1.116 + RArray<TSmlSyncType> iTaskSyncTypes;
1.117 + HBufC8* iVendorSpecificInfo;
1.118 + TUint iFlags;
1.119 + TInt iUimode;
1.120 + };
1.121 +
1.122 +///////////////////////////////////////////////////////////////////////////////
1.123 +///////////////////////////////////////////////////////////////////////////////
1.124 +///////////////////////////////////////////////////////////////////////////////
1.125 +#endif