1 #pragma once 2 3 #include <string> 4 #include <inttypes.h> 5 6 namespace mous { 7 8 struct MediaTag 9 { 10 std::string title; 11 std::string artist; 12 std::string album; 13 std::string comment; 14 std::string genre; 15 int32_t year = -1; 16 int32_t track = -1; 17 18 template<typename buf_t> void operator>>(buf_t& buf) const 19 { 20 buf << title << artist << album << comment << genre << year << track; 21 } 22 23 template<typename buf_t> void operator<<(buf_t& buf) 24 { 25 buf >> title >> artist >> album >> comment >> genre >> year >> track; 26 } 27 }; 28 29 } 30