
#ifndef XPACE_INDEXLIST_C_H
#define XPACE_INDEXLIST_C_H

#include "index_c.h"

#ifdef __cplusplus
#include "index/indexlist.h"
extern "C"
{
  struct Xpace_IndexList
  {
    Xpace::IndexList* il;
  };

#else
  typedef struct
  {
    void* v;
  }
  Xpace_IndexList;
#endif

XPACE_EXPORT Xpace_Error _stdcall Xpace_IndexList_Create
  (Xpace_String config,
   bool overwrite,
   Xpace_IndexList* result);
    
XPACE_EXPORT void _stdcall Xpace_IndexList_Destroy
  (Xpace_IndexList il);

XPACE_EXPORT Xpace_Error _stdcall Xpace_IndexList_getConfig
  (Xpace_IndexList il,
   Xpace_String* result);

XPACE_EXPORT Xpace_Error _stdcall Xpace_IndexList_getCount
  (const Xpace_IndexList il,
   size_t* result);

XPACE_EXPORT Xpace_Error _stdcall Xpace_IndexList_getIndexConfig
  (const Xpace_IndexList il,
   size_t indexNum,
   Xpace_String* result);

XPACE_EXPORT Xpace_Error _stdcall Xpace_IndexList_openIndexName
  (const Xpace_IndexList il,
   const Xpace_String indexName,
   uint* indexNum,
   Xpace_String config,
   Xpace_Index* result);

XPACE_EXPORT Xpace_Error _stdcall Xpace_IndexList_openIndexNum
  (const Xpace_IndexList il,
   uint indexNum,
   Xpace_String config,
   Xpace_Index* result);

#ifdef XPACE_REFLIST_C_H
XPACE_EXPORT Xpace_Error _stdcall Xpace_IndexList_Eval
  (const Xpace_IndexList il,
   Xpace_String query,
   uint64 recCount,
   Xpace_RefListCursor* result);
#endif

#ifdef __cplusplus
}
#endif

#endif