CCodDownloadImpl Class Reference
class CCodDownloadImpl : public CActive
|
Public Member Functions
|
|
~CCodDownloadImpl
()
|
IMPORT_C
TInt
|
ActiveDownload
()
|
IMPORT_C
TPtrC
|
GetDestFilePath
(
TInt
)
|
IMPORT_C
TPtrC
|
GetPath
()
|
IMPORT_C
HBufC8
*
|
GetPostResponseUrlL
()
|
IMPORT_C
TPtrC
|
Name
()
|
IMPORT_C
CCodDownloadImpl
*
|
NewL
(
CCodDownload
&, const
TDesC8
&, const
TDesC8
&,
MCodDownloadObserver
&, CEikonEnv *, const
TDesC8
*, const
TDesC16
*)
|
IMPORT_C
CCodDownloadImpl
*
|
NewL
(
CCodDownload
&, const
TInt
, const
TUid
, const
TDesC8
&,
MCodDownloadObserver
&, CEikonEnv *, const
TDesC8
*, const
TDesC16
*)
|
IMPORT_C
HBufC8
*
|
NextUrlL
()
|
IMPORT_C void
|
Pause
()
|
IMPORT_C const
TCodDownloadProgress
&
|
Progress
()
|
IMPORT_C
TBool
|
RemovableMedia
()
|
IMPORT_C void
|
ServiceFlowL
()
|
IMPORT_C void
|
SetCodDlAttached
(const
TBool
)
|
IMPORT_C void
|
SetUserData
(
TAny
*)
|
IMPORT_C void
|
StartL
(const CAiwGenericParamList *)
|
IMPORT_C void
|
Stop
()
|
IMPORT_C
TPtrC8
|
Type
()
|
IMPORT_C
HBufC8
*
|
UpdatedDDUriL
()
|
IMPORT_C
HBufC8
*
|
UpdatedDownloadDataL
()
|
IMPORT_C
HBufC8
*
|
UpdatedTrackDataL
(
TInt
&)
|
IMPORT_C
TAny
*
|
UserData
()
|
Private Member Functions
|
|
CCodDownloadImpl
(
CCodDownload
&,
MCodDownloadObserver
&, CEikonEnv *)
|
void
|
ActivateNextUrlL
()
|
TBool
|
ConfirmConnectL
()
|
TInt
|
ConnError
()
|
void
|
ConstructL
(const
TDesC8
&, const
TDesC8
&, const
TDesC8
*, const
TDesC16
*)
|
void
|
ConstructL
(const
TInt
, const
TUid
, const
TDesC8
&, const
TDesC8
*, const
TDesC16
*)
|
void
|
ContentTypeChanged
()
|
void
|
DoCancel
()
|
TBool
|
DoServiceFlowL
()
|
void
|
Done
()
|
void
|
Done
(
TInt
,
TInt
)
|
void
|
DownloadPaused
()
|
void
|
DownloadResumedPdAvailable
()
|
void
|
EndConnect
()
|
void
|
GetRootPathL
(
TDes
&)
|
void
|
HandleRoapPostResponseUrlL
(const
TDesC8
&)
|
void
|
HandleServerAppExit
(
TInt
)
|
void
|
LaunchHelpL
(const
TDesC
&)
|
void
|
LoadDoneL
()
|
TBool
|
LoadFailedL
()
|
TBool
|
LoadOkL
()
|
void
|
MediaObjectNameChanged
()
|
TPtrC8
|
NextUrlAttr
(
TBool
&)
|
void
|
PdPlayAvailable
()
|
void
|
ProgressL
(
TInt
,
TInt
)
|
void
|
ResetProgress
()
|
TBool
|
RoAcqOkL
()
|
TBool
|
RoapFailedL
()
|
TBool
|
RoapOkL
()
|
void
|
RoapTriggerParsedL
(const CRoapData &)
|
TInt
|
RunError
(
TInt
)
|
void
|
RunL
()
|
void
|
SetActiveDownload
()
|
void
|
SetConnError
(
TInt
)
|
void
|
SetOkL
()
|
TInt
|
ShowRoapCallback
(
TAny
*)
|
void
|
StartCancelL
()
|
void
|
StartConnect
(
TUint32
)
|
void
|
StartLoadL
(
TInt
)
|
void
|
UpdateMediaInfoL
()
|
void
|
UpdatePausable
(
TBool
)
|
void
|
UpdateTrackInfoL
()
|
TBool
|
UserAuthL
(const
TDesC
&, const
TDesC
&,
TBool
,
TDes
&,
TDes
&)
|
void
|
WaitForLicenseL
()
|
Constructor & Destructor Documentation
CCodDownloadImpl(CCodDownload &, MCodDownloadObserver &, CEikonEnv *)
Parameters
CCodDownload
& aProxy
|
Proxy owning this object.
|
MCodDownloadObserver
& aObserver
|
Observer.
|
CEikonEnv * aEikEnv
|
Eikon environment or NULL. Can be NULL if download does not require UI functionality.
|
~CCodDownloadImpl()
IMPORT_C
|
~CCodDownloadImpl
|
(
|
)
|
[virtual]
|
Member Functions Documentation
ActivateNextUrlL()
void
|
ActivateNextUrlL
|
(
|
)
|
[private]
|
Service flow: launch browser and (optionally) activate Next-URL, if exists.
ActiveDownload()
IMPORT_C
TInt
|
ActiveDownload
|
(
|
)
|
|
Currently active COD download
ConfirmConnectL()
TBool
|
ConfirmConnectL
|
(
|
)
|
[private, virtual]
|
Get confirmation for creating network connection.
ConnError()
TInt
|
ConnError
|
(
|
)
|
[private, inline, virtual]
|
Connection Error return: Connection Error .
ConstructL(const TDesC8 &, const TDesC8 &, const TDesC8 *, const TDesC16 *)
void
|
ConstructL
|
(
|
const
TDesC8
&
|
aBuf,
|
|
const
TDesC8
&
|
aType,
|
|
const
TDesC8
*
|
aMultipartBoundary,
|
|
const
TDesC16
*
|
aMultipartUrl
|
|
)
|
[private]
|
Second phase constructor. Leaves on failure.
Parameters
const
TDesC8
& aBuf
|
The descriptor.
|
const
TDesC8
& aType
|
Data type.
|
const
TDesC8
* aMultipartBoundary
|
Multipart boundary or NULL. Required for processing multipart.
|
const
TDesC16
* aMultipartUrl
|
Multipart URL or NULL. Required for processing multipart.
|
ConstructL(const TInt, const TUid, const TDesC8 &, const TDesC8 *, const TDesC16 *)
void
|
ConstructL
|
(
|
const
TInt
|
aDownloadId,
|
|
const
TUid
|
aDlUid,
|
|
const
TDesC8
&
|
aType,
|
|
const
TDesC8
*
|
aMultipartBoundary,
|
|
const
TDesC16
*
|
aMultipartUrl
|
|
)
|
[private]
|
Second phase constructor. Leaves on failure.
Parameters
const
TInt
aDownloadId
|
The download id.
|
const
TUid
aDlUid
|
The app uid.
|
const
TDesC8
& aType
|
Data type.
|
const
TDesC8
* aMultipartBoundary
|
Multipart boundary or NULL. Required for processing multipart.
|
const
TDesC16
* aMultipartUrl
|
Multipart URL or NULL. Required for processing multipart.
|
ContentTypeChanged()
void
|
ContentTypeChanged
|
(
|
)
|
[private, virtual]
|
To update the server about content type.
DoCancel()
void
|
DoCancel
|
(
|
)
|
[private, virtual]
|
Cancel protocol implementation.
DoServiceFlowL()
TBool
|
DoServiceFlowL
|
(
|
)
|
[private]
|
Perform service flow after a successful or failed download. This consists of zero, one or both of
Done(TInt, TInt)
void
|
Done
|
(
|
TInt
|
aStatusCode,
|
|
TInt
|
aError
|
|
)
|
[private, virtual]
|
Processing ended. Note that if processing does not include loading, this method can be called without a preceding StartLoadL call.
Parameters
TInt
aStatusCode
|
HTTP status code (aError mapped to HTTP status code).
|
TInt
aError
|
Error code of result. (The Set(), Accept() or Reject() request to CodEng will also complete with this value.)
|
DownloadPaused()
void
|
DownloadPaused
|
(
|
)
|
[private, inline, virtual]
|
To indicate the download is paused
DownloadResumedPdAvailable()
void
|
DownloadResumedPdAvailable
|
(
|
)
|
[private, inline, virtual]
|
To indicate the download is resumed and ready for PD
EndConnect()
void
|
EndConnect
|
(
|
)
|
[private, virtual]
|
GetDestFilePath(TInt)
IMPORT_C
TPtrC
|
GetDestFilePath
|
(
|
TInt
|
aMOIndex
|
)
|
const
|
Get Destination file name
Parameters
TInt
aMOIndex
|
media object index between 1 to 'n'
|
GetPath()
IMPORT_C
TPtrC
|
GetPath
|
(
|
)
|
const
|
Get path of saved content (or empty string). Available only after successful download.
GetPostResponseUrlL()
IMPORT_C
HBufC8
*
|
GetPostResponseUrlL
|
(
|
)
|
const
|
GetRootPathL(TDes &)
void
|
GetRootPathL
|
(
|
TDes
&
|
aRootPath
|
)
|
[private, virtual]
|
Get download root path. Leave with KErrCancel if query is cancelled.
Parameters
TDes
& aRootPath
|
Root path returned here.
|
HandleRoapPostResponseUrlL(const TDesC8 &)
void
|
HandleRoapPostResponseUrlL
|
(
|
const
TDesC8
&
|
aPrUrl
|
)
|
[private, virtual]
|
To handle PostResponseUrlL as part of metering response
HandleServerAppExit(TInt)
void
|
HandleServerAppExit
|
(
|
TInt
|
aReason
|
)
|
[private]
|
Embedded document viewing has ended.
Parameters
TInt
aReason
|
Exit reason (unused).
|
LaunchHelpL(const TDesC &)
void
|
LaunchHelpL
|
(
|
const
TDesC
&
|
aContext
|
)
|
[private]
|
LoadDoneL()
void
|
LoadDoneL
|
(
|
)
|
[private]
|
LoadFailedL()
TBool
|
LoadFailedL
|
(
|
)
|
[private]
|
LoadOkL()
TBool
|
LoadOkL
|
(
|
)
|
[private]
|
MediaObjectNameChanged()
void
|
MediaObjectNameChanged
|
(
|
)
|
[private, virtual]
|
To update the server about next media object being downloaded.
Name()
Get name attribute. This may be empty string, if attribute is empty or not available. Do not store pointer (data may change as download proceeds).
NewL(CCodDownload &, const TDesC8 &, const TDesC8 &, MCodDownloadObserver &, CEikonEnv *, const TDesC8 *, const TDesC16 *)
Two-phased constructor. Leaves on failure.
Parameters
CCodDownload
& aProxy
|
Proxy owning this object.
|
const
TDesC8
& aBuf
|
The descriptor.
|
const
TDesC8
& aType
|
Descriptor data type.
|
MCodDownloadObserver
& aObserver
|
Observer.
|
CEikonEnv * aEikEnv
|
Eikon environment or NULL. Can be NULL if download does not require UI functionality.
|
const
TDesC8
* aMultipartBoundary
|
Multipart boundary or NULL. Required for processing multipart.
|
const
TDesC16
* aMultipartUrl
|
Multipart URL or NULL. Required for processing multipart.
|
NewL(CCodDownload &, const TInt, const TUid, const TDesC8 &, MCodDownloadObserver &, CEikonEnv *, const TDesC8 *, const TDesC16 *)
Two-phased constructor. Leaves on failure.
Parameters
CCodDownload
& aProxy
|
Proxy owning this object.
|
const
TInt
aDownloadId
|
The download id.
|
const
TUid
aDlUid
|
The app UID.
|
const
TDesC8
& aType
|
Descriptor data type.
|
MCodDownloadObserver
& aObserver
|
Observer.
|
CEikonEnv * aEikEnv
|
Eikon environment or NULL. Can be NULL if download does not require UI functionality.
|
const
TDesC8
* aMultipartBoundary
|
Multipart boundary or NULL. Required for processing multipart.
|
const
TDesC16
* aMultipartUrl
|
Multipart URL or NULL. Required for processing multipart.
|
NextUrlAttr(TBool &)
Get Next-URL (possibly relative) attribute.
Parameters
TBool
& aBack
|
Etrue is returned here if Next-URL is 'back'.
|
NextUrlL()
IMPORT_C
HBufC8
*
|
NextUrlL
|
(
|
)
|
const
|
PdPlayAvailable()
void
|
PdPlayAvailable
|
(
|
)
|
[private, virtual]
|
Progresive download "Play" is available return: Connection Error .
ProgressL(TInt, TInt)
void
|
ProgressL
|
(
|
TInt
|
aFinalValue,
|
|
TInt
|
aCurrentValue
|
|
)
|
[private, virtual]
|
Parameters
TInt
aFinalValue
|
Final progress value.
|
TInt
aCurrentValue
|
Current progress value.
|
RemovableMedia()
IMPORT_C
TBool
|
RemovableMedia
|
(
|
)
|
const
|
Check if downloading to removable media. Available after EAccept event.
ResetProgress()
void
|
ResetProgress
|
(
|
)
|
[private, inline]
|
RoAcqOkL()
TBool
|
RoAcqOkL
|
(
|
)
|
[private]
|
Handle successful RoAcq ROAP.
RoapFailedL()
TBool
|
RoapFailedL
|
(
|
)
|
[private]
|
RoapOkL()
TBool
|
RoapOkL
|
(
|
)
|
[private]
|
RoapTriggerParsedL(const CRoapData &)
void
|
RoapTriggerParsedL
|
(
|
const CRoapData &
|
aData
|
)
|
[private, virtual]
|
ROAP Trigger parsed (success or error).
Parameters
const CRoapData & aData
|
ROAP Trigger data.
|
RunError(TInt)
TInt
|
RunError
|
(
|
TInt
|
aError
|
)
|
[private, virtual]
|
RunL()
void
|
RunL
|
(
|
)
|
[private, virtual]
|
Outstanding request completed.
ServiceFlowL()
IMPORT_C void
|
ServiceFlowL
|
(
|
)
|
|
Perform service flow after a successful or failed download. This consists of zero, one or both of
SetActiveDownload()
void
|
SetActiveDownload
|
(
|
)
|
[private, virtual]
|
SetCodDlAttached(const TBool)
IMPORT_C void
|
SetCodDlAttached
|
(
|
const
TBool
|
aValue
|
)
|
|
Set COD download attached
Parameters
const
TBool
aValue
|
If equals ETrue - download is attached
|
SetConnError(TInt)
void
|
SetConnError
|
(
|
TInt
|
aError
|
)
|
[private, inline, virtual]
|
Connection Error return: Connection Error .
SetOkL()
void
|
SetOkL
|
(
|
)
|
[private]
|
SetUserData(TAny *)
IMPORT_C void
|
SetUserData
|
(
|
TAny
*
|
aUserData
|
)
|
|
Set tansparent user data.
Parameters
TAny
* aUserData
|
User data.
|
ShowRoapCallback(TAny *)
TInt
|
ShowRoapCallback
|
(
|
TAny
*
|
aPtr
|
)
|
[private, static]
|
Call back function to launch the help
StartCancelL()
void
|
StartCancelL
|
(
|
)
|
[private, virtual]
|
Cancelling content load started. Not called if cancelling error report.
StartConnect(TUint32)
void
|
StartConnect
|
(
|
TUint32
|
aIap
|
)
|
[private, virtual]
|
Parameters
TUint32
aIap
|
AP to be used for creating the connection.
|
StartL(const CAiwGenericParamList *)
IMPORT_C void
|
StartL
|
(
|
const CAiwGenericParamList *
|
aParams
|
)
|
|
Start download. Panics if already active. Restart is OK for completed downloads.
Parameters
const CAiwGenericParamList * aParams
|
Parameters or NULL.
|
StartLoadL(TInt)
void
|
StartLoadL
|
(
|
TInt
|
aStatusCode
|
)
|
[private, virtual]
|
Starting load (fetch content or error-notify).
Parameters
TInt
aStatusCode
|
HTTP status code.900 (Success) indicates start of content load.Other values indicate start of error report.
|
Stop()
Stop (cancel) download. Safe to call in any state. Some processing still follows (e.g. install-notify).
Type()
IMPORT_C
TPtrC8
|
Type
|
(
|
)
|
const
|
Get data type of content (or empty string: type may not be available).
UpdateMediaInfoL()
void
|
UpdateMediaInfoL
|
(
|
)
|
[private, virtual]
|
Inform DownloadMgrClntSrv about updated media info return: Connection Error .
UpdatePausable(TBool)
void
|
UpdatePausable
|
(
|
TBool
|
aPausable
|
)
|
[private, virtual]
|
To update the server about whether or not download is pausable
UpdateTrackInfoL()
void
|
UpdateTrackInfoL
|
(
|
)
|
[private, virtual]
|
Inform DownloadMgrClntSrv about updated track return: Connection Error .
UpdatedDDUriL()
IMPORT_C
HBufC8
*
|
UpdatedDDUriL
|
(
|
)
|
const
|
UpdatedDownloadDataL()
IMPORT_C
HBufC8
*
|
UpdatedDownloadDataL
|
(
|
)
|
const
|
Set the CodData stream descriptor.
UpdatedTrackDataL(TInt &)
IMPORT_C
HBufC8
*
|
UpdatedTrackDataL
|
(
|
TInt
&
|
aValue
|
)
|
const
|
Set the stream descriptor for single mediaq object (track).
UserAuthL(const TDesC &, const TDesC &, TBool, TDes &, TDes &)
Parameters
const
TDesC
& aHost
|
Host.
|
const
TDesC
& aRealm
|
Realm.
|
TBool
aProxyAuth
|
ETrue if this is a proxy authentication.
|
TDes
& aUsername
|
Return username here.
|
TDes
& aPassword
|
Return password here.
|
UserData()
IMPORT_C
TAny
*
|
UserData
|
(
|
)
|
const
|
Get tansparent user data.
WaitForLicenseL()
void
|
WaitForLicenseL
|
(
|
)
|
[private, virtual]
|
Displays Info message "Waiting for license"
Member Enumerations Documentation
Enum TState
Enumerators
EInit
|
|
ESet
|
|
ELoad
|
|
ELoadDone
|
|
EServiceFlow
|
|
Member Data Documentation
TBool
iAttached
TBool
|
iAttached
|
[private]
|
TBool
iAutoAccept
TBool
|
iAutoAccept
|
[private]
|
TInt
iConnError
TInt
|
iConnError
|
[private]
|
CDocumentHandler * iDocHandler
CDocumentHandler *
|
iDocHandler
|
[private]
|
CAiwGenericParamList * iDocParams
CAiwGenericParamList *
|
iDocParams
|
[private]
|
TBool
iDownloadPaused
TBool
|
iDownloadPaused
|
[private]
|
CEikonEnv * iEikEnv
CEikonEnv *
|
iEikEnv
|
[private]
|
CCodEngBase * iEng
CCodEngBase *
|
iEng
|
[private]
|
CErrorUI * iErrorUi
CErrorUI *
|
iErrorUi
|
[private]
|
MCodDownloadObserver & iObserver
CAiwGenericParamList * iParams
CAiwGenericParamList *
|
iParams
|
[private]
|
RPointerArray< CBodyPart > iParts
HBufC8 * iPostResponseURL
HBufC8
*
|
iPostResponseURL
|
[private]
|
TCodDownloadProgress
iProgress
TBool
iSilentMode
TBool
|
iSilentMode
|
[private]
|
TBool
iSuppressLaunch
TBool
|
iSuppressLaunch
|
[private]
|
TBool
iSuppressNextUrl
TBool
|
iSuppressNextUrl
|
[private]
|
CCodUiResource * iUiResource
CCodUiResource *
|
iUiResource
|
[private]
|
TAny * iUserData
TAny
*
|
iUserData
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.