RFotaEngineSession Class Reference
class RFotaEngineSession : public RAknAppServiceBase
|
A client handle to a FOTA engine session. fotaengine.lib
-
Since
-
Series 60 3.1
Public Member Functions
|
|
RFotaEngineSession
()
|
IMPORT_C void
|
Close
()
|
IMPORT_C
TInt
|
CurrentVersion
(
TDes
&)
|
IMPORT_C
TInt
|
DeleteUpdatePackage
(const
TInt
)
|
IMPORT_C
TInt
|
Download
(const
TInt
, const
TDesC8
&, const
TSmlProfileId
, const
TDesC8
&, const
TDesC8
&)
|
IMPORT_C
TInt
|
DownloadAndUpdate
(const
TInt
, const
TDesC8
&, const
TSmlProfileId
, const
TDesC8
&, const
TDesC8
&)
|
IMPORT_C void
|
GenericAlertSentL
(const
TInt
)
|
IMPORT_C
TInt
|
GetDownloadUpdatePackageSize
(const
TInt
,
TInt
&,
TInt
&)
|
IMPORT_C
TInt
|
GetResult
(const
TInt
)
|
IMPORT_C
TState
|
GetState
(const
TInt
)
|
IMPORT_C
TInt
|
GetUpdatePackageIds
(
TDes16
&)
|
IMPORT_C
TBool
|
IsPackageStoreSizeAvailable
(const
TInt
)
|
IMPORT_C
TInt
|
LastUpdate
(
TTime
&)
|
IMPORT_C void
|
OpenL
()
|
IMPORT_C
TInt
|
OpenUpdatePackageStore
(const
TInt
,
RWriteStream
*&)
|
IMPORT_C
TInt
|
ScheduledUpdateL
(
TFotaScheduledUpdate
)
|
IMPORT_C
TInt
|
TryResumeDownload
()
|
IMPORT_C
TInt
|
Update
(const
TInt
, const
TSmlProfileId
, const
TDesC8
&, const
TDesC8
&)
|
IMPORT_C void
|
UpdatePackageDownloadComplete
(const
TInt
)
|
IMPORT_C
TVersion
|
Version
()
|
Inherited Functions
|
|
RAknAppServiceBase::ConnectChainedAppL(TUid)
|
|
RApaAppServiceBase::CancelNotifyServerExit()const
|
|
RApaAppServiceBase::ConnectExistingAppL(const RApaAppServiceBase &)
|
|
RApaAppServiceBase::ConnectExistingAppL(const RApaAppServiceBase &,const TSecurityPolicy &)
|
|
RApaAppServiceBase::ConnectExistingByNameL(const TDesC &)
|
|
RApaAppServiceBase::ConnectExistingByNameL(const TDesC &,const TSecurityPolicy &)
|
|
RApaAppServiceBase::NotifyServerExit(TRequestStatus &)const
|
|
RApaAppServiceBase::RApaAppServiceBase()
|
|
RApaAppServiceBase::ServerName()const
|
|
RApaAppServiceBase::TransferExistingSessionL(RApaAppServiceBase &)
|
|
REikAppServiceBase::ConnectNewAppL(TUid)
|
|
REikAppServiceBase::ConnectNewAppL(TUid,const TSecurityPolicy &)
|
|
REikAppServiceBase::ConnectNewChildAppL(TUid,RWindowGroup &)
|
|
REikAppServiceBase::ConnectNewChildAppL(TUid,RWindowGroup &,const TSecurityPolicy &)
|
|
RHandleBase::Attributes()const
|
|
RHandleBase::BTraceId()const
|
|
RHandleBase::DoExtendedClose()
|
|
RHandleBase::Duplicate(const RThread &,TOwnerType)
|
|
RHandleBase::FullName()const
|
|
RHandleBase::FullName(TDes &)const
|
|
RHandleBase::Handle()const
|
|
RHandleBase::HandleInfo(THandleInfo *)
|
|
RHandleBase::Name()const
|
|
RHandleBase::NotifyDestruction(TRequestStatus &)
|
|
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
|
|
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
|
|
RHandleBase::RHandleBase()
|
|
RHandleBase::RHandleBase(TInt)
|
|
RHandleBase::SetHandle(TInt)
|
|
RHandleBase::SetHandleNC(TInt)
|
|
RSessionBase::CreateSession(RServer2,const TVersion &)
|
|
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
|
|
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
|
|
RSessionBase::CreateSession(const TDesC &,const TVersion &)
|
|
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
|
|
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
|
|
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
|
|
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
|
|
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
|
|
RSessionBase::Open(TInt,TOwnerType)
|
|
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
|
|
RSessionBase::Send(TInt)const
|
|
RSessionBase::Send(TInt,const TIpcArgs &)const
|
|
RSessionBase::SendReceive(TInt)const
|
|
RSessionBase::SendReceive(TInt,TRequestStatus &)const
|
|
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
|
|
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
|
|
RSessionBase::SetReturnedHandle(TInt)
|
|
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
|
|
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
|
|
RSessionBase::ShareAuto()
|
|
RSessionBase::ShareProtected()
|
Public Member Enumerations
|
enum
|
TResult
{
EResSuccessful
= 200,
EResUserCancelled
= 401,
EResCorruptedFWUPD
= 402,
EResPackageMismatch
= 403,
EResFailedSignatureAuthentication
= 404,
EResUndefinedError
= 409,
EResUpdateFailed
= 410,
EResMalformedOrBadURL
= 411,
EResAlternateDLServerUnavailable
= 412,
EResDLFailDueToDeviceOOM
= 501,
EResDLFailDueToNWIssues
= 503
}
|
enum
|
TState
{
EIdle
= 10,
EClientRequest
= 5,
EStartingDownload
= 15,
EDownloadFailed
= 20,
EDownloadProgressingWithResume
= 25,
EDownloadProgressing
= 30,
EDownloadComplete
= 40,
EStartingUpdate
= 50,
EUpdateProgressing
= 60,
EUpdateFailed
= 70,
EUpdateFailedNoData
= 80,
EUpdateSuccessful
= 90,
EUpdateSuccessfulNoData
= 100
}
|
Constructor & Destructor Documentation
RFotaEngineSession()
IMPORT_C
|
RFotaEngineSession
|
(
|
)
|
|
Member Functions Documentation
Close()
Closes session to Fota Engine
ConnectToServerL(const TUid &, const TUid &)
void
|
ConnectToServerL
|
(
|
const
TUid
&
|
aNameUid,
|
|
const
TUid
&
|
aAppServerUid
|
|
)
|
[private]
|
Connects to running fotaserver instance
Parameters
const
TUid
& aNameUid
|
Differentiator.
|
const
TUid
& aAppServerUid
|
FotaServer app uid
|
CurrentVersion(TDes &)
IMPORT_C
TInt
|
CurrentVersion
|
(
|
TDes
&
|
aSWVersion
|
)
|
|
Parameters
TDes
& aSWVersion
|
On return, contains FW version of device.
|
DeleteUpdatePackage(const TInt)
IMPORT_C
TInt
|
DeleteUpdatePackage
|
(
|
const
TInt
|
aPkgId
|
)
|
|
Called when DM server deletes firmware update management object from device's management tree. I.e. Delete to mgmt URI ./FUMO/<x>. If FOTA Engine has not yet deleted specified update package, then it should do so.
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package.
|
Download(const TInt, const TDesC8 &, const TSmlProfileId, const TDesC8 &, const TDesC8 &)
Called when DM server calls execute command to Firmware update object URI ./FUMO/<x>/Download Initiates a firmware download for the specified update package.
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package. Mapped to Mgmt URI ./FUMO/<x> in DM Framework
|
const
TDesC8
& aPkgURL
|
Contains the URL where the firmware update package or download descriptor is located. This URL is used for alternative download mechanism such as Descriptor Based Download. Mgmt URI ./FUMO/<x>/Download/PkgURL
|
const
TSmlProfileId
aProfileId
|
ProfileId of the DM server that send the execute command
|
const
TDesC8
& aPkgName
|
Name associated with the firmware update package, may be empty Mgmt URI ./FUMO/<x>/PkgName
|
const
TDesC8
& aPkgVersion
|
Version information for the firmware update package, may be empty. Mgmt URI./FUMO/<x>/PkgVersion
|
DownloadAndUpdate(const TInt, const TDesC8 &, const TSmlProfileId, const TDesC8 &, const TDesC8 &)
Called when DM server calls execute command to Firmware update object URI ./FUMO/<x>/DownloadAndUpdate Initiates a firmware download and an immediate update for the specified update package.
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package. Mapped to Mgmt URI ./FUMO/<x> in DM Framework
|
const
TDesC8
& aPkgURL
|
Contains the URL where the firmware update package or download descriptor is located. This URL is used for alternative download mechanism such as Descriptor Based Download. Mgmt URI ./FUMO/<x>/DownloadAndUpdate/PkgURL
|
const
TSmlProfileId
aProfileId
|
ProfileId of the DM server that send the execute command
|
const
TDesC8
& aPkgName
|
Name associated with the firmware update package, may be empty. Mgmt URI ./FUMO/<x>/PkgName
|
const
TDesC8
& aPkgVersion
|
Version information for the firmware update package, may be empty. Mgmt URI./FUMO/<x>/PkgVersion
|
ExtensionInterface(TUid, TAny *&)
IMPORT_C void
|
ExtensionInterface
|
(
|
TUid
|
aInterfaceId,
|
|
TAny
*&
|
aImplementation
|
|
)
|
[private, virtual]
|
Parameters
TUid
aInterfaceId
|
|
TAny
*& aImplementation
|
|
GenericAlertSentL(const TInt)
IMPORT_C void
|
GenericAlertSentL
|
(
|
const
TInt
|
aPackageID
|
)
|
|
Tells fotaserver that generic alert for package is sent. When fotaengine session is closed, cleanup for package is done.
GetDownloadUpdatePackageSize(const TInt, TInt &, TInt &)
IMPORT_C
TInt
|
GetDownloadUpdatePackageSize
|
(
|
const
TInt
|
aPkgId,
|
|
TInt
&
|
aDownloadedSize,
|
|
TInt
&
|
aTotalSize
|
|
)
|
|
Gets the downloaded and full size of the update package. Called by Download Manager during resume operation to know the size of partially downloaded package.
-
Since
-
Series 60 3.2.2
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package.
|
TInt
& aDownloadedSize
|
On return, size of the downloaded package in bytes
|
TInt
& aTotalSize
|
On return, full size of the download package in bytes
|
GetResult(const TInt)
IMPORT_C
TInt
|
GetResult
|
(
|
const
TInt
|
aPkgId
|
)
|
|
Called when caller wants to enquire Final Result Code of specified firmware update operation. If the update operation is not yet reached final stage, then -1 should be returned to the caller. Possible Final Result Codes are specified in OMA FUMO Specification. Note that Download operation also ends to final result code e.g. 202 - Successful Download.
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package.
|
GetState(const TInt)
Called when caller wants to enquire State of specified firmware update. If the State is unknown to FOTA Engine, then it should return EIdle.
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package.
|
GetUpdatePackageIds(TDes16 &)
IMPORT_C
TInt
|
GetUpdatePackageIds
|
(
|
TDes16
&
|
aPackageIdList
|
)
|
|
Gets IDs of the present update packages.
Parameters
TDes16
& aPackageIdList
|
On return, contains array of pkg ids
|
IsPackageStoreSizeAvailable(const TInt)
IMPORT_C
TBool
|
IsPackageStoreSizeAvailable
|
(
|
const
TInt
|
aSize
|
)
|
|
Called when DM server is about to start sending new firmware update package using DM Large Object download. This function is used to enquire if there is enough space available for the firmware update package. e.g when DM server is about to start sending new firmware update package using DM Large Object download.
Parameters
const
TInt
aSize
|
Size of the firmware update package. Since continuation of interrupted downloads is not supported , this means new update package.
|
LastUpdate(TTime &)
Retrieves the timestamp of last succesful update.
Parameters
TTime
& aUpdate
|
On return, contains time of last succesfull update
|
OpenL()
Opens session to Fota Engine
OpenUpdatePackageStore(const TInt, RWriteStream *&)
Opens stream to update package storage. Call UpdatePackageDownloadComplete when package is completely written.
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package. Download mgr may use value -1.
|
RWriteStream
*& aPkgStore
|
On return, open stream in which file may be written to.
|
ReleaseChunkHandle()
TInt
|
ReleaseChunkHandle
|
(
|
)
|
[private]
|
Signals the server to release chunk handle
ScheduledUpdateL(TFotaScheduledUpdate)
Like Update, but called by scheduler mechanism. Needed package details (profile id etc are already known)
SendChunkL(const TUint8 *, const TUint8 *)
void
|
SendChunkL
|
(
|
const
TUint8
*
|
aP1,
|
|
const
TUint8
*
|
aP2
|
|
)
|
[private]
|
Signals the server to read chunk contents
Parameters
const
TUint8
* aP1
|
Pointer to beginning of content
|
const
TUint8
* aP2
|
Pointer to end of content
|
ServiceUid()
TUid
|
ServiceUid
|
(
|
)
|
const [private, virtual]
|
Returns the UID of the service that this session provides an interface for. Client side service implementations must implement this function to return the UID for the service that they implement.
StartApplicationL(const TUid &, const TUid &)
void
|
StartApplicationL
|
(
|
const
TUid
&
|
aNameUid,
|
|
const
TUid
&
|
aAppServerUid
|
|
)
|
[private]
|
Starts fotaserver server application.
Parameters
const
TUid
& aNameUid
|
Differentiator.
|
const
TUid
& aAppServerUid
|
FotaServer app uid
|
TryResumeDownload()
IMPORT_C
TInt
|
TryResumeDownload
|
(
|
)
|
|
Requests to resume the suspended download of the update package. Called by Fota Monitory Service. for ex, when network is available again.
-
Since
-
Series 60 3.2.2
Update(const TInt, const TSmlProfileId, const TDesC8 &, const TDesC8 &)
Called when DM server calls execute command to Firmware update object URI ./FUMO/<x>/Update Initiates a firmware update for the specified update package. Firmware Update Package should be already downloaded to the device either using DM Large Object or OMA OTA download mechanisms.
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package.
|
const
TSmlProfileId
aProfileId
|
ProfileId of the DM server that send the execute command
|
const
TDesC8
& aPkgName
|
Name associated with the firmware update package, may be empty. Mgmt URI ./FUMO/<x>/PkgName
|
const
TDesC8
& aPkgVersion
|
Version information for the firmware update package, may be empty. Mgmt URI./FUMO/<x>/PkgVersion
|
UpdatePackageDownloadComplete(const TInt)
IMPORT_C void
|
UpdatePackageDownloadComplete
|
(
|
const
TInt
|
aPkgId
|
)
|
|
Call this when download of update package is completed. In case of software error or network interruption, this is not called and package store is left empty. When this is called, fotaengine closes the stream and associated storage.
Parameters
const
TInt
aPkgId
|
Unique identifier of the update package. Download mgr may use value -1.
|
Member Enumerations Documentation
Enum TResult
An enumeration of the firmware update result codes as specified in the OMA Firmware Update Management Oobject specification.
Enumerators
EResSuccessful = 200
|
|
EResUserCancelled = 401
|
|
EResCorruptedFWUPD = 402
|
|
EResPackageMismatch = 403
|
|
EResFailedSignatureAuthentication = 404
|
|
EResUndefinedError = 409
|
|
EResUpdateFailed = 410
|
|
EResMalformedOrBadURL = 411
|
|
EResAlternateDLServerUnavailable = 412
|
|
EResDLFailDueToDeviceOOM = 501
|
|
EResDLFailDueToNWIssues = 503
|
|
Enum TState
An enumeration of the firmware update progress state codes as specified in FUMO spec.
Enumerators
EIdle = 10
|
No firmware update has been started
|
EClientRequest = 5
|
Client has sent a client initiated request
|
EStartingDownload = 15
|
There is no data available and download is about to start
|
EDownloadFailed = 20
|
Download failed and there is no data received
|
EDownloadProgressingWithResume = 25
|
Download is progressing with resume support. This is an internal state and is not a valid FUMO state. Only DM UI and Fota Server can get this state; others get state 30 instead.
|
EDownloadProgressing = 30
|
Download is progressing without resume support.
|
EDownloadComplete = 40
|
Have data and download has been completed successfully
|
EStartingUpdate = 50
|
Have data and about to start update
|
EUpdateProgressing = 60
|
Denotes that the update is currently running, but has not yet completed
|
EUpdateFailed = 70
|
Have data but update failed
|
EUpdateFailedNoData = 80
|
Update failed and data deleted or removed
|
EUpdateSuccessful = 90
|
Update complete and data still available
|
EUpdateSuccessfulNoData = 100
|
Data deleted or removed after a successful update
|
Member Data Documentation
RChunk
iChunk
Chunk for sending swupd contents to fotaserver
TInt
iGenericAlertSentPkgID
TInt
|
iGenericAlertSentPkgID
|
[private]
|
If not -1 , indicates that generic alert has been sent for this package
RFotaWriteStream * iStream
Stream for writing swupd file to chunk
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.