CDscItem Class Reference

class CDscItem : public CBase

CDscItem class containing application/process information required by the AMAStarter to launch an AMA. It is inherit from CStartupProperties

When an instance of this class is created it contains default values for all properties.

Inherits from

Public Member Functions
~CDscItem ()
IMPORT_C TPtrC Args ()
IMPORT_C TUid DscId ()
IMPORT_C TPtrC FileName ()
IMPORT_C TInt ItemId ()
IMPORT_C TBool Monitored ()
IMPORT_C CDscItem * NewL ()
IMPORT_C CDscItem * NewL (const TDesC &, const TDesC &)
IMPORT_C CDscItem * NewLC ()
IMPORT_C CDscItem * NewLC (const TDesC &, const TDesC &)
IMPORT_C TInt NoOfRetries ()
IMPORT_C void Reset ()
IMPORT_C void SetDscId (const TUid &)
IMPORT_C void SetFileParamsL (const TDesC &, const TDesC &)
IMPORT_C void SetItemId (const TInt )
IMPORT_C void SetMonitored ( TBool )
IMPORT_C void SetNoOfRetriesL ( TInt )
IMPORT_C void SetStartInBackground ( TBool )
IMPORT_C void SetStartMethodL ( TStartMethod )
IMPORT_C void SetStartupTypeL ( TStartupType )
IMPORT_C void SetTimeoutL ( TInt )
IMPORT_C void SetViewless ( TBool )
IMPORT_C const CSsmStartupProperties & SsmStartupProperties ()
IMPORT_C TBool StartInBackground ()
IMPORT_C TStartMethod StartMethod ()
IMPORT_C const CStartupProperties & StartupProperties ()
IMPORT_C TStartupType StartupType ()
IMPORT_C TInt Timeout ()
IMPORT_C TBool Viewless ()
Private Member Functions
CDscItem ()
void ConstructL ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
TUid iDscId
TInt iItemId
CSsmStartupProperties * iSsmStartupProperties
CStartupProperties * iStartupProperties

Constructor & Destructor Documentation

CDscItem()

CDscItem ( ) [private]

~CDscItem()

IMPORT_C ~CDscItem ( )

Member Functions Documentation

Args()

IMPORT_C TPtrC Args ( ) const

Accessor function returning the args value of the item CStartupProperties

ConstructL()

void ConstructL ( ) [private]

DscId()

IMPORT_C TUid DscId ( ) const

Accessor function returning the DscId of the DSC this item was retrieved from

FileName()

IMPORT_C TPtrC FileName ( ) const

Accessor function returning the filename value of the item CStartupProperties

ItemId()

IMPORT_C TInt ItemId ( ) const

Accessor function returning ItemId of the item

Monitored()

IMPORT_C TBool Monitored ( ) const

Accessor function returning the monitored value of the item CStartupProperties

NewL()

IMPORT_C CDscItem * NewL ( ) [static]
Used to create an instance of the CDscItem class
leave
One of the system-wide error codes

NewL(const TDesC &, const TDesC &)

IMPORT_C CDscItem * NewL ( const TDesC & aFileName,
const TDesC & aArgs
) [static]

Parameters

const TDesC & aFileName
const TDesC & aArgs

NewLC()

IMPORT_C CDscItem * NewLC ( ) [static]
Used to create an instance of the CDscItem class. The returned instance is put on the CleanupStack .
leave
One of the system-wide error codes

NewLC(const TDesC &, const TDesC &)

IMPORT_C CDscItem * NewLC ( const TDesC & aFileName,
const TDesC & aArgs
) [static]

Parameters

const TDesC & aFileName
const TDesC & aArgs

NoOfRetries()

IMPORT_C TInt NoOfRetries ( ) const

Accessor function returning the number of retries value of the item CStartupProperties

Reset()

IMPORT_C void Reset ( )

Reset all variables in this instance back to constructor defaults. This will enable to reuse this instance instead of having to delete it and create a new one.

SetDscId(const TUid &)

IMPORT_C void SetDscId ( const TUid & aDscId )

Sets the Id of the Dynamic Startup Configuration list this item resides in. The dscId of a DSC in the database must be set with this method before adding, updating, or deleting this item in this DSC

Parameters

const TUid & aDscId Id of the DSC this item resides in.

SetFileParamsL(const TDesC &, const TDesC &)

IMPORT_C void SetFileParamsL ( const TDesC & aFileName,
const TDesC & aArgs
)
Sets the filename and args values of the item
leave
KErrArgument - the filename is empty or one of the parameters exceeds KDscStoreMaxStringLength
leave
One of the system-wide error codes
CStartupProperties

Parameters

const TDesC & aFileName filename of the component.
const TDesC & aArgs arg list of the component.

SetItemId(const TInt)

IMPORT_C void SetItemId ( const TInt aItemId )
Sets itemId parameter for the item. Can only be set once. Normally the itemId is set by the DBMS, but if you know the itemId for a DscItem in the database you can create an empty CDscItem , set the itemId+dscId and let the DBMS look it up and fill in the other values.
panic
if you try to change the value

Parameters

const TInt aItemId Id of the item.

SetMonitored(TBool)

IMPORT_C void SetMonitored ( TBool aMonitored )

Sets the monitored value of the item CStartupProperties

Parameters

TBool aMonitored Whether the component is to be monitored once it is started

SetNoOfRetriesL(TInt)

IMPORT_C void SetNoOfRetriesL ( TInt aNumRetries )
Sets the number of retries value of the item
leave
KErrArgument - the number of retries must be either 0 or 1
CStartupProperties

Parameters

TInt aNumRetries number of retries should the start fail

SetStartInBackground(TBool)

IMPORT_C void SetStartInBackground ( TBool aStartInBackground )

Sets the StartInBackground value of the item CStartupProperties

Parameters

TBool aStartInBackground Whether to start the application in the background or not

SetStartMethodL(TStartMethod)

IMPORT_C void SetStartMethodL ( TStartMethod aStartMethod )
Sets the start method value of the item
leave
KErrArgument - the start method is not either EFireAndForget or EWaitForStart
CStartupProperties

Parameters

TStartMethod aStartMethod How we want to start the component

SetStartupTypeL(TStartupType)

IMPORT_C void SetStartupTypeL ( TStartupType aType )

Sets the startup type value of the item CStartupProperties

Parameters

TStartupType aType The startup type

SetTimeoutL(TInt)

IMPORT_C void SetTimeoutL ( TInt aTimeout )
Sets the timeout value of the item
leave
KErrArgument - the timeout must not be negative
CStartupProperties

Parameters

TInt aTimeout timeout between retries

SetViewless(TBool)

IMPORT_C void SetViewless ( TBool aViewless )

Sets the viewless value of the item CStartupProperties

Parameters

TBool aViewless Whether the application is viewless or not

SsmStartupProperties()

IMPORT_C const CSsmStartupProperties & SsmStartupProperties ( ) const

Returns a const reference to the embedded startup properties object CSsmStartupProperties

StartInBackground()

IMPORT_C TBool StartInBackground ( ) const

Accessor function returning the StartInBackground value of the item CStartupProperties

StartMethod()

IMPORT_C TStartMethod StartMethod ( ) const

Accessor function returning the start method value of the item CStartupProperties

StartupProperties()

IMPORT_C const CStartupProperties & StartupProperties ( ) const

Returns a const reference to the embedded startup properties object CStartupProperties

StartupType()

IMPORT_C TStartupType StartupType ( ) const

Accessor function returning the startup type value of the item CStartupProperties

Timeout()

IMPORT_C TInt Timeout ( ) const

Accessor function returning the timeout value of the item CStartupProperties

Viewless()

IMPORT_C TBool Viewless ( ) const

Accessor function returning the viewless value of the item CStartupProperties

Member Data Documentation

TUid iDscId

TUid iDscId [private]

TInt iItemId

TInt iItemId [private]

CSsmStartupProperties * iSsmStartupProperties

CSsmStartupProperties * iSsmStartupProperties [private]

CStartupProperties * iStartupProperties

CStartupProperties * iStartupProperties [private]