|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Produces objects that implement MLogsGetEvent |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CLogsGetEventFactory.h" |
|
22 #include "CLogsGetEvent.h" |
|
23 #include "CLogsEventArray.h" |
|
24 #include "MLogsEventArray.h" |
|
25 |
|
26 #include "CLogsEvent.h" |
|
27 //#include "TLogsEvent.h" |
|
28 //#include "TLogsRecentEvent.h" |
|
29 //#include "TLogsRecentMissedEvent.h" |
|
30 // CONSTANTS |
|
31 |
|
32 MLogsGetEvent* CLogsGetEventFactory::LogsGetEventL( RFs& aFsSession, |
|
33 TLogsEventStrings& aStrings, |
|
34 MLogsObserver* aObserver ) |
|
35 { |
|
36 return CLogsGetEvent::NewL( aFsSession, aStrings, aObserver ); |
|
37 } |
|
38 |
|
39 MLogsEventArray* CLogsGetEventFactory::LogsEventArrayL( TLogsModel /* aModel */, |
|
40 TInt aGranularity ) |
|
41 { |
|
42 |
|
43 return CLogsEventArray<CLogsEvent>::NewL( aGranularity ); |
|
44 |
|
45 //OLD IMPL: FIXME: WE'LL USE CLogsEvent instead of the 4 below types |
|
46 /********************************************************** |
|
47 switch ( aModel ) |
|
48 { |
|
49 case ELogsMainModel: |
|
50 { |
|
51 return CLogsEventArray<TLogsEvent>::NewL( aGranularity ); |
|
52 } |
|
53 case ELogsDialledModel: // fallthrough |
|
54 case ELogsReceivedModel: |
|
55 { |
|
56 return CLogsEventArray<TLogsRecentEvent>::NewL( aGranularity ); |
|
57 } |
|
58 case ELogsMissedModel: |
|
59 { |
|
60 return CLogsEventArray<TLogsRecentMissedEvent>::NewL( aGranularity ); |
|
61 } |
|
62 default: |
|
63 { |
|
64 //Illegal model |
|
65 return NULL; |
|
66 } |
|
67 } |
|
68 **********************************************************/ |
|
69 } |
|
70 |