|
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: Interface class for WMDRM DLA Browser View Handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_WMDRMDLABROWSERVIEWHANDLER_H |
|
20 #define C_WMDRMDLABROWSERVIEWHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class RWmDrmDlaAppClient; |
|
25 class MWmDrmDlaBrowserObserver; |
|
26 |
|
27 /** |
|
28 * WMDRM DLA Browser View Handler |
|
29 * |
|
30 * @lib wmdrmdlautils.lib |
|
31 * @since S60 v9.1 |
|
32 */ |
|
33 NONSHARABLE_CLASS( CWmDrmDlaBrowserViewHandler ) : public CActive |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 IMPORT_C static CWmDrmDlaBrowserViewHandler* NewL(); |
|
39 IMPORT_C static CWmDrmDlaBrowserViewHandler* NewLC(); |
|
40 |
|
41 /** |
|
42 * Launches browser view |
|
43 * |
|
44 * @param aObserver Observer used to query needed information for |
|
45 * launching and to inform caller about browser |
|
46 * view activities. |
|
47 * @leave with KErrArgument, if aObserver is NULL, KErrInUse, |
|
48 * if browser view is already active, KErrNotSupported, |
|
49 * if CCoeEnv isn't available, otherwise |
|
50 * standard Symbian error code in case of error. |
|
51 */ |
|
52 IMPORT_C void LaunchBrowserViewL( |
|
53 MWmDrmDlaBrowserObserver* aObserver ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CWmDrmDlaBrowserViewHandler(); |
|
59 |
|
60 protected: // from base class CActive |
|
61 |
|
62 /** |
|
63 * From CActive Cancels async request. |
|
64 */ |
|
65 void DoCancel(); |
|
66 |
|
67 /** |
|
68 * From CActive Called when async request completes. |
|
69 */ |
|
70 void RunL(); |
|
71 |
|
72 /** |
|
73 * From CActive Called if RunL leaves. |
|
74 */ |
|
75 TInt RunError( TInt aError ); |
|
76 |
|
77 private: |
|
78 |
|
79 CWmDrmDlaBrowserViewHandler(); |
|
80 void ConstructL(); |
|
81 |
|
82 void CompleteSelf(); |
|
83 |
|
84 private: // data |
|
85 |
|
86 enum TBrowserViewHandlerState |
|
87 { |
|
88 EIdle, |
|
89 ELaunchBrowserView |
|
90 }; |
|
91 |
|
92 TBrowserViewHandlerState iState; |
|
93 RWmDrmDlaAppClient* iClient; |
|
94 |
|
95 //Not owned |
|
96 MWmDrmDlaBrowserObserver* iObserver; |
|
97 |
|
98 }; |
|
99 |
|
100 #endif // C_WMDRMDLABROWSERVIEWHANDLER_H |