CContextEngine Class Reference
class CContextEngine : public CBase |
An engine to collect context metadata with available context plugins. CContextEngineAO is used to do the actual work. This class is implemented as a Singleton.
Constructor & Destructor Documentation
CContextEngine()
CContextEngine | ( | ) | [private] |
C++ constructor - not exported; implicitly called from GetInstance()
~CContextEngine()
~CContextEngine | ( | ) | [virtual] |
Destroys the implementation. This is virtual method and this class is not intended for derivation, so not exported.
Member Functions Documentation
ConstructL(MContextInitializationObserver *)
2nd phase construction, called by GetInstance()
ContextSnapshot(MContextSnapshotObserver &, CHarvesterData &)
Context snapshot. This takes the snapshot using plug-ins.
ContextSnapshot(MContextSnapshotObserver &, RPointerArray< CHarvesterData > &)
Context snapshot. This takes the snapshot using plug-ins.
ContextSnapshotStatus(CHarvesterData *)
void | ContextSnapshotStatus | ( | CHarvesterData * | aHD | ) | |
From MContextEngineObserver. Method is called by CContextEngineAO when a context snapshot is finished or an error has occured.
Destroy()
Ignores the reference count and destroys this singleton. THINK BEFORE USING! Should be used only instead of reference counting if clients are not calling ReleaseInstance() (which they should).
GetInstanceL(MContextInitializationObserver *)
Gets an instance to CContextEngine singleton. A new object is created if needed. If an observer object to notify is given, context plugins are initialized asyncronously and observer is notified when ready.
PluginCount()
IMPORT_C TInt | PluginCount | ( | ) | |
Method used to clarify amount of plug-ins.
QueueSnapshotItem(CContextSnapshotItem *)
Add a new observer and metadata items to a queue. These observers need to be informed when a snapshot is ready and items need a context snapshot.
ReleaseInstance()
IMPORT_C void | ReleaseInstance | ( | ) | |
Release an instance of this singleton.
SetMdeSession(CMdESession *)
IMPORT_C void | SetMdeSession | ( | CMdESession * | aSession | ) | |
Set a pointer to MdESession. The pointer is given forward to context plugins. Session must be set in order to successfully harvest context data.
Parameters
CMdESession * aSession | Session pointer to set. |
Member Data Documentation
TInt
iArrayCount
TInt
| iArrayCount | [private] |
In case array of objects for snapshot were passed, variable to store the amount of items to be processed.
CContextEngineAO * iContextEngineAO
This active object is used to handle queued snapshot requests.
TInt
iProcessedArrayCount
TInt
| iProcessedArrayCount | [private] |
In case array of objects for snapshot were passed, variable to store the amount of items that have been processed.
RPointerArray< CContextSnapshotItem > iSnapshotQueue
Array of observers and related metadata objects that need a context snapshot. Related observer is informed about snapshot completion.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.