cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper_p.cpp
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 #include "psetcliwrapper_p.h"
       
    19 #include "psetcliwrapper.h"
       
    20 #include "psetwrappertypes.h"
       
    21 #include "logging.h"
       
    22 #include <rsssettings.h>
       
    23 #include <psetcontainer.h>
       
    24 #include <psetcli.h>
       
    25 
       
    26 /*!
       
    27   PSetCliWrapperPrivate::PSetCliWrapperPrivate
       
    28  */
       
    29 PSetCliWrapperPrivate::PSetCliWrapperPrivate(
       
    30         PSetCliWrapper &owner) :
       
    31     m_Owner(owner)
       
    32 {
       
    33     DPRINT;
       
    34 }
       
    35 
       
    36 /*!
       
    37   PSetCliWrapperPrivate::~PSetCliWrapperPrivate
       
    38  */
       
    39 PSetCliWrapperPrivate::~PSetCliWrapperPrivate()
       
    40 {
       
    41     DPRINT;
       
    42 }
       
    43 
       
    44 // --------  Observer interface  --------- // 
       
    45 /*!
       
    46   PSetCliWrapperPrivate::SetEngineContact
       
    47  */
       
    48 void PSetCliWrapperPrivate::SetEngineContact(MPsetCli* aEngine)
       
    49 {
       
    50     DPRINT << "aEngine: " << aEngine;
       
    51 }
       
    52 
       
    53 /*!
       
    54   PSetCliWrapperPrivate::HandleCliRequestingL
       
    55  */
       
    56 void PSetCliWrapperPrivate::HandleCliRequestingL(TBool aOngoing,
       
    57         TBool aInterrupted)
       
    58 {
       
    59     DPRINT << "aOngoing: " << aOngoing
       
    60         << " aInterrupted: " << aInterrupted;
       
    61 
       
    62     QT_TRYCATCH_LEAVING(
       
    63         emit m_Owner.handleCliRequesting(static_cast<bool>(aOngoing),
       
    64                 static_cast<bool> (aInterrupted));
       
    65     )
       
    66 }
       
    67 
       
    68 /*!
       
    69   PSetCliWrapperPrivate::CliInformationL
       
    70  */
       
    71 void PSetCliWrapperPrivate::CliInformationL(TPsuiCli aType)
       
    72 {
       
    73     DPRINT << "aType: " << aType;
       
    74     
       
    75     QT_TRYCATCH_LEAVING(
       
    76         emit m_Owner.cliInformation(static_cast<PsCallLineIdentity>(aType));
       
    77     )
       
    78 }
       
    79 
       
    80 /*!
       
    81   PSetCliWrapperPrivate::HandleCliStatusL
       
    82  */
       
    83 void PSetCliWrapperPrivate::HandleCliStatusL(
       
    84         TUint8 aBsc[KPSetNumberOfBsc], TPsuiCli aMode)
       
    85 {
       
    86     DPRINT << "aBsc[0]: " << aBsc[0]
       
    87             << " aMode: " << aMode;
       
    88     
       
    89     QT_TRYCATCH_LEAVING(
       
    90         emit m_Owner.handleCliStatus(static_cast<unsigned char *>(aBsc),
       
    91             KPSetNumberOfBsc, static_cast<PsCallLineIdentity> (aMode));
       
    92     )
       
    93 }
       
    94 
       
    95 /*!
       
    96   PSetCliWrapperPrivate::HandleCnapStatusL
       
    97  */
       
    98 void PSetCliWrapperPrivate::HandleCnapStatusL(TInt aStatus)
       
    99 {
       
   100     DPRINT << "aStatus: " << aStatus;
       
   101     
       
   102     QT_TRYCATCH_LEAVING(
       
   103         emit m_Owner.handleCnapStatus(aStatus);
       
   104     )
       
   105 }
       
   106 
       
   107 /*!
       
   108   PSetCliWrapperPrivate::HandleCliErrorL
       
   109  */
       
   110 void PSetCliWrapperPrivate::HandleCliErrorL(TInt aError)
       
   111 {
       
   112     DPRINT << "aError: " << aError;
       
   113     
       
   114     QT_TRYCATCH_LEAVING(
       
   115         emit m_Owner.handleCliError(aError);
       
   116     )
       
   117 }
       
   118 
       
   119 // End of File.