|
1 /* |
|
2 * Copyright (c) 2005 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: MusicShop embedded launcher |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUSICSHOP_EMBEDDED_LAUNCHER_H |
|
21 #define MUSICSHOP_EMBEDDED_LAUNCHER_H |
|
22 |
|
23 #include <MusicShopExternalInterface.h> |
|
24 #include <Avkon.rsg> |
|
25 #include <AknServerApp.h> |
|
26 |
|
27 class CAknNullService; |
|
28 class CAknLaunchAppService; |
|
29 class CGenericParamList; |
|
30 |
|
31 const TInt KMusDefaultIap = 0; // 0 means application will take the default |
|
32 // internet access point from comms db. |
|
33 |
|
34 /** |
|
35 * Launches MusicShop in Embedded mode. |
|
36 * |
|
37 * @lib MusicShopLib.lib |
|
38 * @since S60 3.2.3 |
|
39 */ |
|
40 |
|
41 NONSHARABLE_CLASS ( CMusicShopEmbeddedLauncher ) |
|
42 : public CBase, |
|
43 public MAknServerAppExitObserver |
|
44 { |
|
45 public: |
|
46 |
|
47 /** |
|
48 * First phase constructor, |
|
49 * |
|
50 * @since S60 v3.2.3 |
|
51 * @param aCoeEnv Eikon environment |
|
52 */ |
|
53 static IMPORT_C CMusicShopEmbeddedLauncher* NewL(CEikonEnv* aCoeEnv); |
|
54 |
|
55 /** |
|
56 * Destructor |
|
57 * |
|
58 * @since S60 v3.2.3 |
|
59 */ |
|
60 IMPORT_C virtual ~CMusicShopEmbeddedLauncher(); |
|
61 |
|
62 /** |
|
63 * Activate MusicShop browser view, this API can also |
|
64 * be used to send DNL message to already launched MS |
|
65 * application. |
|
66 * |
|
67 * @since S60 v3.2.3 |
|
68 * @param aUrlLink name of the url |
|
69 * @param aDefaultAccessPoint URL access point |
|
70 * 0 to use default AP |
|
71 * @param aRskId Right softkey id |
|
72 */ |
|
73 static IMPORT_C void ActivateMusBrViewL( |
|
74 const TDesC& aUrlLink, |
|
75 const TUint aDefaultAccessPoint = KMusDefaultIap, |
|
76 const TInt aRskId = R_AVKON_SOFTKEYS_OPTIONS_BACK); |
|
77 |
|
78 /** |
|
79 * This will launch the music shop application based on view id |
|
80 * |
|
81 * @since S60 v3.2.3 |
|
82 * @param aUrlLink If Url is set to NULL then Bookmark view |
|
83 * is launched else browser view. |
|
84 * @param aDefaultAccessPoint URL access point |
|
85 * 0 to use default AP |
|
86 * @param aRskId Right softkey id |
|
87 */ |
|
88 IMPORT_C void LaunchMusicShopL( |
|
89 const TDesC& aUrlLink, |
|
90 const TUint aDefaultAccessPoint = KMusDefaultIap, |
|
91 const TInt aRskId = R_AVKON_SOFTKEYS_OPTIONS_BACK); |
|
92 private: |
|
93 /** |
|
94 * Default Contructor |
|
95 * |
|
96 * @since S60 v3.2.3 |
|
97 * @param aCoeEnv Eikon environment |
|
98 */ |
|
99 CMusicShopEmbeddedLauncher(CEikonEnv* aCoeEnv); |
|
100 |
|
101 /** |
|
102 * Second phase constructor |
|
103 * |
|
104 * @since S60 v3.2.3 |
|
105 */ |
|
106 void ConstructL(); |
|
107 |
|
108 /** |
|
109 * This will launch the music shop application based on view id and URL value |
|
110 * |
|
111 * @since S60 v3.2.3 |
|
112 * @param aViewId KUidMusBmViewId for launching Bookmark view else |
|
113 * KUidMusBrViewId for browser view |
|
114 * @param aUrlLink Link to be loaded by the browser view. |
|
115 * @param aDefaultAccessPoint URL access point |
|
116 * @param aRskId Right softkey id |
|
117 */ |
|
118 void LaunchMusicShopL( |
|
119 const TUid& aViewId, |
|
120 const TDesC& aUrlLink, |
|
121 const TUint aDefaultAccessPoint, |
|
122 const TInt aRskId |
|
123 ); |
|
124 |
|
125 |
|
126 private: |
|
127 CEikonEnv* iCoeEnv; |
|
128 CAknNullService* iNullService; |
|
129 CAknLaunchAppService* iLaunchAppService; |
|
130 }; |
|
131 |
|
132 #endif // MUSICSHOP_EMBEDDED_LAUNCHER_H |
|
133 |
|
134 // End of File |