/* 2007-09-27: File added by Sony Corporation */
#ifndef __SNSC_KINSPECT_H__
#define __SNSC_KINSPECT_H__

/* structure */

typedef struct kipct_buf {
	char *buf;
	int max_buf_len;
} kipct_buf_t;

typedef struct kipct_cb_arg {
	kipct_buf_t bufinfo;
} kipct_cb_arg_t;

typedef int (*kipct_cb)(kipct_cb_arg_t * arg);

typedef struct kipct_clctr_rgst {
	int clctr_id;
	char *clctr_name;
	kipct_cb cb;
	kipct_cb infocb;
} kipct_clctr_rgst_t;

typedef struct kipct_write {
	int clctr_id;
	int unit_id;
	int seq_id;
} kipct_write_t;




/* exported function */

int kipct_survey_start(void);
int kipct_survey_stop(void);

int kipct_clctr_register(kipct_clctr_rgst_t *rgst);
int kipct_clctr_unregister(kipct_clctr_rgst_t *rgst);

int kipct_format_write(kipct_write_t *info, const char *format, ...);
int kipct_lformat_write(kipct_write_t *info, const char *format, ...);
int kipct_file_write(kipct_write_t *info, const char* file);
int kipct_buf_write(char *buf, unsigned long len);
loff_t kipct_get_file_size(const char * file);
int kipct_sprintf(char *buf, unsigned int maxlen,
		  unsigned int *lenp, const char *format, ...);
int kipct_write_header(kipct_buf_t *bufinfo, kipct_write_t *info,
		       unsigned int *lenp);
int kipct_write_tailer(kipct_buf_t *bufinfo, kipct_write_t *info,
		       unsigned int *lenp, unsigned int body_length);
int kipct_read_file(char *buf, int *lenp, const char* file,
		    unsigned int max_buf_len);


#endif /* __SNSC_KINSPECT_H__ */
