56
|
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: This file defines the abstract factory class for
|
|
15 |
* trigger store implementations
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#include "lbttriggerstorerepository.h"
|
|
21 |
#include "lbtdbtriggersmanager.h"
|
|
22 |
#include "lbtramtriggersmanager.h"
|
|
23 |
|
|
24 |
|
|
25 |
// ---------------------------------------------------------------------------
|
|
26 |
// This method returns the number of trigger stores supported in the container
|
|
27 |
// ---------------------------------------------------------------------------
|
|
28 |
//
|
|
29 |
TInt LbtTriggerStoreFactory::NumStores()
|
|
30 |
{
|
|
31 |
return 2;
|
|
32 |
}
|
|
33 |
|
|
34 |
|
|
35 |
// ---------------------------------------------------------------------------
|
|
36 |
// Creates and returns all the available trigger stores.
|
|
37 |
// ---------------------------------------------------------------------------
|
|
38 |
//
|
|
39 |
void LbtTriggerStoreFactory::CreateTriggerStoresL(RPointerArray<MLbtTriggerStore>& aStoreArray)
|
|
40 |
{
|
|
41 |
CleanupClosePushL(aStoreArray);
|
|
42 |
CLbtDbTriggersManager* dbTriggerStore = CLbtDbTriggersManager::NewL();
|
|
43 |
CleanupStack::PushL( dbTriggerStore );
|
|
44 |
|
|
45 |
aStoreArray.Append( dbTriggerStore );
|
|
46 |
|
|
47 |
CLbtRamTriggersManager* ramTriggerStore = CLbtRamTriggersManager::NewL();
|
|
48 |
CleanupStack::PushL( ramTriggerStore );
|
|
49 |
|
|
50 |
aStoreArray.Append( ramTriggerStore );
|
|
51 |
|
|
52 |
CleanupStack::Pop( 3, &aStoreArray );
|
|
53 |
}
|