mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-25 20:16:14 -05:00
Move *_offsetof() macro definitions to db.h
This commit is contained in:
12
src/db.h
12
src/db.h
@@ -3,7 +3,7 @@
|
||||
#define __DB_H__
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <sqlite3.h>
|
||||
@@ -105,6 +105,8 @@ struct media_file_info {
|
||||
char *album_artist;
|
||||
};
|
||||
|
||||
#define mfi_offsetof(field) offsetof(struct media_file_info, field)
|
||||
|
||||
struct playlist_info {
|
||||
uint32_t id; /* integer id (miid) */
|
||||
char *title; /* playlist name as displayed in iTunes (minm) */
|
||||
@@ -117,6 +119,8 @@ struct playlist_info {
|
||||
uint32_t index; /* index of playlist for paths with multiple playlists */
|
||||
};
|
||||
|
||||
#define pli_offsetof(field) offsetof(struct playlist_info, field)
|
||||
|
||||
struct db_playlist_info {
|
||||
char *id;
|
||||
char *title;
|
||||
@@ -129,6 +133,8 @@ struct db_playlist_info {
|
||||
char *index;
|
||||
};
|
||||
|
||||
#define dbpli_offsetof(field) offsetof(struct db_playlist_info, field)
|
||||
|
||||
struct db_media_file_info {
|
||||
char *id;
|
||||
char *path;
|
||||
@@ -174,6 +180,8 @@ struct db_media_file_info {
|
||||
char *album_artist;
|
||||
};
|
||||
|
||||
#define dbmfi_offsetof(field) offsetof(struct db_media_file_info, field)
|
||||
|
||||
struct watch_info {
|
||||
int wd;
|
||||
char *path;
|
||||
@@ -181,6 +189,8 @@ struct watch_info {
|
||||
int libidx;
|
||||
};
|
||||
|
||||
#define wi_offsetof(field) offsetof(struct watch_info, field)
|
||||
|
||||
struct watch_enum {
|
||||
uint32_t cookie;
|
||||
char *match;
|
||||
|
||||
Reference in New Issue
Block a user