2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: This file contains the definition of the Client interface of Download Mgr Server.
19 #ifndef __DOWNLOADMGR_CLIENT_H__
20 #define __DOWNLOADMGR_CLIENT_H__
25 #include <httpdownloadmgrcommon.h>
28 // FORWARD DECLARATIONS
29 class CDownloadMgrHandler;
31 class MHttpDownloadMgrObserver;
33 class CRHttpDownloadExtension;
34 class CRHttpDownloadMgrExtension;
35 class CRHttpDlExtension;
37 class CTransactionObserver;
38 class THttpTransactionCallback;
43 * Calculate a hash and in the form of a 32 character hex result.
44 * @param aMessage Source.
45 * @param aHash Hash value.
48 void HashL( const TDesC8& aMessage, TDes8& aHash );
51 typedef CArrayPtrFlat< RHttpDownload > CDownloadArray;
52 typedef CArrayPtrFlat< MHttpDownloadMgrObserver > CDownloadMgrObserver;
57 * Contains download states
60 * @since Series 60 2.8
62 NONSHARABLE_CLASS( THttpDownloadEvent )
66 THttpDownloadState iDownloadState;
67 // download progress state
68 THttpProgressState iProgressState;
72 * Provides the interface for notification of events from a Download Manager
73 * session and its subsessions.
76 * @since Series 60 2.8
78 class MHttpDownloadMgrObserver
85 * @param aDownload The download with which the event occured.
86 * @param aEvent Event type.
89 virtual void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent ) = 0;
93 * Provides the interface for sending next uri to
94 * the client when downloading OMA or COD.
97 * @since Series 60 3.0
99 class MHttpDownloadMgrNextUriObserver
105 * Send next uri to the client. The client can then handle it.
106 * @param aDownload Reference to the download.
107 * @param aUri Next URI of the OMA or COD download.
110 virtual void NextUriL( RHttpDownload& aDownload, const TDesC8& aUri ) = 0;
114 * Creates a download manager session and performs operations on it
117 * @since Series 60 2.8
120 NONSHARABLE_CLASS( RHttpDownloadMgr ) : public RSessionBase,
121 public MHttpDownloadMgrObserver
125 * C++ default constructor.
127 IMPORT_C RHttpDownloadMgr();
129 public: // New functions
132 * Creates a download manager session.
133 * @param aAppUid Client application's UID.
134 * @param aObserver Observer
135 * @param aMaster Indicates whether (if ETrue) this instance
136 * inherints all downloads of other instances. (stand-alone app flag).
139 IMPORT_C void ConnectL( TUid aAppUid,
140 MHttpDownloadMgrObserver& aObserver,
144 * Gives version information.
146 * @return TVersion Contains version information.
148 IMPORT_C TVersion Version() const;
151 * Closes download manager session.
155 IMPORT_C void Close();
158 * Returns a list of the current downloads.
160 * @return CDownloadArray
162 IMPORT_C const CDownloadArray& CurrentDownloads() const;
165 * Creates a new download subsession.
166 * @param aUrl The url to be downloaded.
167 * @param aResult The result is true if the download is created.
168 * If the URL is already being downloaded the seult is false.
169 * @return RHttpDownload&
171 IMPORT_C RHttpDownload& CreateDownloadL( const TDesC8& aUrl, TBool& aResult );
174 * Creates a new download subsession. It creates a new one even
175 * if the URL is already beeing downloaded.
176 * @param aUrl The url to be downloaded.
177 * If the URL is already being downloaded the seult is false.
178 * @return RHttpDownload&
180 IMPORT_C RHttpDownload& CreateDownloadL( const TDesC8& aUrl );
183 * Creates a new download in client side.
184 * @param aHttpTransaction http transaction.
185 * @param aResult The result is true if the download is created.
186 * If the URL is already being downloaded the seult is false.
188 IMPORT_C RHttpDownload& CreateClientSideDownloadL( TInt aHttpTransaction,TBool& aResult );
191 * Creates a new download subsession for COD.
192 * @param aUrl The url from the COD is downloaded.
193 * @param aBuf The COD descriptor.
194 * @param aMimeType The mimetype.
195 * @param aEikEnv Eikon environment or NULL. Can be NULL if download
196 * does not require UI functionality.
197 * @param aResult The result is true if the download is created.
198 * If the URL is already being downloaded the seult is false.
199 * @return RHttpDownload&
201 IMPORT_C RHttpDownload& CreateCodDownloadL( const TDesC8& aUrl,
203 const TDesC8& aMimeType,
208 * Finds if the download is already created
210 * @param aUrl given URL
211 * @param aMsgBody Message body from post operation
212 * @return Returns a pointer to the found download or null.
213 * This pointer is NOT owned by the client!
215 IMPORT_C RHttpDownload* FindDownload( const TDesC8& aUrl, const TDesC8& aMsgBody );
218 * Pauses all downloads.
222 IMPORT_C TInt PauseAll();
225 * Resumes all downloads.
229 IMPORT_C TInt StartAll();
232 * Resets all downloads.
236 IMPORT_C TInt ResetAll();
239 * Deletes all downloads.
243 IMPORT_C TInt DeleteAll();
246 * Disconnect the http connection and pauses all downloads.
250 IMPORT_C TInt Disconnect();
253 * Gets the value for a TInt attribute.
254 * @param aAttribute Identifies the attribute to be retrived.
255 * @param aValue On completion, contains the requested TInt attribute.
258 IMPORT_C TInt GetIntAttribute( const TUint aAttribute, TInt32& aValue );
261 * Gets the value for a TBool attribute.
262 * @param aAttribute Identifies the attribute to be retrived.
263 * @param aValue On completion, contains the requested TBool attribute.
266 IMPORT_C TInt GetBoolAttribute( const TUint aAttribute, TBool& aValue );
269 * Gets the value for a TDes16 attribute.
270 * @param aAttribute Identifies the attribute to be retrived.
271 * @param aValue On completion, contains the requested TDes16 attribute.
274 IMPORT_C TInt GetStringAttribute( const TUint aAttribute, TDes16& aValue );
277 * Gets the value for a TDes8 attribute.
278 * @param aAttribute Identifies the attribute to be retrived.
279 * @param aValue On completion, contains the requested TDes8 attribute.
282 IMPORT_C TInt GetStringAttribute( const TUint aAttribute, TDes8& aValue );
285 * Sets the value for a TInt attribute.
286 * @param aAttribute Identifies the attribute to be set.
287 * @param aValue The value to be set.
290 IMPORT_C TInt SetIntAttribute( const TUint aAttribute, TInt32 aValue );
293 * Sets the value for a TBool attribute.
294 * @param aAttribute Identifies the attribute to be set.
295 * @param aValue The value to be set.
298 IMPORT_C TInt SetBoolAttribute( const TUint aAttribute, TBool aValue );
301 * Sets the value for a TDesC attribute.
302 * @param aAttribute Identifies the attribute to be set.
303 * @param aValue The value to be set.
306 IMPORT_C TInt SetStringAttribute( const TUint aAttribute, const TDesC16& aValue );
309 * Sets the value for a TDesC8 attribute.
310 * @param aAttribute Identifies the attribute to be set.
311 * @param aValue The value to be set.
314 IMPORT_C TInt SetStringAttribute( const TUint aAttribute, const TDesC8& aValue );
317 * Sets the value for the default TInt attribute.
318 * @param aAttribute Identifies the attribute to be set.
319 * @param aValue The value to be set.
322 IMPORT_C TInt SetDefaultIntAttribute( const TUint aAttribute, TInt32 aValue );
325 * Sets the value for the default TBool attribute.
326 * @param aAttribute Identifies the attribute to be set.
327 * @param aValue The value to be set.
330 IMPORT_C TInt SetDefaultBoolAttribute( const TUint aAttribute, TBool aValue );
333 * Sets the value for the default TDesC attribute.
334 * @param aAttribute Identifies the attribute to be set.
335 * @param aValue The value to be set.
338 IMPORT_C TInt SetDefaultStringAttribute( const TUint aAttribute, const TDesC16& aValue );
341 * Sets the value for the default TDesC8 attribute.
342 * @param aAttribute Identifies the attribute to be set.
343 * @param aValue The value to be set.
346 IMPORT_C TInt SetDefaultStringAttribute( const TUint aAttribute, const TDesC8& aValue );
349 * Adds client to the observer list.
350 * @param aObserver Observer.
353 IMPORT_C void AddObserverL( MHttpDownloadMgrObserver& aObserver );
356 * Removes client from the observer list.
357 * @param aObserver Observer.
360 IMPORT_C void RemoveObserver( MHttpDownloadMgrObserver& aObserver );
363 * Set next uri observer.
364 * @param aObserver Observer.
367 IMPORT_C void SetNextUriObserver( MHttpDownloadMgrNextUriObserver* aObserver );
370 * Checks for possibility of a new donload
372 * @return TBool,possibility of a new download.
374 TBool IsNewDownloadPossible();
376 protected: // from MHttpDownloadMgrObserver
379 * Indicates an event.
380 * @param aDownload The download with which the event occured.
381 * @param aEvent Event type.
384 void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
389 * Indicates the session's event.
390 * @param aHandle Unique identifier of server side subsession.
391 * @param aEvent Event type.
394 void HandleSessionEventL( TInt aHandle, THttpDownloadEvent aEvent );
396 private: // New functions
399 * Creates a download manager session.
400 * @param aAppUid Client application's UID.
401 * @param aObserver Observer
402 * @param aMaster Indicates whether (if ETrue) this instance
403 * inherints all downloads of other instances. (stand-alone app flag).
406 void DoConnectL( TUid aAppUid,
407 MHttpDownloadMgrObserver& aObserver,
411 * Initializes the download manager session.
412 * @param aAppUid Client app's UID.
413 * @param aObserver Observer to add to the observer list.
414 * @param aMaster Indicates whether (if ETrue) this instance
415 * inherints all downloads of other instances. (stand-alone app flag).
418 void InitializeL( TUid aAppUid,
419 MHttpDownloadMgrObserver& aObserver,
422 protected: // New functions
425 * Adds the created download to the list. If it is already added,
426 * then it will do nothing.
427 * @param aElement Download subsession.
428 * @return RHttpDownload& reference to the added item in the list.
430 RHttpDownload& AddToArrayL( RHttpDownload* aElement );
432 private: // New functions
435 * Removes the download from the list.
436 * @param aElement Download subsession.
439 void RemoveFromArray( RHttpDownload* aElement );
442 * Finds the download in the list.
443 * @param aElement Download subsession.
444 * @param aIndex Index of the element found.
445 * @return KErrNone if found, KErrNotFound otherwise..
447 TInt FindInArray( RHttpDownload* aElement, TInt& aIndex ) const;
450 * Returns a reference to the download identified by a handle.
451 * @param aHandle Handle identifier.
452 * @return RHttpDownload&
454 RHttpDownload& DownloadFromHandleL( TUint aHandle );
457 * Finds observer based on index.
458 * @param aObserver Observer found.
459 * @param aIndex Index.
462 TInt FindObserver( MHttpDownloadMgrObserver& aObserver, TInt& aIndex ) const;
465 * Attach client to the session.
466 * @param aBuf Buffer to the subsession IDs.
469 void AttachL( TDes8& aBuf );
472 * Close a download subsession.
473 * @param aElement Download subsession.
476 void CloseDownload( RHttpDownload* aElement );
479 * Packes the default values of the attributes.
481 * @return bbuffer of the packed attribs.
483 HBufC8* PackedDefaultAttributesLC();
486 * Sets the default value for the TInt32 attribute.
487 * @param aAttribute Identifies the attribute to be set.
488 * @param aValue The value to be set.
491 void DoSetDefaultAttributeL( const TUint aAttribute, TInt32 aValue );
494 * Sets the default value for the TBool attribute.
495 * @param aAttribute Identifies the attribute to be set.
496 * @param aValue The value to be set.
499 void DoSetDefaultAttributeL( const TUint aAttribute, TBool aValue );
502 * Sets the default value for the TDesC8 attribute.
503 * @param aAttribute Identifies the attribute to be set.
504 * @param aValue The value to be set.
507 void DoSetDefaultAttributeL( const TUint aAttribute, const TDesC8& aValue );
510 * Sets the default value for the TDesC16 attribute.
511 * @param aAttribute Identifies the attribute to be set.
512 * @param aValue The value to be set.
515 void DoSetDefaultAttributeL( const TUint aAttribute, const TDesC16& aValue );
518 * Start session's event notification.
519 * @param aStatus Handler's request status.
522 void StartSessionEventNotification( const TDesC8& aDownloadState,
523 const TDesC8& aProgressState,
524 const TDesC8& aHandle,
525 TRequestStatus& aStatus );
528 * Cancels session's event notification.
532 void CancelSessionEventNotification();
535 * Leave version of FindDownload
537 RHttpDownload* DoFindDownloadL( const TDesC8& aUrl, const TDesC8& aMsgBody );
540 * Gets the number of client side download.
541 * @param aValue Num of client side download
542 * @return Error code.
544 TInt NumberOfClientSideDownload( TInt32& aValue );
547 * Tells that event is being broadcasted.
551 TBool IsEventBroadcasting();
554 * Do-Indicates the session's event.
555 * @param aHandle Unique identifier of server side subsession.
556 * @param aEvent Event type.
559 void DoHandleSessionEventL( TInt aHandle, THttpDownloadEvent aEvent );
562 * Broadcasts an event.
563 * @param aDownload The download with which the event occured.
564 * @param aEvent Event type.
567 void BroadcastEvent( RHttpDownload& aDownload,
568 THttpDownloadEvent aEvent );
571 * Returns the next uri observer from the extension calss.
572 * @return Next uri observer.
574 MHttpDownloadMgrNextUriObserver* NextUriObserver() const;
577 * Returns the session id
580 TInt SessionId() const;
583 * Broadcast deleting event.
584 * @param aDownload download is beenig deleted.
587 // void BroadcastDeleting( RHttpDownload& aDownload );
590 * Returns the the event priority flag
593 TInt EventPriorityFlag() const;
596 * Increments the event priority flas
599 void IncrementEventPriorityFlag();
602 * Decrements the event priority flag
605 void DecrementEventPriorityFlag();
608 // The client application UID.
610 // List of downloads.
611 CDownloadArray* iDownloadArray; ///< Owned.
612 // List of observers.
613 CDownloadMgrObserver* iObservers; ///< Owned.
614 // Default attributes.
615 CArrayPtrFlat< CDefaultAttrib >* iDefaultAttribs; ///< Owned.
616 // Moved event handler
617 CDownloadMgrHandler* iManagerHandler; ///< Owned.
619 CRHttpDownloadMgrExtension* iExtension; ///< Owned.
621 public: // Friend classes
623 friend class RHttpDownload;
624 friend class CDownloadMgrHandler;
625 friend class CTransactionObserver;
626 friend class CCodObserver;
630 * Creates a download manager subsession and performs operations on it
633 * @since Series 60 2.8
635 NONSHARABLE_CLASS( RHttpDownload ): public RSubSessionBase
639 * Cod download progress states
641 enum TCodProgressState
650 * C++ default constructor.
652 RHttpDownload( RHttpDownloadMgr* aServer );
654 public: // New functions
657 * Starts downloading.
661 IMPORT_C TInt Start();
664 * Pauses downloading.
668 IMPORT_C TInt Pause();
671 * Resets downloading.
675 IMPORT_C TInt Reset();
678 * Deletes downloading.
682 IMPORT_C TInt Delete();
685 * Moves downloaded content to the previously specified location
689 IMPORT_C TInt Move();
692 * Gets the value for a TInt attribute.
693 * @param aAttribute Identifies the attribute to be retrived.
694 * @param aValue On completion, contains the requested TInt attribute.
697 IMPORT_C TInt GetIntAttribute( const TUint aAttribute, TInt32& aValue );
700 * Gets the value for a TBool attribute.
701 * @param aAttribute Identifies the attribute to be retrived.
702 * @param aValue On completion, contains the requested TBool attribute.
705 IMPORT_C TInt GetBoolAttribute( const TUint aAttribute, TBool& aValue );
708 * Gets the value for a TDes16 attribute.
709 * @param aAttribute Identifies the attribute to be retrived.
710 * @param aValue On completion, contains the requested TDes16 attribute.
713 IMPORT_C TInt GetStringAttribute( const TUint aAttribute, TDes16& aValue );
716 * Gets the value for a TDes8 attribute.
717 * @param aAttribute Identifies the attribute to be retrived.
718 * @param aValue On completion, contains the requested TDes8 attribute.
721 IMPORT_C TInt GetStringAttribute( const TUint aAttribute, TDes8& aValue );
724 * Gets the download's destination file's handle.
725 * @param aFile RFile that adopts file handle from download.
727 IMPORT_C TInt GetFileHandleAttribute( RFile& aFile );
730 * Sets the value for a TInt attribute.
731 * @param aAttribute Identifies the attribute to be set.
732 * @param aValue The value to be set.
735 IMPORT_C TInt SetIntAttribute( const TUint aAttribute, TInt32 aValue );
738 * Sets the value for a TDesC attribute.
739 * @param aAttribute Identifies the attribute to be set.
740 * @param aValue The value to be set.
743 IMPORT_C TInt SetBoolAttribute( const TUint aAttribute, TBool aValue );
746 * Sets the value for a TDesC attribute.
747 * @param aAttribute Identifies the attribute to be set.
748 * @param aValue The value to be set.
751 IMPORT_C TInt SetStringAttribute( const TUint aAttribute, const TDesC16& aValue );
754 * Sets the value for a TDesC8 attribute.
755 * @param aAttribute Identifies the attribute to be set.
756 * @param aValue The value to be set.
759 IMPORT_C TInt SetStringAttribute( const TUint aAttribute, const TDesC8& aValue );
762 * Sets the download's destination file handle.
763 * @param aFile RFile to be transfered to server.
764 * @return KErrNotSupported on non-support platform.
765 * @return KErrBadHandle is file is not opened.
767 IMPORT_C TInt SetFileHandleAttribute( RFile& aFile );
769 * Gets the value for a TInt attribute.
770 * @param aAttribute Identifies the attribute to be retrived.
771 * @param aMoIndex Identifies the media object index.
772 * @param aValue On completion, contains the requested TInt attribute.
775 IMPORT_C TInt GetIntAttribute( const TUint aAttribute, const TInt32& aMoIndex, TInt32& aValue );
778 * Gets the value for a TBool attribute.
779 * @param aAttribute Identifies the attribute to be retrived.
780 * @param aMoIndex Identifies the media object index.
781 * @param aValue On completion, contains the requested TBool attribute.
784 IMPORT_C TInt GetBoolAttribute( const TUint aAttribute, const TInt32& aMoIndex, TBool& aValue );
787 * Gets the value for a TDes16 attribute.
788 * @param aAttribute Identifies the attribute to be retrived.
789 * @param aMoIndex Identifies the media object index.
790 * @param aValue On completion, contains the requested TDes16 attribute.
793 IMPORT_C TInt GetStringAttribute( const TUint aAttribute, const TInt32& aMoIndex, TDes16& aValue );
796 * Gets the value for a TDes8 attribute.
797 * @param aAttribute Identifies the attribute to be retrived.
798 * @param aMoIndex Identifies the media object index.
799 * @param aValue On completion, contains the requested TDes8 attribute.
802 IMPORT_C TInt GetStringAttribute( const TUint aAttribute, const TInt32& aMoIndex, TDes8& aValue );
805 * Sets the value for a TDesC attribute.
806 * @param aAttribute Identifies the attribute to be set.
807 * @param aMoIndex Identifies the media object index.
808 * @param aValue The value to be set.
811 IMPORT_C TInt SetStringAttribute(const TUint aAttribute, const TInt32& aMoIndex, const TDesC16& aValue );
814 * Sets the download data (media information).
815 * @param sizeBytes The length of descriptor (second parameter) in bytes.
816 * @param aValue The value to be set.
819 IMPORT_C TInt SetDownloadDataAttribute( const TDesC8& aValue );
822 * Sets the download data (media information).
823 * @param sizeBytes The length of descriptor (second parameter) in bytes.
824 * @param aValue The value to be set.
827 IMPORT_C TInt SetTrackDataAttribute( const TInt aIndex, const TDesC8& aValue );
829 public: // New functions
832 * Closes download subsession.
840 * Indicates whether the download is closed.
842 * @return TBool - ETrue if download is closed else EFalse.
850 * Resume COD download.
854 void ResumeCodDownloadL() ;
857 * Get Downloaded Size of product.
861 TInt GetProductDownloadedSize();
863 private: // New functions
866 * Closes download subsession. This is called internally to close the sub session when the download
867 * is completed. Only the subsession will be closed but retains the RHttpDownload object.
870 void CloseSubSession();
873 * This is called internally to save the downloaded subsession before closing the subsession
877 void SaveDownloadInfoL();
880 * Creates download subsession.
881 * @param aUrl The url to be downloaded.
884 void CreateL( const TDesC8& aUrl, const TPtr8 aPackedAttribs );
887 * Attaches subsession to the server subsession by handle.
888 * @param aHandle A handle which identifies the server subsession.
891 void AttachL( TInt aHandle );
894 * Start event notification.
895 * @param aDownloadState State.
896 * @param aProgressState Progress.
897 * @param aEventAttrib Packed attribs
898 * @param aStatus Handler's request status.
901 void StartEventNotification( TDes8& aDownloadState,
902 TDes8& aProgressState,
904 TRequestStatus& aStatus );
907 * Cancels event notification.
911 void CancelEventNotification();
914 * Returns true if the handle is equals with the stored one.
915 * @param aHandle Handle.
918 TBool IsDownload( TInt aHandle );
921 * Returns true if the params belongs to this download.
923 * @param aParsedReqUrl given URL
924 * @param aMsgBody Message body from post operation
927 TBool IsDownloadL( const TUriParser8& aParsedReqUrl,
928 const TDesC8& aMsgBody );
931 * Sets the default value for the attributes.
932 * @param aDownload The download which default attributes to be set.
935 void SetDefaultAttributesL( const TDesC8& aPackedAttribs );
938 * Buffers attributes which need when a client deletes download.
942 void BufferAttributesL();
949 void SetEventType( THttpDownloadState aEventType );
952 * Sets http transaction.
953 * @param aHttpTransaction.
956 void SetHttpTransactionL( TInt aHttpTransaction );
959 * Delete http transaction.
963 void DeleteTransaction();
966 * Initialize OMA DD download.
967 * @param aBuf The descriptor.
968 * @param aType Descriptor data type.
969 * @param aEikEnv Eikon environment or NULL. Can be NULL if download
970 * does not require UI functionality. If download needs UI but NULL is
971 * passed here, the download fails with EFailedPermanent KErrCancel.
974 void InitCodDownloadL( const TDesC8& aBuf,
975 const TDesC8& aMimeType,
976 CEikonEnv* aEikEnv );
979 * Initialize paused OMA DD download.
980 * @param aAppUid App UID of the client.
983 void InitPausedCodDownloadL( const TUid aAppUid );
986 * Starts COD download.
992 * Checks the mime type of a completed content.
993 * Creates a cod download if it is considered as OMA DD.
994 * The return value is the result of the checking.
995 * Leaves in case of failure.
998 TBool CheckContentTypeAndCreateCodDownloadL();
1001 * Sets the error value.
1002 * @param aAttribute Identifies the attribute to be set.
1003 * @param aValue The value to be set.
1006 TInt SetOnError( TInt aError,
1007 THttpDownloadMgrError aDlError = EGeneral );
1011 * Allocate buffer for event attribute. Part of IPC optimalization.
1014 HBufC8* AllocEventAttribBufL();
1018 * Unpack event attribute package.
1019 * @param aPack Packed attributes.
1022 void UnpackEventAttribL( const TDesC8& aPack );
1025 * True if it is a client side download
1029 TBool IsClientSideDownload() const;
1032 * Tells that download should be deleted.
1036 TBool IsToBeDeleted();
1039 * Starts downloading.
1046 * Returns the the event priority flag from session
1049 TInt EventPriorityFlag() const;
1052 * ETrue if download should be deleted on COD completion.
1055 TBool IsDeleteCodWhenDone() const;
1058 * Sets COD in progress flag.
1061 void SetCodInProgress( TCodProgressState aVal );
1064 * Attach to an existing download.
1065 * @param aDlId Download ID.
1068 void AttachToDownloadL( const TInt32 aDlId );
1071 * Sets COD in progress flag.
1072 * @return iExtension
1074 TInt32 ActiveMoIndex() const;
1077 * To stop waiting loop of AS
1080 void StopWaitingAS();
1083 // Event notification handler.
1084 CDownloadMgrHandler* iDownloadHandler; ///< Owned.
1085 // Download manager session.
1086 RHttpDownloadMgr* iDownloadMgr; ///< NOT Owned.
1087 // Unique identifier of server side subsession.
1090 CRHttpDownloadExtension* iExtension; ///< Owned.
1092 CTransactionObserver* iTransactionObserver;
1093 RHTTPTransaction* iHttpTransaction;
1094 // Descriptor Based download COD/DD
1095 CCodDownload* iCodDownload; ///< Owned.
1097 CCodObserver* iCodObserver; ///< Owned.
1098 // Client Side Download
1099 TBool iClientSideDownload;
1100 // Boolean flag which indicates download closure
1102 // Boolean flag which indicates download subsession closure
1103 TBool iClosedSubSession;
1104 // Extension class to cache the cloased subsession
1105 CRHttpDlExtension* iDlExtension; ///< Owned.
1107 CActiveSchedulerWait* iWait;
1109 // Boolean flag which indicates Active Scheduler is Ready
1112 public: // Friend classes
1114 friend class CDownloadMgrHandler;
1115 friend class RHttpDownloadMgr;
1116 friend class RHttpDownloadMgrApiExt;
1117 friend class CTransactionObserver;
1118 friend class CCodObserver;
1119 friend class CDownloadMgrHandler;
1123 #endif /* __DOWNLOADMGR_CLIENT_H__ */