serviceproviders/sapi_sysinfo/sysinfoservice/src/sysinfoservice.cpp
changeset 28 92cfb77afb61
parent 23 50974a8b132e
child 44 0b68a1b0c15e
--- a/serviceproviders/sapi_sysinfo/sysinfoservice/src/sysinfoservice.cpp	Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/sysinfoservice/src/sysinfoservice.cpp	Tue Feb 02 00:45:40 2010 +0200
@@ -444,7 +444,7 @@
         User::LeaveIfError(RProperty::Get(KPSUidNetworkInfo,
                                     KNWRegistrationStatus,status));
         }
-    else if( !aKey.CompareF(KNetworkMode) )
+    else if( !aKey.CompareF(SysInfo::KNetworkMode) )
         {
         User::LeaveIfError(RProperty::Get(KPSUidNetworkInfo,
                                     KNWTelephonyNetworkMode,status));
@@ -579,6 +579,28 @@
         featureID = KFeatureIdSideVolumeKeys;
     else if( !aKey.CompareF(KVibra) )
         featureID = KFeatureIdVibra;
+    else if( !aKey.CompareF(KVideoDecoder) )
+        {
+        MMMFDevVideoPlayObserverImpl obsImpl;
+        RArray<TUid> aDecoders;
+        CMMFDevVideoPlay *videoPlay=CMMFDevVideoPlay::NewL(obsImpl);
+        //place object on cleanupstack.
+        CleanupStack::PushL(videoPlay);
+        
+        videoPlay->GetDecoderListL(aDecoders);
+        CVideoDecDataList *decDataList=CVideoDecDataList::NewL();
+        for(int i=0;i<aDecoders.Count();i++)
+            {
+            CVideoDecoderInfo *decoderInfo=videoPlay->VideoDecoderInfoLC(aDecoders[i]);
+            CVideoDecDataList::CVideoDecData *data=new CVideoDecDataList::CVideoDecData(decoderInfo->Manufacturer(),decoderInfo->Identifier(),decoderInfo->MaxBitrate(),decoderInfo->Accelerated(),decoderInfo->Version().Name());
+            decDataList->AppendL(data);
+            CleanupStack::PopAndDestroy(decoderInfo);
+            }
+        
+        aSysData = decDataList;
+        CleanupStack::PopAndDestroy(videoPlay);
+        return;     
+        }
     else
         User::Leave(KErrNotFound);
 
@@ -667,6 +689,48 @@
             }  
         aSysData = CStringData::NewL(FormatedMacAddress);
         }
+    else if( !aKey.CompareF(KWirelessConnSupport) )
+        {
+        CDesCArray*     connTypesDesArray;
+        connTypesDesArray = new (ELeave) CDesCArrayFlat(4);
+        CleanupStack::PushL(connTypesDesArray);
+
+         //Initialize the feature manager if not already done.
+         if (!iFeatureManagerInitialized)
+         {
+             FeatureManager::InitializeLibL();
+             iFeatureManagerInitialized = ETrue;
+         }
+         
+         if(FeatureManager::FeatureSupported(KFeatureIdBt))
+             {
+             connTypesDesArray->AppendL(KBT);
+             }
+         if(FeatureManager::FeatureSupported(KFeatureIdIrda))
+             {
+             connTypesDesArray->AppendL(KIrda);
+             }
+         if(FeatureManager::FeatureSupported(KFeatureIdProtocolWlan))
+             {
+             connTypesDesArray->AppendL(KWlan);
+             }
+         if(FeatureManager::FeatureSupported(KFeatureIdProtocolGsm))
+             {
+             connTypesDesArray->AppendL(KGsm);
+             }
+         if(FeatureManager::FeatureSupported(KFeatureIdProtocolWcdma))
+             {
+             connTypesDesArray->AppendL(KWcdma);
+             }
+         if(FeatureManager::FeatureSupported(KFeatureIdProtocolCdma))
+             {
+             connTypesDesArray->AppendL(KCdma);
+             }
+
+        //connTypesDesArray ownership passed to CStringList.
+        aSysData = CStringList::NewL(connTypesDesArray);
+        CleanupStack::Pop(connTypesDesArray);         
+        }
     else
         User::Leave(KErrNotFound);
     }