#ifndef _JAVA_LEVEL_DB_INCLUDE_H_
#define _JAVA_LEVEL_DB_INCLUDE_H_

#include <jni.h>

#ifdef __cplusplus
extern "C" {
#endif

/** Leveldb破棄. **/
void java_leveldb_destroy( jlong name,jint write_buffer_size,
    jint max_open_files,jint block_size,jint block_restart_interval ) ;

/** Leveldb調整. **/
void java_leveldb_repair( jlong name,jint write_buffer_size,
    jint max_open_files,jint block_size,jint block_restart_interval ) ;

/** Leveldbオープン. **/
jlong java_leveldb_open( jlong name,jint write_buffer_size,
    jint max_open_files,jint block_size,jint block_restart_interval ) ;

/** Leveldbクローズ. **/
void java_leveldb_close( jlong db ) ;

/** Leveldb要素セット. **/
jint java_leveldb_put( jlong db, jlong key, jint kLen, jlong value , jint vlen ) ;

/** Leveldb要素取得. **/
jint java_leveldb_get( JNIEnv* env, jlong db , jlong key, jint len, jlongArray buf, jint bufLen ) ;

/** Leveldb要素削除. **/
jint java_leveldb_remove( jlong db, jlong key, jint len ) ;

/** Leveldb状態取得. **/
jint java_leveldb_property( JNIEnv* env, jlong db , jlong cmd, jint len, jlongArray buf, jint bufLen ) ;

/** Iterator作成. **/
jlong java_leveldb_iterator( jlong db ) ;

/** Iteratorクローズ. **/
void java_leveldb_itr_delete( jlong itr ) ;

/** Iterator先頭に移動. **/
void java_leveldb_itr_first( jlong itr ) ;

/** Iterator最後に移動. **/
void java_leveldb_itr_last( jlong itr ) ;

/** Iteratorシーク位置に移動. **/
void java_leveldb_itr_seek( jlong itr, jlong key,jint len ) ;

/** Iterator現在位置カーソルの情報存在確認. **/
jint java_leveldb_itr_valid( jlong itr ) ;

/** Iteratorカーソルを次に移動. **/
void java_leveldb_itr_next( jlong itr ) ;

/** Iteratorカーソル位置のKeyを取得. **/
jint java_leveldb_itr_key( JNIEnv* env, jlong itr , jlongArray out, jint bufLen ) ;

/** Iteratorカーソル位置のValueを取得. **/
jint java_leveldb_itr_value( JNIEnv* env, jlong itr, jlongArray out, jint bufLen ) ;

#ifdef __cplusplus
}  /* end extern "C" */
#endif

#endif /** _JAVA_LEVEL_DB_INCLUDE_H_ **/
