|
1 /* |
|
2 * Copyright (c) 2007-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: Implementation of CWsfAiHelperDocument |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "wsfaihelperappui.h" |
|
20 #include "wsfaihelperdocument.h" |
|
21 #include "wsfmodel.h" |
|
22 #include "wsfwlaninfo.h" |
|
23 |
|
24 |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // CWsfAiHelperDocument::NewL |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 CWsfAiHelperDocument* CWsfAiHelperDocument::NewL( CEikApplication& aApp ) |
|
31 { |
|
32 CWsfAiHelperDocument* self = NewLC( aApp ); |
|
33 CleanupStack::Pop( self ); |
|
34 return self; |
|
35 } |
|
36 |
|
37 |
|
38 // --------------------------------------------------------------------------- |
|
39 // CWsfAiHelperDocument::NewLC |
|
40 // --------------------------------------------------------------------------- |
|
41 // |
|
42 CWsfAiHelperDocument* CWsfAiHelperDocument::NewLC( CEikApplication& aApp ) |
|
43 { |
|
44 CWsfAiHelperDocument* self = new (ELeave) CWsfAiHelperDocument( aApp ); |
|
45 CleanupStack::PushL( self ); |
|
46 self->ConstructL(); |
|
47 return self; |
|
48 } |
|
49 |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // CWsfAiHelperDocument::ConstructL |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 void CWsfAiHelperDocument::ConstructL() |
|
56 { |
|
57 } |
|
58 |
|
59 |
|
60 // --------------------------------------------------------------------------- |
|
61 // CWsfAiHelperDocument::CWsfAiHelperDocument |
|
62 // --------------------------------------------------------------------------- |
|
63 // |
|
64 CWsfAiHelperDocument::CWsfAiHelperDocument( CEikApplication& aApp ): |
|
65 CAknDocument( aApp ) |
|
66 { |
|
67 // no implementation required |
|
68 } |
|
69 |
|
70 |
|
71 // --------------------------------------------------------------------------- |
|
72 // CWsfAiHelperDocument::~CWsfAiHelperDocument |
|
73 // --------------------------------------------------------------------------- |
|
74 // |
|
75 CWsfAiHelperDocument::~CWsfAiHelperDocument() |
|
76 { |
|
77 delete iModel; |
|
78 } |
|
79 |
|
80 |
|
81 // --------------------------------------------------------------------------- |
|
82 // CWsfAiHelperDocument::CreateAppUiL |
|
83 // --------------------------------------------------------------------------- |
|
84 // |
|
85 CEikAppUi* CWsfAiHelperDocument::CreateAppUiL() |
|
86 { |
|
87 // Create the application user interface, and return a pointer to it, |
|
88 // the framework takes ownership of this object |
|
89 CWsfAiHelperAppUi* appUi = new (ELeave) CWsfAiHelperAppUi; |
|
90 iModel = CWsfModel::NewL( *appUi, EFalse ); |
|
91 |
|
92 iModel->EnableScanL(); |
|
93 return appUi; |
|
94 } |
|
95 |
|
96 |
|
97 // --------------------------------------------------------------------------- |
|
98 // CWsfAiHelperDocument::OpenFileL |
|
99 // --------------------------------------------------------------------------- |
|
100 // |
|
101 CFileStore* CWsfAiHelperDocument::OpenFileL( TBool /*aDoOpen*/, |
|
102 const TDesC& aFilename, |
|
103 RFs &/*aFs*/ ) |
|
104 { |
|
105 // Read the afilename arg |
|
106 // Take that into a TWlanInfo and start creation of accesspoint |
|
107 TPckgBuf<TWsfWlanInfo> info; |
|
108 |
|
109 info.Copy( aFilename.Left( sizeof( TWsfWlanInfo ) ) ); |
|
110 |
|
111 iWlanInfo = info(); |
|
112 |
|
113 static_cast<CWsfAiHelperAppUi*>( iAppUi )->NotifyFileName(); |
|
114 |
|
115 return NULL; |
|
116 } |
|
117 |
|
118 |
|
119 |