# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1261032922 -7200 # Node ID 31ef7fef3f45207d6afdc65b6bdebf56f07cfa27 Revision: 200947 Kit: 200951 diff -r 000000000000 -r 31ef7fef3f45 group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/group/bld.inf Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,29 @@ +/* +* Copyright (c) 2006-2007 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#include + +#include "../metadatasrv_plat/group/bld.inf" +#include "../metadatasrv_pub/group/bld.inf" + +#include "../mediamanagementutilities/group/bld.inf" + +PRJ_EXPORTS + +// End of File + diff -r 000000000000 -r 31ef7fef3f45 layers.sysdef.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layers.sysdef.xml Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,20 @@ + + +]> + + + + + + + + + + + + + + + + diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/group/bld.inf Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,20 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#include "../mediafetch/group/bld.inf" diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/BWINS/MGFETCHU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/BWINS/MGFETCHU.DEF Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,6 @@ +EXPORTS + ?RunL@MGFetch@@SAHAAVCDesC16Array@@W4TMediaFileType@@HABVTDesC16@@2PAVMDesC16Array@@PAVMMGFetchVerifier@@@Z @ 1 NONAME ; int MGFetch::RunL(class CDesC16Array &, enum TMediaFileType, int, class TDesC16 const &, class TDesC16 const &, class MDesC16Array *, class MMGFetchVerifier *) + ?RunL@MGFetch@@SAHAAVCDesC16Array@@W4TMediaFileType@@HPAVMMGFetchVerifier@@@Z @ 2 NONAME ; int MGFetch::RunL(class CDesC16Array &, enum TMediaFileType, int, class MMGFetchVerifier *) + ?RunL@MGFetch@@SAHAAVCDesC16Array@@W4TMediaFileType@@HABVTDesC16@@2PAVMMGFetchVerifier@@@Z @ 3 NONAME ; int MGFetch::RunL(class CDesC16Array &, enum TMediaFileType, int, class TDesC16 const &, class TDesC16 const &, class MMGFetchVerifier *) + ?RunL@MGFetch@@SAHAAVCDesC16Array@@W4TMediaFileType@@HABVTDesC16@@2PAVMDesC16Array@@AAPAVMMGFetchCanceler@@PAVMMGFetchVerifier@@@Z @ 4 NONAME ; int MGFetch::RunL(class CDesC16Array &, enum TMediaFileType, int, class TDesC16 const &, class TDesC16 const &, class MDesC16Array *, class MMGFetchCanceler * &, class MMGFetchVerifier *) + diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/EABI/MGFetchU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/EABI/MGFetchU.DEF Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,6 @@ +EXPORTS + _ZN7MGFetch4RunLER12CDesC16Array14TMediaFileTypeiP16MMGFetchVerifier @ 1 NONAME + _ZN7MGFetch4RunLER12CDesC16Array14TMediaFileTypeiRK7TDesC16S5_P16MMGFetchVerifier @ 2 NONAME + _ZN7MGFetch4RunLER12CDesC16Array14TMediaFileTypeiRK7TDesC16S5_P12MDesC16ArrayP16MMGFetchVerifier @ 3 NONAME + _ZN7MGFetch4RunLER12CDesC16Array14TMediaFileTypeiRK7TDesC16S5_P12MDesC16ArrayRP16MMGFetchCancelerP16MMGFetchVerifier @ 4 NONAME + diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/data/MGFetch.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/data/MGFetch.pkg Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,29 @@ +; +; Copyright (c) 2009 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" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +; Languages +&EN + +; Header +#{"MGFetch"}, (0x101f4d8f), 1, 0, 0, TYPE=SA + +; Localised Vendor name +%{"Nokia"} + +; Unique Vendor name +:"Nokia" + +;Files +""-"z:\sys\bin\MGFetch.dll" diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/data/MGFetchStub.sis Binary file mediamanagementutilities/mediafetch/data/MGFetchStub.sis has changed diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/data/buildsis.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/data/buildsis.bat Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,17 @@ +rem +rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +rem All rights reserved. +rem This component and the accompanying materials are made available +rem under the terms of "Eclipse Public License v1.0" +rem which accompanies this distribution, and is available +rem at the URL "http://www.eclipse.org/legal/epl-v10.html". +rem +rem Initial Contributors: +rem Nokia Corporation - initial contribution. +rem +rem Contributors: +rem +rem Description: +rem + +makesis -s MGFetch.pkg MGFetchStub.sis \ No newline at end of file diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/group/bld.inf Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,36 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information file for project MGFetch +* +*/ + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +// Iby files +../rom/mediafetch.iby CORE_MW_LAYER_IBY_EXPORT_PATH( mediafetch.iby ) + +//Stubs +../data/MGFetchStub.sis /epoc32/data/z/system/install/mgfetchstub.SIS + +PRJ_MMPFILES +mediafetch.mmp + +PRJ_TESTMMPFILES + +PRJ_TESTEXPORTS diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/group/mediafetch.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/group/mediafetch.mmp Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,35 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Project definition file for project mediafetch +* +*/ + + +#include + +TARGET MGFetch.dll +TARGETTYPE DLL +UID 0x1000008d 0x101f4d8f // S60 v2.x Media Gallery UID + +CAPABILITY CAP_GENERAL_DLL +VENDORID VID_DEFAULT + +SOURCEPATH ../src +SOURCE MGFetch.cpp +SOURCE mediafetch.cpp + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib +LIBRARY ecom.lib diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/rom/mediafetch.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/rom/mediafetch.iby Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,30 @@ +/* +* Copyright (c) 2007 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: IBY file for mediafetch +* +*/ + + +#ifndef MEDIAFETCH_IBY +#define MEDIAFETCH_IBY + +file=ABI_DIR\BUILD_DIR\MGFetch.dll SHARED_LIB_DIR\MGFetch.dll + +// sis stub +//data=ZSYSTEM\install\MGFetchStub.sis System\Install\MGFetchStub.sis + + +#endif // MEDIAFETCH_IBY + +// End of File diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/src/MGFetch.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/src/MGFetch.cpp Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Media Fetch API +* +*/ + + +#include +#include +#include +#include "mediafetch.h" + +// ======== MEMBER FUNCTIONS ======== + +EXPORT_C TBool MGFetch::RunL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType, + TBool aMultiSelect, + MMGFetchVerifier* aVerifier ) + { + + return RunL( aSelectedFiles, aMediaType, aMultiSelect, + KNullDesC, KNullDesC, NULL, aVerifier ); + } + +EXPORT_C TBool MGFetch::RunL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType, + TBool aMultiSelect, + const TDesC& aSelectionSoftkey, + const TDesC& aHeading, + MMGFetchVerifier* aVerifier ) + { + + return RunL( aSelectedFiles, aMediaType, aMultiSelect, aSelectionSoftkey, + aHeading, NULL, aVerifier ); + } + +EXPORT_C TBool MGFetch::RunL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType, + TBool aMultiSelect, + const TDesC& aSelectionSoftkey, + const TDesC& aHeading, + MDesCArray* aMimeTypes, + MMGFetchVerifier* aVerifier + ) + { + // We just need a pointer to pass as reference, not used + MMGFetchCanceler* dummyCanceler = NULL; + + return RunL( aSelectedFiles, aMediaType, aMultiSelect, aSelectionSoftkey, + aHeading, aMimeTypes, dummyCanceler, aVerifier ); + + } + +EXPORT_C TBool MGFetch::RunL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType, + TBool aMultiSelect, + const TDesC& aSelectionSoftkey, + const TDesC& aHeading, + MDesCArray* aMimeTypes, + MMGFetchCanceler*& aCanceler, + MMGFetchVerifier* aVerifier + ) + { + CMediaFetch* fetch = CMediaFetch::NewLC( (TInt)aMediaType ); + + // Pass optional parameters for plug-in implemention + fetch->SetMultiSelectionL( aMultiSelect ); + if( aMimeTypes ) + { + fetch->SetMimeTypesL( *aMimeTypes ); + } + if( aSelectionSoftkey != KNullDesC ) + { + fetch->SetSelectionSoftkeyL( aSelectionSoftkey ); + } + if( aHeading != KNullDesC ) + { + fetch->SetHeadingL( aHeading ); + } + if( aVerifier ) + { + fetch->SetVerifierL( *aVerifier ); + } + + // Get canceler interface + fetch->GetCancelerL( aCanceler ); + + // Launch fetcher + + TBool result( EFalse ); + TRAPD( error, result = fetch->LaunchL( aSelectedFiles, aMediaType ) ); + aCanceler = NULL; + CleanupStack::PopAndDestroy( fetch ); + User::LeaveIfError( error ); + + return result; + } diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/src/mediafetch.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/src/mediafetch.cpp Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,153 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Media Fetch implementation plug-in loader +* +*/ + + +#include + +#include "mediafetch.h" +#include "mediafetch.hrh" +#include + +// ============================= LOCAL FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// CleanupResetAndDestroy +// ----------------------------------------------------------------------------- +// +void CleanupResetAndDestroy( TAny* aObj ) + { + if( aObj ) + { + static_cast( aObj )->ResetAndDestroy(); + } + } + + +// ======== MEMBER FUNCTIONS ======== + +inline CMediaFetch::CMediaFetch() + { + } + +inline void CMediaFetch::ConstructL( TInt aMediaType ) + { + RImplInfoPtrArray implementations; + CleanupStack::PushL( TCleanupItem( CleanupResetAndDestroy, + &implementations) ); + + // Get a list of all Media Fetch plug-in implementations + REComSession::ListImplementationsL( + TUid::Uid( MEDIAFETCH_ECOM_INTERFACE ), + implementations ); + + TUid uid( TUid::Null() ); + TInt version( -1 ); + + const TInt count( implementations.Count() ); + + // Loop through all found implementations + for( TInt i( 0 ); i < count; ++i ) + { + CImplementationInformation* implInfo = implementations[i]; + + // Get media types supported by the implementation + // The value is assumed to be in hexadecimal as defined in the + // Media Fetch Implementation API + TUint val( 0 ); + TLex8 lex( implInfo->DataType() ); + User::LeaveIfError( lex.Val( val, EHex ) ); + + // Check that the implementation supports the wanted media type(s) + if( ( aMediaType & val ) == aMediaType ) + { + // Pick implementation with highest version number + if( implInfo->Version() > version ) + { + uid = implInfo->ImplementationUid(); + version = implInfo->Version(); + } + } + } + + if( uid == TUid::Null() ) + { + User::Leave( KErrNotSupported ); + } + + + // Instatiate the fetcher plug-in implementation + iFetcher = CMediaFetchImplementation::NewL( uid ); + + CleanupStack::PopAndDestroy(); // implementations + } + +CMediaFetch* CMediaFetch::NewL( TInt aMediaType ) + { + CMediaFetch* self = CMediaFetch::NewLC( aMediaType ); + CleanupStack::Pop( self ); + return self; + } + +CMediaFetch* CMediaFetch::NewLC( TInt aMediaType ) + { + CMediaFetch* self = new( ELeave ) CMediaFetch; + CleanupStack::PushL( self ); + self->ConstructL( aMediaType ); + return self; + } + +CMediaFetch::~CMediaFetch() + { + delete iFetcher; + REComSession::FinalClose(); + } + +void CMediaFetch::SetMultiSelectionL( TBool aMultiSelect ) + { + iFetcher->SetMultiSelectionL( aMultiSelect ); + } + +void CMediaFetch::SetMimeTypesL( const MDesCArray& aMimeTypes ) + { + iFetcher->SetMimeTypesL( aMimeTypes ); + } + +void CMediaFetch::SetSelectionSoftkeyL( const TDesC& aSelectionSoftkey ) + { + iFetcher->SetSelectionSoftkeyL( aSelectionSoftkey ); + } + +void CMediaFetch::SetHeadingL( const TDesC& aHeading ) + { + iFetcher->SetHeadingL( aHeading ); + } + +void CMediaFetch::SetVerifierL( MMGFetchVerifier& aVerifier ) + { + iFetcher->SetVerifierL( aVerifier ); + } + +void CMediaFetch::GetCancelerL( MMGFetchCanceler*& aCanceler ) + { + iFetcher->GetCancelerL( aCanceler ); + } + +TBool CMediaFetch::LaunchL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType ) + { + return iFetcher->LaunchL( aSelectedFiles, aMediaType ); + } diff -r 000000000000 -r 31ef7fef3f45 mediamanagementutilities/mediafetch/src/mediafetch.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediamanagementutilities/mediafetch/src/mediafetch.h Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,120 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Media Fetch implementation plug-in loader +* +*/ + + +#ifndef MEDIAFETCH_H +#define MEDIAFETCH_H + +#include +#include +#include + +class MMGFetchVerifier; +class MMGFetchCanceler; +class CMediaFetchImplementation; +class MDesCArray; + +/** + * Media Fetch ECom plug-in loader + * + * Loads the ECom plug-in with the highest version number that supports the + * media type(s) given at construction parameter. + * + * @lib MGFetch.lib + * @since S60 v3.2 + */ +NONSHARABLE_CLASS( CMediaFetch ) : public CBase + { + +public: + + static CMediaFetch* NewL( TInt aMediaType ); + + static CMediaFetch* NewLC( TInt aMediaType ); + + virtual ~CMediaFetch(); + + /** + * + * @since S60 v3.2 + * @param aMultiSelect if ETrue then multiselection fetcher is enabled + */ + void SetMultiSelectionL( TBool aMultiSelect ); + + /** + * + * @since S60 v3.2 + * @param aMimeTypes plug-in should show only files with given Mime types + */ + void SetMimeTypesL( const MDesCArray& aMimeTypes ); + + /** + * + * @since S60 v3.2 + * @param aSelectionSoftkey Custom selection softkey label + */ + void SetSelectionSoftkeyL( const TDesC& aSelectionSoftkey ); + + /** + * + * @since S60 v3.2 + * @param aHeading Custom heading text for fetcher + */ + void SetHeadingL( const TDesC& aHeading ); + + /** + * + * @since S60 v3.2 + * @param aVerifier See MMGFetchVerifier.h + */ + void SetVerifierL( MMGFetchVerifier& aVerifier ); + + /** + * + * @since S60 v3.2 + * @param aCanceler See MMGFetchCanceler.h + */ + void GetCancelerL( MMGFetchCanceler*& aCanceler ); + + /** + * + * + * @since S60 v3.2 + * @param aSelectedFiles array to hold selected items + * @param aMediaType type of fetcher to use + * @return ETrue if user selected files, EFalse if user canceled the fetcher + */ + TBool LaunchL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType ); + +private: + + inline CMediaFetch(); + + inline void ConstructL( TInt aMediaType ); + +private: // data + + /** + * Fetcher implementation + * Own. + */ + CMediaFetchImplementation* iFetcher; + + }; + +#endif // MEDIAFETCH_H diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_plat/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_plat/group/bld.inf Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,28 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Includes all the Domain API specific bld.inf files, which +* export files. +* +*/ + + + +#include "../media_fetch_implementation_api/group/bld.inf" +#ifndef RD_MDS_2_5 +#include "../content_listing_framework_collection_manager_api/group/bld.inf" +#include "../content_listing_framework_extended_api/group/bld.inf" +#endif + + + diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_plat/media_fetch_implementation_api/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_plat/media_fetch_implementation_api/group/bld.inf Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,29 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: File that exports the files belonging to +: Media Fetch Implementation API +* +*/ + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +../inc/mediafetchimplementation.h MW_LAYER_PLATFORM_EXPORT_PATH(mediafetchimplementation.h) +../inc/mediafetch.hrh MW_LAYER_PLATFORM_EXPORT_PATH(mediafetch.hrh) +../inc/mediafetchimplementation.inl MW_LAYER_PLATFORM_EXPORT_PATH(mediafetchimplementation.inl) diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_plat/media_fetch_implementation_api/inc/mediafetch.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_plat/media_fetch_implementation_api/inc/mediafetch.hrh Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Resource headers for project mediafetch +* +*/ + + +#ifndef MEDIAFETCH_HRH +#define MEDIAFETCH_HRH + +/** ECom interface UID */ +#define MEDIAFETCH_ECOM_INTERFACE 0x102828E7 + +#endif // MEDIAFETCH_HRH diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_plat/media_fetch_implementation_api/inc/mediafetchimplementation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_plat/media_fetch_implementation_api/inc/mediafetchimplementation.h Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,136 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Media Fetch Implementation API +* +*/ + + +#ifndef MEDIAFETCHIMPLEMENTATION_H +#define MEDIAFETCHIMPLEMENTATION_H + +#include +#include + +class MMGFetchVerifier; +class MMGFetchCanceler; + +/** + * ECom interface for Media Fetch plug-in implementation. + * + * Plug-in implementation used for Media Fetch API functionality is selected + * based on plug-ins' implementation information. + * + * Media types supported by the plug-in are defined in plug-in resource's + * default_data. The value must be in hexadecimal format: + * + * LTEXT8 default_data; + * + * Example: default_data = "00000003" if both image (0x00000001) and video + * (0x00000002) fetchers are supported by the plug-in. + * + * See MediaFileTypes.hrh for supported media types. + * + * If multiple plug-ins support the same media type(s) then the plug-in with + * the highest version number is selected. + * + * BYTE version_no; + * + * See registryinfov2.rh for ECom resource structure information. + * + * @lib n/a + * @since S60 v3.2 + */ +class CMediaFetchImplementation : public CBase + { + +public: + + inline static CMediaFetchImplementation* NewL( + const TUid& aImplementationUid ); + + inline virtual ~CMediaFetchImplementation(); + + /** + * Optional feature. + * By default fetcher is single selection fetcher. + * If multi-selection is enabled then plug-in should display a + * multi-selection fetcher and allow user to select several items. + * @since S60 v3.2 + * @param aMultiSelect if ETrue then multiselection fetcher is enabled + */ + virtual void SetMultiSelectionL( TBool aMultiSelect ) = 0; + + /** + * Optional feature. + * @since S60 v3.2 + * @param aMimeTypes plug-in should show only files with given Mime types + */ + virtual void SetMimeTypesL( const MDesCArray& aMimeTypes ) = 0; + + /** + * Optional feature. + * Plug-in should use given text as selection key (SK1) label + * @since S60 v3.2 + * @param aSelectionSoftkey Custom selection softkey label + */ + virtual void SetSelectionSoftkeyL( const TDesC& aSelectionSoftkey ) = 0; + + /** + * Optional feature + * Plug-in should use given text as heading + * @since S60 v3.2 + * @param aHeading Custom heading text for fetcher + */ + virtual void SetHeadingL( const TDesC& aHeading ) = 0; + + /** + * Optional feature. + * Plug-in should call this interface before selection is done. + * if MMGFetchVerifier::VerifySelectionL() returns ETrue + * then the user's selection should be accepted and the fetcher + * closed. If EFalse is returned then user should change the current + * selection before it can be accepted and the fetcher closed. + * @since S60 v3.2 + * @param aVerifier See MMGFetchVerifier.h + */ + virtual void SetVerifierL( MMGFetchVerifier& aVerifier ) = 0; + + /** + * Optional feature. + * Plug-in should return canceler interface. + * @since S60 v3.2 + * @param aCanceler See MMGFetchCanceler.h + */ + virtual void GetCancelerL( MMGFetchCanceler*& aCanceler ) = 0; + + /** + * Plug-in should launch fetcher popup for given media type. + * @since S60 v3.2 + * @param aSelectedFiles plug-in appends selected files to this array + * @param aMediaType plug-in should display only files with this media type + * return ETrue if user selected file(s), EFalse if use cancelled. + */ + virtual TBool LaunchL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType ) = 0; + +private: // data + + // Own: ID key + TUid iDtor_ID_Key; + + }; + +#include "mediafetchimplementation.inl" + +#endif // MEDIAFETCHIMPLEMENTATION_H diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_plat/media_fetch_implementation_api/inc/mediafetchimplementation.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_plat/media_fetch_implementation_api/inc/mediafetchimplementation.inl Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,47 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Media Fetch Implementation API +* +*/ + + +// INCLUDE FILES +#include + +// ----------------------------------------------------------------------------- +// ?implementation_description +// ----------------------------------------------------------------------------- +// +inline CMediaFetchImplementation* CMediaFetchImplementation::NewL( + const TUid& aImplementationUid ) + { + TAny* ptr = REComSession::CreateImplementationL( + aImplementationUid, + _FOFF( CMediaFetchImplementation, iDtor_ID_Key ) ); + + return reinterpret_cast(ptr); + } + + +// ----------------------------------------------------------------------------- +// ?implementation_description +// ----------------------------------------------------------------------------- +// +inline CMediaFetchImplementation::~CMediaFetchImplementation() + { + if( iDtor_ID_Key.iUid != 0 ) + { + REComSession::DestroyedImplementation( iDtor_ID_Key ); + } + } diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_plat/media_fetch_implementation_api/media_fetch_implementation_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_plat/media_fetch_implementation_api/media_fetch_implementation_api.metaxml Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,17 @@ + + + Media Fetch Implementation API + An ECom plug-in interface for implementing Media Fetch plug-ins + c++ + mediamanagementutilities + + + + + + + + no + no + + diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_pub/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_pub/group/bld.inf Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,23 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Includes all the SDK API specific bld.inf files, which +* export files. +* +*/ + + +#ifndef RD_MDS_2_5 +#include "../content_listing_framework_api/group/bld.inf" +#endif +#include "../media_fetch_api/group/bld.inf" diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_pub/media_fetch_api/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_pub/media_fetch_api/group/bld.inf Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,30 @@ +/* +* Copyright (c) 2006 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: File that exports the files belonging to +: Media Fetch API +* +*/ + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +../inc/MediaFileTypes.hrh MW_LAYER_PUBLIC_EXPORT_PATH(MediaFileTypes.hrh) +../inc/MGFetch.h MW_LAYER_PUBLIC_EXPORT_PATH(MGFetch.h) +../inc/MMGFetchVerifier.h MW_LAYER_PUBLIC_EXPORT_PATH(MMGFetchVerifier.h) +../inc/MMGFetchCanceler.h MW_LAYER_PUBLIC_EXPORT_PATH(MMGFetchCanceler.h) diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_pub/media_fetch_api/inc/MGFetch.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_pub/media_fetch_api/inc/MGFetch.h Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,146 @@ +/* +* Copyright (c) 2002 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Media fetch API +* +*/ + + +#ifndef MGFETCH_H +#define MGFETCH_H + +// INCLUDES +#include +#include +#include + +// FORWARD DECLARATIONS +class MMGFetchVerifier; +class MMGFetchCanceler; + +// CLASS DECLARATION + +/** +* MGFetch can be used to to fetch media files from third party applications. +* Supported TMediaFileType's EImageFile, EVideoFile, EAudioFile and EMusicFile. +* +* @lib MGFetch.lib +* @since 2.0 +*/ +class MGFetch + { + public: // New functions + + /** + * Launch media file fetcher for single media type + * + * @since 2.0 + * @param aSelectedFiles Array to hold selected files + * @param aMediaType Defines what media files to fetch + * @param aMultiSelect Single or multiple file selection + * @param aVerifier Optional verifier for file selection + * @return ETrue if user selected file(s), EFalse if cancelled + * + * will leave with KErrNotSupported if plugin for wanted content + * is not found. + */ + IMPORT_C static TBool RunL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType, + TBool aMultiSelect, + MMGFetchVerifier* aVerifier = NULL ); + + /** + * Launch media file fetcher for single media type + * + * @since 2.6 + * @param aSelectedFiles Array to hold selected files + * @param aMediaType Defines what media files to fetch + * @param aMultiSelect Single or multiple file selection + * @param aSelectionSoftkey Optional text for left softkey + * (KNullDesC for default text) + * @param aHeading Optional text for popup heading + * (KNullDesC for default text) + * @param aVerifier Optional verifier for file selection + * @return ETrue if user selected file(s), EFalse if cancelled + * + * will leave with KErrNotSupported if plugin for wanted content + * is not found. + */ + IMPORT_C static TBool RunL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType, + TBool aMultiSelect, + const TDesC& aSelectionSoftkey, + const TDesC& aHeading, + MMGFetchVerifier* aVerifier = NULL ); + + /** + * Launch media file fetcher for single media type + * + * @since 2.6 + * @param aSelectedFiles Array to hold selected files + * @param aMediaType Defines what media files to fetch + * @param aMultiSelect Single or multiple file selection + * @param aSelectionSoftkey Optional text for left softkey + * (KNullDesC for default text) + * @param aHeading Optional text for popup heading + * (KNullDesC for default text) + * @param aMimeTypes Optional array containing MIME types of files + * which are displayed in the fetcher + * @param aVerifier Optional verifier for file selection + * @return ETrue if user selected file(s), EFalse if cancelled + * + * will leave with KErrNotSupported if plugin for wanted content + * is not found. + */ + IMPORT_C static TBool RunL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType, + TBool aMultiSelect, + const TDesC& aSelectionSoftkey, + const TDesC& aHeading, + MDesCArray* aMimeTypes, + MMGFetchVerifier* aVerifier = NULL ); + + /** + * Launch media file fetcher for single media type + * + * @since 2.6 + * @param aSelectedFiles Array to hold selected files + * @param aMediaType Defines what media files to fetch + * @param aMultiSelect Single or multiple file selection + * @param aSelectionSoftkey Optional text for left softkey + * (KNullDesC for default text) + * @param aHeading Optional text for popup heading + * (KNullDesC for default text) + * @param aMimeTypes Optional array containing MIME types of files + * which are displayed in the fetcher + * @param aCanceler Reference to canceler interface pointer + * @param aVerifier Optional verifier for file selection + * @return ETrue if user selected file(s), EFalse if cancelled + * + * will leave with KErrNotSupported if plugin for wanted content + * is not found. + */ + IMPORT_C static TBool RunL( CDesCArray& aSelectedFiles, + TMediaFileType aMediaType, + TBool aMultiSelect, + const TDesC& aSelectionSoftkey, + const TDesC& aHeading, + MDesCArray* aMimeTypes, + MMGFetchCanceler*& aCanceler, + MMGFetchVerifier* aVerifier = NULL + ); + + }; +#endif // MGFETCH_H + +// End of File diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_pub/media_fetch_api/inc/MMGFetchCanceler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_pub/media_fetch_api/inc/MMGFetchCanceler.h Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2002 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ?Description +* +*/ + + +#ifndef MMGFETCHCANCELER_H +#define MMGFETCHCANCELER_H + +// CLASS DECLARATION + +/** +* Interface for canceling the fetch popup +* +* @since 2.6 +*/ +class MMGFetchCanceler + { + public: // New functions + /** + * Calling this method while the fetcher (MGFetch.h) popup is visible + * (when the MMGFetchCanceler pointer is NOT NULL) causes the fetcher + * to close. + * + * @since 2.6 + */ + virtual void CancelFetcherL() = 0; + }; + +#endif // MMGFETCHCANCELER_H + +// End of File diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_pub/media_fetch_api/inc/MMGFetchVerifier.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_pub/media_fetch_api/inc/MMGFetchVerifier.h Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,57 @@ +/* +* Copyright (c) 2002 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ?Description +* +*/ + + +#ifndef MMGFETCHVERIFIER_H +#define MMGFETCHVERIFIER_H + + +// INCLUDES +#include // MDesCArray + +// CLASS DECLARATION + +/** +* Interface for verifying fetch selection before the fetch popup is closed +* +* @since 2.0 +*/ +class MMGFetchVerifier + { + public: // Constructors and destructor + + virtual ~MMGFetchVerifier() {} + + public: // New functions + /** + * Interface for verifying fetch file selection (see MGFetch.h) + * If MMGFetchVerifier is passed to MGFetch then VerifySelectionL + * is called when user tries to select file(s) from the fetcher. + * If VerifySelectionL returns ETrue then the fetcher popup is closed and + * the selection is accepted. If VerifySelectionL returns EFalse then the + * fetcher is not closed and user needs to select different file(s) or + * cancel the operation. + * + * @since 2.0 + * @param aSelectedFiles Array holding the file(s) to be verified + * @return ETrue if selection is accepted, EFalse if not + */ + virtual TBool VerifySelectionL( const MDesCArray* aSelectedFiles ) = 0; + }; +#endif // MMGFETCHVERIFIER_H + +// End of File diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_pub/media_fetch_api/inc/MediaFileTypes.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_pub/media_fetch_api/inc/MediaFileTypes.hrh Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2002 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef MEDIAFILETYPES_HRH +#define MEDIAFILETYPES_HRH + +// CONSTANTS + +// Media file types supported by Media Gallery + +enum TMediaFileType + { + ENoMediaFile = 0x00000000, + EImageFile = 0x00000001, + EVideoFile = 0x00000002, + EAudioFile = 0x00000004, + ERAMFile = 0x00000008, // Not supported since S60 5.0 + EPlaylistFile = 0x00000010, // Not supported since S60 5.0 + EGMSFile = 0x00000020, // Not supported since S60 2.6 + EMusicFile = 0x00000040, + EPresentationsFile = 0x00000080, // Not supported since S60 5.0 + EAnyMediaFile = 0x0000FFFF // Not supported since S60 5.0 + }; + +#endif // MEDIAFILETYPES_HRH +// End of File diff -r 000000000000 -r 31ef7fef3f45 metadatasrv_pub/media_fetch_api/media_fetch_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metadatasrv_pub/media_fetch_api/media_fetch_api.metaxml Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,18 @@ + + + Media Fetch API + An interface for selecting media files + c++ + mediamanagementutilities + + + + + + + + + no + no + + diff -r 000000000000 -r 31ef7fef3f45 package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_definition.xml Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 31ef7fef3f45 sysdef_1_4_0.dtd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysdef_1_4_0.dtd Thu Dec 17 08:55:22 2009 +0200 @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +