phoneapp/phoneuicontrol/src/cphoneaccessorybthandler.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
child 81 c26cc2a7c548
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
    20 #include    <featmgr.h>
    20 #include    <featmgr.h>
    21 #include    <StringLoader.h>
    21 #include    <StringLoader.h>
    22 #include    <btengdomainpskeys.h>
    22 #include    <btengdomainpskeys.h>
    23 #include    <btengdomaincrkeys.h>
    23 #include    <btengdomaincrkeys.h>
    24 #include    <mpeengineinfo.h>
    24 #include    <mpeengineinfo.h>
       
    25 #include    <AknNotifyStd.h>
    25 
    26 
    26 #include    "cphoneaccessorybthandler.h"
    27 #include    "cphoneaccessorybthandler.h"
    27 #include    "cphonecenrepproxy.h"
    28 #include    "cphonecenrepproxy.h"
    28 #include    "cphonemainresourceresolver.h"
    29 #include    "cphonemainresourceresolver.h"
    29 #include    "mphoneneclearedhandler.h"
    30 #include    "mphoneneclearedhandler.h"
    32 #include    "phoneconstants.h"
    33 #include    "phoneconstants.h"
    33 #include    "phonelogger.h"
    34 #include    "phonelogger.h"
    34 #include    "phoneui.pan"
    35 #include    "phoneui.pan"
    35 #include    "phonerssbase.h"
    36 #include    "phonerssbase.h"
    36 #include    "tphonecmdparamnote.h"
    37 #include    "tphonecmdparamnote.h"
       
    38 #include    "tphonecmdparamglobalnote.h"
       
    39 
    37 
    40 
    38 // CONSTANTS
    41 // CONSTANTS
    39 
    42 
    40 const TInt KPhoneBtAddressTextLength = 64;
    43 const TInt KPhoneBtAddressTextLength = 64;
    41 
    44 
    72 // CPhoneAccessoryBTHandler::~CPhoneAccessoryBTHandler
    75 // CPhoneAccessoryBTHandler::~CPhoneAccessoryBTHandler
    73 // -----------------------------------------------------------------------------
    76 // -----------------------------------------------------------------------------
    74 //
    77 //
    75 CPhoneAccessoryBTHandler::~CPhoneAccessoryBTHandler()
    78 CPhoneAccessoryBTHandler::~CPhoneAccessoryBTHandler()
    76     {
    79     {
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------
       
    83 // CPhoneAccessoryBTHandler::SetBTDebugModeL
       
    84 // Handling for message EPEMessageBTDebugMode.
       
    85 // Sets BT debug mode PS key on.
       
    86 // -----------------------------------------------------------
       
    87 //
       
    88 void CPhoneAccessoryBTHandler::SetBTDebugModeL()
       
    89     {
       
    90     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneAccessoryBTHandler::SetBTDebugModeL( ) ");
       
    91     if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) )
       
    92         {
       
    93         iViewCommandHandle->ExecuteCommandL( EPhoneViewClearNumberEntryContent );                      
       
    94         }
       
    95     else
       
    96         {
       
    97         // Remove number entry from screen
       
    98         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );   
       
    99         }
       
   100     iNEClearedHandler->HandleNumberEntryClearedL();
       
   101     if ( RProperty::Set( KPSUidBluetoothDutMode, KBTSspDebugmode, EBTSspDebugModeOn ))
       
   102         {
       
   103         __PHONELOG( EOnlyFatal, EPhoneControl, "CPhoneAccessoryBTHandler::SetBTDebugModeL PS key not defined" );
       
   104         }
    77     }
   105     }
    78 
   106 
    79 // ---------------------------------------------------------
   107 // ---------------------------------------------------------
    80 // CPhoneAccessoryBTHandler::SetBTHandsfreeModeL
   108 // CPhoneAccessoryBTHandler::SetBTHandsfreeModeL
    81 // ---------------------------------------------------------
   109 // ---------------------------------------------------------
   208 // Shows BT activated note.
   236 // Shows BT activated note.
   209 // -----------------------------------------------------------
   237 // -----------------------------------------------------------
   210 //
   238 //
   211 void CPhoneAccessoryBTHandler::ShowBTActivatedL()
   239 void CPhoneAccessoryBTHandler::ShowBTActivatedL()
   212     {
   240     {
   213     // Get localised text 
   241  
   214     HBufC* buf = StringLoader::LoadLC( 
   242     TPhoneCmdParamGlobalNote globalNoteParam;
   215             CPhoneMainResourceResolver::Instance()->
   243     globalNoteParam.SetType( EAknGlobalInformationNote );
   216             ResolveResourceID( EPhoneInfoBTAccActivated ) );
   244     globalNoteParam.SetTone( EAvkonSIDNoSound );
   217     
   245 
   218     TPhoneCmdParamNote noteParam;
   246     globalNoteParam.SetTextResourceId( 
   219     noteParam.SetType( EPhoneNoteConfirmation );
   247         CPhoneMainResourceResolver::Instance()->
   220     noteParam.SetText( *buf );
   248         ResolveResourceID( EPhoneInfoBTAccActivated ) );
   221 
   249 		
   222     // Display note
   250     // Display note
   223     iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, &noteParam );
   251     iViewCommandHandle->ExecuteCommandL( 
   224     CleanupStack::PopAndDestroy( buf );
   252         EPhoneViewShowGlobalNote, &globalNoteParam );   
   225     }
   253     }
   226 
   254 
   227 // ---------------------------------------------------------
   255 // ---------------------------------------------------------
   228 // CPhoneAccessoryBTHandler::DoSetHandsfreeModeL
   256 // CPhoneAccessoryBTHandler::DoSetHandsfreeModeL
   229 // ---------------------------------------------------------
   257 // ---------------------------------------------------------