cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper_p.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     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 DIVERTINGOBSERVER_H_
       
    19 #define DIVERTINGOBSERVER_H_
       
    20 
       
    21 #include <mpsetdivertobs.h>
       
    22 #include <mphcltemergencycallobserver.h>
       
    23 #include <mpsetrequestobs.h>
       
    24 #include <voicemailboxdefs.h>
       
    25 #include "psetcalldivertingwrapper.h"
       
    26 #include "psetwrappertypes.h"
       
    27 
       
    28 class PSetCallDivertingWrapperPrivate : 
       
    29         public MPsetDivertObserver,
       
    30         public MPhCltEmergencyCallObserver,
       
    31         public MPsetRequestObserver
       
    32 {
       
    33 public:
       
    34     PSetCallDivertingWrapperPrivate(PSetCallDivertingWrapper &owner);
       
    35 
       
    36     virtual ~PSetCallDivertingWrapperPrivate();
       
    37 
       
    38 public:
       
    39     // Functions from base classes (observer interface):     
       
    40 
       
    41     /**
       
    42      * Handles showing notes, when diverts change.
       
    43      *
       
    44      * @param aSetting Setting which was changed.
       
    45      * @param aPlural Plural notes to be used.
       
    46      */
       
    47     void HandleDivertingChangedL(const TCallDivertSetting& aSetting,
       
    48             TBool aPlural);
       
    49 
       
    50     /**
       
    51      * Handles showing of status inquiry notes.
       
    52      *
       
    53      * @param aBsc List of basic services.
       
    54      * @param aSetting Divert setting which was queried.
       
    55      * @param aPlural Plural notes to be used.
       
    56      */
       
    57 
       
    58     void HandleDivertingStatusL(CMobilePhoneCFList& aSetting, TBool aPlural);
       
    59 
       
    60     /**
       
    61      * Handles showing of error notes.
       
    62      *
       
    63      * @param aReason Reason for diverting error.
       
    64      */
       
    65     void HandleDivertingErrorL(TInt aReason);
       
    66 
       
    67     /**
       
    68      * Handles requesting notes.
       
    69      *
       
    70      * @param aOngoing Is there a request going on.
       
    71      * @param aInterrupted Request needs to immediately cancelled.
       
    72      */
       
    73     void HandleCFRequestingL(TBool aOngoing, TBool aInterrupted);
       
    74 
       
    75     /**
       
    76      * Sets pointer so that message is passed succesfully
       
    77      * from requester to observer.
       
    78      *
       
    79      * @param aDivertEngine Source for the events to observer.
       
    80      */
       
    81     void SetEngineContact(MPsetCallDiverting* aDivertEngine);
       
    82 
       
    83 public:
       
    84     // From MPhCltEmergencyCallObserver   
       
    85 
       
    86     /**
       
    87      * It is called whenever client's dial request is completed.
       
    88      *
       
    89      * @param aStatus error code of the success of the operation.
       
    90      */
       
    91     void HandleEmergencyDialL(const TInt aStatus);
       
    92 
       
    93 public:
       
    94     // From MPsetRequestObserver
       
    95     /**
       
    96     * Informs the receiver that request has been completed.
       
    97     */
       
    98     void RequestComplete();
       
    99 
       
   100     /**
       
   101     * Informs the receiver that request state has changed.
       
   102     * @param new status, or when finished KErrNone or error code.
       
   103     */
       
   104     void RequestStatusChanged( TInt aNewStatus );
       
   105     
       
   106 public:
       
   107     TCallDivertingCondition convert(PsCallDivertingCondition type);
       
   108     TDivertingStatus convert(PsCallDivertingStatus type);
       
   109     TServiceGroup convert(PsServiceGroup type);
       
   110     TDivertingSetting convert(PsCallDivertingSetting type);
       
   111     TVmbxType convert(PsService aService);
       
   112     
       
   113 private:
       
   114     PsCallDivertingCondition convert(TCallDivertingCondition type);
       
   115     PsCallDivertingCondition convert(RMobilePhone::TMobilePhoneCFCondition type);
       
   116     PsCallDivertingStatus convert(TDivertingStatus type);
       
   117     PsCallDivertingStatus convert(RMobilePhone::TMobilePhoneCFStatus type);
       
   118     PsServiceGroup convert(TServiceGroup type);
       
   119     PsServiceGroup convert(RMobilePhone::TMobileService service);
       
   120     
       
   121     
       
   122 private:
       
   123     PSetCallDivertingWrapper &m_Owner;
       
   124 
       
   125     QList<PSCallDivertingStatus*> m_DivertingStatusList;
       
   126 
       
   127     PSCallDivertingCommand m_callDivertingSetting;
       
   128 };
       
   129 
       
   130 #endif /* DIVERTINGOBSERVER_H_ */