31
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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: Plugin Loader that loads all the data model plugins.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef UNI_DATA_MODEL_LOADER_H
|
|
19 |
#define UNI_DATA_MODEL_LOADER_H
|
|
20 |
|
|
21 |
#include <QMap>
|
|
22 |
#include "convergedmessage.h"
|
|
23 |
|
|
24 |
//Forward declarations
|
|
25 |
class UniDataModelPluginInterface;
|
|
26 |
class QPluginLoader;
|
|
27 |
|
|
28 |
|
|
29 |
#ifdef BUILD_DLL_DATA_MODEL
|
|
30 |
#define UNI_DATA_MODEL_LOADER_EXPORT Q_DECL_EXPORT
|
|
31 |
#else
|
|
32 |
#define UNI_DATA_MODEL_LOADER_EXPORT Q_DECL_IMPORT
|
|
33 |
#endif
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
/**
|
|
40 |
* Loads all the data model plugins.
|
|
41 |
*/
|
|
42 |
class UNI_DATA_MODEL_LOADER_EXPORT UniDataModelLoader
|
|
43 |
{
|
|
44 |
public:
|
|
45 |
/**
|
|
46 |
* Constructor.
|
|
47 |
*/
|
|
48 |
UniDataModelLoader();
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Destructor.
|
|
52 |
*/
|
|
53 |
~UniDataModelLoader();
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Gets the data model intended plugin.
|
|
57 |
* @param messageType
|
|
58 |
*/
|
|
59 |
UniDataModelPluginInterface* getDataModelPlugin(ConvergedMessage::MessageType messageType);
|
|
60 |
|
|
61 |
private:
|
|
62 |
/**
|
|
63 |
* Keep a list of all the pluginloaders used
|
|
64 |
*/
|
|
65 |
QList<QPluginLoader* > mPluginLoaderList;
|
|
66 |
};
|
|
67 |
|
|
68 |
#endif //UNI_DATA_MODEL_LOADER_H
|