18 |
18 |
19 #ifndef C_WMDRMDLABROWSERVIEW_H |
19 #ifndef C_WMDRMDLABROWSERVIEW_H |
20 #define C_WMDRMDLABROWSERVIEW_H |
20 #define C_WMDRMDLABROWSERVIEW_H |
21 |
21 |
22 #include <aknview.h> |
22 #include <aknview.h> |
23 #include <brctlspecialloadobserver.h> |
23 #include <BrCtlSpecialLoadObserver.h> |
24 |
24 |
25 class CWmDrmDlaBrowserContainer; |
25 class CWmDrmDlaBrowserContainer; |
26 class CInternetConnectionManager; |
26 class CInternetConnectionManager; |
27 |
27 |
28 /** |
28 /** |
29 * Interface for license received callback. |
29 * Interface for license received callback. |
30 */ |
30 */ |
31 class MBrowserViewLicenseReceivedCallback |
31 class MBrowserViewLicenseReceivedCallback |
32 { |
32 { |
33 public: |
33 public: |
34 |
34 |
35 virtual void LicenseReceived() = 0; |
35 virtual void LicenseReceived() = 0; |
36 |
36 |
37 }; |
37 }; |
38 |
38 |
39 class CWmDrmDlaBrowserView : public CAknView, |
39 class CWmDrmDlaBrowserView : public CAknView, |
40 public MBrCtlSpecialLoadObserver |
40 public MBrCtlSpecialLoadObserver |
41 { |
41 { |
42 |
42 |
43 public: |
43 public: |
44 |
44 |
47 |
47 |
48 /** |
48 /** |
49 * Destructor. |
49 * Destructor. |
50 */ |
50 */ |
51 virtual ~CWmDrmDlaBrowserView(); |
51 virtual ~CWmDrmDlaBrowserView(); |
52 |
52 |
53 /** |
53 /** |
54 * Set the IAP that is used in network connection |
54 * Set the IAP that is used in network connection |
55 * @param aIap - IAP to be used |
55 * @param aIap - IAP to be used |
56 */ |
56 */ |
57 void SetIAP( TInt aIap ); |
57 void SetIAP( TInt aIap ); |
58 |
58 |
59 /** |
59 /** |
60 * Make a POST-request |
60 * Make a POST-request |
61 * @param aCallback - Callback used to inform when license |
61 * @param aCallback - Callback used to inform when license |
62 * response is received |
62 * response is received |
63 * @param aPostUrl - Post URL |
63 * @param aPostUrl - Post URL |
64 * @param aPostContentType - Post content type |
64 * @param aPostContentType - Post content type |
65 * @param aPostData - Post data |
65 * @param aPostData - Post data |
66 * @param aPostContentBoundary - Post content boundary |
66 * @param aPostContentBoundary - Post content boundary |
68 void PostL( MBrowserViewLicenseReceivedCallback* aCallback, |
68 void PostL( MBrowserViewLicenseReceivedCallback* aCallback, |
69 const TDesC& aPostUrl, |
69 const TDesC& aPostUrl, |
70 const TDesC8& aPostContentType, |
70 const TDesC8& aPostContentType, |
71 const TDesC8& aPostData, |
71 const TDesC8& aPostData, |
72 const TDesC8& aPostContentBoundary ); |
72 const TDesC8& aPostContentBoundary ); |
73 |
73 |
74 /** |
74 /** |
75 * Get the license response |
75 * Get the license response |
76 * @return License response or NULL |
76 * @return License response or NULL |
77 */ |
77 */ |
78 HBufC8* LicenseResponse(); |
78 HBufC8* LicenseResponse(); |
87 /** |
87 /** |
88 * @see CAknView |
88 * @see CAknView |
89 */ |
89 */ |
90 void HandleCommandL( TInt aCommand ); |
90 void HandleCommandL( TInt aCommand ); |
91 |
91 |
92 /** |
92 /** |
93 * @see CAknView |
93 * @see CAknView |
94 */ |
94 */ |
95 void DoActivateL( const TVwsViewId& aPrevViewId, |
95 void DoActivateL( const TVwsViewId& aPrevViewId, |
96 TUid aCustomMessageId, |
96 TUid aCustomMessageId, |
97 const TDesC8& aCustomMessage ); |
97 const TDesC8& aCustomMessage ); |
101 void DoDeactivate(); |
101 void DoDeactivate(); |
102 |
102 |
103 /** |
103 /** |
104 * @see CAknView |
104 * @see CAknView |
105 */ |
105 */ |
106 void HandleClientRectChange(); |
106 void HandleClientRectChange(); |
107 |
107 |
108 public: // From MBrCtlSpecialLoadObserver |
108 public: // From MBrCtlSpecialLoadObserver |
109 |
109 |
110 void NetworkConnectionNeededL( TInt* aConnectionPtr, |
110 void NetworkConnectionNeededL( TInt* aConnectionPtr, |
111 TInt* aSockSvrHandle, |
111 TInt* aSockSvrHandle, |
112 TBool* aNewConn, |
112 TBool* aNewConn, |
113 TApBearerType* aBearerType ); |
113 TApBearerType* aBearerType ); |
114 |
114 |
115 TBool HandleRequestL( RArray<TUint>* aTypeArray, |
115 TBool HandleRequestL( RArray<TUint>* aTypeArray, |
116 CDesCArrayFlat* aDesArray ); |
116 CDesCArrayFlat* aDesArray ); |
117 |
117 |
118 TBool HandleDownloadL( RArray<TUint>* aTypeArray, |
118 TBool HandleDownloadL( RArray<TUint>* aTypeArray, |
119 CDesCArrayFlat* aDesArray ); |
119 CDesCArrayFlat* aDesArray ); |
120 |
120 |
121 private: |
121 private: |
122 |
122 |
123 CWmDrmDlaBrowserView(); |
123 CWmDrmDlaBrowserView(); |
124 void ConstructL(); |
124 void ConstructL(); |
125 |
125 |
126 void CreateContainerL(); |
126 void CreateContainerL(); |
127 void RemoveContainer(); |
127 void RemoveContainer(); |
128 void BrCtlHandleCommandL( TInt aCommand ); |
128 void BrCtlHandleCommandL( TInt aCommand ); |
129 |
129 |
130 private: // data |
130 private: // data |
131 |
131 |
132 //Not Owned |
132 //Not Owned |
133 MBrowserViewLicenseReceivedCallback* iCallback; |
133 MBrowserViewLicenseReceivedCallback* iCallback; |
134 |
134 |
135 CWmDrmDlaBrowserContainer* iContainer; |
135 CWmDrmDlaBrowserContainer* iContainer; |
136 HBufC8* iLicenseResponse; |
136 HBufC8* iLicenseResponse; |
137 CInternetConnectionManager* iConMgr; |
137 CInternetConnectionManager* iConMgr; |
138 TInt iIap; |
138 TInt iIap; |
139 }; |
139 }; |