|
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: cbsfactory.h |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CBSFACTORY_H |
|
19 #define __CBSFACTORY_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class MBSAccess; |
|
26 class MBSUpdater; |
|
27 class RBSClient; |
|
28 |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 class CBSFactory : public CBase |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param aDefaultBrandId the default brand id for branding interfaces |
|
40 * that are created through this factory. If this parameter |
|
41 * is given the branding items will be taken from the given |
|
42 * default brand if they are not found from the wanted brand. |
|
43 * brand. |
|
44 * @param aApplicationId application id |
|
45 */ |
|
46 IMPORT_C static CBSFactory* NewL( const TDesC8& aDefaultBrandId, |
|
47 const TDesC8& aApplicationId ); |
|
48 |
|
49 // destructor |
|
50 IMPORT_C virtual ~CBSFactory(); |
|
51 |
|
52 private: |
|
53 |
|
54 // constructor |
|
55 CBSFactory(); |
|
56 |
|
57 void ConstructL( const TDesC8& aDefaultBrandId, const TDesC8& aApplicationId ); |
|
58 |
|
59 |
|
60 public: |
|
61 |
|
62 /** |
|
63 * Creates a brand access interface |
|
64 * @param aBrandId the brand to be used with this interface instance |
|
65 * @param aLanguageId the language id to be used with this interface instance |
|
66 * @param aCacheData should the interface cache the branding data |
|
67 * @param aReserved for further use |
|
68 * @return the access interface |
|
69 */ |
|
70 IMPORT_C MBSAccess* CreateAccessL( const TDesC8& aBrandId, |
|
71 TLanguage aLanguageId, |
|
72 TBool aCacheData = EFalse, |
|
73 TInt aReserved = 0 ); |
|
74 |
|
75 /** |
|
76 * Creates a brand access interface |
|
77 * @param aBrandId the brand to be used with this interface instance |
|
78 * @param aLanguageId the language id to be used with this interface instance |
|
79 * @param aCacheData should the interface cache the branding data |
|
80 * @param aReserved for further use |
|
81 * @return the access interface |
|
82 */ |
|
83 IMPORT_C MBSAccess* CreateAccessLC( const TDesC8& aBrandId, |
|
84 TLanguage aLanguageId, |
|
85 TBool aCacheData = EFalse, |
|
86 TInt aReserved = 0 ); |
|
87 |
|
88 /** |
|
89 * Creates a brand update interface |
|
90 * @return the interface |
|
91 */ |
|
92 IMPORT_C MBSUpdater* CreateUpdaterL(); |
|
93 |
|
94 /** |
|
95 * Creates a brand update interface |
|
96 * @return the interface |
|
97 */ |
|
98 IMPORT_C MBSUpdater* CreateUpdaterLC(); |
|
99 |
|
100 |
|
101 private: // data |
|
102 HBufC8* iDefaultBrand; |
|
103 bool iUseDefaultBrand; |
|
104 HBufC8* iApplicationId; |
|
105 RBSClient* iServerKeepAlive; |
|
106 |
|
107 }; |
|
108 |
|
109 #endif // __CBSFACTORY_H |
|
110 |
|
111 // End of File |