mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-05-04 20:39:29 +01:00
applied platformio structure
This commit is contained in:
36
lib/spotify/cspot/include/TrackReference.h
Normal file
36
lib/spotify/cspot/include/TrackReference.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <pb_encode.h>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
#include "NanoPBHelper.h"
|
||||
#include "pb_decode.h"
|
||||
#include "protobuf/spirc.pb.h"
|
||||
|
||||
namespace cspot {
|
||||
struct TrackReference {
|
||||
TrackReference();
|
||||
|
||||
// Resolved track GID
|
||||
std::vector<uint8_t> gid;
|
||||
std::string uri, context;
|
||||
std::optional<bool> 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
|
||||
Reference in New Issue
Block a user