omadrm/drmplugins/drmrohandler/inc/rohandlerdmgrwrapper.h
changeset 49 69d8e75812b7
parent 29 3bdc3b853094
equal deleted inserted replaced
48:c68061d56109 49:69d8e75812b7
    17 
    17 
    18 
    18 
    19 #ifndef ROHANDLERDMGRWRAPPER_H
    19 #ifndef ROHANDLERDMGRWRAPPER_H
    20 #define ROHANDLERDMGRWRAPPER_H
    20 #define ROHANDLERDMGRWRAPPER_H
    21 
    21 
    22 namespace Roap
    22 #include <e32base.h>
    23     {
    23 #include <f32file.h>
    24     class MRoapObserver;
    24 
    25     }
    25 #include <RoapObserver.h>
       
    26 #include <RoapEng.h>
       
    27 
       
    28 #include <qobject.h>
       
    29 #include <downloadmanager.h>
       
    30 #include <download.h>
    26 
    31 
    27 class CDRMRights;
    32 class CDRMRights;
    28 
    33 class QRoHandlerDMgrEventHandler;
    29 class MHttpDownloadMgrObserver;
       
    30 
    34 
    31 class MRoHandlerDMgrWrapper
    35 class MRoHandlerDMgrWrapper
    32     {
    36     {
    33 public:
    37 public:
    34     virtual void HandleRoapTriggerL( const TDesC8& aTrigger ) = 0;
    38     virtual void HandleRoapTriggerL( const TDesC8& aTrigger ) = 0;
    38 *  Class for downloading ROAP triggers
    42 *  Class for downloading ROAP triggers
    39 *
    43 *
    40 */
    44 */
    41 class CRoHandlerDMgrWrapper:
    45 class CRoHandlerDMgrWrapper:
    42     public CActive, // Now active
    46     public CActive, // Now active
    43     public MHttpDownloadMgrObserver,
       
    44     public Roap::MRoapObserver,
    47     public Roap::MRoapObserver,
    45     public MRoHandlerDMgrWrapper
    48     public MRoHandlerDMgrWrapper
    46     {
    49     {
    47 private:
    50 private:
    48     enum TMeterState
    51     enum TMeterState
    70     * @since S60 3.2
    73     * @since S60 3.2
    71     * @param aUrl  URL of ROAP trigger
    74     * @param aUrl  URL of ROAP trigger
    72     */
    75     */
    73     void HandleRoapTriggerL( const TDesC8& aTrigger );
    76     void HandleRoapTriggerL( const TDesC8& aTrigger );
    74 
    77 
    75 
       
    76 // from base class MHttpDownloadMgrObserver
       
    77 
       
    78     /**
       
    79     * From MHttpDownloadMgrObserver.
       
    80     * Handle download manager events
       
    81     *
       
    82     * @since S60 3.2
       
    83     * @param aDownload the download
       
    84     * @param aEvent the event
       
    85     */
       
    86     void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
       
    87 
       
    88 // From Roap::MRoapObserver
    78 // From Roap::MRoapObserver
    89     /**
    79     /**
    90     * ConnectionConfL
    80     * ConnectionConfL
    91     * @return ETrue: the network can be establish
    81     * @return ETrue: the network can be establish
    92     *         EFalse: the ROAP transaction is canceled
    82     *         EFalse: the ROAP transaction is canceled
   209     *
   199     *
   210     *
   200     *
   211     * @leave  System wide error code */
   201     * @leave  System wide error code */
   212     void PostResponseUrlL( const TDesC8& aPostResponseUrl );
   202     void PostResponseUrlL( const TDesC8& aPostResponseUrl );
   213 
   203 
       
   204     /**
       
   205 	* Handle download manager events
       
   206 	*
       
   207 	* @param aEvent the event
       
   208 	*/
       
   209 	void HandleDownloadEventL( WRT::DownloadEvent* aEvent );
       
   210 
   214 protected:
   211 protected:
   215     //from Cactive
   212     //from Cactive
   216     virtual void DoCancel();
   213     virtual void DoCancel();
   217 
   214 
   218     virtual void RunL();
   215     virtual void RunL();
   244 private: // data
   241 private: // data
   245 
   242 
   246     /**
   243     /**
   247     * Download manager session
   244     * Download manager session
   248     */
   245     */
   249     RHttpDownloadMgr iDlMgr;
   246     WRT::DownloadManager* iDlMgr;
   250 
   247 
       
   248     WRT::Download* iDownload;
   251     /**
   249     /**
   252     * Used to make downloads synchronous
   250     * Used to make downloads synchronous
   253     */
   251     */
   254     CActiveSchedulerWait iWait;
   252     CActiveSchedulerWait iWait;
   255 
   253 
   275     Roap::CRoapEng* iRoapEng;
   273     Roap::CRoapEng* iRoapEng;
   276 
   274 
   277     RFs iFs;
   275     RFs iFs;
   278 
   276 
   279     HBufC* iFileName;
   277     HBufC* iFileName;
       
   278     
       
   279     QRoHandlerDMgrEventHandler* iRoHandlerDMgrEventHandler;
       
   280     
   280     };
   281     };
   281 
   282 
   282 #endif // ROHANDLERDMGRWRAPPER_H
   283 #endif // ROHANDLERDMGRWRAPPER_H