#pragma once #include #include #include #include #include "NanoPBHelper.h" #include "pb_decode.h" #include "protobuf/spirc.pb.h" namespace cspot { struct TrackReference { TrackReference(); // Resolved track GID std::vector gid; std::string uri, context; std::optional queued; // Type identifier enum class Type { TRACK, EPISODE }; Type type; void decodeURI(); bool operator==(const TrackReference& other) const; // Encodes list of track references into a pb structure, used by nanopb static bool pbEncodeTrackList(pb_ostream_t* stream, const pb_field_t* field, void* const* arg); static bool pbDecodeTrackList(pb_istream_t* stream, const pb_field_t* field, void** arg); }; } // namespace cspot