--- a/wmdrm/camese/wmdrmdlaapp/inc/wmdrmdlabrowserview.h Tue Aug 31 15:29:38 2010 +0300
+++ b/wmdrm/camese/wmdrmdlaapp/inc/wmdrmdlabrowserview.h Wed Sep 01 12:21:16 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -20,6 +20,7 @@
#define C_WMDRMDLABROWSERVIEW_H
#include <aknview.h>
+#include <brctlspecialloadobserver.h>
class CWmDrmDlaBrowserContainer;
class CInternetConnectionManager;
@@ -29,13 +30,14 @@
*/
class MBrowserViewLicenseReceivedCallback
{
- public:
-
+ public:
+
virtual void LicenseReceived() = 0;
};
-class CWmDrmDlaBrowserView : public CAknView
+class CWmDrmDlaBrowserView : public CAknView,
+ public MBrCtlSpecialLoadObserver
{
public:
@@ -47,6 +49,33 @@
* Destructor.
*/
virtual ~CWmDrmDlaBrowserView();
+
+ /**
+ * Set the IAP that is used in network connection
+ * @param aIap - IAP to be used
+ */
+ void SetIAP( TInt aIap );
+
+ /**
+ * Make a POST-request
+ * @param aCallback - Callback used to inform when license
+ * response is received
+ * @param aPostUrl - Post URL
+ * @param aPostContentType - Post content type
+ * @param aPostData - Post data
+ * @param aPostContentBoundary - Post content boundary
+ */
+ void PostL( MBrowserViewLicenseReceivedCallback* aCallback,
+ const TDesC& aPostUrl,
+ const TDesC8& aPostContentType,
+ const TDesC8& aPostData,
+ const TDesC8& aPostContentBoundary );
+
+ /**
+ * Get the license response
+ * @return License response or NULL
+ */
+ HBufC8* LicenseResponse();
public: // From CAknView
@@ -58,6 +87,11 @@
/**
* @see CAknView
*/
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * @see CAknView
+ */
void DoActivateL( const TVwsViewId& aPrevViewId,
TUid aCustomMessageId,
const TDesC8& aCustomMessage );
@@ -69,15 +103,26 @@
/**
* @see CAknView
*/
- void HandleClientRectChange();
-
+ void HandleClientRectChange();
+
public: // From MBrCtlSpecialLoadObserver
+ void NetworkConnectionNeededL( TInt* aConnectionPtr,
+ TInt* aSockSvrHandle,
+ TBool* aNewConn,
+ TApBearerType* aBearerType );
+
+ TBool HandleRequestL( RArray<TUint>* aTypeArray,
+ CDesCArrayFlat* aDesArray );
+
+ TBool HandleDownloadL( RArray<TUint>* aTypeArray,
+ CDesCArrayFlat* aDesArray );
+
private:
CWmDrmDlaBrowserView();
void ConstructL();
-
+
void CreateContainerL();
void RemoveContainer();
void BrCtlHandleCommandL( TInt aCommand );
@@ -86,7 +131,7 @@
//Not Owned
MBrowserViewLicenseReceivedCallback* iCallback;
-
+
CWmDrmDlaBrowserContainer* iContainer;
HBufC8* iLicenseResponse;
CInternetConnectionManager* iConMgr;