--- a/serviceproviders/sapi_sysinfo/inc/sysinfoaiwparams.hrh Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/inc/sysinfoaiwparams.hrh Tue Feb 02 00:45:40 2010 +0200
@@ -145,6 +145,13 @@
_LIT8(KCamResList,"ResolutionList");
_LIT8(KCamMimeTypesList,"MimeTypeList");
+
+_LIT8(KCapability, "capability");
+_LIT8(KDecManufacturer, "manufacturer");
+_LIT8(KIdentifier, "identifier");
+_LIT8(KAccelerated, "accelerated");
+_LIT8(KMaxBitrate, "maxBitrate");
+_LIT8(KVersion, "version");
}
-#endif //__SYSINFO_AIWPARAMS_HRH_
\ No newline at end of file
+#endif //__SYSINFO_AIWPARAMS_HRH_
--- a/serviceproviders/sapi_sysinfo/src/sysinfointerface.cpp Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/src/sysinfointerface.cpp Tue Feb 02 00:45:40 2010 +0200
@@ -876,7 +876,40 @@
CleanupStack::PopAndDestroy( camResList );
}
break;
-
+ case CSysData::EVideoDecList:
+ {
+ CLiwList* decResList = CLiwDefaultList::NewL();
+ CleanupClosePushL( *decResList );
+ const CVideoDecDataList* declist = ((CVideoDecDataList*) aInSysData);
+ count = declist->Count();
+ CVideoDecDataList::CVideoDecData * decinfo = NULL;
+
+ for ( int index=0; index<count; index++ )
+ {
+ TInt val = 0;
+ CLiwMap* resMap = CLiwDefaultMap::NewL();
+ CleanupStack::PushL( resMap );
+ decinfo=(*declist)[index];
+ TPtrC temp;
+ temp.Set(*(decinfo->Manufacturer));
+ TPtrC temp1;
+ temp1.Set(*(decinfo->Identifier));
+
+ resMap->InsertL( KDecManufacturer, temp );
+ resMap->InsertL( KIdentifier, temp1 );
+ resMap->InsertL( KMaxBitrate, (TInt32)decinfo->MaxBitrate );
+ resMap->InsertL( KAccelerated, (TBool)decinfo->Accelerated );
+ resMap->InsertL( KVersion, decinfo->Version );
+
+ decResList->AppendL( resMap );
+ CleanupStack::Pop( resMap );
+ resMap->Close();
+ }
+ aOutMapParam->InsertL( KCapability, decResList );
+ CleanupStack::PopAndDestroy( decResList );
+ //aOutMapParam->InsertL( KCapability, 1 );
+ }
+ break;
default:
User::Leave(KErrArgument);
}
--- a/serviceproviders/sapi_sysinfo/sysinfoservice/bwins/sysinfoserviceu.def Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/sysinfoservice/bwins/sysinfoserviceu.def Tue Feb 02 00:45:40 2010 +0200
@@ -60,4 +60,6 @@
?Count@CCameraResolutionList@@QBEHXZ @ 59 NONAME ; int CCameraResolutionList::Count(void) const
?MimeTypesList@CCameraInfo@@QBEPAVCStringList@@XZ @ 60 NONAME ; class CStringList * CCameraInfo::MimeTypesList(void) const
?ResolutionList@CCameraInfo@@QBEPAVCCameraResolutionList@@XZ @ 61 NONAME ; class CCameraResolutionList * CCameraInfo::ResolutionList(void) const
+ ??ACVideoDecDataList@@QBEPAUCVideoDecData@0@H@Z @ 62 NONAME ; struct CVideoDecDataList::CVideoDecData * CVideoDecDataList::operator[](int) const
+ ?Count@CVideoDecDataList@@QBEHXZ @ 63 NONAME ; int CVideoDecDataList::Count(void) const
--- a/serviceproviders/sapi_sysinfo/sysinfoservice/eabi/sysinfoserviceu.def Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/sysinfoservice/eabi/sysinfoserviceu.def Tue Feb 02 00:45:40 2010 +0200
@@ -60,4 +60,6 @@
_ZNK21CCameraResolutionList2AtEiiRi @ 59 NONAME
_ZNK21CCameraResolutionList5CountEv @ 60 NONAME
_ZNK21CCameraResolutionListixEi @ 61 NONAME
+ _ZNK17CVideoDecDataList5CountEv @ 62 NONAME
+ _ZNK17CVideoDecDataListixEi @ 63 NONAME
--- a/serviceproviders/sapi_sysinfo/sysinfoservice/group/sysinfoservice.mmp Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/sysinfoservice/group/sysinfoservice.mmp Tue Feb 02 00:45:40 2010 +0200
@@ -66,7 +66,7 @@
LIBRARY PlatformEnv.lib
LIBRARY ImagingConfigManager.lib
LIBRARY Avkon.lib // PhoneLanguage
-LIBRARY estlib.lib //strlen function
+LIBRARY estlib.lib devvideo.lib //strlen function
paged
--- a/serviceproviders/sapi_sysinfo/sysinfoservice/inc/entitykeys.h Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/sysinfoservice/inc/entitykeys.h Tue Feb 02 00:45:40 2010 +0200
@@ -62,7 +62,7 @@
_LIT(KActiveConnections,"ActiveConnections");
_LIT(KConnectionStatus, "ConnectionStatus");
_LIT(KWLanMacAddress, "WLanMacAddress");
-
+_LIT(KWirelessConnSupport, "WirelessConnSupport");
_LIT(KCamera, "Camera");
_LIT(KMemoryCard, "MemoryCard");
@@ -75,7 +75,14 @@
_LIT(KCoverUI, "CoverUI");
_LIT(KSideVolumeKeys, "SideVolumeKeys");
_LIT(KVibra, "Vibra");
+_LIT(KVideoDecoder, "VideoDecoder");
+_LIT(KBT, "Bluetooth");
+_LIT(KIrda, "Irda");
+_LIT(KWlan, "Wlan");
+_LIT(KGsm, "Gsm");
+_LIT(KWcdma, "Wcdma");
+_LIT(KCdma, "Cdma");
_LIT(KBrightness, "Brightness");
_LIT(KPowerSaverTimeOut,"PowerSaverTimeOut");
--- a/serviceproviders/sapi_sysinfo/sysinfoservice/inc/sysinfo.h Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/sysinfoservice/inc/sysinfo.h Tue Feb 02 00:45:40 2010 +0200
@@ -53,7 +53,8 @@
EResolution,
EStringList,
EStringData,
- ECameraInfo
+ ECameraInfo,
+ EVideoDecList
};
public:
/**
@@ -922,5 +923,65 @@
CCameraResolutionList* iResList;
CStringList* iMimeTypesList;
};
+/**
+* @ref CVideoDecDataList
+*
+* @lib sysinfoservice.lib
+* @since S60 3.2
+*/
+NONSHARABLE_CLASS(CVideoDecDataList) : public CSysData
+ {
+ public:
+ struct CVideoDecData
+ {
+ CVideoDecData(const TDesC &iManufacturer,const TDesC &iIdentifier,TInt iMaxBitrate,TBool iAccelerated,const TDesC &iVersion)
+ :MaxBitrate(iMaxBitrate),Accelerated(iAccelerated)
+ {
+ Manufacturer = iManufacturer.AllocL();
+ Identifier = iIdentifier.AllocL();
+ Version=iVersion.AllocL();
+ }
+
+ TInt MaxBitrate;
+ TBool Accelerated;
+ HBufC* Manufacturer;
+ HBufC* Identifier;
+ HBufC* Version;
+ };
+ public:
+ /**
+ * Two-phased constructor.
+ *
+ * @return A new instance of this class.
+ */
+ static CVideoDecDataList* NewL();
+ /**
+ * @return drive number.
+ */
+ void AppendL(CVideoDecData *entry);
+ IMPORT_C CVideoDecData *operator[](TInt aIndex) const;
+ /**
+ * @return number of drives.
+ */
+ IMPORT_C TInt Count() const;
+ /**
+ * Destructor.
+ */
+ ~CVideoDecDataList();
+
+ private:
+ /**
+ * C++ default constructor.
+ */
+ CVideoDecDataList();
+ /**
+ * Symbian 2nd phase constructor.
+ */
+ void ConstructL();
+
+ private:
+ RArray<CVideoDecData *> iDecData;
+ TInt iCount;
+};
#endif __SYSINFO_H__
--- a/serviceproviders/sapi_sysinfo/sysinfoservice/inc/sysinfoservice.h Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/sysinfoservice/inc/sysinfoservice.h Tue Feb 02 00:45:40 2010 +0200
@@ -23,6 +23,7 @@
#include "sysinfo.h"
#include "sysrequest.h"
#include "imagingconfigmanager.h"
+#include <mmf\devvideo\devvideoplay.h >
// FORWORD CLASS DECLARATION
class CSysData;
@@ -292,6 +293,47 @@
CDeviceInfo* iDeviceInfo;
};
+/**
+* @ref MMMFDevVideoPlayObserverImpl is used as video observer
+*
+* @lib sysinfoservice
+* @since S60 9.2
+* @version $Revision: 1.0 $
+*/
+class MMMFDevVideoPlayObserverImpl : public MMMFDevVideoPlayObserver
+ {
+ public:
+
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoNewBuffers() {}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoReturnPicture(TVideoPicture* ) {}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoSupplementalInformation(const TDesC8& ,
+ const TTimeIntervalMicroSeconds& ,
+ const TPictureId& ) {}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoPictureLoss() {}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoPictureLoss(const TArray<TPictureId>& ) {}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoSliceLoss(TUint , TUint , const TPictureId& ){}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoReferencePictureSelection(const TDesC8& ){}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoTimedSnapshotComplete(TInt ,
+ TPictureData* ,
+ const TTimeIntervalMicroSeconds& ,
+ const TPictureId& ){}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoNewPictures() {}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoFatalError(TInt ) {}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoInitComplete(TInt ) {}
+ /* Dummy implementation for virtual function */
+ virtual void MdvpoStreamEnd() {}
+ };
#endif __CSYSINFOSERVICE_H__
--- a/serviceproviders/sapi_sysinfo/sysinfoservice/src/sysinfo.cpp Mon Jan 18 21:02:57 2010 +0200
+++ b/serviceproviders/sapi_sysinfo/sysinfoservice/src/sysinfo.cpp Tue Feb 02 00:45:40 2010 +0200
@@ -1386,5 +1386,75 @@
{
return iMimeTypesList;
}
-
+
+// --------------------------------------------------------------------
+// CVideoDecDataList::CVideoDecDataList()
+// Constructor.
+// --------------------------------------------------------------------
+//
+CVideoDecDataList::CVideoDecDataList():CSysData(EVideoDecList)
+ {
+ }
+
+// --------------------------------------------------------------------
+// CDriveList::~CDriveList()
+// Destructor
+// --------------------------------------------------------------------
+//
+CVideoDecDataList::~CVideoDecDataList()
+ {
+ for(int i=0;i<iDecData.Count();i++)
+ delete iDecData[i];
+ }
+
+// --------------------------------------------------------------------
+// CDriveList::NewL()
+// Two-phased constructor. returns new instance of this class.
+// --------------------------------------------------------------------
+//
+CVideoDecDataList* CVideoDecDataList::NewL()
+ {
+ CVideoDecDataList* self;
+ self = new (ELeave) CVideoDecDataList();
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+// --------------------------------------------------------------------
+// CDriveList::ConstructL()
+// 2nd phase construtor
+// --------------------------------------------------------------------
+//
+void CVideoDecDataList::ConstructL()
+ {
+ }
+
+void CVideoDecDataList::AppendL(CVideoDecData *entry)
+ {
+ iDecData.AppendL(entry);
+ }
+// --------------------------------------------------------------------
+// CDriveList::[]
+// gets drive number at specified index.
+// --------------------------------------------------------------------
+//
+EXPORT_C CVideoDecDataList::CVideoDecData *CVideoDecDataList::operator[](TInt aIndex) const
+ {
+ if(0 <= aIndex && aIndex<iDecData.Count())
+ return iDecData[aIndex];
+ else
+ return NULL;
+ }
+
+// --------------------------------------------------------------------
+// CDriveList::Count
+// returns number of drives.
+// --------------------------------------------------------------------
+//
+EXPORT_C TInt CVideoDecDataList::Count() const
+ {
+ return iDecData.Count();
+ }
// End of file.
--- 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);
}