Symbian3/PDK/Source/GUID-6DE69F29-45B0-5E62-AA13-DA4041B1BC46.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
    26     virtual TInt Validate(TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
    26     virtual TInt Validate(TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
    27     };
    27     };
    28 </codeblock>
    28 </codeblock>
    29 <p>This implements the four virtual functions that the base class defines,
    29 <p>This implements the four virtual functions that the base class defines,
    30 as well as a default constructor. </p>
    30 as well as a default constructor. </p>
    31 <section id="GUID-5A36A559-CBB6-4495-A1ED-0C4F9289F9B0"><title>Install()</title> <p> <codeph>Install()</codeph> sets the
    31 <section id="GUID-5A36A559-CBB6-4495-A1ED-0C4F9289F9B0"><title>Install()</title> <p> <codeph>Install()</codeph> sets
    32 driver name. The name is the way that the physical device is identified. The
    32 the driver name. The name is the way that the physical device is identified.
    33 name is the same as the LDD name, but followed by a dot and a short string
    33 The name is the same as the LDD name, but followed by a dot and a short string
    34 to represent the physical device. If you have similar existing source, just
    34 to represent the physical device. If you have similar existing source, just
    35 copy from there. The function is implemented as: </p> <codeblock id="GUID-6988B583-5060-5CE7-9404-C631C40B188A" xml:space="preserve">TInt DDriverComm::Install()
    35 copy from there. The function is implemented as: </p> <codeblock id="GUID-6988B583-5060-5CE7-9404-C631C40B188A" xml:space="preserve">TInt DDriverComm::Install()
    36     {
    36     {
    37     return SetName(&amp;KPddName);
    37     return SetName(&amp;KPddName);
    38     }
    38     }
    39 </codeblock> <p>In the template port, the name is the string <codeph>Comm.Template</codeph>. </p> <p>See
    39 </codeblock> <p>In the template port, the name is the string <codeph>Comm.Template</codeph>. </p> <p>See
    40 also <xref href="GUID-A5484A7F-94B9-34C7-9F88-82B1BF516930.dita#GUID-A5484A7F-94B9-34C7-9F88-82B1BF516930/GUID-0065FAAF-D734-3ED2-816A-CCE9BF607BAB"><apiname>DPhysicalDevice::Install()</apiname></xref>  </p> </section>
    40 also <xref href="GUID-A5484A7F-94B9-34C7-9F88-82B1BF516930.dita#GUID-A5484A7F-94B9-34C7-9F88-82B1BF516930/GUID-0065FAAF-D734-3ED2-816A-CCE9BF607BAB"><apiname>DPhysicalDevice::Install()</apiname></xref>  </p> </section>
    41 <section id="GUID-CBFB3280-3C16-4F15-A7DB-EDCA278562F6"><title>GetCaps()</title> <p> <codeph>GetCaps()</codeph> returns the
    41 <section id="GUID-CBFB3280-3C16-4F15-A7DB-EDCA278562F6"><title>GetCaps()</title> <p> <codeph>GetCaps()</codeph> returns
    42 capabilities of the physical driver <i>factory</i> (not the driver object).
    42 the capabilities of the physical driver <i>factory</i> (not the driver object).
    43 Since driver factories all produce polymorphic objects there is no point in
    43 Since driver factories all produce polymorphic objects there is no point in
    44 differentiating between them so the function should ignore the passed in descriptor
    44 differentiating between them so the function should ignore the passed in descriptor
    45 reference. The driver object’s capabilities are returned by the <codeph>DComm</codeph> derived <codeph>Caps()</codeph> function. </p> <p>GetCaps()
    45 reference. The driver object’s capabilities are returned by the <codeph>DComm</codeph> derived <codeph>Caps()</codeph> function. </p> <p>GetCaps()
    46 can be implemented as a stub function, i.e.: </p> <codeblock id="GUID-338ECD13-DD25-55E0-812F-3ED3A49826CD" xml:space="preserve">Void DDriverComm::GetCaps(TDes8&amp;  /* aDes */)
    46 can be implemented as a stub function, i.e.: </p> <codeblock id="GUID-338ECD13-DD25-55E0-812F-3ED3A49826CD" xml:space="preserve">Void DDriverComm::GetCaps(TDes8&amp;  /* aDes */)
    47     {
    47     {
    92     return r;
    92     return r;
    93     }
    93     }
    94 </codeblock> <p>where <codeph>DCommXXX</codeph> is a <codeph>DComm</codeph> derived
    94 </codeblock> <p>where <codeph>DCommXXX</codeph> is a <codeph>DComm</codeph> derived
    95 class. </p> <p>Customisation depends on the functions in the <codeph>DCommXXX::DoCreate()</codeph> function. </p> </section>
    95 class. </p> <p>Customisation depends on the functions in the <codeph>DCommXXX::DoCreate()</codeph> function. </p> </section>
    96 </conbody><related-links>
    96 </conbody><related-links>
    97 <link>
    97 <link href="GUID-3C34724F-B476-5329-B0B1-6D5A34294979.dita"><linktext>Interrupt
    98 <desc><xref href="GUID-3C34724F-B476-5329-B0B1-6D5A34294979.dita">Interrupt Dispatcher
    98 Dispatcher Tutorial</linktext></link>
    99 Tutorial</xref></desc>
       
   100 </link>
       
   101 </related-links></concept>
    99 </related-links></concept>