Internalfunctions - SmartSlog KP Library
Macros | Functions
ss_multisib.h File Reference
#include <ckpi/ckpi.h>
#include "utils/list.h"

Go to the source code of this file.

Macros

#define _SS_MSIB_H
#define SSLOG_EXTERN

Functions

SSLOG_EXTERN ss_info_t * sslog_get_ss_info ()
SSLOG_EXTERN int sslog_ss_init_new_session (const char *name_id)
 Adds new SIB to the global list and discover it.
SSLOG_EXTERN int sslog_ss_init_new_session_with_parameters (const char *space_id, const char *ss_address, int ss_port, const char *name_id)
 Adds new SIB to the global list and discover it with given access.
SSLOG_EXTERN int sslog_switch_sib (const char *name_id)
 Set current SIB pointer to SIB with given name.
SSLOG_EXTERN int sslog_ss_leave_session (ss_info_t *ss_info)
SSLOG_EXTERN int sslog_ss_leave_session_all ()
 Inserts given individual to SS.

Macro Definition Documentation

#define _SS_MSIB_H
#define SSLOG_EXTERN

Function Documentation

SSLOG_EXTERN ss_info_t* sslog_get_ss_info ( )
SSLOG_EXTERN int sslog_ss_init_new_session ( const char *  name_id)

Adds new SIB to the global list and discover it.

Creates new structure with ss_info and given name if it not already exists and adds it to global list and discover. Pointer to current SIB would be set to new SIB. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]constchar * name_id. Pointer to the local name of the new SIB.
Returns:
int. Status of the operation when completed (0 if successfull, otherwise -1).
SSLOG_EXTERN int sslog_ss_init_new_session_with_parameters ( const char *  space_id,
const char *  ss_address,
int  ss_port,
const char *  name_id 
)

Adds new SIB to the global list and discover it with given access.

Creates new structure with ss_info and given name if it not already exists and adds it to global list and discover with given access. Pointer to current SIB would be set to new SIB. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]constchar * space_id. Pointer to the Smart Space ID.
[in]constchar * ss_address. Pointer to the Smart Space IP address.
[in]intss_port. Pointer to the Smart Space TCP port.
[in]constchar * name_id. Pointer to the local name of the new SIB.
Returns:
int. Status of the operation when completed (0 if successfull, otherwise -1).
SSLOG_EXTERN int sslog_ss_leave_session ( ss_info_t *  ss_info)
SSLOG_EXTERN int sslog_ss_leave_session_all ( )

Inserts given individual to SS.

Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets, which will be placed to SS. Function sets global SmartSlog KP Library's errno.

Returns:
int. Status of the operation when completed (0 if successfull, otherwise -1).
SSLOG_EXTERN int sslog_switch_sib ( const char *  name_id)

Set current SIB pointer to SIB with given name.

Tries to find SIB with given name in global list and set current SIB pointer to it . Function sets global SmartSlog KP Library's errno.

Parameters:
[in]constchar * name_id. Pointer to the local name of the SIB.
Returns:
int. Status of the operation when completed (0 if successfull, otherwise -1).