Symbian3/PDK/Source/GUID-1197F032-1B73-58E1-8B45-E5D58B9DF788.dita
changeset 1 25a17d01db0c
child 5 f345bda72bc4
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-1197F032-1B73-58E1-8B45-E5D58B9DF788" xml:lang="en"><title>Domain
       
    13 Management Policy DLL</title><shortdesc>This provides an implementation of the domain tree, and a suitable
       
    14 implementation of the <apiname>DmPolicy</apiname> class that the domain manager
       
    15 uses to access that tree.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    16 <p>A base port must supply a Domain Policy DLL that defines a domain tree.
       
    17 The domain manager uses the domain tree, which represents the domain hierarchy. </p>
       
    18 <p>The domain tree is a static structure that is defined by domain management
       
    19 policy at system initialization, and remains fixed after system initialization. </p>
       
    20 <p>The policy that governs the management of domains and its implementation
       
    21 is entirely up to the device. The only mandatory requirement that Symbian
       
    22 platform makes is that you supply a Domain Policy DLL. This provides an implementation
       
    23 of the domain tree, and a suitable implementation of the <xref href="GUID-15CAA28D-943B-3B92-B4E1-8AA466DFA407.dita"><apiname>DmPolicy</apiname></xref> class
       
    24 that the domain manager uses to access that tree. A default implementation
       
    25 is provided by Symbian platform. </p>
       
    26 <fig id="GUID-C902A1BA-C300-5A93-8385-F4D39FB6F86A">
       
    27 <image href="GUID-CE3C8A77-8797-53FB-984E-A91A413BA254_d0e363473_href.png" placement="inline"/>
       
    28 </fig>
       
    29 <p>The domain hierarchy itself is defined in terms of a simple array of <xref href="GUID-15A31C41-77E0-3E6D-B106-D4FBFA9A52C6.dita"><apiname>TDmDomainSpec</apiname></xref> objects.
       
    30 Each <codeph>TDmDomainSpec</codeph> item defines a domain, its characteristics,
       
    31 and its position in the domain hierarchy. A default domain hierarchy is supplied
       
    32 by Symbian platform, but domain management policy can define additional domain
       
    33 identifiers, <xref href="GUID-4F284AB0-85A5-3871-B973-8BCAB4AA91BC.dita"><apiname>TDmDomainId</apiname></xref> types, and consequently domains.
       
    34 The only requirement that the domain manager makes is that the root of the
       
    35 domain tree must have domain Id <codeph>KDmIdRoot</codeph>. </p>
       
    36 <fig id="GUID-7590D6B6-A264-58A6-8764-8491020B921C">
       
    37 <title>           Default domain tree          </title>
       
    38 <image href="GUID-32C58139-E341-5A15-B20C-D3EA4117AC6E_d0e363498_href.png" placement="inline"/>
       
    39 </fig>
       
    40 <p>The default domain hierarchy supplied by Symbian platform in <filepath>domainpolicy.cpp</filepath> is
       
    41 simply: </p>
       
    42 <codeblock id="GUID-89939191-2C55-54B5-BCBA-DA8D1430D849" xml:space="preserve">static const TDmDomainSpec    DomainHierarchy[] = 
       
    43     
       
    44     {
       
    45         { KDmIdRoot,    KDmIdNone,    KCapabilityWriteSystemData, EPwActive,    100000 /* 100ms */    },
       
    46         { KDmIdApps,    KDmIdRoot,    KCapabilityNone,            EPwActive,    100000 /* 100ms */    },
       
    47         { KDmIdUiApps,    KDmIdRoot,    KCapabilityNone,            EPwActive,    100000 /* 100ms */    },
       
    48         { KDmIdNone,    KDmIdNone,    0,                            EPwActive,    0    }
       
    49     };
       
    50     </codeblock>
       
    51 <p>The domain manager uses the domain tree specification (i.e. the <codeph>TDmDomainSpec</codeph> array)
       
    52 to build its own internal representation of the domain hierarchy. It calls <xref href="GUID-15CAA28D-943B-3B92-B4E1-8AA466DFA407.dita#GUID-15CAA28D-943B-3B92-B4E1-8AA466DFA407/GUID-A3E21E8F-5920-3DBD-B735-D4B8DE8E382D"><apiname>DmPolicy::GetDomainSpecs()</apiname></xref> to
       
    53 access the domain tree specification, and calls <xref href="GUID-15CAA28D-943B-3B92-B4E1-8AA466DFA407.dita#GUID-15CAA28D-943B-3B92-B4E1-8AA466DFA407/GUID-5A1DD864-7059-3322-8DF2-BB7A53237CB6"><apiname>DmPolicy::Release()</apiname></xref> to
       
    54 free that specification. The default implementation of <codeph>GetDomainSpecs()</codeph> simply
       
    55 returns a pointer to the specification, which means that the default implementation
       
    56 of <codeph>Release()</codeph> has nothing to do, and is indeed empty. </p>
       
    57 </conbody></concept>