inc/unidatamodelloader.h
changeset 23 238255e8b033
child 25 84d9eb65b26f
equal deleted inserted replaced
5:4697dfb2d7ad 23:238255e8b033
       
     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 
       
    23 //Forward declarations
       
    24 class UniDataModelPluginInterface;
       
    25 
       
    26 
       
    27 
       
    28 #ifdef BUILD_DLL_DATA_MODEL
       
    29 #define UNI_DATA_MODEL_LOADER_EXPORT Q_DECL_EXPORT
       
    30 #else
       
    31 #define UNI_DATA_MODEL_LOADER_EXPORT Q_DECL_IMPORT
       
    32 #endif
       
    33 
       
    34 
       
    35 
       
    36 
       
    37 
       
    38 /**
       
    39  * Loads all the data model plugins.
       
    40  */
       
    41 class UNI_DATA_MODEL_LOADER_EXPORT UniDataModelLoader
       
    42 {
       
    43 public:
       
    44     /**
       
    45      * Constructor.
       
    46      */
       
    47     UniDataModelLoader();
       
    48 
       
    49     /**
       
    50      * Destructor.
       
    51      */
       
    52     ~UniDataModelLoader();
       
    53 
       
    54     /**
       
    55      * Gets the  data model intended plugin.
       
    56      * @param messageType
       
    57      */
       
    58     UniDataModelPluginInterface* getDataModelPlugin(const QString& messageType);
       
    59 
       
    60     /**
       
    61      * Loads plugins
       
    62      */
       
    63     void loadPlugins();
       
    64 
       
    65 private:
       
    66     /**
       
    67      * This shall store all the message types
       
    68      * mapped to plugin instance
       
    69      */
       
    70     QMap<QString, UniDataModelPluginInterface*> mDataModelPluginMap;
       
    71 };
       
    72 
       
    73 #endif //UNI_DATA_MODEL_LOADER_H