Domain Management Policy DLL

This provides an implementation of the domain tree, and a suitable implementation of the DmPolicy class that the domain manager uses to access that tree.

A base port must supply a Domain Policy DLL that defines a domain tree. The domain manager uses the domain tree, which represents the domain hierarchy.

The domain tree is a static structure that is defined by domain management policy at system initialization, and remains fixed after system initialization.

The policy that governs the management of domains and its implementation is entirely up to the device. The only mandatory requirement that Symbian platform makes is that you supply a Domain Policy DLL. This provides an implementation of the domain tree, and a suitable implementation of the DmPolicy class that the domain manager uses to access that tree. A default implementation is provided by Symbian platform.

The domain hierarchy itself is defined in terms of a simple array of TDmDomainSpec objects. Each TDmDomainSpec item defines a domain, its characteristics, and its position in the domain hierarchy. A default domain hierarchy is supplied by Symbian platform, but domain management policy can define additional domain identifiers, TDmDomainId types, and consequently domains. The only requirement that the domain manager makes is that the root of the domain tree must have domain Id KDmIdRoot.

Figure 1. Default domain tree

The default domain hierarchy supplied by Symbian platform in domainpolicy.cpp is simply:

static const TDmDomainSpec    DomainHierarchy[] = 
    
    {
        { KDmIdRoot,    KDmIdNone,    KCapabilityWriteSystemData, EPwActive,    100000 /* 100ms */    },
        { KDmIdApps,    KDmIdRoot,    KCapabilityNone,            EPwActive,    100000 /* 100ms */    },
        { KDmIdUiApps,    KDmIdRoot,    KCapabilityNone,            EPwActive,    100000 /* 100ms */    },
        { KDmIdNone,    KDmIdNone,    0,                            EPwActive,    0    }
    };
    

The domain manager uses the domain tree specification (i.e. the TDmDomainSpec array) to build its own internal representation of the domain hierarchy. It calls DmPolicy::GetDomainSpecs() to access the domain tree specification, and calls DmPolicy::Release() to free that specification. The default implementation of GetDomainSpecs() simply returns a pointer to the specification, which means that the default implementation of Release() has nothing to do, and is indeed empty.