Revision: 201023 RCL_3 PDK_3.0.1
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 21 Jun 2010 15:41:55 +0300
branchRCL_3
changeset 15 33b357311f14
parent 13 46625afeb3de
child 17 8ce15fced3a6
Revision: 201023 Kit: 2010125
srsf/loc/defaultvoicecommands.loc
srsf/vcommandmanager/data/defaultvoicecommands.rss
srsf/vcommandmanager/inc/emailvoicecommands.xml
voiceui/rom/voiceui.iby
voiceui/voiceuivoicerecognition/data/btnamediallerstarttone.wav
voiceui/voiceuivoicerecognition/data/vuivoicerecognition.rss
voiceui/voiceuivoicerecognition/group/exports.inc
voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp
voiceui/voiceuivoicerecognition/inc/vuictoneplayer.h
voiceui/voiceuivoicerecognition/src/vuictoneplayer.cpp
--- a/srsf/loc/defaultvoicecommands.loc	Wed Jun 09 09:43:17 2010 +0300
+++ b/srsf/loc/defaultvoicecommands.loc	Mon Jun 21 15:41:55 2010 +0300
@@ -51,6 +51,13 @@
 // 
 #define qtn_vc_info_popup_text_msg                  "Say %U to create a new message"
 
+// d:Tooltip text shown when a mail related voice command is highlighted
+// d:%U is the application name (either default or user edited)
+// l:popup_preview_text_window/opt5
+// r:3.2
+// 
+#define qtn_vc_info_popup_text_mail                  "Say %U to create a new mail" 
+
 // d:Tooltip text shown when qtn_vc_main_time is highlighted.
 // d:%U is qan_vc_main_time or user edited voice command
 // l:popup_preview_text_window/opt5
--- a/srsf/vcommandmanager/data/defaultvoicecommands.rss	Wed Jun 09 09:43:17 2010 +0300
+++ b/srsf/vcommandmanager/data/defaultvoicecommands.rss	Mon Jun 21 15:41:55 2010 +0300
@@ -138,7 +138,14 @@
             key = 10020;
             txt = qtn_vc_info_popup_text_vdown;
             },
-
+        
+        // Tooltip logical string - New Mail
+        VCOMMANDITEM
+            {
+            key = 10021;
+            txt = qtn_vc_info_popup_text_mail;
+            },
+                
         // Logical string (written) - Browser
         VCOMMANDITEM
             {
--- a/srsf/vcommandmanager/inc/emailvoicecommands.xml	Wed Jun 09 09:43:17 2010 +0300
+++ b/srsf/vcommandmanager/inc/emailvoicecommands.xml	Mon Jun 21 15:41:55 2010 +0300
@@ -12,7 +12,7 @@
         <vcommand tts="true" modifiable="true">
             <spoken locindex="9129"/>
             <written locindex="129"/>
-            <tooltip locindex="10003"/>
+            <tooltip locindex="10021"/>
             <executes uid="0x10281D15"/>
             <cmdlineparams>
             4
--- a/voiceui/rom/voiceui.iby	Wed Jun 09 09:43:17 2010 +0300
+++ b/voiceui/rom/voiceui.iby	Mon Jun 21 15:41:55 2010 +0300
@@ -32,6 +32,7 @@
 
 data=ABI_DIR\BUILD_DIR\z\system\sounds\digital\NameDiallerStartTone.wav     System\sounds\digital\NameDiallerStartTone.wav
 data=ABI_DIR\BUILD_DIR\z\system\sounds\digital\namediallerconfirmtone.wav   System\sounds\digital\namediallerconfirmtone.wav
+data=ABI_DIR\BUILD_DIR\z\system\sounds\digital\btnamediallerstarttone.wav   System\sounds\digital\btnamediallerstarttone.wav
 
 // PbkInfoView
 ECOM_PLUGIN(aiwpbkinfoviewprovider.dll, 10281c81.rsc)
Binary file voiceui/voiceuivoicerecognition/data/btnamediallerstarttone.wav has changed
--- a/voiceui/voiceuivoicerecognition/data/vuivoicerecognition.rss	Wed Jun 09 09:43:17 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/data/vuivoicerecognition.rss	Mon Jun 21 15:41:55 2010 +0300
@@ -35,6 +35,7 @@
 // CONSTANTS
 #define KVoiceStartSoundFile           "z:\\system\\sounds\\digital\\namediallerstarttone.wav"
 #define KVoiceConfirmationSoundFile    "z:\\system\\sounds\\digital\\namediallerconfirmtone.wav"
+#define KVoiceBTStartSoundFile         "z:\\system\\sounds\\digital\\btnamediallerstarttone.wav"
 
 RESOURCE RSS_SIGNATURE { }
 
@@ -375,6 +376,18 @@
     {
     buf = KVoiceStartSoundFile;
     }
+
+//----------------------------------------------------
+//   
+//    r_voice_bt_start_sound_path
+//    Path to a sound file to play when starting voice dialing from bluetooth accessory
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_voice_bt_start_sound_path
+    {
+    buf = KVoiceBTStartSoundFile;
+    }
     
 //----------------------------------------------------
 //   
--- a/voiceui/voiceuivoicerecognition/group/exports.inc	Wed Jun 09 09:43:17 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/group/exports.inc	Mon Jun 21 15:41:55 2010 +0300
@@ -1,7 +1,7 @@
 /*
 * ==============================================================================
 *        %name: exports.inc %
-*     %version: tr1nss#18.2.19 %
+*     %version: be1sido#18.2.20 %
 *      Part of: VoiceUI / VoiceUiNameDialer
 *  Description: VoiceUiNameDialer exports
 *
@@ -38,6 +38,11 @@
 ../data/namediallerconfirmtone.wav  /epoc32/release/armv5/urel/z/system/sounds/digital/namediallerconfirmtone.wav
 ../data/namediallerconfirmtone.wav  /epoc32/release/armv5/udeb/z/system/sounds/digital/namediallerconfirmtone.wav
 
+../data/btnamediallerstarttone.wav  /epoc32/release/winscw/urel/z/system/sounds/digital/btnamediallerstarttone.wav
+../data/btnamediallerstarttone.wav  /epoc32/release/winscw/udeb/z/system/sounds/digital/btnamediallerstarttone.wav
+../data/btnamediallerstarttone.wav  /epoc32/release/armv5/urel/z/system/sounds/digital/btnamediallerstarttone.wav
+../data/btnamediallerstarttone.wav  /epoc32/release/armv5/udeb/z/system/sounds/digital/btnamediallerstarttone.wav
+
 ../loc/vuivoicerecognition.loc      APP_LAYER_LOC_EXPORT_PATH(vuivoicerecognition.loc)
 
 
--- a/voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp	Wed Jun 09 09:43:17 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp	Mon Jun 21 15:41:55 2010 +0300
@@ -139,4 +139,6 @@
 
 LIBRARY         VPbkEng.lib
 LIBRARY         ecom.lib 
+LIBRARY         accpolicy.lib
+LIBRARY         accclient.lib
 
--- a/voiceui/voiceuivoicerecognition/inc/vuictoneplayer.h	Wed Jun 09 09:43:17 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/inc/vuictoneplayer.h	Mon Jun 21 15:41:55 2010 +0300
@@ -70,6 +70,12 @@
         * @param aSid The sound ID
         */
         void PlayTone( TInt aSid );
+        
+        /**
+        * Check Bt Accessory Status
+        * @
+        */
+        void ChekcAccesoryStatusL();
 
     public: // Functions from base classes
 
@@ -117,11 +123,17 @@
         // Start sound path
         HBufC*                          iStartSound;
         
+        // Bluetooth start sound path
+        HBufC*                          iBtStartSound;
+        
         // Confirmation sound path
         HBufC*                          iConfirmationSound;
 
         // Volume
         TInt                            iVolume;
+        
+        //BT Accessory flag
+        TBool                           iBTAcc;
         };
 
 #endif      // VUICTONEPLAYER_H
--- a/voiceui/voiceuivoicerecognition/src/vuictoneplayer.cpp	Wed Jun 09 09:43:17 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/src/vuictoneplayer.cpp	Mon Jun 21 15:41:55 2010 +0300
@@ -19,6 +19,8 @@
 // INCLUDE FILES
 #include <aknsoundsystem.h>
 #include <aknappui.h>
+#include <AccessoryServer.h>        //RAccessoryServer
+#include <AccessoryConnection.h>    //RAccessoryConnection
 
 #include <centralrepository.h>
 
@@ -67,6 +69,7 @@
 
     delete iStartSound;
     delete iConfirmationSound;
+    delete iBtStartSound;
 
     iObserver = NULL;
     
@@ -104,6 +107,10 @@
 
     iStartSound = StringLoader::LoadL( R_VOICE_START_SOUND_PATH );
     iConfirmationSound = StringLoader::LoadL( R_VOICE_CONFIRMATION_SOUND_PATH );
+    iBtStartSound = StringLoader::LoadL( R_VOICE_BT_START_SOUND_PATH );
+    iBTAcc = EFalse;
+    
+    ChekcAccesoryStatusL();
     }
   
  // ---------------------------------------------------------
@@ -135,8 +142,15 @@
     if ( aSid == EAvkonSIDNameDiallerStartTone )
         {
         RUBY_DEBUG0( "CTonePlayer::InitToneL - case: EAvkonSIDNameDiallerStartTone" );
-
-        TRAPD( err, iAudioPlayer->OpenFileL( *iStartSound ) );
+        TInt err = KErrNone;
+        if ( iBTAcc )
+            {
+            TRAP( err, iAudioPlayer->OpenFileL( *iBtStartSound ) );
+            }
+        else
+            {
+            TRAP( err, iAudioPlayer->OpenFileL( *iStartSound ) );
+            }
         if ( err )
             {
             RUBY_ERROR1( "CTonePlayer::InitToneL - err [%d]", err );
@@ -248,5 +262,47 @@
     return volume;
     }
 
+// ---------------------------------------------------------
+// CTonePlayer::ChekcAccesoryStatus
+// ---------------------------------------------------------
+//  
+void CTonePlayer::ChekcAccesoryStatusL()
+    {    
+    // Connection to the accessory server
+    RAccessoryServer accessoryServer;    
+    // Subsession for server
+    RAccessoryConnection accessoryConnection;    
+    //Generic ID array for accessories
+    TAccPolGenericIDArray accessoryArray;
+    
+    TInt err = KErrNone;
+    //connect to accessory server
+    err = accessoryServer.Connect();
+    if ( err == KErrNone )
+        {
+        //create subsession to accessory server
+        err = accessoryConnection.CreateSubSession( accessoryServer );
+        if ( err == KErrNone )
+            {
+            accessoryConnection.GetAccessoryConnectionStatus( accessoryArray );
+            
+            TAccPolGenericID genId;
+            for ( TInt i = 0; i < accessoryArray.Count(); i++ )
+                {
+                genId = accessoryArray.GetGenericIDL( i );
+
+                if ( genId.PhysicalConnectionCaps( KPCBluetooth ) && 
+                    ( genId.DeviceTypeCaps( KDTHeadset ) || genId.DeviceTypeCaps( KDTCarKit ) ) )
+                    {
+                    iBTAcc = ETrue;
+                    }
+                }
+            }
+        }
+
+    accessoryConnection.CloseSubSession();
+    accessoryServer.Close();
+    }
+
 //  End of File