sl@0: // Copyright (c) 2006-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: // sl@0: sl@0: #include "definitions.h" sl@0: sl@0: /* sl@0: ** Connect to the framework. sl@0: */ sl@0: TInt RAppArc::Connect() sl@0: { sl@0: TInt err; sl@0: sl@0: do sl@0: { sl@0: err = iAppArc.Connect(); sl@0: if (err != KErrNone) sl@0: { sl@0: break; sl@0: } sl@0: sl@0: err = iFs.Connect(); sl@0: if (err != KErrNone) sl@0: { sl@0: break; sl@0: } sl@0: sl@0: err = iFs.ShareProtected(); sl@0: if (err != KErrNone) sl@0: { sl@0: break; sl@0: } sl@0: sl@0: return KErrNone; sl@0: } sl@0: while (EFalse); sl@0: sl@0: // If we get here then an error has occurred. sl@0: Close(); sl@0: return err; sl@0: } sl@0: sl@0: /* sl@0: ** sl@0: */ sl@0: void RAppArc::Close() sl@0: { sl@0: iFs.Close(); sl@0: iAppArc.Close(); sl@0: } sl@0: sl@0: /* sl@0: ** sl@0: */ sl@0: TInt RAppArc::Recognise(RFile& aFile, TDataType& aDataType) sl@0: { sl@0: TUid uid; sl@0: sl@0: uid.iUid = 0; sl@0: return iAppArc.AppForDocument(aFile, uid, aDataType); sl@0: } sl@0: sl@0: /* sl@0: ** sl@0: */ sl@0: TInt RAppArc::Recognise(RFile& aFile, TDataRecognitionResult& aResult) sl@0: { sl@0: aResult.Reset(); sl@0: return iAppArc.RecognizeData(aFile, aResult); sl@0: } sl@0: sl@0: /* sl@0: ** sl@0: */ sl@0: RFs& RAppArc::FileServer() sl@0: { sl@0: return iFs; sl@0: } sl@0: sl@0: