|
1 /* |
|
2 * Copyright (c) 2009-2010 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: Document implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <apgwgnam.h> |
|
21 #include "VoIPProvisioningDocument.h" |
|
22 #include "VoIPProvisioningAppUi.h" |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS ============================== |
|
25 |
|
26 // ---------------------------------------------------------------------------- |
|
27 // CVoIPProvisioningDocument::~CVoIPProvisioningDocument() |
|
28 // ---------------------------------------------------------------------------- |
|
29 |
|
30 CVoIPProvisioningDocument::~CVoIPProvisioningDocument() |
|
31 { |
|
32 } |
|
33 |
|
34 // ---------------------------------------------------------------------------- |
|
35 // CVoIPProvisioningDocument::CreateAppUiL() |
|
36 // Creates CVoIPProvisioningAppUi |
|
37 // ---------------------------------------------------------------------------- |
|
38 CEikAppUi* CVoIPProvisioningDocument::CreateAppUiL() |
|
39 { |
|
40 // Create new instance of appui class |
|
41 return new (ELeave) CVoIPProvisioningAppUi(); |
|
42 } |
|
43 |
|
44 // ---------------------------------------------------------------------------- |
|
45 // CVoIPProvisioningDocument::UpdateTaskNameL( CApaWindowGroupName* aWgName ) |
|
46 // ---------------------------------------------------------------------------- |
|
47 void CVoIPProvisioningDocument::UpdateTaskNameL( CApaWindowGroupName* aWgName ) |
|
48 { |
|
49 // Set task name to be hidden from the tasklist |
|
50 CAknDocument::UpdateTaskNameL( aWgName ); |
|
51 aWgName->SetHidden( ETrue ); |
|
52 } |
|
53 |
|
54 // ---------------------------------------------------------------------------- |
|
55 // CVoIPProvisioningDocument::OpenFileL |
|
56 // ---------------------------------------------------------------------------- |
|
57 CFileStore* CVoIPProvisioningDocument::OpenFileL( TBool aDoOpen, |
|
58 const TDesC& aFilename, RFs& aFs ) |
|
59 { |
|
60 if ( aDoOpen ) |
|
61 { |
|
62 RFile file; |
|
63 TInt error( file.Open( aFs, aFilename, EFileShareAny | EFileRead ) ); |
|
64 if ( error == KErrNone ) |
|
65 { |
|
66 static_cast<CVoIPProvisioningAppUi*>(iAppUi)->HandleFileL( file ); |
|
67 } |
|
68 } |
|
69 |
|
70 return NULL; |
|
71 } |
|
72 |
|
73 // ---------------------------------------------------------------------------- |
|
74 // CVoIPProvisioningDocument::OpenFileL |
|
75 // ---------------------------------------------------------------------------- |
|
76 void CVoIPProvisioningDocument::OpenFileL( CFileStore*& /*aFileStore*/, |
|
77 RFile& aFile ) |
|
78 { |
|
79 // Request appui to handle this file |
|
80 static_cast<CVoIPProvisioningAppUi*>( iAppUi )->HandleFileL( aFile ); |
|
81 } |
|
82 |
|
83 // End of File |