A Comms Provider Module is a thread in the C32exe process. A Comms Provider Module is an extension of the thread class (RThread) and adds functionality and information required by threads in the C32exe process. This information includes:
The name of the Comms Provider Module
The other Comms Provider Modules this Comms Provider Module must bind with for communication
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.
Parameters of RThread:
Functionality that a Comms Provider Module provides includes:
Access to the instance of the debug logger used with C32exe
Extra debug logging on thread exit, including a trace of all memory leaks
A Comms Provider Module is represented by a single CMI file.
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.
For a DLL to be run as a Comms Provider Module, the DLL must have these attributes:
The type (2nd UID) is KUidCommsProviderModule (0x101f7418)
It exports a function which acts as the main function of a new thread. This function must have a signature that takes a single TCFModuleInfo * parameter and returns a TInt 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 TCFModuleInfo.