phonesettings/cpphonesettingsplugins/divertplugin/src/cpdivertplugingroup.h
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 30 ebdbd102c78a
parent 46 bc5a64e5bc3c
equal deleted inserted replaced
40:bab96b7ed1a4 51:f39ed5e045e0
    34 class PSCallDivertingCommand;
    34 class PSCallDivertingCommand;
    35 class HbListWidget;
    35 class HbListWidget;
    36 class CpDivertItemData;
    36 class CpDivertItemData;
    37 class QEventLoop; 
    37 class QEventLoop; 
    38 class HbLineEdit; 
    38 class HbLineEdit; 
       
    39 class HbDataFormModelItem;
    39 
    40 
    40 using namespace CpTelephonyUtils;
    41 using namespace CpTelephonyUtils;
    41 
    42 
    42 /*!
    43 /*!
    43     \class CpDivertPluginGroup
    44     \class CpDivertPluginGroup
    58     public:
    59     public:
    59         DivertRequest request;
    60         DivertRequest request;
    60         CpDivertItemData *item;
    61         CpDivertItemData *item;
    61     };
    62     };
    62     
    63     
       
    64     // Activate divert phases
       
    65     enum ActivateDivertPhases
       
    66     {
       
    67         NonePhase,
       
    68         PopUpVoiceNumberListQueryPhase,
       
    69         PopUpTimerQueryPhase
       
    70     };
    63     
    71     
    64 public:
    72 public:
    65 
    73 
    66     explicit CpDivertPluginGroup(CpItemDataHelper &helper);
    74     explicit CpDivertPluginGroup(CpItemDataHelper &helper);
    67     
    75     
   132             CpSettingFormItemData *parent = 0);
   140             CpSettingFormItemData *parent = 0);
   133     
   141     
   134     /**
   142     /**
   135      Show to user divert number query list.
   143      Show to user divert number query list.
   136      */
   144      */
   137     bool popUpVoiceNumberListQuery(
   145     void popUpVoiceNumberListQuery(
   138             const QString& heading, QString& result, PsServiceGroup serviceGroup);
   146             const QString& heading, PsServiceGroup serviceGroup);
   139     
   147     
   140     /**
   148     /**
   141      Show to user number query.
   149      Show to user number query.
   142      */
   150      */
   143     void popUpNumberEditor(
   151     void popUpNumberEditor(
   144             const QString& heading, QString& result);
   152             const QString& heading);
   145     
   153     
   146     
   154     
   147     /**
   155     /**
   148      Send comand to psetwrappercalldiverting.
   156      Send comand to psetwrappercalldiverting.
   149      */
   157      */
   150     void setCallDiverting(PSCallDivertingCommand& command);
   158     void setCallDiverting(PSCallDivertingCommand& command);
   151     
   159     
   152     /**
   160     /**
   153      Show to user divert time out query list.
   161      Show to user divert time out query list.
   154      */
   162      */
   155     bool popUpTimerQuery(int &timeout);
   163     void popUpTimerQuery();
   156     
   164     
   157     /**
   165     /**
   158      Desides which bsc parameters to use.
   166      Desides which bsc parameters to use.
   159      */
   167      */
   160     int bscParam(PsServiceGroup serviceGroup);
   168     int bscParam(PsServiceGroup serviceGroup);
   221      Synchronizes content and status of divert options dependent from the 
   229      Synchronizes content and status of divert options dependent from the 
   222      status of some other divert.
   230      status of some other divert.
   223      */
   231      */
   224     void updateDependentDivertOptions(bool fetchFromNetwork = false);
   232     void updateDependentDivertOptions(bool fetchFromNetwork = false);
   225     void activateDependentDivertOption(CpDivertItemData* item, bool fetchFromNetwork);
   233     void activateDependentDivertOption(CpDivertItemData* item, bool fetchFromNetwork);
   226     void deActivateDependentDivertOption(CpDivertItemData* item) const;
   234     void deactivateDependentDivertOption(CpDivertItemData* item) const;
   227     
   235     
   228     /**
   236     /**
   229      Synchronizes content and status of not available divert option based on
   237      Synchronizes content and status of not available divert option based on
   230      statuses of CFB, CFNry and CFNrc.
   238      statuses of CFB, CFNry and CFNrc.
   231      */
   239      */
   232     void updateNotAvailableDivertOption();
   240     void updateNotAvailableDivertOption();
   233     
   241     
       
   242     void nextPhaseForActivateDivert(bool ok);
       
   243     
       
   244     bool isDivertSettingsItem(HbDataFormModelItem* modelItem);
       
   245      
   234 private:   // data
   246 private:   // data
   235 
   247 
   236     // Setting wrappers 
   248     // Setting wrappers 
   237     PSetWrapper *m_pSetWrapper;
   249     PSetWrapper *m_pSetWrapper;
   238     SsSettingsWrapper *m_ssSettingsWrapper;
   250     SsSettingsWrapper *m_ssSettingsWrapper;
   254     CpDivertItemData *m_DataItemVideoIfNotAvailable;
   266     CpDivertItemData *m_DataItemVideoIfNotAvailable;
   255 
   267 
   256     int m_activeNoteId;
   268     int m_activeNoteId;
   257     int m_activeProgressNoteId;
   269     int m_activeProgressNoteId;
   258 
   270 
   259     // To prevent adding vmbx number to defaultlist
       
   260     bool m_divertToVoiceMailBox;
       
   261 
       
   262     /**
   271     /**
   263      Divert request queue
   272      Divert request queue
   264      */
   273      */
   265     QQueue<CpDivertRequestQueueItem> m_divertRequestQueue;
   274     QQueue<CpDivertRequestQueueItem> m_divertRequestQueue;
   266 
   275 
   267     CpItemDataHelper &m_helper;
   276     CpItemDataHelper &m_helper;
   268     
   277     
   269     int m_divertTimeout;
   278     ActivateDivertPhases m_activateDivertPhase;
   270     
   279     PSCallDivertingCommand m_divertCommand;
   271     HbListWidget *m_voiceNumberList;
   280     int m_timerId;
   272     HbListWidget *m_popupTimerList; 
   281     HbDialog *m_dialog;
   273     QString m_divertNumber; 
   282 
   274     HbLineEdit *m_voiceNumberEditor; 
       
   275     QEventLoop *m_eventLoop; 
       
   276     
       
   277 };
   283 };
   278 
   284 
   279 #endif // CPDIVERTPLUGINGROUP_H
   285 #endif // CPDIVERTPLUGINGROUP_H
   280 
   286 
   281 
   287