wvuing/wvvariant/Src/CCAOpBrandVariant21.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Active implementation of res.file& bitmaps changing feature.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CCAOPBRANDVARIANT21_H
       
    21 #define CCAOPBRANDVARIANT21_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "MCAOpBrandVariant.h"
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CAlternator;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 * Active implementation of res.file& bitmaps changing feature.
       
    34 * See base class MCAOpBrandVariant.h for method comments.
       
    35 *
       
    36 *  @lib chat.app
       
    37 *  @since 1.2s
       
    38 */
       
    39 class CCAOpBrandVariant21 : public CBase, public MCAOpBrandVariant
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42 
       
    43         /**
       
    44         * Two-phased constructor.
       
    45         */
       
    46         static CCAOpBrandVariant21* NewL();
       
    47 
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         virtual ~CCAOpBrandVariant21();
       
    52 
       
    53 
       
    54     public: // Functions from base classes
       
    55 
       
    56         /**
       
    57         * Methods implemented from MCAOpBrandVariant.
       
    58         * See MCAOpBrandVariant.h for method comments.
       
    59         * @since 1.2s
       
    60         */
       
    61         void RemoveAppResourceL( CCoeEnv* aCoeEnv, TInt& aAppResFileOffset );
       
    62 
       
    63         /**
       
    64         * Retrieves branded application resource file if there is one.
       
    65         * If not, the default
       
    66         * application resource file is loaded.
       
    67         * @since 1.2s
       
    68         * @param aCoeEnv, control environment.
       
    69         * @param aOrigAppResPath, original application resource path
       
    70         * @param aOrigEngResPath, original engine resource path
       
    71         * @param aOrigPresenceResPath, original presence resource path
       
    72         * @param aOrigCommUiResPath, original common ui resource path
       
    73         * @param aBitmapPath, bitmap path
       
    74         */
       
    75         void RetrieveSavedSettingsL( CCoeEnv* aCoeEnv,
       
    76                                      const TDesC& aOrigAppResPath,
       
    77                                      const TDesC& aOrigEngResPath,
       
    78                                      const TDesC& aOrigPresenceResPath,
       
    79                                      const TDesC& aOrigVariationResPath,
       
    80                                      const TDesC& aOrigCommUiResPath,
       
    81                                      TDes& aBitmapPath );
       
    82 
       
    83         void ActivateBrandL( const TDesC& aServer, TDes& aBitmapPath );
       
    84 
       
    85         void DeleteResource( CCoeEnv* aCoeEnv );
       
    86 
       
    87         TBool BrandBitmapsActivatedL() const;
       
    88 
       
    89         void CurrentResourceFileL( const TDesC& aServer,
       
    90                                    const TDesC& aResourceFile,
       
    91                                    TDes& aFullPath  );
       
    92 
       
    93     private:
       
    94 
       
    95         /**
       
    96         * C++ default constructor.
       
    97         */
       
    98         CCAOpBrandVariant21();
       
    99 
       
   100         /**
       
   101         * By default Symbian 2nd phase constructor is private.
       
   102         */
       
   103         void ConstructL();
       
   104 
       
   105 
       
   106     private:    // Data
       
   107 
       
   108         // application resource file offset
       
   109         TInt iAppResFileOffset;
       
   110         // app eng's resource file offset
       
   111         TInt iEngResFileOffset;
       
   112         // app presence's resource file offset
       
   113         TInt iPresenceResFileOffset;
       
   114         // app presence's resource file offset
       
   115         TInt iVariationResFileOffset;
       
   116         // common ui's resource file offset
       
   117         TInt iCommUiResFileOffset;
       
   118         // original application resource file path
       
   119         TFileName iOrigAppResource;
       
   120         // original engine resource file path
       
   121         TFileName iOrigEngResource;
       
   122         // original presence resource file path
       
   123         TFileName iOrigPresenceResource;
       
   124         // original presence resource file path
       
   125         TFileName iOrigVariationResource;
       
   126         // original common ui resource file path
       
   127         TFileName iOrigCommUiResource;
       
   128         // original application bitmap path
       
   129         TFileName iOrigBitmapPath;
       
   130         // interface to alternator.dll
       
   131         CAlternator* iAlternator;
       
   132         // control environment
       
   133         CCoeEnv* iCoeEnv;
       
   134         TBuf<64> iServerName;
       
   135 
       
   136         // Are branded bitmaps in use
       
   137         TBool iBrandedBitmaps;
       
   138 
       
   139     };
       
   140 
       
   141 #endif      // CCAOPBRANDVARIANT21_H
       
   142 
       
   143 // End of File