|
1 /* |
|
2 * Copyright (c) 2008 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: Class CNcdProviderManager declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCD_PROVIDERMANAGER_H |
|
20 #define C_NCD_PROVIDERMANAGER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "ncdprovidercloseobserver.h" |
|
25 #include "catalogscontext.h" |
|
26 |
|
27 class CNcdProviderUtils; |
|
28 class CCatalogsTransport; |
|
29 class CNcdProvider; |
|
30 class CNcdStorageManager; |
|
31 class RFs; |
|
32 |
|
33 /** |
|
34 * This class manages the general managers of all connected |
|
35 * families |
|
36 */ |
|
37 class CNcdProviderManager : |
|
38 public CBase, |
|
39 public MNcdProviderCloseObserver |
|
40 { |
|
41 public: |
|
42 |
|
43 static CNcdProviderManager* NewL(); |
|
44 |
|
45 virtual ~CNcdProviderManager(); |
|
46 |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Gets or creates a provider for the client |
|
51 */ |
|
52 CNcdProvider& ProviderL( |
|
53 const MCatalogsContext& aContext, |
|
54 TBool& aCreated ); |
|
55 |
|
56 /** |
|
57 * Gets a provider |
|
58 * |
|
59 * @return Client's provider or NULL if it hasn't been created |
|
60 */ |
|
61 CNcdProvider* Provider( |
|
62 const MCatalogsContext& aContext ) const; |
|
63 |
|
64 |
|
65 protected: // MNcdProviderCloseObserver |
|
66 |
|
67 void ProviderClosed( CNcdProvider& aProvider ); |
|
68 |
|
69 private: |
|
70 |
|
71 CNcdProviderManager(); |
|
72 void ConstructL(); |
|
73 |
|
74 TInt FindFamily( const MCatalogsContext& aContext ) const; |
|
75 |
|
76 HBufC* WritableEnginePathL( RFs& aFs ); |
|
77 |
|
78 private: |
|
79 |
|
80 RPointerArray<CNcdProvider> iProviders; // owns one reference |
|
81 CNcdProviderUtils* iProviderUtils; // owned |
|
82 CCatalogsTransport* iTransport; // owned |
|
83 CNcdStorageManager* iStorageManager; // owned |
|
84 HBufC* iEngineRootPath; // owned |
|
85 }; |
|
86 |
|
87 #endif /* C_NCD_PROVIDERMANAGER_H */ |