aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Library/ml_local/mldbApi.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/Library/ml_local/mldbApi.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/Plugins/Library/ml_local/mldbApi.h')
-rw-r--r--Src/Plugins/Library/ml_local/mldbApi.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/Src/Plugins/Library/ml_local/mldbApi.h b/Src/Plugins/Library/ml_local/mldbApi.h
new file mode 100644
index 00000000..3ee0e2f7
--- /dev/null
+++ b/Src/Plugins/Library/ml_local/mldbApi.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "api_mldb.h"
+
+class MLDBAPI : public api_mldb
+{
+public:
+ itemRecordW *GetFile(const wchar_t *filename);
+ itemRecordW *GetFileIf(const wchar_t *filename, const wchar_t *query);
+ itemRecordListW *GetAlbum(const wchar_t *albumname, const wchar_t *albumartist);
+ itemRecordListW *Query(const wchar_t *query);
+ itemRecordListW *QueryLimit(const wchar_t *query, unsigned int limit);
+
+ void SetField(const wchar_t *filename, const char *field, const wchar_t *value);
+ void SetFieldInteger(const wchar_t *filename, const char *field, int value);
+ void SetFieldInt128(const wchar_t *filename, const char *field, uint8_t value[16]);
+ void Sync();
+
+ int AddFile(const wchar_t *filename);
+
+ void FreeRecord(itemRecordW *record);
+ void FreeRecordList(itemRecordListW *recordList);
+ int RemoveFile(const wchar_t *filename);
+
+ /* wrappers around ndestring */
+ void RetainString(wchar_t *str);
+ void ReleaseString(wchar_t *str);
+ wchar_t *DuplicateString(const wchar_t *str);
+
+ int GetMaxInteger(const char *field, int *max);
+protected:
+ RECVS_DISPATCH;
+};
+