1 /* |
|
2 * Copyright (c) 2009-2010 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: Factory class for different mailbox engines |
|
15 * Interface : Private, CVmbxEngineFactory |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef C_VMBXENGINEFACTORY_H |
|
20 #define C_VMBXENGINEFACTORY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CVmbxEngineBase; |
|
27 |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * CVmbxEngineFactory declaration |
|
33 * |
|
34 * @lib vmbxengine.lib |
|
35 */ |
|
36 NONSHARABLE_CLASS( CVmbxEngineFactory ) : public CBase |
|
37 { |
|
38 |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor |
|
43 * @param aProvider Reference to MVmbxResourceProvider |
|
44 */ |
|
45 static CVmbxEngineFactory* NewL( MVmbxResourceProvider& aProvider ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CVmbxEngineFactory(); |
|
51 |
|
52 public: // New functions |
|
53 |
|
54 /** |
|
55 * Creates instance of the mailbox entry |
|
56 * |
|
57 * @param aEngine ownership is transferred |
|
58 * @param aType mailbox type |
|
59 */ |
|
60 void CreateEngineL( CVmbxEngineBase*& aEngine, TVmbxType aType ); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * C++ default constructor. |
|
66 * @param aProvider Reference to MVmbxResourceProvider |
|
67 */ |
|
68 CVmbxEngineFactory( MVmbxResourceProvider& aProvider ); |
|
69 |
|
70 /** |
|
71 * By default Symbian 2nd phase constructor is private. |
|
72 */ |
|
73 void ConstructL(); |
|
74 |
|
75 private: // data |
|
76 |
|
77 /** |
|
78 * Reference to MVmbxResourceProvider |
|
79 */ |
|
80 MVmbxResourceProvider& iProvider; |
|
81 }; |
|
82 |
|
83 #endif // C_VMBXENGINEFACTORY_H |
|