Prosody generic: API: sm_open_module

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_open_module(struct sm_open_module_parms *module_parmsp)

Parameters

*module_parmsp
a structure of the following type:
typedef struct sm_open_module_parms {
	tSMCardId card_id;					/* in */
	tSM_UT32 module_ix;					/* in */
	tSMModuleId module_id;					/* out */
} SM_OPEN_MODULE_PARMS;

Description

Opens a specified Prosody module.

Only on Prosody before the V6 API: Before the V6 API was introduced this function did not exist because a tSMModuleID specifying a Prosody module was merely an integer in the range 0.. sm_get_modules() -1 which specified the module by a global index. The V6 API makes tSMModuleId an opaque type which can only be manipulated through the provided API calls. However, this API function has been added to all variants of Prosody TiNG so that applications can handle V6 and pre-V6 APIs the same. In pre-V6 TiNG, this function produces the appropriate module number in module_id..

Fields

card_id (Only in Prosody version 2 (TiNG))
The card, which has been opened (e. g. with sm_open_prosody_pci() ) and on which is the module to be opened,
module_ix (Only in Prosody version 2 (TiNG))
The physical module number of the module to open. Ths is the zero-based index of the module on the card specified by card_id.. The module numbers refer to positions on the card, so a card which has connectors for plugging in a module will always use the same number for a module plugged into a particular position regardless of which other positions are occupied.
module_id (Only in Prosody version 2 (TiNG))
The opened module.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody generic API.