RHttpDownloadMgr Class Reference

API published in: S60 2nd Ed FP 3

Link against: downloadmgr.lib

Capability Information

Required Capabilities

None

Exceptions

The capability NetworkServices is required in: RHttpDownloadMgr::ConnectL( TUid aAppUid, MHttpDownloadMgrObserver& aObserver, TBool aMaster)


#include <
downloadmgrclient.h>

Inherits MHttpDownloadMgrObserver.

Inherited by RHttpDownloadMgrApiExt.


Detailed Description

Creates a download manager session and performs operations on it.

Public Member Functions

IMPORT_C RHttpDownloadMgr ()
 C++ default constructor.
IMPORT_C void ConnectL (TUid aAppUid, MHttpDownloadMgrObserver &aObserver, TBool aMaster)
 Creates a download manager session.
IMPORT_C TVersion Version () const
 Gives version information.
IMPORT_C void Close ()
 Closes download manager session.
IMPORT_C const CDownloadArrayCurrentDownloads () const
 Returns a list of the current downloads.
IMPORT_C RHttpDownloadCreateDownloadL (const TDesC8 &aUrl, TBool &aResult)
 Creates a new download subsession.
IMPORT_C RHttpDownloadCreateDownloadL (const TDesC8 &aUrl)
 Creates a new download subsession.
IMPORT_C RHttpDownloadCreateClientSideDownloadL (TInt aHttpTransaction, TBool &aResult)
 Creates a new download in client side.
IMPORT_C RHttpDownloadCreateCodDownloadL (const TDesC8 &aUrl, const TDesC8 &aBuf, const TDesC8 &aMimeType, CEikonEnv *aEikEnv, TBool &aResult)
 Creates a new download subsession for COD.
IMPORT_C RHttpDownloadFindDownload (const TDesC8 &aUrl, const TDesC8 &aMsgBody)
 Finds if the download is already created.
IMPORT_C TInt PauseAll ()
 Pauses all downloads.
IMPORT_C TInt StartAll ()
 Resumes all downloads.
IMPORT_C TInt ResetAll ()
 Resets all downloads.
IMPORT_C TInt DeleteAll ()
 Deletes all downloads.
IMPORT_C TInt Disconnect ()
 Disconnect the http connection and pauses all downloads.
IMPORT_C TInt GetIntAttribute (const TUint aAttribute, TInt32 &aValue)
 Gets the value for a TInt attribute.
IMPORT_C TInt GetBoolAttribute (const TUint aAttribute, TBool &aValue)
 Gets the value for a TBool attribute.
IMPORT_C TInt GetStringAttribute (const TUint aAttribute, TDes16 &aValue)
 Gets the value for a TDes16 attribute.
IMPORT_C TInt GetStringAttribute (const TUint aAttribute, TDes8 &aValue)
 Gets the value for a TDes8 attribute.
IMPORT_C TInt SetIntAttribute (const TUint aAttribute, TInt32 aValue)
 Sets the value for a TInt attribute.
IMPORT_C TInt SetBoolAttribute (const TUint aAttribute, TBool aValue)
 Sets the value for a TBool attribute.
IMPORT_C TInt SetStringAttribute (const TUint aAttribute, const TDesC16 &aValue)
 Sets the value for a TDesC attribute.
IMPORT_C TInt SetStringAttribute (const TUint aAttribute, const TDesC8 &aValue)
 Sets the value for a TDesC8 attribute.
IMPORT_C TInt SetDefaultIntAttribute (const TUint aAttribute, TInt32 aValue)
 Sets the value for the default TInt attribute.
IMPORT_C TInt SetDefaultBoolAttribute (const TUint aAttribute, TBool aValue)
 Sets the value for the default TBool attribute.
IMPORT_C TInt SetDefaultStringAttribute (const TUint aAttribute, const TDesC16 &aValue)
 Sets the value for the default TDesC attribute.
IMPORT_C TInt SetDefaultStringAttribute (const TUint aAttribute, const TDesC8 &aValue)
 Sets the value for the default TDesC8 attribute.
IMPORT_C void AddObserverL (MHttpDownloadMgrObserver &aObserver)
 Adds client to the observer list.
IMPORT_C void RemoveObserver (MHttpDownloadMgrObserver &aObserver)
 Removes client from the observer list.
IMPORT_C void SetNextUriObserver (MHttpDownloadMgrNextUriObserver *aObserver)
 Set next uri observer.

Protected Member Functions

void HandleDMgrEventL (RHttpDownload &aDownload, THttpDownloadEvent aEvent)
 Indicates an event.
RHttpDownloadAddToArrayL (RHttpDownload *aElement)
 Adds the created download to the list.

Friends

class RHttpDownload
class CDownloadMgrHandler
class CTransactionObserver
class CCodObserver

Constructor & Destructor Documentation

IMPORT_C RHttpDownloadMgr::RHttpDownloadMgr  ) 
 

C++ default constructor.


Member Function Documentation

IMPORT_C void RHttpDownloadMgr::AddObserverL MHttpDownloadMgrObserver aObserver  ) 
 

Adds client to the observer list.

Parameters:
aObserver Observer.
Returns:
None.
RHttpDownload& RHttpDownloadMgr::AddToArrayL RHttpDownload aElement  )  [protected]
 

Adds the created download to the list.

If it is already added, then it will do nothing.

Parameters:
aElement Download subsession.
Returns:
RHttpDownload& reference to the added item in the list.
IMPORT_C void RHttpDownloadMgr::Close  ) 
 

Closes download manager session.

Parameters:
- 
Returns:
None.
IMPORT_C void RHttpDownloadMgr::ConnectL TUid  aAppUid,
MHttpDownloadMgrObserver aObserver,
TBool  aMaster
 

Creates a download manager session.

Parameters:
aAppUid Client application's UID.
aObserver Observer
aMaster Indicates whether (if ETrue) this instance inherints all downloads of other instances. (stand-alone app flag).
Returns:
None.
IMPORT_C RHttpDownload& RHttpDownloadMgr::CreateClientSideDownloadL TInt  aHttpTransaction,
TBool &  aResult
 

Creates a new download in client side.

Parameters:
aHttpTransaction http transaction.
aResult The result is true if the download is created. If the URL is already being downloaded the seult is false.
IMPORT_C RHttpDownload& RHttpDownloadMgr::CreateCodDownloadL const TDesC8 &  aUrl,
const TDesC8 &  aBuf,
const TDesC8 &  aMimeType,
CEikonEnv *  aEikEnv,
TBool &  aResult
 

Creates a new download subsession for COD.

Parameters:
aUrl The url from the COD is downloaded.
aBuf The COD descriptor.
aMimeType The mimetype.
aEikEnv Eikon environment or NULL. Can be NULL if download does not require UI functionality.
aResult The result is true if the download is created. If the URL is already being downloaded the seult is false.
Returns:
RHttpDownload&
IMPORT_C RHttpDownload& RHttpDownloadMgr::CreateDownloadL const TDesC8 &  aUrl  ) 
 

Creates a new download subsession.

It creates a new one even if the URL is already beeing downloaded.

Parameters:
aUrl The url to be downloaded. If the URL is already being downloaded the seult is false.
Returns:
RHttpDownload&
IMPORT_C RHttpDownload& RHttpDownloadMgr::CreateDownloadL const TDesC8 &  aUrl,
TBool &  aResult
 

Creates a new download subsession.

Parameters:
aUrl The url to be downloaded.
aResult The result is true if the download is created. If the URL is already being downloaded the seult is false.
Returns:
RHttpDownload&
IMPORT_C const CDownloadArray& RHttpDownloadMgr::CurrentDownloads  )  const
 

Returns a list of the current downloads.

Parameters:
- 
Returns:
CDownloadArray
IMPORT_C TInt RHttpDownloadMgr::DeleteAll  ) 
 

Deletes all downloads.

Parameters:
- 
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::Disconnect  ) 
 

Disconnect the http connection and pauses all downloads.

Parameters:
- 
Returns:
None.
IMPORT_C RHttpDownload* RHttpDownloadMgr::FindDownload const TDesC8 &  aUrl,
const TDesC8 &  aMsgBody
 

Finds if the download is already created.

Parameters:
aUrl given URL
aMsgBody Message body from post operation
Returns:
Returns a pointer to the found download or null. This pointer is NOT owned by the client!
IMPORT_C TInt RHttpDownloadMgr::GetBoolAttribute const TUint  aAttribute,
TBool &  aValue
 

Gets the value for a TBool attribute.

Parameters:
aAttribute Identifies the attribute to be retrived.
aValue On completion, contains the requested TBool attribute.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::GetIntAttribute const TUint  aAttribute,
TInt32 &  aValue
 

Gets the value for a TInt attribute.

Parameters:
aAttribute Identifies the attribute to be retrived.
aValue On completion, contains the requested TInt attribute.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::GetStringAttribute const TUint  aAttribute,
TDes8 &  aValue
 

Gets the value for a TDes8 attribute.

Parameters:
aAttribute Identifies the attribute to be retrived.
aValue On completion, contains the requested TDes8 attribute.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::GetStringAttribute const TUint  aAttribute,
TDes16 &  aValue
 

Gets the value for a TDes16 attribute.

Parameters:
aAttribute Identifies the attribute to be retrived.
aValue On completion, contains the requested TDes16 attribute.
Returns:
None.
void RHttpDownloadMgr::HandleDMgrEventL RHttpDownload aDownload,
THttpDownloadEvent  aEvent
[protected, virtual]
 

Indicates an event.

Parameters:
aDownload The download with which the event occured.
aEvent Event type.
Returns:
None.

Implements MHttpDownloadMgrObserver.

IMPORT_C TInt RHttpDownloadMgr::PauseAll  ) 
 

Pauses all downloads.

Parameters:
- 
Returns:
None.
IMPORT_C void RHttpDownloadMgr::RemoveObserver MHttpDownloadMgrObserver aObserver  ) 
 

Removes client from the observer list.

Parameters:
aObserver Observer.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::ResetAll  ) 
 

Resets all downloads.

Parameters:
- 
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::SetBoolAttribute const TUint  aAttribute,
TBool  aValue
 

Sets the value for a TBool attribute.

Parameters:
aAttribute Identifies the attribute to be set.
aValue The value to be set.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::SetDefaultBoolAttribute const TUint  aAttribute,
TBool  aValue
 

Sets the value for the default TBool attribute.

Parameters:
aAttribute Identifies the attribute to be set.
aValue The value to be set.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::SetDefaultIntAttribute const TUint  aAttribute,
TInt32  aValue
 

Sets the value for the default TInt attribute.

Parameters:
aAttribute Identifies the attribute to be set.
aValue The value to be set.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::SetDefaultStringAttribute const TUint  aAttribute,
const TDesC8 &  aValue
 

Sets the value for the default TDesC8 attribute.

Parameters:
aAttribute Identifies the attribute to be set.
aValue The value to be set.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::SetDefaultStringAttribute const TUint  aAttribute,
const TDesC16 &  aValue
 

Sets the value for the default TDesC attribute.

Parameters:
aAttribute Identifies the attribute to be set.
aValue The value to be set.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::SetIntAttribute const TUint  aAttribute,
TInt32  aValue
 

Sets the value for a TInt attribute.

Parameters:
aAttribute Identifies the attribute to be set.
aValue The value to be set.
Returns:
None.
IMPORT_C void RHttpDownloadMgr::SetNextUriObserver MHttpDownloadMgrNextUriObserver aObserver  ) 
 

Set next uri observer.

Parameters:
aObserver Observer.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::SetStringAttribute const TUint  aAttribute,
const TDesC8 &  aValue
 

Sets the value for a TDesC8 attribute.

Parameters:
aAttribute Identifies the attribute to be set.
aValue The value to be set.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::SetStringAttribute const TUint  aAttribute,
const TDesC16 &  aValue
 

Sets the value for a TDesC attribute.

Parameters:
aAttribute Identifies the attribute to be set.
aValue The value to be set.
Returns:
None.
IMPORT_C TInt RHttpDownloadMgr::StartAll  ) 
 

Resumes all downloads.

Parameters:
- 
Returns:
None.
IMPORT_C TVersion RHttpDownloadMgr::Version  )  const
 

Gives version information.

Parameters:
- 
Returns:
TVersion Contains version information.

Friends And Related Function Documentation

friend class CCodObserver [friend]
 
friend class CDownloadMgrHandler [friend]
 
friend class CTransactionObserver [friend]
 
friend class RHttpDownload [friend]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top