brandingserver/bsclient/cbsupdater.h
changeset 0 e6b17d312c8b
child 21 cfd5c2994f10
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2006 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: CBSUpdater.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CBSUPDATER_H__
       
    20 #define __CBSUPDATER_H__
       
    21 #include <e32std.h>
       
    22 #include "mbsupdater.h"
       
    23 #include "cbsclient.h"
       
    24 
       
    25 /**
       
    26  * Simple ClientServer for
       
    27  * testing and example purposes.
       
    28  */
       
    29 NONSHARABLE_CLASS( CBSUpdater ): public CBase,
       
    30 								 public MBSUpdater
       
    31     {
       
    32 	public:
       
    33 		/**
       
    34 		* Two-phased constructor.
       
    35 		*/
       
    36 		static CBSUpdater* NewL( const TDesC8& aApplicationId );
       
    37 
       
    38     	virtual ~CBSUpdater();
       
    39 
       
    40 		/*
       
    41 		* @see MBSUpdater
       
    42 		*/ 
       
    43 		void Close();
       
    44 
       
    45 	private:
       
    46     	void ConstructL( const TDesC8& aApplicationId );
       
    47 		CBSUpdater();
       
    48 
       
    49 
       
    50 	private: // from MBSUpdater
       
    51 
       
    52      	/*
       
    53      	* @see MBSUpdater
       
    54      	*/
       
    55         void StartTransactionL( const TDesC8& aBrandId,
       
    56          						TLanguage aLanguageId,
       
    57          						TUpdateTransactionType aType = EUpdateInstall,
       
    58 								TInt aReserved = 0 );
       
    59      	/*
       
    60      	* @see MBSUpdater
       
    61      	*/
       
    62 		TInt StopTransactionL();
       
    63 
       
    64      	/*
       
    65      	* @see MBSUpdater
       
    66      	*/
       
    67 		void CancelTransactionL();
       
    68 
       
    69 
       
    70      	/*
       
    71      	* @see MBSUpdater
       
    72      	*/
       
    73 		void RemoveBrandL( const TDesC8& aApplicationId,
       
    74 								   const TDesC8& aBrandId );
       
    75 
       
    76      	/*
       
    77      	* @see MBSUpdater
       
    78      	*/
       
    79 		void RemoveBrandsL( const TDesC8& aApplicationId );
       
    80 
       
    81 
       
    82 		//*** BRAND INSTALLING ***//
       
    83      	/*
       
    84      	* @see MBSUpdater
       
    85      	*/
       
    86         void InsertTextL( const TDesC8& aId,
       
    87         				  const TDesC& aText );
       
    88 
       
    89      	/*
       
    90      	* @see MBSUpdater
       
    91      	*/
       
    92         void InsertBufferL( const TDesC8& aId,
       
    93         					const TDesC8& aBuffer );
       
    94 
       
    95      	/*
       
    96      	* @see MBSUpdater
       
    97      	*/
       
    98         void InsertIntL( const TDesC8& aId,
       
    99         				 TInt aInt );
       
   100 
       
   101      	/*
       
   102      	* @see MBSUpdater
       
   103      	*/
       
   104         void InsertFileL( const TDesC8& aId,
       
   105         				  const TDesC& aFileName );
       
   106 
       
   107      	/*
       
   108      	* @see MBSUpdater
       
   109      	*/
       
   110         void InsertElementL( MBSElement* aElement );
       
   111 
       
   112 
       
   113 
       
   114 		//*** BRAND UPDATING - replacing ***//
       
   115      	/*
       
   116      	* @see MBSUpdater
       
   117      	*/
       
   118         void ReplaceTextL( const TDesC8& aId,
       
   119         				   const TDesC& aText );
       
   120 
       
   121      	/*
       
   122      	* @see MBSUpdater
       
   123      	*/
       
   124         void ReplaceBufferL( const TDesC8& aId,
       
   125         					 const TDesC8& aBuffer );
       
   126 
       
   127      	/*
       
   128      	* @see MBSUpdater
       
   129      	*/
       
   130         void ReplaceIntL( const TDesC8& aId,
       
   131         				  TInt aInt );
       
   132 
       
   133      	/*
       
   134      	* @see MBSUpdater
       
   135      	*/
       
   136         void ReplaceFileL( const TDesC8& aId,
       
   137         				   const TDesC& aFileName );
       
   138 
       
   139      	/*
       
   140      	* @see MBSUpdater
       
   141      	*/
       
   142         void ReplaceElementL( MBSElement* aElement );
       
   143 
       
   144 
       
   145 
       
   146 		//*** BRAND UPDATING - appending ***//
       
   147      	/*
       
   148      	* @see MBSUpdater
       
   149      	*/
       
   150         void AppendTextL( const TDesC8& aId,
       
   151         				  const TDesC& aText );
       
   152 
       
   153      	/*
       
   154      	* @see MBSUpdater
       
   155      	*/
       
   156         void AppendBufferL( const TDesC8& aId,
       
   157         					const TDesC8& aBuffer );
       
   158 
       
   159      	/*
       
   160      	* @see MBSUpdater
       
   161      	*/
       
   162         void AppendIntL( const TDesC8& aId,
       
   163         				 TInt aInt );
       
   164 
       
   165      	/*
       
   166      	* @see MBSUpdater
       
   167      	*/
       
   168         void AppendFileL( const TDesC8& aId,
       
   169         				  const TDesC& aFileName );
       
   170 
       
   171      	/*
       
   172      	* @see MBSUpdater
       
   173      	*/
       
   174         void AppendElementL( MBSElement* aElement );
       
   175 
       
   176      	/*
       
   177      	* @see MBSUpdater
       
   178      	*/
       
   179         void RegisterObserverL( MBSBackupRestoreStateObserver* aBackupObserver ) ;
       
   180 		
       
   181      	/*
       
   182      	* @see MBSUpdater
       
   183      	*/
       
   184         void UnRegisterObserverL( MBSBackupRestoreStateObserver* aObserver ) ;
       
   185 
       
   186 		
       
   187 	private: // data
       
   188 
       
   189 		// tells if a transaction is ongoing or not
       
   190 		TBool iActive;
       
   191 
       
   192 		HBufC8* iApplicationId;
       
   193 		HBufC8* iBrandId;
       
   194 		TLanguage iLanguageId;
       
   195 		TBool iUseCache;
       
   196 		RBSClient iClient;
       
   197 		TUpdateTransactionType iTxType;
       
   198 		TInt iReserved;
       
   199     };
       
   200 
       
   201 #endif      //  __CBSUPDATER_H__
       
   202 
       
   203 
       
   204 //  END OF FILE
       
   205