Prosody X: API: sm_open_prosody_s_v3

Prototype Definition

int sm_open_prosody_s_v3(struct sm_open_prosody_s_v3_parms *openp)

Parameters

*openp
a structure of the following type:
typedef struct sm_open_prosody_s_v3_parms {
	char *ps_locator;					/* in */
	tSMCardId card_id;					/* in */
} SM_OPEN_PROSODY_S_V3_PARMS;

Description

Opens a Prosody S version 3 virtual card for use with the Prosody API. This function must be invoked by applications using the V6 interface to register the tSMCardId value for passing into any other Prosody API function which refers to this card.

The security key in the ps_locator is only validated when establishing a connection with the virtual module. Supplying a incorrect key will result in an error return from a function call some time after sm_open_module() has reported success, as the connection is made asynchronously.

An open card can be closed by calling sm_close_prosody().

Fields

ps_locator
The IP address of the ProsodyS server, or its registered name (i.e. a valid input to the standard function getaddrinfo()), then a colon followed by the port the server is listening on. If the server is using a security key, the IP address and port is followed by a slash (/) character and the security key. For example, "10.202.100.254:2030/mykey".

Note that IPv6 addresses in numeric form should be enclosed in square brackets, for example "[2010:836B:4179::836B:4179]:2030/mykey".

card_id
An arbitrary value representing the open card.

Returns

0 if call completed successfully, otherwise a standard error.


This function is part of the Prosody X API.