1 /*
2  * @(#)CDDBEnums.h	7.1 01/01/19
3  * from cddb2sdk-1.0.R3
4  *
5  * CDDBEnums.h Copyright (C) 2000 CDDB, Inc. All Rights Reserved.
6  *
7  * Enums used by CDDBControl
8  *
9  * This file is published to 3rd party developers so that they may call the SDK.
10  */
11 #ifndef CDDBENUMS_H
12 #define CDDBENUMS_H
13 
14 
15 typedef enum CDDBErrors
16 {
17 	ERR_DomainMask			= 0x7ff0000,
18 	ERR_DomainTransport		= 0x2fa0000,
19 	ERR_DomainService		= 0x2fb0000,
20 	ERR_DomainControl		= 0x2fc0000,
21 	ERR_CodeMask			= 0xffff,
22 	ERR_Busy				= 0x1,
23 	ERR_NotRegistered		= 0x2,
24 	ERR_HandleUsed			= 0x3,
25 	ERR_InvalidParameter	= 0x4,
26 	ERR_MissingField		= 0x5,
27 	ERR_MissingProperty		= 0x6,
28 	ERR_NoCommand			= 0x7,
29 	ERR_NoClientInfo		= 0x8,
30 	ERR_NotInitialized		= 0x9,
31 	ERR_InvalidTagId		= 0xA,
32 	ERR_Disabled			= 0xB,
33 
34 /*
35  *	NOTE:	The CDDBTRN enums must be kept consistent with
36  *			those defined in cddbslib.h.
37  */
38 	CDDBTRNOutOfMemory			= 0x82FA0001,	/* couldn't allocate memory */
39 	CDDBTRNBadPointer			= 0x82FA0002,	/* invalid pointer */
40 	CDDBTRNOutOfRange			= 0x82FA0003,	/* argument out of range */
41 	CDDBTRNCorruptedData		= 0x82FA0004,	/* data malformed or corrupted */
42 	CDDBTRNFieldNotFound		= 0x82FA0005,	/* named field not found */
43 	CDDBTRNUnknownEncoding		= 0x82FA0006,	/* data from server encoded in unknown format */
44 	CDDBTRNSockInitErr			= 0x82FA0007,	/* couldn't initialize network communications */
45 	CDDBTRNHostNotFound			= 0x82FA0008,	/* CDDB server can't be found */
46 	CDDBTRNSockCreateErr		= 0x82FA0009,	/* socket create failed */
47 	CDDBTRNSockOpenErr			= 0x82FA000A,	/* socket open failed */
48 	CDDBTRNSendFailed			= 0x82FA000B,	/* send to server failed */
49 	CDDBTRNRecvFailed			= 0x82FA000C,	/* recv of server data failed */
50 	CDDBTRNNoEvent				= 0x82FA000D,	/* no event available */
51 	CDDBTRNNoUserInfo			= 0x82FA000E,	/* user/client info has not been set */
52 	CDDBTRNBatchNest			= 0x82FA000F,	/* batch nesting not permitted */
53 	CDDBTRNBatchNotOpen			= 0x82FA0010,	/* must open before closing */
54 	CDDBTRNBadResponseSyntax	= 0x82FA0011,	/* response from CDDB server had bad syntax */
55 	CDDBTRNUnknownCompression	= 0x82FA0012,	/* unsupported compression scheme requested */
56 	CDDBTRNTooManyRetries		= 0x82FA0013,	/* retry limit exceeded when communicating with server */
57 	CDDBTRNRecordNotFound		= 0x82FA0014,	/* record not found in data store */
58 	CDDBTRNKeyTooLong			= 0x82FA0015,	/* datastore key exceeds maximum allowed length */
59 	CDDBTRNURLNotFound			= 0x82FA0016,	/* URL response not found in datastore */
60 	CDDBTRNBadArgument			= 0x82FA0017,	/* invalid argument passed to interface function */
61 	CDDBTRNUnflattenFailed		= 0x82FA0018,	/* object stored in the datastore is corrupt */
62 	CDDBTRNTokenTooLong			= 0x82FA0019,	/* protocol parser error: token exceeds max size */
63 	CDDBTRNTokenInvalid			= 0x82FA001A,	/* protocol parser error: token malformed */
64 	CDDBTRNCannotCreateFile		= 0x82FA001B,	/* unable to create file in file system */
65 	CDDBTRNBadClientCommand		= 0x82FA001C,	/* malformed command sent from server to client */
66 	CDDBTRNSendStatsFailed		= 0x82FA001D,	/* sending statistics to server failed */
67 	CDDBTRNUnknownEncryption	= 0x82FA001E,	/* unsupported encryption scheme requested */
68 	CDDBTRNProtocolVersion		= 0x82FA001F,	/* server using newer version of protocol */
69 	CDDBTRNDataStoreVersion		= 0x82FA0020,	/* unknown version of datastore file */
70 	CDDBTRNDataStoreInitFail	= 0x82FA0021,	/* can't initialize datastore */
71 	CDDBTRNDataStoreNotCached	= 0x82FA0022,	/* passed query not in local datastore */
72 	CDDBTRNCancelled			= 0x82FA0023,	/* command cancelled before completion */
73 	CDDBTRNServerTimeout		= 0x82FA0024,	/* timed-out waiting for data from server */
74 	CDDBTRNInvalidURL			= 0x82FA0025,	/* passed URL has bad format */
75 	CDDBTRNHTTPError			= 0x82FA0026,	/* generic (non-proxy) HTTP processing error */
76 	CDDBTRNFileWriteError		= 0x82FA0027,	/* cannot write to file */
77 	CDDBTRNFileDeleteError		= 0x82FA0028,	/* cannot delete file */
78 	CDDBTRNIDInvalidated		= 0x82FA0029,	/* previously cached ID has been invalidated */
79 	CDDBTRNHTTPProxyError		= 0x82FA002A,	/* HTTP proxy error */
80 
81 	CDDBSVCServiceError			= 0x82FB0000,	/*	unspecified service error */
82 	CDDBSVCHandleUsed			= 0x82FB0001,	/* handle is taken */
83 	CDDBSVCNoEmail				= 0x82FB0002,	/* no email address was available */
84 	CDDBSVCNoHint				= 0x82FB0003,	/* no password hint was available */
85 	CDDBSVCUnknownHandle		= 0x82FB0004,	/* handle is unknown */
86 	CDDBSVCInvalidField			= 0x82FB0064,	/* request contains invalid field */
87 	CDDBSVCMissingField			= 0x82FB0065,	/* request does not include required field */
88 	CDDBSVCLimitReached			= 0x82FB0066,	/* disc query limit reached */
89 
90 	CDDBCTLBusy					= 0x82FC0001,	/* control is busy */
91 	CDDBCTLNotRegistered		= 0x82FC0002,	/* user is not registered */
92 	CDDBCTLHandleUsed			= 0x82FC0003,	/* requested user "nickname" is used or the password being supplied is invalid */
93 	CDDBCTLInvalidParameter		= 0x82FC0004,	/* required field is invalid */
94 	CDDBCTLMissingField			= 0x82FC0005,	/* required field is missing */
95 	CDDBCTLMissingProperty		= 0x82FC0006,	/* required property is missing */
96 	CDDBCTLNoCommand			= 0x82FC0007,	/* no active command */
97 	CDDBCTLNoClientInfo			= 0x82FC0008,	/* client info has not been set */
98 	CDDBCTLNotInitialized		= 0x82FC0009,	/* control hasn't been initialized */
99 	CDDBCTLInvalidTagId			= 0x82FC000A,	/* passed Tag Id isn't valid */
100 	CDDBCTLDisabled				= 0x82FC000B,	/* the application or control has been disabled */
101 
102 	CDDBCTL_ID3TagNoMemory		= 0x82FC1000,	/* No available memory */
103 	CDDBCTL_ID3TagNoData		= 0x82FC1001,	/* No data to parse */
104 	CDDBCTL_ID3TagBadData		= 0x82FC1002,	/* Improperly formatted data */
105 	CDDBCTL_ID3TagNoBuffer		= 0x82FC1003,	/* No buffer to write to */
106 	CDDBCTL_ID3TagSmallBuffer	= 0x82FC1004,	/* Buffer is too small */
107 	CDDBCTL_ID3TagInvalidFrameID	= 0x82FC1005,	/* Invalid frame id */
108 	CDDBCTL_ID3TagFieldNotFound		= 0x82FC1006,	/* Requested field not found */
109 	CDDBCTL_ID3TagUnknownFieldType	= 0x82FC1007,	/* Unknown field type */
110 	CDDBCTL_ID3TagAlreadyAttached	= 0x82FC1008,	/* Tag is already attached to a file */
111 	CDDBCTL_ID3TagInvalidVersion	= 0x82FC1009,	/* Invalid tag version */
112 	CDDBCTL_ID3TagNoFile		= 0x82FC100A,	/* No file to parse */
113 	CDDBCTL_ID3TagReadonly		= 0x82FC100B,	/* Attempting to write to a read-only file */
114 	CDDBCTL_ID3TagzlibError		= 0x82FC100C	/* Error in compression/decompression */
115 
116 } CDDBErrors;
117 
118 typedef enum CDDBCommands
119 {
120 	CMD_None					= 0,
121 	CMD_Invalid					= -1,
122 	PROP_Version				= 1,
123 	PROP_ServiceStatusURL		= 2,
124 	CMD_IsRegistered			= 3,
125 	CMD_SetClientInfo			= 4,
126 	CMD_GetUserInfo				= 5,
127 	CMD_SetUserInfo				= 6,
128 	CMD_GetOptions				= 7,
129 	CMD_SetOptions				= 8,
130 	CMD_GetMediaToc				= 9,
131 	CMD_LookupMediaByToc		= 10,
132 	CMD_GetMatchedDiscInfo		= 11,
133 	CMD_InvokeFuzzyMatchDialog	= 12,
134 	CMD_GetFullDiscInfo			= 13,
135 	CMD_GetDiscInfo				= 14,
136 	CMD_InvokeDiscInfo			= 15,
137 	CMD_DisplayDiscInfo			= 16,
138 	CMD_GetSubmitDisc			= 17,
139 	CMD_SubmitDisc				= 18,
140 	CMD_InvokeSubmitDisc		= 19,
141 	CMD_GetMediaTagId			= 100,
142 	CMD_LookupMediaByTagId		= 101,
143 	CMD_LookupMediaByFile		= 102,
144 	CMD_GetGenreList			= 20,
145 	CMD_GetGenreTree			= 21,
146 	CMD_GetGenreInfo			= 22,
147 	CMD_GetRegionList			= 23,
148 	CMD_GetRegionInfo			= 24,
149 	CMD_GetRoleList				= 25,
150 	CMD_GetRoleTree				= 26,
151 	CMD_GetRoleInfo				= 27,
152 	CMD_GetLanguageList			= 28,
153 	CMD_GetLanguageInfo			= 29,
154 	CMD_GetFieldList			= 30,
155 	CMD_GetFieldInfo			= 31,
156 	CMD_GetURLList				= 32,
157 	CMD_GetCoverURL				= 33,
158 	CMD_GetURLManager			= 34,
159 	CMD_Cancel					= 35,
160 	CMD_Status					= 36,
161 	CMD_GetServiceStatus		= 37,
162 	CMD_ServerNoop				= 38,
163 	CMD_FlushLocalCache			= 39,
164 	CMD_UpdateControl			= 40
165 } CDDBCommands;
166 
167 typedef enum CDDBLogFlags
168 {
169 	LOG_DEFAULT					= 0,
170 	LOG_OFF						= 0x1,
171 	LOG_WINDOW					= 0x2,
172 	LOG_FILE					= 0x4,
173 	LOG_APP						= 0x8,
174 	LOG_DEST_MASK				= 0xff,
175 	LOG_EVENT_MASK				= 0xffffff00,
176 	LOG_EVENT_UI				= 0x100,
177 	LOG_EVENT_DEVICE			= 0x200,
178 	LOG_EVENT_SERVER			= 0x400,
179 	LOG_EVENT_EVENTS			= 0x800,
180 	LOG_EVENT_COMPLETION		= 0x1000,
181 	LOG_EVENT_ERROR				= 0x10000000
182 } CDDBLogFlags;
183 
184 typedef enum CDDBUIFlags
185 {
186 	UI_NONE						= 0,
187 	UI_READONLY					= 0x1,
188 	UI_EDITMODE					= 0x2,
189 	UI_SUBMITNEW				= 0x8,
190 	UI_OK						= 0x100,
191 	UI_CANCEL					= 0x200,
192 	UI_DATA_CHANGED				= 0x400,
193 	UI_FULL						= 0x1000,
194 	UI_SHORT					= 0x2000,
195 	UI_DISP_PROGRESS			= 0x10000,
196 	UI_DISP_STATIC				= 0x20000,
197 	UI_DISP_BONUS				= 0x40000
198 } CDDBUIFlags;
199 
200 typedef enum CDDBTagFlags
201 {
202 	TAG_MERGE_DEFAULT			= 0,
203 	TAG_MERGE_ALL				= 0x1,
204 	TAG_MERGE_ID_ONLY			= 0x2
205 } CDDBTagFlags;
206 
207 typedef enum CDDBEventCodes
208 {
209 	EVENT_COMMAND_COMPLETED		= 1,
210 	EVENT_LOG_MESSAGE			= 2,
211 	EVENT_SERVER_MESSAGE		= 3,
212 	EVENT_COMMAND_PROGRESS		= 4
213 } CDDBEventCodes;
214 
215 typedef enum CDDBProperty
216 {
217 	PROP_Default			= 0x00000000,
218 	PROP_DomainMask			= 0xff000000,
219 	PROP_Title				= 0x1,
220 	PROP_Artist				= 0x2,
221 	PROP_Label				= 0x4,
222 	PROP_Year				= 0x8,
223 	PROP_Notes				= 0x10,
224 	PROP_GenreId			= 0x20,
225 	PROP_SecondaryGenreId	= 0x40,
226 	PROP_RegionId			= 0x80,
227 	PROP_TotalInSet			= 0x100,
228 	PROP_NumberInSet		= 0x200,
229 	PROP_Certifier			= 0x400,
230 	PROP_TitleSort			= 0x800,
231 	PROP_TitleThe			= 0x1000,
232 	PROP_ArtistFirstName	= 0x2000,
233 	PROP_ArtistLastName		= 0x4000,
234 	PROP_ArtistThe			= 0x8000,
235 	PROP_Lyrics				= 0x10000,
236 	PROP_BeatsPerMinute		= 0x20000,
237 	PROP_ISRC				= 0x40000,
238 	PROP_Name				= 0x80000,
239 	PROP_StartTrack			= 0x100000,
240 	PROP_StartFrame			= 0x200000,
241 	PROP_EndTrack			= 0x400000,
242 	PROP_EndFrame			= 0x800000,
243 	PROP_Href				= 0x1000001,
244 	PROP_DisplayLink		= 0x1000002,
245 	PROP_Description		= 0x1000004,
246 	PROP_Category			= 0x1000008,
247 	PROP_Size				= 0x1000010,
248 	PROP_DisplayText		= 0x1000020,
249 	PROP_Id					= 0x1000040,
250 	PROP_Compilation		= 0x1000080
251 } CDDBProperty;
252 
253 /*
254  *	NOTE:	The following enums must be kept consistent with
255  *			those defined in cddbslib.h.
256  */
257 typedef enum CDDBMatchCode
258 {
259 	MATCH_NONE					= 1,
260 	MATCH_MULTIPLE				= 2,
261 	MATCH_EXACT					= 3,
262 	MATCH_CODE_SIZER			= 0xFFFFFFFF	/* force the size of a CDDBMatchCode to 32 bits */
263 } CDDBMatchCode;
264 
265 typedef enum CDDBProgressCodes
266 {
267 	CMD_CONNECTING				= 1,
268 	CMD_SENDING					= 2,
269 	CMD_RECEIVING				= 3,
270 	CMD_CANCELLED				= 4,
271 	CMD_WAITING					= 5,
272 	CMD_COMPLETED				= 6
273 } CDDBProgressCodes;
274 
275 typedef enum CDDBCacheFlags
276 {
277 	CACHE_DEFAULT				= 0,
278 	CACHE_DONT_CONNECT			= 0x1,
279 	CACHE_DONT_CREATE			= 0x2,
280 	CACHE_DONT_WRITE_MEDIA		= 0x10,
281 	CACHE_DONT_WRITE_LIST		= 0x20,
282 	CACHE_DONT_WRITE_URL		= 0x40,
283 	CACHE_DONT_WRITE_ANY		= 0xF0,
284 	CACHE_NO_LOOKUP_MEDIA		= 0x100,
285 	CACHE_NO_LOOKUP_LIST		= 0x200,
286 	CACHE_NO_LOOKUP_URL			= 0x400,
287 	CACHE_NO_LOOKUP_ANY			= 0xF00,
288 	CACHE_SUBMIT_UPDATE			= 0x1000,
289 	CACHE_SUBMIT_NEW			= 0x2000,
290 	CACHE_SUBMIT_OFFLINE		= 0x4000,
291 	CACHE_SUBMIT_ALL			= 0xF000,
292 	CACHE_UPDATE_FUZZY			= 0x10000,
293 	CACHE_UPDATE_CHECK			= 0x20000
294 
295 } CDDBCacheFlags;
296 
297 typedef enum CDDBFlushFlags
298 {
299 	FLUSH_DEFAULT				= 0,
300 	FLUSH_USERINFO				= 0x1,
301 	FLUSH_CLIENTINFO			= 0x2,
302 	FLUSH_REGISTRY				= 0x4,
303 	FLUSH_CACHE_MEDIA			= 0x10,
304 	FLUSH_CACHE_LISTS			= 0x20,
305 	FLUSH_CACHE_URLS			= 0x40,
306 	FLUSH_MEMORY_MEDIA			= 0x100,
307 	FLUSH_MEMORY_LISTS			= 0x200,
308 	FLUSH_MEMORY_URLS			= 0x400
309 } CDDBFlushFlags;
310 
311 typedef enum CDDBServerMessageCodes
312 {
313 	MSG_UPDATE					= 1,
314 	MSG_ENABLE					= 2,
315 	MSG_DISABLE					= 3,
316 	MSG_MESSAGE					= 4
317 } CDDBServerMessageCodes;
318 
319 typedef enum CDDBServerMessageActions
320 {
321 	ACTION_NONE					= 1,
322 	ACTION_RECOMMENDED			= 2,
323 	ACTION_REQUIRED				= 3
324 } CDDBServerMessageActions;
325 
326 #endif
327