serviceproviders/sapi_sysinfo/sysinfoservice/src/sysinfoservice.cpp
branchRCL_3
changeset 66 a9c0808a1095
parent 65 0b68a1b0c15e
equal deleted inserted replaced
65:0b68a1b0c15e 66:a9c0808a1095
   442     if ( !aKey.CompareF(KRegistrationStatus) )
   442     if ( !aKey.CompareF(KRegistrationStatus) )
   443         {
   443         {
   444         User::LeaveIfError(RProperty::Get(KPSUidNetworkInfo,
   444         User::LeaveIfError(RProperty::Get(KPSUidNetworkInfo,
   445                                     KNWRegistrationStatus,status));
   445                                     KNWRegistrationStatus,status));
   446         }
   446         }
   447     else if( !aKey.CompareF(KNetworkMode) )
   447     else if( !aKey.CompareF(SysInfo::KNetworkMode) )
   448         {
   448         {
   449         User::LeaveIfError(RProperty::Get(KPSUidNetworkInfo,
   449         User::LeaveIfError(RProperty::Get(KPSUidNetworkInfo,
   450                                     KNWTelephonyNetworkMode,status));
   450                                     KNWTelephonyNetworkMode,status));
   451         }
   451         }
   452     else
   452     else
   577         featureID = KFeatureIdCoverDisplay;
   577         featureID = KFeatureIdCoverDisplay;
   578     else if( !aKey.CompareF(KSideVolumeKeys) )
   578     else if( !aKey.CompareF(KSideVolumeKeys) )
   579         featureID = KFeatureIdSideVolumeKeys;
   579         featureID = KFeatureIdSideVolumeKeys;
   580     else if( !aKey.CompareF(KVibra) )
   580     else if( !aKey.CompareF(KVibra) )
   581         featureID = KFeatureIdVibra;
   581         featureID = KFeatureIdVibra;
       
   582     else if( !aKey.CompareF(KVideoDecoder) )
       
   583         {
       
   584         MMMFDevVideoPlayObserverImpl obsImpl;
       
   585         RArray<TUid> aDecoders;
       
   586         CMMFDevVideoPlay *videoPlay=CMMFDevVideoPlay::NewL(obsImpl);
       
   587         //place object on cleanupstack.
       
   588         CleanupStack::PushL(videoPlay);
       
   589         
       
   590         videoPlay->GetDecoderListL(aDecoders);
       
   591         CVideoDecDataList *decDataList=CVideoDecDataList::NewL();
       
   592         for(int i=0;i<aDecoders.Count();i++)
       
   593             {
       
   594             CVideoDecoderInfo *decoderInfo=videoPlay->VideoDecoderInfoLC(aDecoders[i]);
       
   595             CVideoDecDataList::CVideoDecData *data=new CVideoDecDataList::CVideoDecData(decoderInfo->Manufacturer(),decoderInfo->Identifier(),decoderInfo->MaxBitrate(),decoderInfo->Accelerated(),decoderInfo->Version().Name());
       
   596             decDataList->AppendL(data);
       
   597             CleanupStack::PopAndDestroy(decoderInfo);
       
   598             }
       
   599         
       
   600         aSysData = decDataList;
       
   601         CleanupStack::PopAndDestroy(videoPlay);
       
   602         return;     
       
   603         }
   582     else
   604     else
   583         User::Leave(KErrNotFound);
   605         User::Leave(KErrNotFound);
   584 
   606 
   585     //Initialize feature manager if not.
   607     //Initialize feature manager if not.
   586     if (!iFeatureManagerInitialized)
   608     if (!iFeatureManagerInitialized)
   664             TBuf<10> FormatText;
   686             TBuf<10> FormatText;
   665             FormatText.Format(KWLanMACDataFormat,DesC8AddrText[i]);
   687             FormatText.Format(KWLanMACDataFormat,DesC8AddrText[i]);
   666             FormatedMacAddress.Append(FormatText);
   688             FormatedMacAddress.Append(FormatText);
   667             }  
   689             }  
   668         aSysData = CStringData::NewL(FormatedMacAddress);
   690         aSysData = CStringData::NewL(FormatedMacAddress);
       
   691         }
       
   692     else if( !aKey.CompareF(KWirelessConnSupport) )
       
   693         {
       
   694         CDesCArray*     connTypesDesArray;
       
   695         connTypesDesArray = new (ELeave) CDesCArrayFlat(4);
       
   696         CleanupStack::PushL(connTypesDesArray);
       
   697 
       
   698          //Initialize the feature manager if not already done.
       
   699          if (!iFeatureManagerInitialized)
       
   700          {
       
   701              FeatureManager::InitializeLibL();
       
   702              iFeatureManagerInitialized = ETrue;
       
   703          }
       
   704          
       
   705          if(FeatureManager::FeatureSupported(KFeatureIdBt))
       
   706              {
       
   707              connTypesDesArray->AppendL(KBT);
       
   708              }
       
   709          if(FeatureManager::FeatureSupported(KFeatureIdIrda))
       
   710              {
       
   711              connTypesDesArray->AppendL(KIrda);
       
   712              }
       
   713          if(FeatureManager::FeatureSupported(KFeatureIdProtocolWlan))
       
   714              {
       
   715              connTypesDesArray->AppendL(KWlan);
       
   716              }
       
   717          if(FeatureManager::FeatureSupported(KFeatureIdProtocolGsm))
       
   718              {
       
   719              connTypesDesArray->AppendL(KGsm);
       
   720              }
       
   721          if(FeatureManager::FeatureSupported(KFeatureIdProtocolWcdma))
       
   722              {
       
   723              connTypesDesArray->AppendL(KWcdma);
       
   724              }
       
   725          if(FeatureManager::FeatureSupported(KFeatureIdProtocolCdma))
       
   726              {
       
   727              connTypesDesArray->AppendL(KCdma);
       
   728              }
       
   729 
       
   730         //connTypesDesArray ownership passed to CStringList.
       
   731         aSysData = CStringList::NewL(connTypesDesArray);
       
   732         CleanupStack::Pop(connTypesDesArray);         
   669         }
   733         }
   670     else
   734     else
   671         User::Leave(KErrNotFound);
   735         User::Leave(KErrNotFound);
   672     }
   736     }
   673 
   737