Symbian3/SDK/Source/GUID-521837E2-583C-5C7D-85F7-D936C77AA84C.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-521837E2-583C-5C7D-85F7-D936C77AA84C"><title>What is a Comms Provider Module?</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A Comms Provider Module is a thread in the C32exe process. A Comms Provider Module is an extension of the thread class (<xref href="GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5.dita"><apiname>RThread</apiname></xref>) and adds functionality and information required by threads in the C32exe process. This information includes: </p> <ul><li id="GUID-25E88AD9-979D-5BDB-A31D-18CCD8979540"><p>The name of the Comms Provider Module </p> </li> <li id="GUID-54CFB2DE-DCD4-52ED-9FF1-E4A246651711"><p>The other Comms Provider Modules this Comms Provider Module must bind with for communication </p> </li> <li id="GUID-BA660D31-3C6D-522B-BF81-556BAA806F5C"><p>Configuration to be sent to the DLL for the thread. This configuration is specific to the thread and is not processed by Root Server. For example, Socket Server Comms Provider Modules must define the protocols to be loaded. </p> </li> <li id="GUID-49CF774D-3604-5F7F-88CC-BBD5AC88467D"><p>Parameters of <codeph>RThread</codeph>: </p> <ul><li id="GUID-125E854B-AC37-57BF-82E1-5BAEB7FBB102"><p>The name of the thread </p> </li> <li id="GUID-B6FFB573-006B-592B-80DA-98C4954EF0E9"><p>Priority of the thread </p> </li> <li id="GUID-0763D72B-F232-51E8-9527-F77577BA872D"><p>Stack and heap allocation of the thread </p> </li> <li id="GUID-B07202B0-F2E3-50BA-B584-C1EA1D69FB9E"><p>Action taken when the thread dies </p> </li> <li id="GUID-9A21532B-3F2F-5FDD-BD52-DFE4ECD6DB09"><p>Location of the thread in the System Startup sequence </p> </li> </ul> </li> </ul> <p>Functionality that a Comms Provider Module provides includes: </p> <ul><li id="GUID-69DC7CD5-F8F4-5764-BA85-963971C84870"><p>Access to the instance of the debug logger used with C32exe </p> </li> <li id="GUID-54BEC59A-0BA6-5799-81A4-B87B9C965222"><p>Extra debug logging on thread exit, including a trace of all memory leaks </p> </li> </ul> <p>A Comms Provider Module is represented by a single <xref href="GUID-10A0DC8C-70B3-53D0-B63F-786C4BAB36CF.dita">CMI file</xref>. </p> <p>Each of the Servers used in communications are a separate Comms Provider Module. For example, the Socket Server, Telephony Server and Serial Communications Server are each Comms Provider Modules. The Socket Server and the Serial Communications Server can also be configured to run as multiple Comms Provider Modules. In this case, each Comms Provider Module runs a group of plugins to the server. For example, the Socket Server can be run as four Comms Provider Modules, with the first Module running the main Socket Server thread, and the other three Modules running the SMS, IP and Bluetooth protocols. </p> <p>For a DLL to be run as a Comms Provider Module, the DLL must have these attributes: </p> <ul><li id="GUID-79C91A9D-1C9C-5A28-B8FD-6C4F06537356"><p>The type (2nd UID) is <xref href="GUID-72BAFF7B-69FA-33B3-9998-4982E70C6177.dita"><apiname>KUidCommsProviderModule</apiname></xref> (<codeph>0x101f7418</codeph>) </p> </li> <li id="GUID-E3344C69-1F31-5E65-BEDC-AF392737DB94"><p>It exports a function which acts as the main function of a new thread. This function must have a signature that takes a single <xref href="GUID-7A7C6CF1-23E3-3243-B4A8-DD94FBCC1FA5.dita"><apiname>TCFModuleInfo</apiname></xref> * parameter and returns a <xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> when the Comms Provider Module unloads. This function is called when the Comms Provider Module is loaded and communicates with the Root Server across the Comms Channels provided in the <codeph>TCFModuleInfo</codeph>. </p> </li> </ul> </conbody></concept>