equal
deleted
inserted
replaced
|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "definitions.h" |
|
17 |
|
18 /* |
|
19 ** Connect to the framework. |
|
20 */ |
|
21 TInt RAppArc::Connect() |
|
22 { |
|
23 TInt err; |
|
24 |
|
25 do |
|
26 { |
|
27 err = iAppArc.Connect(); |
|
28 if (err != KErrNone) |
|
29 { |
|
30 break; |
|
31 } |
|
32 |
|
33 err = iFs.Connect(); |
|
34 if (err != KErrNone) |
|
35 { |
|
36 break; |
|
37 } |
|
38 |
|
39 err = iFs.ShareProtected(); |
|
40 if (err != KErrNone) |
|
41 { |
|
42 break; |
|
43 } |
|
44 |
|
45 return KErrNone; |
|
46 } |
|
47 while (EFalse); |
|
48 |
|
49 // If we get here then an error has occurred. |
|
50 Close(); |
|
51 return err; |
|
52 } |
|
53 |
|
54 /* |
|
55 ** |
|
56 */ |
|
57 void RAppArc::Close() |
|
58 { |
|
59 iFs.Close(); |
|
60 iAppArc.Close(); |
|
61 } |
|
62 |
|
63 /* |
|
64 ** |
|
65 */ |
|
66 TInt RAppArc::Recognise(RFile& aFile, TDataType& aDataType) |
|
67 { |
|
68 TUid uid; |
|
69 |
|
70 uid.iUid = 0; |
|
71 return iAppArc.AppForDocument(aFile, uid, aDataType); |
|
72 } |
|
73 |
|
74 /* |
|
75 ** |
|
76 */ |
|
77 TInt RAppArc::Recognise(RFile& aFile, TDataRecognitionResult& aResult) |
|
78 { |
|
79 aResult.Reset(); |
|
80 return iAppArc.RecognizeData(aFile, aResult); |
|
81 } |
|
82 |
|
83 /* |
|
84 ** |
|
85 */ |
|
86 RFs& RAppArc::FileServer() |
|
87 { |
|
88 return iFs; |
|
89 } |
|
90 |
|
91 |