phonesettings/cpphonesettingsplugins/divertplugin/src/cpdivertplugingroup.h
changeset 27 2f8f8080a020
parent 21 92ab7f8d0eab
child 30 ebdbd102c78a
equal deleted inserted replaced
22:6bb1b21d2484 27:2f8f8080a020
   104 private:     
   104 private:     
   105     
   105     
   106     /**
   106     /**
   107      Creates group items.
   107      Creates group items.
   108      */
   108      */
   109     void createVoiceCallItems();
   109     void createVoiceCallItems(CpSettingFormItemData *group);
   110 
   110 
   111     /**
   111     /**
   112      Creates group items.
   112      Creates group items.
   113      */
   113      */
   114     void createVideoCallItems();
   114     void createVideoCallItems(CpSettingFormItemData *parent);
   115     
   115     
   116     /**
   116     /**
   117      Creates group items.
   117      Creates single item.
   118      */
   118      */
   119     void createVoIPCallItems();
   119     CpDivertItemData *createDivertItem(
       
   120             PsCallDivertingCondition condition,
       
   121             PsServiceGroup serviceGroup,
       
   122             const QString &label,
       
   123             const QString &queryLabel,
       
   124             bool needTimeoutInfo,
       
   125             CpSettingFormItemData *parent = 0);
   120     
   126     
   121     /**
   127     /**
   122      Show to user divert number query list.
   128      Show to user divert number query list.
   123      */
   129      */
   124     bool popUpVoiceNumberListQuery(
   130     bool popUpVoiceNumberListQuery(
   125             const QString& heading, QString& result);
   131             const QString& heading, QString& result, PsServiceGroup serviceGroup);
   126     
   132     
   127     /**
   133     /**
   128      Show to user number query.
   134      Show to user number query.
   129      */
   135      */
   130     bool popUpNumberEditor(
   136     bool popUpNumberEditor(
   142     bool popUpTimerQuery(int &timeout) const;
   148     bool popUpTimerQuery(int &timeout) const;
   143     
   149     
   144     /**
   150     /**
   145      Desides which bsc parameters to use.
   151      Desides which bsc parameters to use.
   146      */
   152      */
   147     int bscParam();
   153     int bscParam(PsServiceGroup serviceGroup);
   148     
   154     
   149     /**
   155     /**
   150      Adds divert data item for wanted parent.
   156      Adds divert data item for wanted parent.
   151      */
   157      */
   152     void addDivertDataItem(CpDivertItemData* item, CpSettingFormItemData *parent);
   158     void addDivertDataItem(
       
   159             CpDivertItemData* item, CpSettingFormItemData *parent);
   153 
   160 
   154     /**
   161     /**
   155      Process next divert request.
   162      Process next divert request.
   156      */
   163      */
   157     void processDivertingRequestQueue();
   164     void processDivertingRequestQueue();
   165     
   172     
   166     /**
   173     /**
   167      Changes divertItemData data.
   174      Changes divertItemData data.
   168      */
   175      */
   169     void changeItemData(
   176     void changeItemData(
       
   177             PsServiceGroup serviceGroup,
   170             PsCallDivertingCondition condition, 
   178             PsCallDivertingCondition condition, 
   171             PsCallDivertingStatus status,
   179             PsCallDivertingStatus status,
   172             const QString& number, 
   180             const QString& number, 
   173             int timeout);
   181             int timeout);
   174     
   182     
   175     /**
   183     /**
   176      Reverts divertItemData data to the last known valid values.
   184      Reverts divertItemData data to the last known valid values.
   177      */
   185      */
   178     void revertItemData(PsCallDivertingCondition condition);
   186     void revertItemData(
   179 
   187             PsServiceGroup serviceGroup, PsCallDivertingCondition condition);
       
   188 
       
   189     /**
       
   190      Helper function which fetches model item according service and condition.
       
   191      */
       
   192     CpSettingFormItemData* item(
       
   193             PsService service, PsCallDivertingCondition condition);
   180 private:
   194 private:
   181     
   195     
   182     /**
   196     /**
   183      Creates dialog with default parameters
   197      Creates dialog with default parameters
   184      */
   198      */
   198 
   212 
   199     /**
   213     /**
   200      Synchronizes content and status of divert options dependent from the 
   214      Synchronizes content and status of divert options dependent from the 
   201      status of some other divert.
   215      status of some other divert.
   202      */
   216      */
   203     void updateDependentDivertOptions();
   217     void updateDependentDivertOptions(bool fetchFromNetwork = false);
       
   218     void activateDependentDivertOption(CpDivertItemData* item, bool fetchFromNetwork);
       
   219     void deActivateDependentDivertOption(CpDivertItemData* item) const;
   204     
   220     
   205     /**
   221     /**
   206      Synchronizes content and status of not available divert option based on
   222      Synchronizes content and status of not available divert option based on
   207      statuses of CFB, CFNry and CFNrc.
   223      statuses of CFB, CFNry and CFNrc.
   208      */
   224      */
   216     
   232     
   217     // Not own
   233     // Not own
   218     PSetCallDivertingWrapper* m_callDivertingWrapper;
   234     PSetCallDivertingWrapper* m_callDivertingWrapper;
   219 
   235 
   220     // Not owned objects
   236     // Not owned objects
   221     CpSettingFormItemData *m_csVoiceCallPage;
   237     CpDivertItemData *m_DataItemVoiceAllCalls;
   222     CpDivertItemData *m_DataItemAllVoiceCalls;
   238     CpDivertItemData *m_DataItemVoiceIfBusy;
   223     CpDivertItemData *m_DataItemIfBusy;
   239     CpDivertItemData *m_DataItemVoiceIfNotAnswered;
   224     CpDivertItemData *m_DataItemIfNotAnswered;
   240     CpDivertItemData *m_DataItemVoiceIfOutOfReach;
   225     CpDivertItemData *m_DataItemIfOutOfReach;
   241     CpDivertItemData *m_DataItemVoiceIfNotAvailable;
   226     CpDivertItemData *m_DataItemIfNotAvailable;
   242     
       
   243     CpDivertItemData *m_DataItemVideoAllCalls;
       
   244     CpDivertItemData *m_DataItemVideoIfBusy;
       
   245     CpDivertItemData *m_DataItemVideoIfNotAnswered;
       
   246     CpDivertItemData *m_DataItemVideoIfOutOfReach;
       
   247     CpDivertItemData *m_DataItemVideoIfNotAvailable;
       
   248     
   227     int m_activeNoteId;
   249     int m_activeNoteId;
   228     int m_activeProgressNoteId;
   250     int m_activeProgressNoteId;
   229 
   251 
   230     // To prevent adding vmbx number to defaultlist
   252     // To prevent adding vmbx number to defaultlist
   231     bool m_divertToVoiceMailBox;
   253     bool m_divertToVoiceMailBox;