12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #ifndef NULLSOT_LOCALMEDIA_DB_H
- #define NULLSOT_LOCALMEDIA_DB_H
- #define MAINTABLE_ID_FILENAME 0
- #define MAINTABLE_ID_TITLE 1
- #define MAINTABLE_ID_ARTIST 2
- #define MAINTABLE_ID_ALBUM 3
- #define MAINTABLE_ID_YEAR 4
- #define MAINTABLE_ID_GENRE 5
- #define MAINTABLE_ID_COMMENT 6
- #define MAINTABLE_ID_TRACKNB 7
- #define MAINTABLE_ID_LENGTH 8
- #define MAINTABLE_ID_TYPE 9
- #define MAINTABLE_ID_LASTUPDTIME 10
- #define MAINTABLE_ID_LASTPLAY 11
- #define MAINTABLE_ID_RATING 12
- #define MAINTABLE_ID_GRACENOTE_ID 14
- #define MAINTABLE_ID_PLAYCOUNT 15
- #define MAINTABLE_ID_FILETIME 16
- #define MAINTABLE_ID_FILESIZE 17
- #define MAINTABLE_ID_BITRATE 18
- #include "../nde/nde.h"
- #include <map>
- #include <string>
- class DB
- {
- public:
- DB();
- ~DB();
- public:
- int Open();
- int Close();
- int Nuke();
- int AddColumn(char* metaKey, int type);
- private:
- BOOL Discover(void);
- void ClearMap(void);
- public:
- void SetTableDir(const char* tableDir);
- const char* GetTableDir();
- int GetColumnsCount();
- int GetColumnId(char *metaKey);
- private:
- char * tableDir;
- Database db;
- Table *table;
- Scanner *sc;
- std::map< std::string, int> columnsMap;
- };
- #endif
|