|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: MidletAppInfo implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "appmngr2midletresourcehandler.h" |
|
19 #include "s60commonutils.h" |
|
20 |
|
21 // MIDlet Runtime plugin resource |
|
22 _LIT(KFileAppMngr2MidletResource, "javaapplicationsettings.rsc"); |
|
23 |
|
24 CAppMngr2MidletResourceHandler* CAppMngr2MidletResourceHandler::NewL() |
|
25 { |
|
26 CAppMngr2MidletResourceHandler* self = new(ELeave) CAppMngr2MidletResourceHandler(); |
|
27 CleanupStack::PushL(self); |
|
28 self->ConstructL(); |
|
29 CleanupStack::Pop(self); |
|
30 return self; |
|
31 } |
|
32 |
|
33 CAppMngr2MidletResourceHandler::CAppMngr2MidletResourceHandler() |
|
34 { |
|
35 } |
|
36 |
|
37 void CAppMngr2MidletResourceHandler::ConstructL() |
|
38 { |
|
39 iResourceFileName = java::util::S60CommonUtils::ResourceLanguageFileNameL( |
|
40 KFileAppMngr2MidletResource); |
|
41 iEnv = CEikonEnv::Static(); |
|
42 } |
|
43 |
|
44 CAppMngr2MidletResourceHandler::~CAppMngr2MidletResourceHandler() |
|
45 { |
|
46 } |
|
47 |
|
48 TInt CAppMngr2MidletResourceHandler::AddResourceFileL() |
|
49 { |
|
50 return iEnv->AddResourceFileL(iResourceFileName); |
|
51 } |
|
52 |
|
53 void CAppMngr2MidletResourceHandler::DeleteResourceFile(TInt aResourceFileOffset) |
|
54 { |
|
55 if (aResourceFileOffset > 0) |
|
56 { |
|
57 iEnv->DeleteResourceFile(aResourceFileOffset); |
|
58 } |
|
59 } |