sl@0: // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // This is the body of the MMF recognizer utility class sl@0: // sl@0: // sl@0: sl@0: #ifndef __RECMMFUTILBODY_H__ sl@0: #define __RECMMFUTILBODY_H__ sl@0: sl@0: #include "mmfcontrollerpluginresolver.h" sl@0: #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS sl@0: #include sl@0: #endif sl@0: sl@0: /** sl@0: * @internalAll sl@0: * sl@0: * Body of MMF utility class used by MMF recognizer sl@0: * Maintains an array of CMMFControllerImplementationInformation objects sl@0: * so that data headers can be speedily matched against. sl@0: * Updates the array when notified by ECOM of a change to the global sl@0: * interface implementation registration data. sl@0: */ sl@0: NONSHARABLE_CLASS( CMmfRecognizerUtil::CBody ) : public CActive sl@0: { sl@0: public: sl@0: static void GetMimeTypesL(CDesC8Array* aMimeTypes); sl@0: sl@0: static CBody* NewL(); sl@0: sl@0: ~CBody(); sl@0: TMatchLevel GetMimeTypeL(const TDesC& aFileName, const TDesC8& aImageData, TDes8& aMimeType); sl@0: sl@0: protected: sl@0: virtual void DoCancel(); sl@0: virtual void RunL(); sl@0: sl@0: private: sl@0: CBody(); sl@0: void ConstructL(); sl@0: void StartNotification(); sl@0: void BuildControllerListL(); sl@0: sl@0: private: sl@0: /** an array of pointers to CMMFControllerImplementationInformation objects */ sl@0: RMMFControllerImplInfoArray iControllers; sl@0: /** for opening a session to the ECom server */ sl@0: REComSession iEcomSession; sl@0: sl@0: }; sl@0: sl@0: #endif