|
1 /* |
|
2 * Copyright (c) 2003 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 vibra control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <e32std.h> |
|
21 #include "vibractrl.h" |
|
22 #include "vibractrlwrapperimpl.h" |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // VibraFactory::VibraFactory() |
|
28 // C++ default constructor. |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 VibraFactory::VibraFactory() |
|
32 { |
|
33 //... |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // VibraFactory::NewL |
|
38 // Two-phased constructor without notify handling. |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 EXPORT_C CVibraControl* VibraFactory::NewL() |
|
42 { |
|
43 CVibraControl *p = NewLC(NULL); |
|
44 CleanupStack::Pop(); |
|
45 return p; |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // VibraFactory::NewL |
|
50 // Two-phased constructor with notify handling. |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 EXPORT_C CVibraControl* VibraFactory::NewL(MVibraControlObserver* aCallback) |
|
54 { |
|
55 CVibraControl *p = NewLC(aCallback); |
|
56 CleanupStack::Pop(); |
|
57 return p; |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // VibraFactory::NewLC |
|
62 // Two-phased constructor. |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 EXPORT_C CVibraControl* VibraFactory::NewLC(MVibraControlObserver* aCallback) |
|
66 { |
|
67 CVibraControlImpl *p = new (ELeave)CVibraControlImpl(aCallback); |
|
68 CleanupStack::PushL(p); |
|
69 p->ConstructL(); |
|
70 return p; |
|
71 } |
|
72 |
|
73 // End of File |