Creating a Dynamic Startup Configuration

A Dynamic Startup Configuration (DSC) is a list of items stored in a DSC database. Each item represents a AMC (After Market Component) to be launched at phone boot time.

A DSC API client, RDscStore requires connection to a DSC database before issuing any requests concerning a DSC. A client opens a connection to the underlying database server using this API. Each DSC is identified by a UID. One DSC has a default UID (KDefaultSymbianDsc) provided by Symbian. By default, this DSC is executed at the end of the startup procedure. The purpose of the default DSC is to allow generic AMCs.

Though all of the insertion points for DSCs (and therefore their UIDs) are fixed when the ROM is built, DSCs themselves may be created and deleted at run time. Items may be added, removed, updated and retrieved using the functions supported by RDscStore. For more information, see Managing a Dynamic Startup Configuration.

Important: Any application wishing to read or write using the DSC API requires either or both ReadDeviceData and WriteDeviceData capability.

  1. Connect to the DSC database using RDscStore::OpenL(). The following code shows how the DSC API client connects to a DSC database:
    RDscStore iDscClient; 
    iDscClient.OpenL();

  2. Create the DSC using RDscStore::CreateDscL(). The following example code illustrates how to create a default Symbian DSC using the type KDefaultSymbianDsc or by passing an UID:
    RDscStore iDscClient;
    iDscClient.OpenL();
    if ( iDscClient.IsOpened() )
        {
        
        // Create DSC with KDefaultSymbianDsc by default
        iDscClient.CreateDscL();
    
        // Alternatively, you can create a DSC by passing an UID
        // A DSC with Id=5 is created 
        TUid iDscUid = TUid::Uid( 5 );
        _LIT( KDescription, "DSC 5" );
        iDscClient.CreateDscL( iDscUid, KDescription );
        iDscClient.Close();
        }