phonesettings/cpphonesettingsplugins/barringplugin/inc/cpbarringplugingroup.h
changeset 22 6bb1b21d2484
parent 21 92ab7f8d0eab
child 27 2f8f8080a020
equal deleted inserted replaced
21:92ab7f8d0eab 22:6bb1b21d2484
     1 /*
     1 /*
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    15  *
    15  *
    16  */
    16  */
    17 #ifndef CPBARRINGPLUGINGROUP_H
    17 #ifndef CPBARRINGPLUGINGROUP_H
    18 #define CPBARRINGPLUGINGROUP_H
    18 #define CPBARRINGPLUGINGROUP_H
    19 
    19 
       
    20 #include <QQueue>
    20 #include <cpsettingformitemdata.h>
    21 #include <cpsettingformitemdata.h>
    21 #include "cptelephonyutilsdefs.h"
    22 #include <psetcallbarringwrapper.h>
    22 
    23 
    23 using namespace CpTelephonyUtils;
    24 class PSetWrapper;
       
    25 class QModelIndex;
       
    26 class CpPhoneNotes;
    24 
    27 
    25 /*!
    28 /*!
    26     \class CpBarringPluginGroup
    29     \class CpBarringPluginGroup
    27     \brief The class CpBarringPluginGroup defines items shown on UI. 
    30     \brief The class CpBarringPluginGroup defines items shown on UI. 
    28  */
    31  */
    31     Q_OBJECT
    34     Q_OBJECT
    32     
    35     
    33 public:
    36 public:
    34 
    37 
    35     explicit CpBarringPluginGroup(CpItemDataHelper &helper);
    38     explicit CpBarringPluginGroup(CpItemDataHelper &helper);
       
    39     ~CpBarringPluginGroup();
       
    40 
       
    41 public slots:
    36     
    42     
    37     ~CpBarringPluginGroup();
    43     void itemShown(const QModelIndex& item);
       
    44     
       
    45 private:
       
    46     
       
    47     void setupLocalization();
       
    48     void connectToWrapper();
       
    49     
       
    50     void createAllOutgoingBarringItem();
       
    51     void createOutgoingInternationalBarringItem();
       
    52     void createOutgoingInternationalExceptToHomeCountryBarringItem();
       
    53     void createAllIncomingBarringItem();
       
    54     void createIncomingWhenRoamingBarringItem();
       
    55     
       
    56     void processBarringStatusRequestQueue();
       
    57     void revertCheckStateForItem(CpSettingFormItemData *barringItem);
       
    58 
       
    59 private slots:
       
    60 
       
    61     void barringStatusRequestCompleted(
       
    62         int result,
       
    63         const QList<unsigned char> & basicServiceGroupIds,
       
    64         PSetCallBarringWrapper::BarringStatus status);
       
    65     
       
    66     void enableBarringRequestCompleted(
       
    67         int result,
       
    68         PSetCallBarringWrapper::BarringType barringType,
       
    69         PSetCallBarringWrapper::BarringStatus barringStatus, 
       
    70         bool plural);
       
    71 
       
    72     void disableBarringRequestCompleted(
       
    73         int result,
       
    74         PSetCallBarringWrapper::BarringType barringType,
       
    75         PSetCallBarringWrapper::BarringStatus barringStatus, 
       
    76         bool plural);
       
    77     
       
    78     void changeBarringStateRequested(int checkState);
    38     
    79     
    39 private: 
    80 private: 
    40     
    81     
    41     CpItemDataHelper &m_helper;
    82     CpItemDataHelper &m_helper;
       
    83     PSetWrapper *m_pSetWrapper;
       
    84     PSetCallBarringWrapper *m_barringWrapper;
       
    85     CpSettingFormItemData *m_allOutgoingBarringItem;
       
    86     CpSettingFormItemData *m_outgoingInternationalBarringItem;
       
    87     CpSettingFormItemData *m_outgoingInternationalExceptToHomeCountryBarringItem;
       
    88     CpSettingFormItemData *m_allIncomingBarringItem;
       
    89     CpSettingFormItemData *m_incomingWhenRoamingBarringItem;
       
    90     QQueue<CpSettingFormItemData *> m_barringRequestQueue;
       
    91     bool m_barringStatusRequestOngoing;
       
    92     int m_activeNoteId;
       
    93     CpPhoneNotes* m_phoneNotes;
    42 };
    94 };
    43 
    95 
    44 #endif // CPBARRINGPLUGINGROUP_H
    96 #endif // CPBARRINGPLUGINGROUP_H