|
1 /* |
|
2 * Copyright (c) 2006-2007 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: This class is used to launch InDevice Search with a list of parameters |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 // System includes |
|
24 #include <AiwMenu.h> |
|
25 #include <AiwCommon.h> |
|
26 #include <AiwGenericParam.h> |
|
27 #include <e32cmn.h> |
|
28 #include <coemain.h> |
|
29 #include <e32def.h> |
|
30 #include <apgtask.h> |
|
31 #include <s32mem.h> |
|
32 #include <AknLaunchAppService.h> |
|
33 #include <AiwGenericParam.h> |
|
34 |
|
35 #include <apgcli.h> |
|
36 #include <barsc.h> |
|
37 #include <bautils.h> |
|
38 |
|
39 // User Includes |
|
40 #include "searchservicelauncher.h" |
|
41 |
|
42 // ------------------------------------------------------------------------------------------------- |
|
43 // Symbian OS 2 phased constructor. |
|
44 // ------------------------------------------------------------------------------------------------- |
|
45 // |
|
46 CSearchServiceLauncher* CSearchServiceLauncher::NewL() |
|
47 { |
|
48 CSearchServiceLauncher* self = CSearchServiceLauncher::NewLC(); |
|
49 CleanupStack::Pop( self ); |
|
50 return self; |
|
51 } |
|
52 |
|
53 // ------------------------------------------------------------------------------------------------- |
|
54 // Symbian OS 2 phased constructor. |
|
55 // ------------------------------------------------------------------------------------------------- |
|
56 // |
|
57 CSearchServiceLauncher* CSearchServiceLauncher::NewLC() |
|
58 { |
|
59 CSearchServiceLauncher* self = new ( ELeave ) CSearchServiceLauncher(); |
|
60 CleanupStack::PushL( self ); |
|
61 self->ConstructL(); |
|
62 return self; |
|
63 } |
|
64 |
|
65 // ------------------------------------------------------------------------------------------------- |
|
66 // Destructor |
|
67 // ------------------------------------------------------------------------------------------------- |
|
68 // |
|
69 CSearchServiceLauncher::~CSearchServiceLauncher() |
|
70 { |
|
71 } |
|
72 |
|
73 // ------------------------------------------------------------------------------------------------- |
|
74 // Launch In-Device-Search with a list of parameters |
|
75 // ------------------------------------------------------------------------------------------------- |
|
76 // |
|
77 void CSearchServiceLauncher::SearchL( TInt /*aFunction*/, const CAiwGenericParamList& aParamList ) |
|
78 { |
|
79 TApaAppInfo *appInfo = new ( ELeave ) TApaAppInfo; |
|
80 CleanupStack::PushL ( appInfo ); |
|
81 RApaLsSession apaSession; |
|
82 User::LeaveIfError( apaSession.Connect() ); |
|
83 CleanupClosePushL( apaSession ); |
|
84 TInt error = apaSession.GetAppInfo( *appInfo, KSrchAppUid ); |
|
85 User::LeaveIfError(error); |
|
86 CleanupStack::PopAndDestroy( &apaSession ); // apaSession |
|
87 |
|
88 if ( iLaunchAppService ) |
|
89 { |
|
90 delete iLaunchAppService; |
|
91 iLaunchAppService = NULL; |
|
92 } |
|
93 |
|
94 iLaunchAppService = CAknLaunchAppService::NewL(appInfo->iUid, this, const_cast<CAiwGenericParamList*>(&aParamList)); |
|
95 |
|
96 CleanupStack::PopAndDestroy( appInfo ); // appInfo |
|
97 } |
|
98 |
|
99 |
|
100 // ------------------------------------------------------------------------------------------------- |
|
101 // Performs the second phase construction. |
|
102 // ------------------------------------------------------------------------------------------------- |
|
103 // |
|
104 void CSearchServiceLauncher::ConstructL() |
|
105 { |
|
106 } |
|
107 |
|
108 |
|
109 // ------------------------------------------------------------------------------------------------- |
|
110 // Performs the first phase construction. |
|
111 // ------------------------------------------------------------------------------------------------- |
|
112 // |
|
113 CSearchServiceLauncher::CSearchServiceLauncher() |
|
114 { |
|
115 } |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 //end of file |