syncmlfw/dm/syncagent/inc/NSmlDMGenericAlert.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2005 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 "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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Posseses all the needed fields to generate 
       
    15 *                a generic alert structure
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __NSMLDMGENERICALERT_H
       
    22 #define __NSMLDMGENERICALERT_H
       
    23 
       
    24 /**
       
    25 * Class CNSmlDMGenericAlert. 
       
    26 * Posseses all the needed fields to generate a generic alert structure 
       
    27 * to the client init package.
       
    28 */
       
    29 class CNSmlDMGenericAlert : public CBase
       
    30 	{
       
    31 	public:
       
    32 	/**
       
    33 	* Creates a new generic alert object.
       
    34 	* @param aFwMgmtUri. The uri which has been used in the exe command whose final result is 
       
    35 	* about to be reported.
       
    36 	* @param aMetaType. Meta/Type that should be used in the alert.
       
    37 	* @param aMetaFormat. Meta/Format that should be used in the alert.
       
    38 	* @param aFinalResult. The final result value which is reported to remote server.
       
    39 	* @param aCorrelator. Correlator value used in the original exec command.
       
    40 	* @return New instance of this class.
       
    41 	*/	
       
    42 	static CNSmlDMGenericAlert* NewL ( const TDesC8& aFwMgmtUri, const TDesC8& aMetaType, const TDesC8& aMetaFormat, TInt aFinalResult, const TDesC8& aFwCorrelator );
       
    43 	static CNSmlDMGenericAlert* NewL ( const TDesC8& aCorrelator, const RArray<CNSmlDMAlertItem>& aItemList  );
       
    44 	/**
       
    45 	* C++ destructor.
       
    46 	*/	
       
    47 	~CNSmlDMGenericAlert();
       
    48 	
       
    49 	/**
       
    50 	* Inline function to retrieve a firmware management uri.
       
    51 	* @return The firmware management uri.
       
    52 	*/	
       
    53 	inline HBufC8* FwMgmtUri() const;
       
    54 	/**
       
    55 	* Inline function to retrieve a meta type.
       
    56 	* E.g. "org.openmobilealliance.firmwareupdate.update"
       
    57 	* @return The meta type.
       
    58 	*/	
       
    59 	inline HBufC8* MetaType() const;
       
    60 	/**
       
    61 	* Inline function to retrieve a meta format.
       
    62 	* E.g. "text/plain"
       
    63 	* @return The meta format.
       
    64 	*/	
       
    65 	inline HBufC8* MetaFormat() const;
       
    66 	/**
       
    67 	* Inline function to retrieve a correlator of the exec command.
       
    68 	* @return The correlator.
       
    69 	*/	
       
    70 	inline HBufC8* FwCorrelator() const;
       
    71 	/**
       
    72 	* Inline function to retrieve a Data.
       
    73 	* @return The Data.
       
    74 	*/	
       
    75 	inline RArray<CNSmlDMAlertItem>* DataItem() const;
       
    76 	/**
       
    77 	* Inline function to retrieve a final result.
       
    78 	* @return The final result value.
       
    79 	*/	
       
    80 	inline TInt FinalResult() const;
       
    81 
       
    82 	private:
       
    83 	/**
       
    84 	* C++ constructor.
       
    85 	*/	
       
    86 	CNSmlDMGenericAlert();
       
    87 	/**        
       
    88 	* Symbian 2nd phase constructor
       
    89 	*/	
       
    90 	void ConstructL ( const TDesC8& aFwMgmtUri, const TDesC8& aMetaType, const TDesC8& aMetaFormat, TInt aFinalResult, const TDesC8& aFwCorrelator, const RArray<CNSmlDMAlertItem>* aDataItem = NULL );
       
    91 	
       
    92 	private:
       
    93 	HBufC8* iFwMgmtUri;
       
    94 	HBufC8* iMetaType;
       
    95 	HBufC8* iMetaFormat;
       
    96 	TInt iFinalResult;
       
    97 	HBufC8* iFwCorrelator;
       
    98 	RArray<CNSmlDMAlertItem>* iDataItem;
       
    99 	};	
       
   100 
       
   101 #include "NSmlDMGenericAlert.inl"
       
   102 
       
   103 #endif      // __NSMLDMGENERICALERT_H
       
   104             
       
   105 // End of File