phonebookui/pbkcommonui/inc/cntmodelprovider.h
changeset 24 0ba2181d7c28
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
       
     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 CNTMODELPROVIDER_H
       
    19 #define CNTMODELPROVIDER_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <mobcntmodel.h>
       
    23 #include "qtpbkglobal.h"
       
    24 
       
    25 
       
    26 QTM_BEGIN_NAMESPACE
       
    27 class QContactManager;
       
    28 QTM_END_NAMESPACE
       
    29 
       
    30 QTM_USE_NAMESPACE
       
    31 
       
    32 // CLASS DECLARATION
       
    33 class QTPBK_EXPORT CntModelProvider : public QObject
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37 public:
       
    38     static CntModelProvider* instance();
       
    39     void release();
       
    40     int referenceCount();
       
    41 
       
    42 public:
       
    43     MobCntModel   *contactModel();
       
    44     QContactManager *contactManager();
       
    45     QContactManager *contactSimManager();
       
    46     ~CntModelProvider();
       
    47 
       
    48 private:
       
    49     CntModelProvider();
       
    50 
       
    51 private:
       
    52     // counter for handles to this object
       
    53     int             mRefCount;
       
    54     // Own: Pointer to the model object and managers
       
    55     MobCntModel     *mContactModel;
       
    56     QContactManager *mContactManager;
       
    57     QContactManager *mContactSimManager;
       
    58 };
       
    59 
       
    60 #endif      // CNTMODELPROVIDER_H
       
    61 
       
    62 // End of File