#ifndef NBM_RAR_H
#define NBM_RAR_H

#ifdef __cplusplus
#ifdef _WIN32
#define CALLBACK
#define PASCAL _stdcall
#define LONG long
#define HANDLE void *
#define UINT unsigned int
#else
#define _UNIX
#endif
#include "unrar/dll.hpp"
extern "C" {
#endif /* __cplusplus */

#define  RAR_FILE_IS_DIR 0x00e0

void* open_rar(char *filename);
int   get_fileinfo_from_rar(void *rfile, char *name, unsigned int *flags);
int   extract_file_from_rar(void *rfile, char *path, char *name);
int   close_rar(void *rfile);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* NMB_RAR_H */
