contacts_plat/contacts_ui_extensions_api/tsrc/contactcardplugin/extensionfactory.h
changeset 61 d30183af6ca6
equal deleted inserted replaced
56:d508aa856878 61:d30183af6ca6
       
     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:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef EXTENSIONFACTORY_H
       
    19 #define EXTENSIONFACTORY_H
       
    20 
       
    21 //System includes
       
    22 #include <QObject>
       
    23 
       
    24 //User includes
       
    25 #include <cntuiextensionfactory.h>
       
    26 
       
    27 class ContactCardExtension;
       
    28 
       
    29 /**
       
    30  * Factory class for plugin
       
    31  */
       
    32 class ExtensionFactory : public QObject, public CntUiExtensionFactory
       
    33 {
       
    34     Q_OBJECT
       
    35     Q_INTERFACES(CntUiExtensionFactory)
       
    36 
       
    37 public:
       
    38     /**
       
    39      * Constructor
       
    40      */
       
    41     ExtensionFactory();
       
    42 
       
    43     /**
       
    44      * Desctructor
       
    45      */
       
    46     ~ExtensionFactory();
       
    47 
       
    48 public: // from CntUiExtensionFactory
       
    49 
       
    50     /**
       
    51      * Gives access to an interface for extending Contact Card.
       
    52      * @return Returns null if not supported. Ownership is not given.
       
    53      */
       
    54     CntUiContactCardExtension* contactCardExtension();
       
    55 
       
    56     /**
       
    57      * Gives access to an interface for extending UI with new groups.
       
    58      * @return Returns null if not supported. Ownership is not given.
       
    59      */
       
    60     CntUiGroupSupplier* groupSupplier();
       
    61 
       
    62     /**
       
    63      * Gives access to an interface for extending edit view list with new items for a given contact.
       
    64      * @return Returns null if not supported. Ownership is not given.
       
    65      */
       
    66     CntEditViewItemSupplier* editViewItemSupplier(QContact &contact);
       
    67 
       
    68     /**
       
    69      * Gives access to an interface for creating new views.
       
    70      * @return Returns null if not supported. Ownership is not given.
       
    71      */
       
    72     CntViewSupplier* viewSupplier();
       
    73 
       
    74     CntUiSocialExtension* socialExtension();
       
    75         
       
    76     bool hasService(int serviceId);
       
    77 
       
    78 private:
       
    79     ContactCardExtension* mContactCardExtension;
       
    80 };
       
    81 
       
    82 #endif // EXTENSIONFACTORY_H