1
0

mldbApi.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "api_mldb.h"
  3. class MLDBAPI : public api_mldb
  4. {
  5. public:
  6. itemRecordW *GetFile(const wchar_t *filename);
  7. itemRecordW *GetFileIf(const wchar_t *filename, const wchar_t *query);
  8. itemRecordListW *GetAlbum(const wchar_t *albumname, const wchar_t *albumartist);
  9. itemRecordListW *Query(const wchar_t *query);
  10. itemRecordListW *QueryLimit(const wchar_t *query, unsigned int limit);
  11. void SetField(const wchar_t *filename, const char *field, const wchar_t *value);
  12. void SetFieldInteger(const wchar_t *filename, const char *field, int value);
  13. void SetFieldInt128(const wchar_t *filename, const char *field, uint8_t value[16]);
  14. void Sync();
  15. int AddFile(const wchar_t *filename);
  16. void FreeRecord(itemRecordW *record);
  17. void FreeRecordList(itemRecordListW *recordList);
  18. int RemoveFile(const wchar_t *filename);
  19. /* wrappers around ndestring */
  20. void RetainString(wchar_t *str);
  21. void ReleaseString(wchar_t *str);
  22. wchar_t *DuplicateString(const wchar_t *str);
  23. int GetMaxInteger(const char *field, int *max);
  24. protected:
  25. RECVS_DISPATCH;
  26. };