wmdrm/camese/wmdrmdlaapp/inc/wmdrmdlabrowserview.h
changeset 74 2768d547bb4b
parent 23 493788a4a8a4
equal deleted inserted replaced
65:1e96dbdff71c 74:2768d547bb4b
     1 /*
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    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>
       
    24 
    23 
    25 class CWmDrmDlaBrowserContainer;
    24 class CWmDrmDlaBrowserContainer;
    26 class CInternetConnectionManager;
    25 class CInternetConnectionManager;
    27 
    26 
    28 /**
    27 /**
    34 
    33 
    35         virtual void LicenseReceived() = 0;
    34         virtual void LicenseReceived() = 0;
    36 
    35 
    37     };
    36     };
    38 
    37 
    39 class CWmDrmDlaBrowserView : public CAknView,
    38 class CWmDrmDlaBrowserView : public CAknView
    40                              public MBrCtlSpecialLoadObserver
       
    41     {
    39     {
    42 
    40 
    43     public:
    41     public:
    44 
    42 
    45         static CWmDrmDlaBrowserView* NewL();
    43         static CWmDrmDlaBrowserView* NewL();
    48         /**
    46         /**
    49          * Destructor.
    47          * Destructor.
    50          */
    48          */
    51         virtual ~CWmDrmDlaBrowserView();
    49         virtual ~CWmDrmDlaBrowserView();
    52 
    50 
    53         /**
       
    54          * Set the IAP that is used in network connection
       
    55          * @param aIap - IAP to be used
       
    56          */
       
    57         void SetIAP( TInt aIap );
       
    58 
       
    59         /**
       
    60          * Make a POST-request
       
    61          * @param aCallback - Callback used to inform when license
       
    62          *                    response is received
       
    63          * @param aPostUrl - Post URL
       
    64          * @param aPostContentType - Post content type
       
    65          * @param aPostData - Post data
       
    66          * @param aPostContentBoundary - Post content boundary
       
    67          */
       
    68         void PostL( MBrowserViewLicenseReceivedCallback* aCallback,
       
    69                     const TDesC& aPostUrl,
       
    70                     const TDesC8& aPostContentType,
       
    71                     const TDesC8& aPostData,
       
    72                     const TDesC8& aPostContentBoundary );
       
    73 
       
    74         /**
       
    75          * Get the license response
       
    76          * @return License response or NULL
       
    77          */
       
    78         HBufC8* LicenseResponse();
       
    79 
       
    80     public: // From CAknView
    51     public: // From CAknView
    81 
    52 
    82         /**
    53         /**
    83         * @see CAknView
    54         * @see CAknView
    84         */
    55         */
    85         TUid Id() const;
    56         TUid Id() const;
    86 
       
    87         /**
       
    88         * @see CAknView
       
    89         */
       
    90         void HandleCommandL( TInt aCommand );
       
    91 
    57 
    92         /**
    58         /**
    93         * @see CAknView
    59         * @see CAknView
    94         */
    60         */
    95         void DoActivateL( const TVwsViewId& aPrevViewId,
    61         void DoActivateL( const TVwsViewId& aPrevViewId,
   104         * @see CAknView
    70         * @see CAknView
   105         */
    71         */
   106         void HandleClientRectChange();
    72         void HandleClientRectChange();
   107 
    73 
   108     public: // From MBrCtlSpecialLoadObserver
    74     public: // From MBrCtlSpecialLoadObserver
   109 
       
   110         void NetworkConnectionNeededL( TInt* aConnectionPtr,
       
   111                                        TInt* aSockSvrHandle,
       
   112                                        TBool* aNewConn,
       
   113                                        TApBearerType* aBearerType );
       
   114 
       
   115         TBool HandleRequestL( RArray<TUint>* aTypeArray,
       
   116                               CDesCArrayFlat* aDesArray );
       
   117 
       
   118         TBool HandleDownloadL( RArray<TUint>* aTypeArray,
       
   119                                CDesCArrayFlat* aDesArray );
       
   120 
    75 
   121     private:
    76     private:
   122 
    77 
   123         CWmDrmDlaBrowserView();
    78         CWmDrmDlaBrowserView();
   124         void ConstructL();
    79         void ConstructL();