|
1 // Copyright (c) 1998-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 // IMPSMAIN.CPP |
|
15 // |
|
16 |
|
17 #include <e32std.h> |
|
18 #include <barsc.h> // RResourceFile |
|
19 #include <bautils.h> // Bafl:: |
|
20 #include <msvutils.h> |
|
21 #include <miuthdr.h> |
|
22 #include "impspan.h" |
|
23 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
24 #include "timrfc822datefield.h" |
|
25 #endif |
|
26 |
|
27 GLDEF_C void gPanic(TImpsPanic aPanic) |
|
28 { |
|
29 User::Panic(_L("IMPS"),aPanic); |
|
30 } |
|
31 |
|
32 GLDEF_C void OpenResourceFileL(RResourceFile& rFile, RFs& anFs) |
|
33 { |
|
34 // NB need to check on all drives - won't necessarily be on |
|
35 // the same one as IMPS.DLL |
|
36 // |
|
37 TFileName fileName(KImEngineResourceFile); |
|
38 MsvUtils::AddPathAndExtensionToResFileL(fileName); |
|
39 BaflUtils::NearestLanguageFile( anFs, fileName ); |
|
40 if (BaflUtils::FileExists(anFs,fileName)) |
|
41 { |
|
42 rFile.OpenL(anFs,fileName); // Qualified: no leavescan error |
|
43 return; |
|
44 } |
|
45 User::Leave(KErrNotFound); |
|
46 } |
|
47 |
|
48 GLDEF_C void CloseResourceFile( TAny* file ) |
|
49 { |
|
50 ((RResourceFile*)file)->Close(); |
|
51 } |