Function :
 CAI_openConversationFromFactory


Description

This function opens an APIv2 conversation from an already opened Factory 

 
API : Application Programming Interface

CaiErr    CAI_openConversationFromFactory (
	CAI_ConversationFactory 
	CAI_OpenType 
	CAI_Conversation 

*io_factory,
*i_open_type,
**o_conversation);

 

Field Descriptions

Parameter In/Out Description
io_factory In/Out A pointer to the factory from which the conversation will be opened..
i_open_type In A pointer to a structure declaring the type of open conversation. (See structure description below).
o_conversation Out A reference to a pointer to a conversation. This pointer (*o_conversation) must be initialized to NULL.
 

 

Structure Definition

 

The CAI_OpenType structure provides clients with a new 'fast open' feature (bind_host_resource) which delays the allocation of AMADEUS central system resources until reception of the first functional transaction, plus the ability to open conversations with custom sign-in parameters. 
This structure must be initialized before use, with the CAI_initOpenType function.
The CAI_initOpenType structure is composed of the TCP/IP parameters used for the connection to the APIv2 server.

Typedef struct
{
	unsigned short		bind_host_resource;
	CAI_CustomSign	        *custom_sign;
	CAI_Reserved		*reserved;
} CAI_OpenType;

 

Field Description
bind_host_resource When set to true an active conversation with a resource allocation in the AMADEUS central System is initiated. When set to false (zero) a 'fast open' is performed and only the connection to the APIv2 Server is processed. The allocation of the resource in the AMADEUS central System will be performed later, on reception of the first transaction.
custom_sign Filling this structure allows customers to overwrite the sign-in parameters agt_initials, duty_code, country_code, currency_code and language_code that are listed in the structure CAI_CustomSign
reserved This field must not be filled.

 

This structure must be initialized with CAI_initCustomSign function.
Typedef struct
{
	unsigned char	*agt_initials;
	unsigned char	*duty_code;
	unsigned char	*country_code;
	unsigned char	*currency_code;
	unsigned char	*language_code;
} CAI_CustomSign;

 

Field Description
agt_initials Agent sign-in initials
duty_code Duty code.
country_code Country code.
currency_code Default currency to use.
language_code Default language chosen.

 

 

Using the openConversationFromFactory with a SI factory

The custom-sign structure allows to pass required sign-in parameters at openConversationFromFactory time. See SI migration page.