201011
authorhgs
Sat, 24 Apr 2010 00:30:15 +0300
changeset 48 625e74332ce2
parent 47 878846f7623e
child 49 141c98a07b37
201011
layers.sysdef.xml
package_definition.xml
tsrc/group/bld.inf
usbengines/usbdevcon/src/cusbdevcon.cpp
usbengines/usblocodplugin/inc/usblcdactive.h
usbengines/usblocodplugin/src/usblcdactive.cpp
usbengines/usbotgwatcher/inc/cusbindicatornotifier.h
usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp
usbengines/usbwatcher/rom/mtp_symbian_temp.iby
usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp
usbservices_plat/usb_notifier_api/inc/usbuinotif.h
usbuis/usbuiqt/usbapplication.pro
--- a/layers.sysdef.xml	Sat Apr 24 00:13:51 2010 +0300
+++ b/layers.sysdef.xml	Sat Apr 24 00:30:15 2010 +0300
@@ -19,5 +19,10 @@
         <unit unitID="lcdo.usbservices.usbclasses.usbuiqt" mrp="" bldFile="&layer_real_source_path;/usbuis/usbuiqt" name="usbservices_usbuis_usbapplication" proFile="usbapplication.pro" qmakeArgs="" />
       </module>
     </layer>
+    <layer name="api_test_layer">
+      <module name="usbservices_test">
+        <unit unitID="lcdo.usbservices_test" mrp="" bldFile="&layer_real_source_path;/tsrc/group" name="usbservices_test" />
+      </module>
+    </layer>    
   </systemModel>
 </SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_definition.xml	Sat Apr 24 00:30:15 2010 +0300
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0">
+  <package id="usbservices" name="USB Services" levels="framework server generic specific plugin">
+    <collection id="usbclasses" name="USB Classes" level="framework">
+      <component id="usbobexclasscontroller" filter="s60" name="USB OBEX Class Controller" class="plugin">
+        <unit bldFile="usbclasses/usbobexclasscontroller/group"/>
+      </component>
+      <component id="usbbasicpersonality" filter="s60" name="USB Basic Personality"  class="plugin">
+        <unit bldFile="usbclasses/usbbasicpersonality/group"/>
+      </component>
+      <component id="usbmscpersonality" filter="s60" name="USB MSC Personality" class="plugin">
+        <unit bldFile="usbclasses/usbmscpersonality/group"/>
+      </component>
+      <component id="pictbridgeengine" filter="s60" name="PictBridge Engine">
+        <unit bldFile="usbclasses/pictbridgeengine/group"/>
+      </component>
+      <component id="usbphoneasmodem" filter="s60" name="USB Phone as Modem" introduced="^3">
+        <unit bldFile="usbclasses/usbphoneasmodem/group"/>
+      </component>
+    </collection>
+    <collection id="usbengines" name="USB Engines" level="generic">
+      <component id="usbwatcher" filter="s60" name="USB Watcher">
+        <unit bldFile="usbengines/usbwatcher/group"/>
+      </component>
+      <component id="usblocodplugin" filter="s60" name="USB Local Connectivity Domain Plugin" class="plugin">
+        <unit bldFile="usbengines/usblocodplugin/group"/>
+      </component>
+      <component id="usbdevcon" filter="s60" name="USB Device Control">
+        <unit bldFile="usbengines/usbdevcon/group"/>
+      </component>
+      <component id="usbremotepersonality" filter="s60" name="USB Remote Personality">
+        <unit bldFile="usbengines/usbremotepersonality/group"/>
+      </component>
+      <component id="usbotgwatcher" filter="s60" name="USB OTG Watcher" introduced="^3">
+        <unit bldFile="usbengines/usbotgwatcher/group"/>
+      </component>
+    </collection>
+    <collection id="usbuis" name="USB UIs" level="specific">
+      <component id="usbui" filter="s60" name="USB UI">
+        <unit bldFile="usbuis/usbui/group"/>
+      </component>
+      <component id="usbuinotif" filter="s60" name="USB UI Notifiers">
+        <unit bldFile="usbuis/usbuinotif/group"/>
+      </component>
+      <component id="imageprintuiprovider" filter="s60" name="ImagePrint UI Provider" class="plugin">
+        <unit bldFile="usbuis/imageprintuiprovider/group"/>
+      </component>
+      <component id="usbimageprintui" filter="s60" name="ImagePrint UI">
+        <unit bldFile="usbuis/imageprintui/group"/>
+      </component>
+    </collection>
+    <collection id="usbservices_info" name="USB Services Info" level="plugin">
+      <component id="usbservices_plat" filter="s60" name="USB Services Platform Interfaces" class="api">
+        <unit bldFile="usbservices_plat/group"/>
+      </component>
+      <component id="usbservices_test" filter="s60,test,api_test" name="USB Services Tests">
+        <unit bldFile="tsrc/group"/>
+      </component>
+    </collection>        
+  </package>
+</SystemDefinition>
--- a/tsrc/group/bld.inf	Sat Apr 24 00:13:51 2010 +0300
+++ b/tsrc/group/bld.inf	Sat Apr 24 00:30:15 2010 +0300
@@ -20,7 +20,6 @@
 DEFAULT
 
 //build files for shortlinkconn
-#include "../../../shortlinkconn/localconnectivityservice/lcstylustap/tsrc/LcStylusTapTest/group/bld.inf"
 #include "../../../shortlinkconn/localconnectivityservice/generichid/tsrc/GenericHidTest/group/bld.inf"
 
 //build files for usb
--- a/usbengines/usbdevcon/src/cusbdevcon.cpp	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbengines/usbdevcon/src/cusbdevcon.cpp	Sat Apr 24 00:30:15 2010 +0300
@@ -260,8 +260,7 @@
         FLOG( _L( "[USBDEVCON]\tCUsbDevCon::RunL Exiting usbdevcon" ) );      
         
         // Shutdown timer is finished, exit program
-        CUsbDevCon:: ~CUsbDevCon(); // destruct resources
-        User::Exit(KErrNone);
+        CActiveScheduler::Stop(); // destruct resources
         }
     }
 
--- a/usbengines/usblocodplugin/inc/usblcdactive.h	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbengines/usblocodplugin/inc/usblcdactive.h	Sat Apr 24 00:30:15 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 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"
@@ -65,8 +65,12 @@
     CUsbLcdActive(MLocodBearerPluginObserver& aObserver);
 
     void ConstructL();
-    void Start();    
-    void NotifyLcd(TBool aUsbStatus);
+    void Start();
+    /**
+     * Handle the change of selected USB personality.
+     * @param aNewPersonalityId current selected USB personality ID.
+     */
+    void HandleUsbPersonalityChange( TInt aNewPersonalityId );
 
 private: // data
 
--- a/usbengines/usblocodplugin/src/usblcdactive.cpp	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbengines/usblocodplugin/src/usblcdactive.cpp	Sat Apr 24 00:30:15 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 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"
@@ -79,26 +79,14 @@
     else
        {
 
-        TInt ret = RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, value);
-        LOGTEXT2(_L8("CUsbLcdActive::RunL() Personality = %d"), value);  
+        TInt ret = iProperty.Get( value );
+        LOGTEXT3(_L8("Personality: %d, ret: %d"), value, ret);  
         iProperty.Subscribe(iStatus);
         SetActive();
         if (ret == KErrNone)
-        { 
-        switch (value)
-            {
-            case KUsbPersonalityIdPCSuite:
-            case KUsbPersonalityIdPCSuiteMTP:
-                NotifyLcd(ETrue);
-                LOGTEXT(_L8("CUsbLcdActive::RunL() in PC Suite mode"));
-                break;
-               
-            default:
-                NotifyLcd(EFalse);
-                LOGTEXT(_L8("CUsbLcdActive::RunL() mode is not PC Suite"));
-                break;
-            }
-        }    
+            { 
+            HandleUsbPersonalityChange( value );
+            }    
        }
     }
 
@@ -145,17 +133,33 @@
     LOG_FUNC
     iProperty.Subscribe(iStatus);
     SetActive();
+    // Check the starting state
+    TInt usbPersonalityId( KUsbWatcherSelectedPersonalityNone );
+    TInt ret = iProperty.Get( usbPersonalityId );
+    if ( ( ret == KErrNone ) && 
+        ( usbPersonalityId != KUsbWatcherSelectedPersonalityNone ) )
+        {
+        HandleUsbPersonalityChange( usbPersonalityId ); 
+        }
     }
      
+
 // ---------------------------------------------------------------------------
-// This function notifying LoCoD framewark about active USB personality
-// If Personality == 113 (PC Suite), then ETrue; in all other cases is EFalse 
+// This function handles the USB active personality change, and notify LoCoD
+// framework whether PC Suite is active 
 // ---------------------------------------------------------------------------
 //
-void CUsbLcdActive::NotifyLcd(TBool aUsbStatus)
+void CUsbLcdActive::HandleUsbPersonalityChange( TInt aNewPersonalityId )
     {
     LOG_FUNC
-    iObserver.NotifyBearerStatus(ELocodBearerUSB, aUsbStatus);
+    LOGTEXT2( _L8( "aNewPersonalityId: %d"), aNewPersonalityId );
+    TBool isPcSuiteActive( EFalse );
+    if ( ( aNewPersonalityId == KUsbPersonalityIdPCSuite ) ||
+         ( aNewPersonalityId == KUsbPersonalityIdPCSuiteMTP ) )
+        {
+        isPcSuiteActive = ETrue;
+        }
+    iObserver.NotifyBearerStatus( ELocodBearerUSB, isPcSuiteActive );
     }
     
 //End of file
--- a/usbengines/usbotgwatcher/inc/cusbindicatornotifier.h	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbengines/usbotgwatcher/inc/cusbindicatornotifier.h	Sat Apr 24 00:30:15 2010 +0300
@@ -22,7 +22,7 @@
 #include <AknNotifyStd.h>       // SAknSmallIndicatorParams
 #include <AknNotifySignature.h> // SAknNotifierPackage
 #include <avkon.hrh>            // EAknIndicatorUSBConnection
-#include "cusbtimer.h"
+
 #include "cusbnotifier.h"
 #include "cusbvbusobserver.h"
 #include "cusbotgwatcher.h"
@@ -31,7 +31,7 @@
  * Class implements functionality of showing/blinking usb indicator
  * Class does not provide method to get response from the user
  */
-NONSHARABLE_CLASS( CUsbIndicatorNotifier ): public CUsbNotifier, MUsbTimerObserver, MUsbOtgWatcherStateObserver, MUsbVBusObserver
+NONSHARABLE_CLASS( CUsbIndicatorNotifier ): public CUsbNotifier, MUsbOtgWatcherStateObserver, MUsbVBusObserver
     {
 public:
     /**
@@ -80,13 +80,6 @@
      */
     virtual void Close();
 
-    // From MUsbTimerObserver
-    /**
-     * Timer elapsed
-     * @param Timer id
-     */
-    void TimerElapsedL(TUsbTimerId aTimerId);
-
 private:
 
     /**
@@ -135,13 +128,6 @@
     CUsbOtgWatcher& iOtgWatcher;
 
     /**
-     * Switch timer for showing/hiding the usb indicator interleavingly for 
-     * animating the indicator. 
-     * Own
-     */
-    CUsbTimer* iIconBlinkingTimer;
-
-    /**
      * Current indicator state
      */
     TInt iIndicatorState;
--- a/usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp	Sat Apr 24 00:30:15 2010 +0300
@@ -54,7 +54,6 @@
     LOG_FUNC
 
     Close();
-    delete iIconBlinkingTimer;
 
     if (iOtgWatcher.VBusObserver())
         {
@@ -95,11 +94,8 @@
     // Subscribe for otg watcher states change notifications
     iOtgWatcher.SubscribeL(*this);
 
-    iIconBlinkingTimer = CUsbTimer::NewL(*this, EIconBlinkingTimer);
-
     // check here for condition to set usb indicator
     SetIndicatorL();
-
     }
 
 // ---------------------------------------------------------------------------
@@ -114,8 +110,6 @@
 
     LOG1("aVisible = %d" , aVisible);
 
-    iIconBlinkingTimer->Cancel();
-
     SetIndicatorStateL(aVisible
                                 ? EAknIndicatorStateOn
                                    : EAknIndicatorStateOff);
@@ -129,8 +123,7 @@
     {
     LOG_FUNC
 
-    // Will be canceled if active in After()
-    iIconBlinkingTimer->After(0);
+    SetIndicatorStateL( EAknIndicatorStateAnimate );
     }
 
 // ---------------------------------------------------------------------------
@@ -152,42 +145,10 @@
     {
     LOG_FUNC
 
-    iIconBlinkingTimer->Cancel();
     TRAP_IGNORE( ShowStaticL(EFalse) );
     }
 
 // ---------------------------------------------------------------------------
-// From MUsbTimerObserver
-// ---------------------------------------------------------------------------
-// 
-void CUsbIndicatorNotifier::TimerElapsedL(TUsbTimerId aTimerId)
-    {
-    switch (aTimerId)
-        {
-        case EIconBlinkingTimer:
-            {
-            SetIndicatorStateL(iIndicatorState
-                                               ? EAknIndicatorStateOn
-                                                  : EAknIndicatorStateOff);
-
-            iIndicatorState
-                    = (iIndicatorState == EAknIndicatorStateOn
-                                                               ? EAknIndicatorStateOff
-                                                                  : EAknIndicatorStateOn);
-
-            // Will be canceled if active in After()
-            iIconBlinkingTimer->After(KUsbIndicatorBlinkingInterval);
-            break;
-            }
-        default:
-            {
-            LOG1("Unknown timer id = %d", aTimerId)
-            PANIC(EWrongTimerId);
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
 // Set USB indicator On or Off
 // ---------------------------------------------------------------------------
 //
--- a/usbengines/usbwatcher/rom/mtp_symbian_temp.iby	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbengines/usbwatcher/rom/mtp_symbian_temp.iby	Sat Apr 24 00:30:15 2010 +0300
@@ -122,6 +122,7 @@
 ECOM_PLUGIN(mtpmetadataservice.dll, mtpmetadataservice.rsc)
 // MTP plugin registration resource file
 data=EPOCROOT##epoc32\data\Z\resource\mtp\2001A9A3.rsc  resource\mtp\2001A9A3.rsc
+data=EPOCROOT##epoc32\data\Z\deviceexperiences\default\en-us\A42998DC-D9BD-4287-A2EA-46116889443C.devicemetadata-ms deviceexperiences\default\en-us\A42998DC-D9BD-4287-A2EA-46116889443C.devicemetadata-ms
 #endif // SYMBIAN_EXCLUDE_MTP
 #endif // MTP_METADATASERVICE_IBY
 
--- a/usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbengines/usbwatcher/src/cusbactivepersonalityhandler.cpp	Sat Apr 24 00:30:15 2010 +0300
@@ -317,12 +317,21 @@
     
     LOG2("Returned error: %d, iState: %d", aError, iState);
 
-    if (KErrNoMemory == aError)
+    switch ( aError )
         {
-        iQueryParams().iQuery = EUSBNotEnoughRam;
-        iPersonalityParams->PersonalityNotifier().ShowQuery(KQueriesNotifier, 
-    	            iQueryParams, iDummyBuf);
-    }
+        case KErrNoMemory:
+            iQueryParams().iQuery = EUSBNotEnoughRam;
+            iPersonalityParams->PersonalityNotifier().ShowQuery(KQueriesNotifier, 
+    	                iQueryParams, iDummyBuf);
+            break;
+        case KErrDiskFull:
+            iQueryParams().iQuery = EUSBDiskFull;
+            iPersonalityParams->PersonalityNotifier().ShowQuery(KQueriesNotifier, 
+    	                iQueryParams, iDummyBuf);
+            break;
+        default:
+        	LOG( "Ignored" );
+        }
 
     //only handle error when TryStart fails now
 	//clean up work to be done in the personality
--- a/usbservices_plat/usb_notifier_api/inc/usbuinotif.h	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbservices_plat/usb_notifier_api/inc/usbuinotif.h	Sat Apr 24 00:30:15 2010 +0300
@@ -64,7 +64,8 @@
     EUSBPossibleDataLossMMC,
     EUSBChangeFromMassStorage,
     EUSBNoMemoryCard,
-    EUSBNotEnoughRam
+    EUSBNotEnoughRam,
+    EUSBDiskFull
    };
 
 /**
--- a/usbuis/usbuiqt/usbapplication.pro	Sat Apr 24 00:13:51 2010 +0300
+++ b/usbuis/usbuiqt/usbapplication.pro	Sat Apr 24 00:30:15 2010 +0300
@@ -3,7 +3,7 @@
 #  Name        : usbapplication.pro
 #  Part of     : USB / USB Settings Application       *** Info from the SWAD
 #  Description : Project definition file for project USB Settings Application
-#  Version     : %version: 6 % << Don't touch! Updated by Synergy at check-out.
+#  Version     : %version: 9 % << Don't touch! Updated by Synergy at check-out.
 #
 #  Copyright © 2009 Nokia.  All rights reserved.
 #  This material, including documentation and any related computer
@@ -36,9 +36,7 @@
 LIBS += -lusbwatcher
 LIBS += -lxqsettingsmanager
 LIBS += -lusbman
-LIBS += -lhbcore
-LIBS += -lhbwidgets
-LIBS += -lhbtools
+
 FORMS += 
 RESOURCES += src/usbicons.qrc \
     src/usbapplication.qrc