metaRecord.h 658 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef NULLSOT_LOCALMEDIA_METARECORD_H
  2. #define NULLSOT_LOCALMEDIA_METARECORD_H
  3. #include <map>
  4. #include <vector>
  5. #include <string>
  6. // Links db record to the metadata struct
  7. typedef struct
  8. {
  9. int dbColumnId;
  10. char *recordKey;
  11. } LM_RECORD_LINK;
  12. // cache size (records count)
  13. #define CACHE_SIZE 100;
  14. class MetaData
  15. {
  16. // construcotrs
  17. public:
  18. MetaData();
  19. ~MetaData();
  20. // methods
  21. private:
  22. // gets record data from db to the cache
  23. int GetDbColumnsCount();
  24. void GetDBRecordToCache(int64 recordId);
  25. public:
  26. // returns pointer to metadata
  27. const char* GetMetaData(const char *metaKey);
  28. // fields
  29. private:
  30. }
  31. #endif //NULLSOT_LOCALMEDIA_METARECORD_H