201029
authorhgs
Fri, 23 Jul 2010 13:40:58 +0300
changeset 71 173beb545395
parent 62 eadeea68c837
child 74 830546d5951a
201029
usbengines/usbwatcher/conf/usbwatcher.confml
usbengines/usbwatcher/conf/usbwatcher_101F8801.crml
usbengines/usbwatcher/inc/cusbactivepersonalityhandler.h
usbengines/usbwatcher/inc/cusbwatcher.h
usbengines/usbwatcher/inc/cusbwatchersession.h
usbengines/usbwatcher/inc/musbwatchernotify.h
usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp
usbengines/usbwatcher/src/cusbwatcher.cpp
usbengines/usbwatcher/src/cusbwatchersession.cpp
usbuis/usbsettingsapp/src/hblistviewitem.css
usbuis/usbsettingsapp/src/hblistviewitem.widgetml
usbuis/usbuinotif/src/usbnotifier.cpp
Binary file usbengines/usbwatcher/conf/usbwatcher.confml has changed
Binary file usbengines/usbwatcher/conf/usbwatcher_101F8801.crml has changed
--- a/usbengines/usbwatcher/inc/cusbactivepersonalityhandler.h	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbengines/usbwatcher/inc/cusbactivepersonalityhandler.h	Fri Jul 23 13:40:58 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -76,11 +76,10 @@
      *
      * @since Series 60 3.2
      * @param aPersonalityId Identification of the personality to be loaded.
-     * @param aAskOnConnectionSetting When this parameter is ETrue, "ask on connection" query is shown.
      * @param aStatus Used to complete outstanding request.
      */
     void StartPersonality( TInt& aPersonalityId, 
-            TInt aAskOnConnectionSetting, TRequestStatus& aStatus );
+	        TRequestStatus& aStatus );
 
     /**
      * Stop current personality.
@@ -233,11 +232,6 @@
     TInt *iPersonalityId;
     
     /**
-     * Ask on connection is either on (1) or off (0).
-     */    
-    TInt iAskOnConnectionSetting;
-
-    /**
      * When value is ETrue then serial number is written to P&S.
      */            
     TBool iSerialNumberWritten;
--- a/usbengines/usbwatcher/inc/cusbwatcher.h	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbengines/usbwatcher/inc/cusbwatcher.h	Fri Jul 23 13:40:58 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -248,16 +248,6 @@
      */
     void DoCancel();
 
-	/**
-     * Check if there is an observer with ask on connection suppression.
-     * Check if one or more sessions have suppressed the ask on 
-     * connection mode query.
-     *
-     * @since S60 5.0
-     * @return ETrue if suppression found
-     */	
-    TBool IsAskOnConnectionSuppression();
-	
 private:
 
     /**
@@ -362,11 +352,6 @@
     TInt iOldPrevPersonalityId;
     
     /**
-     * Current ask on connection setting
-     */
-    TInt iAskOnConnectionSetting;
-    
-    /**
      * State for USB starting/stoping
      */
     TUsbState iState;
--- a/usbengines/usbwatcher/inc/cusbwatchersession.h	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbengines/usbwatcher/inc/cusbwatchersession.h	Fri Jul 23 13:40:58 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -40,12 +40,6 @@
         
     virtual void Notify(TInt iPersonalityId, TInt aStatus); 
 
-    /**
-     * Check if ask on connection mode query is suppressed in this session.
-     * From MUsbWatcherNotify
-     */
-    virtual TBool IsAskOnConnectionSuppressed();
-    
 protected:
     CUsbWatcherSession(CUsbWatcherServer* aServer);
     void ConstructL();
@@ -66,14 +60,6 @@
     TInt SetPreviousPersonalityOnDisconnect(const RMessage2& aMessage, 
             TBool& aComplete);
 
-    /**
-     * Prevent showing ask on connection mode query in this session.
-     * This affects to the next cable connections. The currently shown
-     * mode query is not closed.
-     * aSuppress ETrue prevents showing the mode query.
-     */
-    void SetAskOnConnectionSuppression(TBool aSuppress);
-
     CUsbWatcherServer* iUsbWatcherServer;
     RMessage2 iSetPersonalityMessage;
     RMessage2 iCancelSetPersonalityMessage;
@@ -84,7 +70,6 @@
 
     TBool iSetPreviousPersonalityOutstanding;
     TBool iCancelSetPreviousPersonalityOutstanding;
-    TBool iSuppressAskOnConnection; // Prevent ask on connection mode query 
     };
 
 #endif
--- a/usbengines/usbwatcher/inc/musbwatchernotify.h	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbengines/usbwatcher/inc/musbwatchernotify.h	Fri Jul 23 13:40:58 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -24,10 +24,6 @@
 public:
     virtual void Notify( TInt aPersonalityId, TInt aStatus ) = 0;  
 
-    /**
-     * Check if ask on connection mode query is suppressed in this session.
-     */
-    virtual TBool IsAskOnConnectionSuppressed() = 0;
     };
 
 #endif
--- a/usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp	Fri Jul 23 13:40:58 2010 +0300
@@ -186,19 +186,17 @@
 // ----------------------------------------------------------------------------
 //
 void CUsbActivePersonalityHandler::StartPersonality( TInt& aPersonalityId,
-        TInt aAskOnConnectionSetting, TRequestStatus& aStatus )
+        TRequestStatus& aStatus )
     {
     LOG_FUNC
 
-    LOG2( "PersonalityId = %d, AskOnConnectionSetting = %d", aPersonalityId,
-            aAskOnConnectionSetting );
+    LOG1( "PersonalityId = %d ", aPersonalityId);
 
     // Remove all notes.
     iPersonalityNotifier->CancelAll();
      
 
     iPersonalityId = &aPersonalityId;
-    iAskOnConnectionSetting = aAskOnConnectionSetting;
     aStatus = KRequestPending;
     iRequestStatus = &aStatus;
 
@@ -435,7 +433,6 @@
             delete iCurrentPersonalityHandler;
             iCurrentPersonalityHandler = NULL;
 
-            //iAskOnConnectionSetting may be have been set to off
             if ( iDeviceState == EUsbDeviceStateUndefined )
                 {
 	            iPersonalityParams->PersonalityNotifier().CancelQuery(
--- a/usbengines/usbwatcher/src/cusbwatcher.cpp	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbengines/usbwatcher/src/cusbwatcher.cpp	Fri Jul 23 13:40:58 2010 +0300
@@ -255,15 +255,6 @@
                 }
             LOG1( "Starting USB personality in device state: %d", aStateNew );
             iPersonalityHandler->StateChangeNotify( aStateOld, aStateNew );
-            // Check AskOnConnection setting every time
-            if( ( iSupportedPersonalities.Count() > 1 ) &&
-                    !IsAskOnConnectionSuppression() )
-                {
-                // read setting if there is more than one personality
-                iPersonalityRepository->Get(
-                        KUsbWatcherChangeOnConnectionSetting,
-                        iAskOnConnectionSetting );
-                }
 
             if( ( iState == EUsbIdle ) && !iPersonalityChangeOngoing )
                 {
@@ -275,10 +266,6 @@
                 Start();
                 }
 
-            // Let's turn ask on connection off after start cause we will
-            // issue it only when cable is connected
-            iAskOnConnectionSetting = KUsbWatcherChangeOnConnectionOff;
-
             //start usbdevcon only in normal global state
             TInt globalState =
                     CUsbGlobalSystemStateObserver::GlobalSystemState();
@@ -531,17 +518,7 @@
     if( EUsbDeviceStateAttached == state || EUsbDeviceStatePowered == state)
         {
         LOG( "Starting USB personality" );
-        TInt err = iPersonalityRepository->Get(
-           KUsbWatcherChangeOnConnectionSetting, iAskOnConnectionSetting );
-        if( KErrNone == err )
-            {
-            Start();
-            iAskOnConnectionSetting = KUsbWatcherChangeOnConnectionOff;
-            }
-        else
-            {
-            LOG1( "Error: CRepository::Get = %d", err );
-            }
+        Start();
         }
     }
 
@@ -771,8 +748,7 @@
                 iStarted = ETrue;
                 // Restore personality to normal in charging mode
                 iSetPreviousPersonalityOnDisconnect = ETrue;
-                iPersonalityHandler->StartPersonality( iPersonalityId,
-                    KUsbWatcherChangeOnConnectionOff, iStatus );
+                iPersonalityHandler->StartPersonality( iPersonalityId, iStatus );
                 }
             else
                 {
@@ -791,8 +767,7 @@
                 RProperty::Set( KPSUidUsbWatcher,
                             KUsbWatcherSelectedPersonality, iPersonalityId );
                 iStarted = ETrue;
-                iPersonalityHandler->StartPersonality( iPersonalityId,
-                        iAskOnConnectionSetting, iStatus );
+                iPersonalityHandler->StartPersonality( iPersonalityId, iStatus );
                 }
             else
                 {
@@ -1015,26 +990,7 @@
     return ret;
     }
 
-// ----------------------------------------------------------------------------
-// Check if there is an observer with ask on connection suppression
-// ----------------------------------------------------------------------------
-//
-TBool CUsbWatcher::IsAskOnConnectionSuppression()
-    {
-    LOG_FUNC
-    
-    TBool ret( EFalse );
-    for( TInt i = 0; i < iObservers.Count(); i++ )
-        {
-        if( iObservers[i]->IsAskOnConnectionSuppressed() )
-            {
-            ret = ETrue;
-            break;
-            }
-        }
-    LOG1( "Return = %d", ret );
-    return ret;
-    }
+
 
 // ----------------------------------------------------------------------------
 // Check current A or B device state
--- a/usbengines/usbwatcher/src/cusbwatchersession.cpp	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbengines/usbwatcher/src/cusbwatchersession.cpp	Fri Jul 23 13:40:58 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -159,9 +159,6 @@
     aComplete = EFalse;
     iSetPersonalityOutstanding = ETrue;
 
-    //Set force parameter to this session.
-    SetAskOnConnectionSuppression( aMessage.Int1() );
-
     iUsbWatcherServer->Watcher().SetPersonality( aMessage.Int0(),
         static_cast<TBool>( aMessage.Int2() ) );
 
@@ -183,7 +180,6 @@
         return KErrNone;
         }
 
-    SetAskOnConnectionSuppression( EFalse );
     aComplete = EFalse;
     iCancelSetPersonalityMessage = aMessage;
     iCancelSetPersonalityOutstanding = ETrue;
@@ -211,7 +207,6 @@
     // Cancel all other pending requests
     iUsbWatcherServer->Watcher().Notify( KErrCancel );
 
-    SetAskOnConnectionSuppression( EFalse );
     iSetPreviousPersonalityOutstanding = ETrue;
     iSetPreviousPersonalityMessage = aMessage;
     aComplete = EFalse;
@@ -239,7 +234,6 @@
     // Cancel all other pending requests
     iUsbWatcherServer->Watcher().Notify( KErrCancel );
 
-    SetAskOnConnectionSuppression( EFalse );
     iUsbWatcherServer->Watcher().SetPreviousPersonality();
 
     return KErrNone;
@@ -277,8 +271,6 @@
     {
     LOG_FUNC
 
-    //connected currently, so ask on connection can be enabled
-    SetAskOnConnectionSuppression( EFalse );
     iUsbWatcherServer->Watcher().SetPreviousPersonalityOnDisconnect();
 
     return KErrNone;
@@ -323,26 +315,4 @@
         }
     }
 
-// ----------------------------------------------------------------------------
-// Set or clear AskOnConnection suppression
-// ----------------------------------------------------------------------------
-//
-void CUsbWatcherSession::SetAskOnConnectionSuppression( TBool aSuppress )
-    {
-    LOG_FUNC
-
-    iSuppressAskOnConnection = aSuppress;
-    }
-
-// ----------------------------------------------------------------------------
-// Check if AskOnConnection is suppressed
-// ----------------------------------------------------------------------------
-//
-TBool CUsbWatcherSession::IsAskOnConnectionSuppressed()
-    {
-    LOG_FUNC
-
-    return iSuppressAskOnConnection;
-    }
-
 // End of file
--- a/usbuis/usbsettingsapp/src/hblistviewitem.css	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbuis/usbsettingsapp/src/hblistviewitem.css	Fri Jul 23 13:40:58 2010 +0300
@@ -7,10 +7,6 @@
 	layout:usb-1;
 }
 
-HbListViewItem[layoutName="usb"][modelItemType="SeparatorItem"]{
-	layout:separator-1;
-}
-
 /*
     Standard primitive properties
 */
--- a/usbuis/usbsettingsapp/src/hblistviewitem.widgetml	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbuis/usbsettingsapp/src/hblistviewitem.widgetml	Fri Jul 23 13:40:58 2010 +0300
@@ -30,7 +30,7 @@
       <meshitem src="text-2" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)" />
       
       <meshitem src="selection-icon" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
-      <meshitem src="selection-icon" srcEdge="TOP" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)" />
+      <meshitem src="selection-icon" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)" />
     
       <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
       <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
--- a/usbuis/usbuinotif/src/usbnotifier.cpp	Tue Jul 13 00:24:10 2010 +0300
+++ b/usbuis/usbuinotif/src/usbnotifier.cpp	Fri Jul 23 13:40:58 2010 +0300
@@ -19,7 +19,6 @@
 
 #include <bautils.h>         // BAFL utils (for language file)
 #include <data_caging_path_literals.hrh> 
-#include <AknNotiferAppServerApplication.h>
 #include <hb/hbcore/hbtextresolversymbian.h>
 
 #include "usbnotifier.h"     // Own class