Use an enum for DMAP types

This commit is contained in:
Julien BLACHE 2010-02-08 14:35:29 +01:00
parent 42dd7ddd00
commit d4fb2091c8
2 changed files with 13 additions and 11 deletions

View File

@ -4,16 +4,18 @@
#include <event.h>
#define DMAP_TYPE_BYTE 0x01
#define DMAP_TYPE_UBYTE 0x02
#define DMAP_TYPE_SHORT 0x03
#define DMAP_TYPE_INT 0x05
#define DMAP_TYPE_LONG 0x07
#define DMAP_TYPE_STRING 0x09
#define DMAP_TYPE_DATE 0x0a
#define DMAP_TYPE_VERSION 0x0b
#define DMAP_TYPE_LIST 0x0c
enum dmap_type
{
DMAP_TYPE_BYTE = 0x01,
DMAP_TYPE_UBYTE = 0x02,
DMAP_TYPE_SHORT = 0x03,
DMAP_TYPE_INT = 0x05,
DMAP_TYPE_LONG = 0x07,
DMAP_TYPE_STRING = 0x09,
DMAP_TYPE_DATE = 0x0a,
DMAP_TYPE_VERSION = 0x0b,
DMAP_TYPE_LIST = 0x0c,
};
void
dmap_add_container(struct evbuffer *evbuf, char *tag, int len);

View File

@ -67,7 +67,7 @@ struct daap_update_request {
struct dmap_field_map {
uint32_t hash;
short type;
enum dmap_type type;
char *tag;
char *desc;
ssize_t mfi_offset;