56
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 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 class is responsible for loading and holding the
|
|
15 |
* stratergy ecom plugin
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef C_LBTSTRATERGYCONTAINER_H
|
|
21 |
#define C_LBTSTRATERGYCONTAINER_H
|
|
22 |
|
|
23 |
// INCLUDE FILES
|
|
24 |
#include <e32base.h>
|
|
25 |
|
|
26 |
// FORWARD DECLARATIONS
|
|
27 |
class CLbtStrategyBase;
|
|
28 |
class REComSession;
|
|
29 |
class MLbtTriggeringSupervisionObserver;
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Class definition for LBT Stratergy container implementation
|
|
33 |
* @since S60 v4.0
|
|
34 |
*
|
|
35 |
*/
|
|
36 |
class CLbtStratergyContainer : public CActive
|
|
37 |
{
|
|
38 |
public:
|
|
39 |
/**
|
|
40 |
* Instantiates a new object of
|
|
41 |
* CLbtStratergyContainer
|
|
42 |
*
|
|
43 |
* @return a pointer to an instance of
|
|
44 |
* CLbtStratergyContainer
|
|
45 |
*/
|
|
46 |
static CLbtStratergyContainer* NewL();
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Destructor
|
|
50 |
*
|
|
51 |
*/
|
|
52 |
~CLbtStratergyContainer();
|
|
53 |
|
|
54 |
/**
|
|
55 |
* This loads the stratergy ecom plugin and starts
|
|
56 |
* listening to ecom upgrade events.On receiving an
|
|
57 |
* ecom upgrade event, a check is made to determine if
|
|
58 |
* the stratergy plugin is upgraded. If the plugin is
|
|
59 |
* upgraded then the cuurently loaded plugin is unloaded
|
|
60 |
* and the new plugin is loaded.
|
|
61 |
*
|
|
62 |
* @param[in] the construction parameters to be sent to
|
|
63 |
* stratergy
|
|
64 |
*
|
|
65 |
*/
|
|
66 |
void LoadStratergyL(MLbtTriggeringSupervisionObserver* aPtr);
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Returns the intance of stratergy
|
|
70 |
*
|
|
71 |
* @return pointer to the stratergy intance
|
|
72 |
*/
|
|
73 |
CLbtStrategyBase* Stratergy();
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Unloads the stratergy ecom dll and stops
|
|
77 |
* listening to ecom plugin upgrade events
|
|
78 |
*
|
|
79 |
*/
|
|
80 |
void UnloadStratergy();
|
|
81 |
|
|
82 |
|
|
83 |
protected: // from CActive
|
|
84 |
void RunL();
|
|
85 |
TInt RunError(TInt aError);
|
|
86 |
void DoCancel();
|
|
87 |
|
|
88 |
private:
|
|
89 |
/**
|
|
90 |
* C++ Default constructor
|
|
91 |
*
|
|
92 |
*/
|
|
93 |
CLbtStratergyContainer();
|
|
94 |
|
|
95 |
/**
|
|
96 |
* 2nd phase constuctor for instantiating
|
|
97 |
* member variables
|
|
98 |
*
|
|
99 |
*/
|
|
100 |
void ConstructL();
|
|
101 |
|
|
102 |
private: // Data
|
|
103 |
|
|
104 |
// Instance of stratergy
|
|
105 |
CLbtStrategyBase* iStratergy;
|
|
106 |
|
|
107 |
// Handle to RProperty
|
|
108 |
RProperty iProperty;
|
|
109 |
|
|
110 |
// Pointer to the ECom session
|
|
111 |
REComSession* iEComSession;
|
|
112 |
|
|
113 |
// Holds the version number of the currently
|
|
114 |
// loaded stratergy dll
|
|
115 |
TInt iVersion;
|
|
116 |
};
|
|
117 |
|
|
118 |
#endif // C_LBTSTRATERGYCONTAINER_H
|
|
119 |
|