// Stub comunication to EM of the Integrade
//
// author: Marcelo de Castro Cardoso

#ifndef EMCONNOIL_H_
#define EMCONNOIL_H_

#define CONN_SUCCESS  0
#define CONN_ERROR    1

// Struct to map key/value
typedef struct 
{
	char * value;
	char * key;
} CONN;
typedef CONN* CONN_t;

/* Create proxy to the object
 * 
 * Input param:
 * obj - object name
 * 
 * Output param:
 * ior - ior to remote object
 *
 * Return param:
 * code error
 */
int connCreateProxy(char * obj, char * ior);

/* Send data to ExecutionManager of the Integrade
 * 
 * Input param:
 * name - remote object of destine
 * rank - number of the process rank mpi
 * name_process - unique name of process 
 * kvs - map key/value of process
 * app_id - id of application
 * 
 * Output param:
 * conns - array of maps key/value
 * connCount - size array maps
 * 
 * Return param:
 * code error
 */
int connRegisterNode(char * name, int rank, char * name_process, char * kvs, char * app_id, CONN_t * conns, unsigned int * connCount);

#endif /*EMCONNOIL_H_*/
