usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp
changeset 35 9d8b04ca6939
child 38 218231f2b3b3
equal deleted inserted replaced
34:7858bc6ead78 35:9d8b04ca6939
       
     1 /*
       
     2 * Copyright (c) 2002-2010 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:  This implements UsbActivePersonalityHandler class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <etelmm.h>             // for fetching the IMEI code
       
    21 #include <mmtsy_names.h>        // for RTelServer names
       
    22 #include <UsbWatcherInternalCRKeys.h>
       
    23 #include <cusbpersonalitynotifier.h>
       
    24 #include <cusbpersonalityplugin.h>
       
    25 #include <tusbpersonalityparams.h>
       
    26 #include <startupdomainpskeys.h> //for global system state
       
    27 #include "cusbactivepersonalityhandler.h"
       
    28 #include "cusbglobalsystemstateobserver.h"
       
    29 #include <usbuinotif.h>
       
    30 
       
    31 // CONSTANTS
       
    32 const TInt KSerialNumberLength = 12;
       
    33 
       
    34 const TUid KUsbmanSvrUid = {0x101fe1db};
       
    35 
       
    36 // ============================ MEMBER FUNCTIONS ==============================
       
    37 
       
    38 // ----------------------------------------------------------------------------
       
    39 // C++ default constructor can NOT contain any code, that might leave.
       
    40 // ----------------------------------------------------------------------------
       
    41 //
       
    42 CUsbActivePersonalityHandler::CUsbActivePersonalityHandler(
       
    43     RUsb& aUsbMan, CUsbWatcher& aOwner )
       
    44     : CActive( EPriorityStandard )
       
    45     , iUsbMan( aUsbMan )
       
    46     , iOwner( aOwner )
       
    47     , isFailureCleanup( EFalse )
       
    48     {
       
    49     CActiveScheduler::Add( this );
       
    50     }
       
    51 
       
    52 // ----------------------------------------------------------------------------
       
    53 // Symbian 2nd phase constructor can leave.
       
    54 // ----------------------------------------------------------------------------
       
    55 //
       
    56 void CUsbActivePersonalityHandler::ConstructL()
       
    57     {
       
    58     LOG_FUNC
       
    59 
       
    60     iPersonalityNotifier = CUsbPersonalityNotifier::NewL();
       
    61     iPersonalityParams = new ( ELeave ) TUsbPersonalityParams( iUsbMan,
       
    62             *iPersonalityNotifier );
       
    63 
       
    64     ConstructUsbSerialNumberL();
       
    65     }
       
    66 
       
    67 // ----------------------------------------------------------------------------
       
    68 // Two-phased constructor.
       
    69 // ----------------------------------------------------------------------------
       
    70 //
       
    71 CUsbActivePersonalityHandler* CUsbActivePersonalityHandler::NewL(
       
    72         RUsb& aUsbMan, CUsbWatcher& aOwner )
       
    73     {
       
    74     LOG_FUNC
       
    75 
       
    76     CUsbActivePersonalityHandler* self = new ( ELeave )
       
    77             CUsbActivePersonalityHandler( aUsbMan, aOwner );
       
    78     CleanupStack::PushL( self );
       
    79     self->ConstructL();
       
    80     CleanupStack::Pop(); // pop self
       
    81     return self;
       
    82     }
       
    83 
       
    84 // Destructor
       
    85 CUsbActivePersonalityHandler::~CUsbActivePersonalityHandler()
       
    86     {
       
    87     LOG_FUNC
       
    88 
       
    89     Cancel(); // cancel any outstanding requests
       
    90 
       
    91     delete iCurrentPersonalityHandler;
       
    92     delete iPersonalityNotifier;
       
    93     delete iPersonalityParams;
       
    94     }
       
    95 
       
    96 // ----------------------------------------------------------------------------
       
    97 // Construct USB serial number. Some of the personalities may need this.
       
    98 // ----------------------------------------------------------------------------
       
    99 //
       
   100 void CUsbActivePersonalityHandler::ConstructUsbSerialNumberL()
       
   101     {
       
   102     LOG_FUNC
       
   103 
       
   104     RTelServer telServer;
       
   105     RMobilePhone phone;
       
   106 
       
   107     LEAVEIFERROR( telServer.Connect() );
       
   108     CleanupClosePushL( telServer );
       
   109 
       
   110     LEAVEIFERROR( telServer.LoadPhoneModule( KMmTsyModuleName ) );
       
   111 
       
   112     LEAVEIFERROR( phone.Open( telServer, KMmTsyPhoneName ) );
       
   113     CleanupClosePushL( phone );
       
   114 
       
   115     // to store the serial number to be published as the USB device's serial
       
   116     // number, fetch it from telephony server.
       
   117     TRequestStatus status;
       
   118     phone.GetPhoneId( status, iPhoneInfo );
       
   119     User::WaitForRequest( status );
       
   120 
       
   121     // make sure that the serial number fulfills USB requirements and then
       
   122     // convert the serial number so that it can be printed to log
       
   123     TLex lex( iPhoneInfo.iSerialNumber );
       
   124     TInt length = iPhoneInfo.iSerialNumber.Length();
       
   125 
       
   126     if( length < KSerialNumberLength )
       
   127         {
       
   128         // In GSM, the complete IMEI can be used as USB serial
       
   129         // number. But in CDMA, the ESN is too short for a valid Mass
       
   130         // Storage serial number (Mass-Storage and Bulk Only Transport
       
   131         // specs both require minimum 12 byte number), so it is
       
   132         // extended with trailing zeroes. When doing this, make sure
       
   133         // not to write anything over descriptor's max length
       
   134         if( iPhoneInfo.iSerialNumber.MaxLength() < KSerialNumberLength )
       
   135             {
       
   136             iPhoneInfo.iSerialNumber.SetLength( KSerialNumberLength );
       
   137             }
       
   138         while( length < KSerialNumberLength )
       
   139             {
       
   140             iPhoneInfo.iSerialNumber.Append( '0' );
       
   141             ++length;
       
   142             }
       
   143         }
       
   144 
       
   145     CleanupStack::PopAndDestroy( 2, &telServer );
       
   146     }
       
   147 
       
   148 // ----------------------------------------------------------------------------
       
   149 // Confirm that personality can be loaded.
       
   150 // ----------------------------------------------------------------------------
       
   151 //
       
   152 void CUsbActivePersonalityHandler::ConfirmPersonalityUnload( TRequestStatus&
       
   153         aStatus )
       
   154     {
       
   155     LOG_FUNC
       
   156 
       
   157     aStatus = KRequestPending;
       
   158     iRequestStatus = &aStatus;
       
   159 
       
   160     if( iState != EUsbPersonalityStarted )
       
   161         {
       
   162         TRequestStatus* status = &iStatus;
       
   163         SetActive();
       
   164         User::RequestComplete( status, KErrGeneral );
       
   165         return;
       
   166         }
       
   167 
       
   168     // Cancel all notes before confirmation
       
   169     iPersonalityParams->PersonalityNotifier().CancelAll();
       
   170 
       
   171     if( iCurrentPersonalityHandler )
       
   172         {
       
   173         iCurrentPersonalityHandler->ConfirmPersonalityUnload( iStatus );
       
   174         SetActive();
       
   175         }
       
   176     else
       
   177         {
       
   178         TRequestStatus* status = &iStatus;
       
   179         SetActive();
       
   180         User::RequestComplete( status, KErrNone );
       
   181         }
       
   182     }
       
   183 
       
   184 // ----------------------------------------------------------------------------
       
   185 // Start personality.
       
   186 // ----------------------------------------------------------------------------
       
   187 //
       
   188 void CUsbActivePersonalityHandler::StartPersonality( TInt& aPersonalityId,
       
   189         TInt aAskOnConnectionSetting, TRequestStatus& aStatus )
       
   190     {
       
   191     LOG_FUNC
       
   192 
       
   193     LOG2( "PersonalityId = %d, AskOnConnectionSetting = %d", aPersonalityId,
       
   194             aAskOnConnectionSetting );
       
   195 
       
   196     // Remove all notes.
       
   197     iPersonalityNotifier->CancelAll();
       
   198      
       
   199 
       
   200     iPersonalityId = &aPersonalityId;
       
   201     iAskOnConnectionSetting = aAskOnConnectionSetting;
       
   202     aStatus = KRequestPending;
       
   203     iRequestStatus = &aStatus;
       
   204 
       
   205     // prepare current personality for start and return
       
   206     if( iCurrentPersonalityHandler )
       
   207         {
       
   208         LOG( "Previous PersonalityHandler not deleted" );
       
   209         User::RequestComplete( iRequestStatus, KErrGeneral );
       
   210         return;
       
   211         }
       
   212 
       
   213     TRAPD( ret, ( iCurrentPersonalityHandler = NewPersonalityHandlerL(
       
   214             *iPersonalityId ) ) );
       
   215 
       
   216     if( ( ret == KErrNone) && iCurrentPersonalityHandler )
       
   217         {
       
   218         LOG( "PersonalityHandler created" );
       
   219         iCurrentPersonalityHandler->PreparePersonalityStart( iStatus );
       
   220         iState = EUsbPersonalityPrepareStart;
       
   221         isFailureCleanup = EFalse;
       
   222         SetActive();
       
   223         }
       
   224     else
       
   225         {
       
   226         LOG( "Error: PersonalityHandler create failed" );
       
   227         User::RequestComplete( iRequestStatus, KErrGeneral );
       
   228         }
       
   229     }
       
   230 
       
   231 // ----------------------------------------------------------------------------
       
   232 // Stop current personality.
       
   233 // ----------------------------------------------------------------------------
       
   234 //
       
   235 void CUsbActivePersonalityHandler::StopPersonality( TRequestStatus& aStatus )
       
   236     {
       
   237     LOG_FUNC
       
   238 
       
   239     aStatus = KRequestPending;
       
   240     iRequestStatus = &aStatus;
       
   241 
       
   242     iState = EUsbPersonalityPrepareStop;
       
   243     isFailureCleanup = EFalse;
       
   244     
       
   245     // prepare current personality for stop and return
       
   246     if( iCurrentPersonalityHandler )
       
   247         {
       
   248         LOG( "Call PersonalityPlugin to prepare stop" );
       
   249         iCurrentPersonalityHandler->PreparePersonalityStop( iStatus );
       
   250         SetActive();
       
   251         }
       
   252     else
       
   253         {
       
   254         LOG( "No current PersonalityPlugin, return immediately" );
       
   255         TRequestStatus* status = &iStatus;
       
   256         SetActive();
       
   257         User::RequestComplete( status, KErrNone );
       
   258         }
       
   259     }
       
   260 
       
   261 // ----------------------------------------------------------------------------
       
   262 // Indicates USB device state change to personality when USB is started.
       
   263 // ----------------------------------------------------------------------------
       
   264 //
       
   265 void CUsbActivePersonalityHandler::StateChangeNotify(
       
   266         TUsbDeviceState aStateOld, TUsbDeviceState aStateNew )
       
   267     {
       
   268     LOG_FUNC
       
   269 
       
   270     iDeviceState = aStateNew;        
       
   271     switch ( aStateNew )
       
   272         {
       
   273         case EUsbDeviceStateAddress:
       
   274             {
       
   275             if( iAskOnConnectionSetting &&
       
   276                     ( aStateOld != EUsbDeviceStateSuspended ) &&
       
   277                     ( aStateOld != EUsbDeviceStateConfigured ) 
       
   278                      )
       
   279                 {
       
   280                 iPersonalityParams->PersonalityNotifier().ShowQuery(
       
   281                         KCableConnectedNotifierUid, iDummy,
       
   282                         iPersonalityPckgBuf);
       
   283                 }
       
   284             break;
       
   285             }
       
   286 		case EUsbDeviceStateUndefined:
       
   287             {
       
   288             iPersonalityNotifier->CancelQuery(KQueriesNotifier);
       
   289             break;
       
   290 			}
       
   291        default:
       
   292             // We do not handle other state here
       
   293 			LOG( "DeviceStatechange ignored by ActivePersonalityhandler or EUsbDeviceStateConfigured" );
       
   294             break;
       
   295         }
       
   296 
       
   297     if( iCurrentPersonalityHandler )
       
   298         {
       
   299         LOG( "Notifying PersonalityPlugin of the new state" );
       
   300         iCurrentPersonalityHandler->StateChangeNotify( aStateNew );
       
   301         }
       
   302     }
       
   303 
       
   304 // ----------------------------------------------------------------------------
       
   305 // Standard active object error function. Handle error and complete
       
   306 // outstanding request. We must not come here.
       
   307 // ----------------------------------------------------------------------------
       
   308 //
       
   309 TInt CUsbActivePersonalityHandler::RunError( TInt aError )
       
   310     {
       
   311     LOG_FUNC
       
   312     
       
   313     LOG2("Returned error: %d, iState: %d", aError, iState);
       
   314 
       
   315     switch ( aError )
       
   316         {
       
   317         case KErrNoMemory:
       
   318             iQueryParams().iQuery = EUSBNotEnoughRam;
       
   319             iPersonalityParams->PersonalityNotifier().ShowQuery(KQueriesNotifier, 
       
   320     	                iQueryParams, iDummyBuf);
       
   321             break;
       
   322         case KErrDiskFull:
       
   323             iQueryParams().iQuery = EUSBDiskFull;
       
   324             iPersonalityParams->PersonalityNotifier().ShowQuery(KQueriesNotifier, 
       
   325     	                iQueryParams, iDummyBuf);
       
   326             break;
       
   327         default:
       
   328         	LOG( "Ignored" );
       
   329         }
       
   330 
       
   331     //only handle error when TryStart fails now
       
   332 	//clean up work to be done in the personality
       
   333     if (iState == EUsbPersonalityStartUsb)
       
   334         {
       
   335         iState = EUsbPersonalityPrepareStop;
       
   336 		isFailureCleanup = ETrue;
       
   337 		
       
   338 	    // prepare current personality for stop and return
       
   339 	    if( iCurrentPersonalityHandler )
       
   340 	        {
       
   341 	        LOG( "Call PersonalityPlugin to prepare stop" );
       
   342 	        iCurrentPersonalityHandler->PreparePersonalityStop( iStatus );
       
   343 	        SetActive();
       
   344 	        }
       
   345 	    else
       
   346 	    	{    
       
   347             LOG( "No current PersonalityPlugin" );
       
   348             }
       
   349 
       
   350         //complete StartPersonality with aError
       
   351         User::RequestComplete( iRequestStatus, aError );
       
   352         }
       
   353     else
       
   354         {
       
   355 	    LOG( "Ignore error in other states" );
       
   356         }
       
   357 
       
   358     return KErrNone;
       
   359     }
       
   360 
       
   361 // ----------------------------------------------------------------------------
       
   362 // Executed when iStatus is completed.
       
   363 // ----------------------------------------------------------------------------
       
   364 //
       
   365 void CUsbActivePersonalityHandler::RunL()
       
   366     {
       
   367     LOG_FUNC
       
   368 
       
   369     TInt ret = iStatus.Int();
       
   370     
       
   371     LOG2( "CUsbActivePersonalityHandler::RunL iStatus = %d, iState = %d", ret, iState );
       
   372 
       
   373     switch( iState )
       
   374         {
       
   375         case EUsbPersonalityIdle:
       
   376             break;
       
   377 
       
   378         case EUsbPersonalityPrepareStart:
       
   379             {
       
   380             LOG( "EUsbPersonalityPrepareStart" );
       
   381             // then write the serial number to P&S for USB Manager
       
   382             PublishSerialNumber();
       
   383             iUsbMan.TryStart( *iPersonalityId, iStatus );
       
   384             iState = EUsbPersonalityStartUsb;
       
   385             SetActive();
       
   386             }
       
   387             break;
       
   388 
       
   389         case EUsbPersonalityStartUsb:
       
   390             LEAVEIFERROR( ret );
       
   391             LOG( "EUsbPersonalityStartUsb" );
       
   392             iState = EUsbPersonalityFinishStart;
       
   393             if( iCurrentPersonalityHandler )
       
   394                 {
       
   395                 iCurrentPersonalityHandler->FinishPersonalityStart( iStatus );
       
   396                 SetActive();
       
   397                 }
       
   398             else
       
   399                 {
       
   400                 TRequestStatus* status = &iStatus;
       
   401                 SetActive();
       
   402                 User::RequestComplete( status, KErrNone );
       
   403                 }
       
   404             break;
       
   405 
       
   406         case EUsbPersonalityFinishStart:
       
   407             LOG( "EUsbPersonalityFinishStart" );
       
   408             User::RequestComplete( iRequestStatus, ret );
       
   409             iState = EUsbPersonalityStarted;
       
   410             break;
       
   411 
       
   412         case EUsbPersonalityPrepareStop:
       
   413             LOG( "EUsbPersonalityPrepareStop" );
       
   414             iUsbMan.TryStop( iStatus );
       
   415             iState = EUsbPersonalityStopUsb;
       
   416             SetActive();
       
   417             break;
       
   418 
       
   419         case EUsbPersonalityStopUsb:
       
   420             LOG( "EUsbPersonalityStopUsb" );
       
   421             iState = EUsbPersonalityFinishStop;
       
   422             if( iCurrentPersonalityHandler )
       
   423                 {
       
   424                 iCurrentPersonalityHandler->FinishPersonalityStop( iStatus );
       
   425                 SetActive();
       
   426                 }
       
   427             else
       
   428                 {
       
   429                 TRequestStatus* status = &iStatus;
       
   430                 SetActive();
       
   431                 User::RequestComplete( status, KErrNone );
       
   432                 }
       
   433             break;
       
   434 
       
   435         case EUsbPersonalityFinishStop:
       
   436             LOG( "EUsbPersonalityFinishStop" );
       
   437 
       
   438             delete iCurrentPersonalityHandler;
       
   439             iCurrentPersonalityHandler = NULL;
       
   440 
       
   441             //iAskOnConnectionSetting may be have been set to off
       
   442             if ( iDeviceState == EUsbDeviceStateUndefined )
       
   443                 {
       
   444 	            iPersonalityParams->PersonalityNotifier().CancelQuery(
       
   445 	                    KCableConnectedNotifierUid );
       
   446                 }
       
   447             //the request should be completed with error code in RunError if failed
       
   448             if ( !isFailureCleanup )
       
   449                 {
       
   450                 User::RequestComplete( iRequestStatus, ret );
       
   451                 }
       
   452             
       
   453             iState = EUsbPersonalityIdle;
       
   454             break;
       
   455 
       
   456         case EUsbPersonalityStarted:
       
   457             // This must unload event. Let's complete.
       
   458             User::RequestComplete( iRequestStatus, ret );
       
   459             break;
       
   460 
       
   461         default:
       
   462             LOG( "ERROR: unexpected state" );
       
   463             PANIC( KErrGeneral );
       
   464             break;
       
   465         }
       
   466     }
       
   467 
       
   468 // ----------------------------------------------------------------------------
       
   469 // Standard active object cancellation function.
       
   470 // ----------------------------------------------------------------------------
       
   471 //
       
   472 void CUsbActivePersonalityHandler::DoCancel()
       
   473     {
       
   474     LOG_FUNC
       
   475 
       
   476     LOG1( "CUsbActivePersonalityHandler::iState = %d", iState );
       
   477     switch( iState )
       
   478         {
       
   479         case EUsbPersonalityFinishStart:
       
   480             {
       
   481             TRequestStatus status;
       
   482 
       
   483             iUsbMan.TryStop( status );
       
   484             SetActive();
       
   485             User::WaitForRequest( status );
       
   486             }
       
   487             // Don't break. We need to cancel outstanding request.
       
   488 
       
   489         case EUsbPersonalityStarted:
       
   490         case EUsbPersonalityPrepareStop:
       
   491         case EUsbPersonalityFinishStop:
       
   492             if( iCurrentPersonalityHandler )
       
   493                 {
       
   494                 iCurrentPersonalityHandler->Cancel();
       
   495                 }
       
   496             break;
       
   497 
       
   498         case EUsbPersonalityStopUsb:
       
   499             iUsbMan.CancelInterest( RUsb::ETryStop );
       
   500             break;
       
   501 
       
   502         case EUsbPersonalityStartUsb:
       
   503             iUsbMan.StartCancel();
       
   504             break;
       
   505 
       
   506         default:
       
   507             break;
       
   508         }
       
   509 
       
   510     if( iCurrentPersonalityHandler && ( iState != EUsbPersonalityStarted ) )
       
   511         {
       
   512         delete iCurrentPersonalityHandler;
       
   513         iCurrentPersonalityHandler = NULL;
       
   514         }
       
   515 
       
   516     // if started then this must unload confirmation
       
   517     if( iState != EUsbPersonalityStarted )
       
   518         {
       
   519         iState = EUsbPersonalityIdle;
       
   520         }
       
   521 
       
   522     // When cancel happens it means that we can cancel all queries & notes
       
   523     iPersonalityParams->PersonalityNotifier().CancelAll();
       
   524 
       
   525     User::RequestComplete( iRequestStatus, KErrCancel );
       
   526     }
       
   527 
       
   528 // ----------------------------------------------------------------------------
       
   529 // Creates and returns a class handler object for the given personality.
       
   530 // ----------------------------------------------------------------------------
       
   531 //
       
   532 CUsbPersonality* CUsbActivePersonalityHandler::NewPersonalityHandlerL(
       
   533         TInt aPersonality )
       
   534     {
       
   535     LOG_FUNC
       
   536 
       
   537     TInt personalityCount = iOwner.Personalities().Count();
       
   538 
       
   539     for (TInt i = 0; i < personalityCount; i++)
       
   540         {
       
   541         const TUsbSupportedPersonalityInf& pinf = iOwner.Personalities()[i];
       
   542         if( pinf.iPersonalityId == aPersonality )
       
   543             {
       
   544             iPersonalityParams->SetPersonalityId( aPersonality );
       
   545             CUsbPersonalityPlugin* plugin = CUsbPersonalityPlugin::NewL(
       
   546                     *iPersonalityParams, pinf.iPersonalityUid );
       
   547             iUseSerialNumber = pinf.iUseSerialNumber;
       
   548             return plugin;
       
   549             }
       
   550         }
       
   551 
       
   552     return NULL;
       
   553     }
       
   554 
       
   555 // ----------------------------------------------------------------------------
       
   556 // Publish serial number for USB Manager, if needed.
       
   557 // ----------------------------------------------------------------------------
       
   558 //
       
   559 TInt CUsbActivePersonalityHandler::PublishSerialNumber()
       
   560     {
       
   561     LOG_FUNC
       
   562 
       
   563     TInt err = KErrNone;
       
   564 
       
   565     if( !iUseSerialNumber && iSerialNumberWritten )
       
   566         {
       
   567         // We are either in test mode or going to start up PC Suite
       
   568         // personality -> delete USB Manager's serial number P&S key
       
   569         // (if necessary)
       
   570         LOG( "Deleting published USB serial number" );
       
   571         err = RProperty::Delete( KUidSystemCategory, KUsbmanSvrUid.iUid );
       
   572         iSerialNumberWritten = EFalse;
       
   573         }
       
   574     else if( iUseSerialNumber && !iSerialNumberWritten )
       
   575         {
       
   576         // to finish, define and write the serial number P&S so that USB
       
   577         // Manager can fetch it
       
   578         _LIT_SECURITY_POLICY_PASS( KAPReadPolicy );
       
   579         _LIT_SECURITY_POLICY_PASS( KAPWritePolicy );
       
   580 
       
   581         err = RProperty::Define( KUidSystemCategory, KUsbmanSvrUid.iUid,
       
   582                 RProperty::EText, KAPReadPolicy, KAPWritePolicy,
       
   583                 KUsbStringDescStringMaxSize );
       
   584 
       
   585         if( !err )
       
   586             {
       
   587             err = RProperty::Set( KUidSystemCategory, KUsbmanSvrUid.iUid,
       
   588                     iPhoneInfo.iSerialNumber );
       
   589             iSerialNumberWritten = ( err == KErrNone );
       
   590             }
       
   591         }
       
   592 
       
   593     LOG1(" ret = %d", err );
       
   594 
       
   595     return err;
       
   596     }
       
   597 
       
   598 // ----------------------------------------------------------------------------
       
   599 // Cancel cable connected notifier
       
   600 // ----------------------------------------------------------------------------
       
   601 //
       
   602 void CUsbActivePersonalityHandler::CancelCableConnectedNotifier()
       
   603     {
       
   604     LOG_FUNC
       
   605 
       
   606     iPersonalityParams->PersonalityNotifier().CancelQuery(
       
   607             KCableConnectedNotifierUid );
       
   608     }
       
   609 
       
   610 // End of file