Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/apev2/header.h

44 lines
611 B
C
Raw Permalink Normal View History

2024-09-24 12:54:57 +00:00
#ifndef NULLSOFT_APEV2_HEADER_H
#define NULLSOFT_APEV2_HEADER_H
#include <bfc/platform/types.h>
namespace APEv2
{
#pragma pack(push, 1)
struct HeaderData
{
uint64_t preamble;
uint32_t version;
uint32_t size;
uint32_t items;
uint32_t flags;
uint16_t reserved;
};
#pragma pack(pop)
class Header
{
public:
Header(void *data);
Header(const HeaderData *data);
bool Valid();
uint32_t TagSize();
bool HasHeader();
bool HasFooter();
bool IsFooter();
bool IsHeader();
int Encode(void *data, size_t len);
uint32_t GetFlags();
enum
{
SIZE=32,
};
private:
HeaderData headerData;
};
}
#endif