2 * Header for DAAP (iTunes Music Sharing) structures
4 * Copyright (C) 2004,2005 Charles Schmidt <cschmidt2@emich.edu>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef __RB_DAAP_STRUCTURE_H
23 #define __RB_DAAP_STRUCTURE_H
26 #include <glib-object.h>
31 RB_DAAP_CC_INVALID
= 0,
41 RB_DAAP_CC_MSTS
, // 10
51 RB_DAAP_CC_MSLR
, // 20
61 RB_DAAP_CC_MSRS
, // 30
71 RB_DAAP_CC_MUSR
, // 40
81 RB_DAAP_CC_ASAL
, // 50
91 RB_DAAP_CC_ASDB
, // 60
101 RB_DAAP_CC_ASTM
, // 70
111 RB_DAAP_CC_PRSV
, // 80
119 typedef struct _RBDAAPItem RBDAAPItem
;
122 RBDAAPContentCode content_code
;
128 rb_daap_structure_add (GNode
*parent
,
129 RBDAAPContentCode cc
,
133 rb_daap_structure_serialize (GNode
*structure
,
137 rb_daap_structure_parse (const gchar
*buf
,
141 rb_daap_structure_find_item (GNode
*structure
,
142 RBDAAPContentCode code
);
145 rb_daap_structure_find_node (GNode
*structure
,
146 RBDAAPContentCode code
);
149 rb_daap_structure_print (GNode
*structure
);
152 rb_daap_structure_destroy (GNode
*structure
);
155 RB_DAAP_TYPE_BYTE
= 0x0001,
156 RB_DAAP_TYPE_SIGNED_INT
= 0x0002,
157 RB_DAAP_TYPE_SHORT
= 0x0003,
158 RB_DAAP_TYPE_INT
= 0x0005,
159 RB_DAAP_TYPE_INT64
= 0x0007,
160 RB_DAAP_TYPE_STRING
= 0x0009,
161 RB_DAAP_TYPE_DATE
= 0x000A,
162 RB_DAAP_TYPE_VERSION
= 0x000B,
163 RB_DAAP_TYPE_CONTAINER
= 0x000C
166 typedef struct _RBDAAPContentCodeDefinition RBDAAPContentCodeDefinition
;
168 struct _RBDAAPContentCodeDefinition
{
169 RBDAAPContentCode code
;
176 const RBDAAPContentCodeDefinition
*
177 rb_daap_content_codes (guint
*number
);
180 rb_daap_content_code_string_as_int32 (const gchar
*str
);
183 rb_daap_content_code_name (RBDAAPContentCode code
);
186 rb_daap_content_code_rb_daap_type (RBDAAPContentCode code
);
189 rb_daap_content_code_string (RBDAAPContentCode code
);
193 #endif /* __RB_DAAP_STRUCTURE_H */