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 |
|
34 public: |
37 public: |
35 virtual void HandleRoapTriggerL( const TDesC8& aTrigger ) = 0; |
38 virtual void HandleRoapTriggerL( const TDesC8& aTrigger ) = 0; |
36 |
|
37 virtual void DownloadAndHandleRoapTriggerL( const HBufC8* aUrl ) = 0; |
|
38 |
|
39 virtual void DownloadAndHandleRoapTriggerFromPrUrlL( const HBufC8* aUrl ) = 0; |
|
40 |
|
41 }; |
39 }; |
42 |
40 |
43 /** |
41 /** |
44 * Class for downloading ROAP triggers |
42 * Class for downloading ROAP triggers |
45 * |
43 * |
46 */ |
44 */ |
47 class CRoHandlerDMgrWrapper: |
45 class CRoHandlerDMgrWrapper: |
48 public CActive, // Now active |
46 public CActive, // Now active |
49 public MHttpDownloadMgrObserver, |
|
50 public Roap::MRoapObserver, |
47 public Roap::MRoapObserver, |
51 public MRoHandlerDMgrWrapper |
48 public MRoHandlerDMgrWrapper |
52 { |
49 { |
53 private: |
50 private: |
54 enum TMeterState |
51 enum TMeterState |
76 * @since S60 3.2 |
73 * @since S60 3.2 |
77 * @param aUrl URL of ROAP trigger |
74 * @param aUrl URL of ROAP trigger |
78 */ |
75 */ |
79 void HandleRoapTriggerL( const TDesC8& aTrigger ); |
76 void HandleRoapTriggerL( const TDesC8& aTrigger ); |
80 |
77 |
81 void DownloadAndHandleRoapTriggerL( const HBufC8* aUrl ); |
|
82 |
|
83 void DownloadAndHandleRoapTriggerFromPrUrlL( const HBufC8* aUrl ); |
|
84 |
|
85 |
|
86 // from base class MHttpDownloadMgrObserver |
|
87 |
|
88 /** |
|
89 * From MHttpDownloadMgrObserver. |
|
90 * Handle download manager events |
|
91 * |
|
92 * @since S60 3.2 |
|
93 * @param aDownload the download |
|
94 * @param aEvent the event |
|
95 */ |
|
96 void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent ); |
|
97 |
|
98 // From Roap::MRoapObserver |
78 // From Roap::MRoapObserver |
99 /** |
79 /** |
100 * ConnectionConfL |
80 * ConnectionConfL |
101 * @return ETrue: the network can be establish |
81 * @return ETrue: the network can be establish |
102 * EFalse: the ROAP transaction is canceled |
82 * EFalse: the ROAP transaction is canceled |