/*=====================================================================
 IMPress V3

 Copyright (C) 2007-2008 IT Access.,Co.Ltd. All Rights Reserved.

 This software is the confidential and proprietary information
 of IT Access.,Co.Ltd.
=====================================================================*/
#ifndef _INC_IMPRESS_H
#define _INC_IMPRESS_H

//#define	IMPRESS_FAX
/*
#define	USE_DLL
*/

#if defined( WIN32 )	/* Windows */
	#define DLL_IMPORT	__declspec(dllimport)
	#define STD_CALL	__stdcall
#else
	#define DLL_IMPORT
	#define STD_CALL
#endif

#ifdef	USE_DLL
#define	LsLibFunc DLL_IMPORT
#else
#define LsLibFunc STD_CALL
#endif

#ifdef __cplusplus
extern "C" {
#endif

/*=====================================================================
	Memory function
=====================================================================*/

void *LsMemcpy(void *dst, const void *src, unsigned int size);
void *LsMemmove(void *dst, const void *src, unsigned int size);
void *LsMemset(void *dst, int c, unsigned int count );

/*=========================================================
	Stream function
=========================================================*/
typedef struct LsStream *HLsStream;

/* 書き込み/読み込みバイト数が0でした */
#define	CALLBACK_NODATA			0
/* コーデック処理を終了します */
#define	CALLBACK_ABORT			-1

typedef int (STD_CALL *CallBack)(void *data, int size, void *param);
typedef int (STD_CALL *SeekCallBack)(void *param, int size, int origin);

#define LS_SEEK_SET			0
#define LS_SEEK_CUR			1
#define LS_SEEK_END			2

int LsLibFunc LsStreamInitHandle(
	HLsStream		hstream,
	void			*buffer,
	unsigned long	cnt,
	void			*param,
	CallBack		callback
	);

long LsLibFunc LsStreamGetHandleSize(
	void
	);

int LsLibFunc LsStreamSetSeek(
	HLsStream		hstream,
	SeekCallBack	callback
	);


#ifdef __cplusplus
	}
#endif

#endif

