1 #define PERL_constant_NOTFOUND 1
2 #define PERL_constant_NOTDEF 2
3 #define PERL_constant_ISIV 3
4 #define PERL_constant_ISNO 4
5 #define PERL_constant_ISNV 5
6 #define PERL_constant_ISPV 6
7 #define PERL_constant_ISPVN 7
8 #define PERL_constant_ISSV 8
9 #define PERL_constant_ISUNDEF 9
10 #define PERL_constant_ISUV 10
11 #define PERL_constant_ISYES 11
14 typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
17 #define aTHX_ /* 5.6 or later define this for threading support. */
20 #define pTHX_ /* 5.6 or later define this for threading support. */
24 constant_13 (pTHX_ const char *name, IV *iv_return) {
25 /* When generated this function returned values for the list of names given
26 here. However, subsequent manual editing may have added or removed some.
27 SERVICE_FILES SERVICE_MUSIC SERVICE_TASKS */
28 /* Offset 11 gives the best switch position. */
31 if (memEQ(name, "SERVICE_FILES", 13)) {
34 *iv_return = SERVICE_FILES;
35 return PERL_constant_ISIV;
37 return PERL_constant_NOTDEF;
42 if (memEQ(name, "SERVICE_MUSIC", 13)) {
45 *iv_return = SERVICE_MUSIC;
46 return PERL_constant_ISIV;
48 return PERL_constant_NOTDEF;
53 if (memEQ(name, "SERVICE_TASKS", 13)) {
56 *iv_return = SERVICE_TASKS;
57 return PERL_constant_ISIV;
59 return PERL_constant_NOTDEF;
64 return PERL_constant_NOTFOUND;
68 constant_14 (pTHX_ const char *name, IV *iv_return) {
69 /* When generated this function returned values for the list of names given
70 here. However, subsequent manual editing may have added or removed some.
71 SERVICE_EMAILS SERVICE_IMAGES SERVICE_VIDEOS */
72 /* Offset 11 gives the best switch position. */
75 if (memEQ(name, "SERVICE_VIDEOS", 14)) {
78 *iv_return = SERVICE_VIDEOS;
79 return PERL_constant_ISIV;
81 return PERL_constant_NOTDEF;
86 if (memEQ(name, "SERVICE_IMAGES", 14)) {
89 *iv_return = SERVICE_IMAGES;
90 return PERL_constant_ISIV;
92 return PERL_constant_NOTDEF;
97 if (memEQ(name, "SERVICE_EMAILS", 14)) {
100 *iv_return = SERVICE_EMAILS;
101 return PERL_constant_ISIV;
103 return PERL_constant_NOTDEF;
108 return PERL_constant_NOTFOUND;
112 constant_17 (pTHX_ const char *name, IV *iv_return) {
113 /* When generated this function returned values for the list of names given
114 here. However, subsequent manual editing may have added or removed some.
115 SERVICE_BOOKMARKS SERVICE_DOCUMENTS SERVICE_PLAYLISTS SERVICE_VFS_FILES
117 /* Offset 14 gives the best switch position. */
120 if (memEQ(name, "SERVICE_VFS_FILES", 17)) {
122 #ifdef SERVICE_VFS_FILES
123 *iv_return = SERVICE_VFS_FILES;
124 return PERL_constant_ISIV;
126 return PERL_constant_NOTDEF;
131 if (memEQ(name, "SERVICE_DOCUMENTS", 17)) {
133 #ifdef SERVICE_DOCUMENTS
134 *iv_return = SERVICE_DOCUMENTS;
135 return PERL_constant_ISIV;
137 return PERL_constant_NOTDEF;
142 if (memEQ(name, "SERVICE_BOOKMARKS", 17)) {
144 #ifdef SERVICE_BOOKMARKS
145 *iv_return = SERVICE_BOOKMARKS;
146 return PERL_constant_ISIV;
148 return PERL_constant_NOTDEF;
153 if (memEQ(name, "SERVICE_PLAYLISTS", 17)) {
155 #ifdef SERVICE_PLAYLISTS
156 *iv_return = SERVICE_PLAYLISTS;
157 return PERL_constant_ISIV;
159 return PERL_constant_NOTDEF;
162 if (memEQ(name, "SERVICE_VFS_MUSIC", 17)) {
164 #ifdef SERVICE_VFS_MUSIC
165 *iv_return = SERVICE_VFS_MUSIC;
166 return PERL_constant_ISIV;
168 return PERL_constant_NOTDEF;
173 return PERL_constant_NOTFOUND;
177 constant_18 (pTHX_ const char *name, IV *iv_return) {
178 /* When generated this function returned values for the list of names given
179 here. However, subsequent manual editing may have added or removed some.
180 SERVICE_TEXT_FILES SERVICE_VFS_IMAGES SERVICE_VFS_VIDEOS */
181 /* Offset 13 gives the best switch position. */
184 if (memEQ(name, "SERVICE_TEXT_FILES", 18)) {
186 #ifdef SERVICE_TEXT_FILES
187 *iv_return = SERVICE_TEXT_FILES;
188 return PERL_constant_ISIV;
190 return PERL_constant_NOTDEF;
195 if (memEQ(name, "SERVICE_VFS_VIDEOS", 18)) {
197 #ifdef SERVICE_VFS_VIDEOS
198 *iv_return = SERVICE_VFS_VIDEOS;
199 return PERL_constant_ISIV;
201 return PERL_constant_NOTDEF;
206 if (memEQ(name, "SERVICE_VFS_IMAGES", 18)) {
208 #ifdef SERVICE_VFS_IMAGES
209 *iv_return = SERVICE_VFS_IMAGES;
210 return PERL_constant_ISIV;
212 return PERL_constant_NOTDEF;
217 return PERL_constant_NOTFOUND;
221 constant_21 (pTHX_ const char *name, IV *iv_return) {
222 /* When generated this function returned values for the list of names given
223 here. However, subsequent manual editing may have added or removed some.
224 DATA_STRING_INDEXABLE SERVICE_CONVERSATIONS SERVICE_VFS_DOCUMENTS */
225 /* Offset 13 gives the best switch position. */
228 if (memEQ(name, "DATA_STRING_INDEXABLE", 21)) {
230 #ifdef DATA_STRING_INDEXABLE
231 *iv_return = DATA_STRING_INDEXABLE;
232 return PERL_constant_ISIV;
234 return PERL_constant_NOTDEF;
239 if (memEQ(name, "SERVICE_VFS_DOCUMENTS", 21)) {
241 #ifdef SERVICE_VFS_DOCUMENTS
242 *iv_return = SERVICE_VFS_DOCUMENTS;
243 return PERL_constant_ISIV;
245 return PERL_constant_NOTDEF;
250 if (memEQ(name, "SERVICE_CONVERSATIONS", 21)) {
252 #ifdef SERVICE_CONVERSATIONS
253 *iv_return = SERVICE_CONVERSATIONS;
254 return PERL_constant_ISIV;
256 return PERL_constant_NOTDEF;
261 return PERL_constant_NOTFOUND;
265 constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
266 /* Initially switch on the length of the name. */
267 /* When generated this function returned values for the list of names given
268 in this section of perl code. Rather than manually editing these functions
269 to add or remove constants, which would result in this comment and section
270 of code becoming inaccurate, we recommend that you edit this section of
271 code, and use it to regenerate a new set of constant functions which you
272 then use to replace the originals.
274 Regenerate these constant functions by feeding this entire source file to
278 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
280 my $types = {map {($_, 1)} qw(IV)};
281 my @names = (qw(DATA_DATE DATA_NUMERIC DATA_STRING DATA_STRING_INDEXABLE
282 SERVICE_APPLICATIONS SERVICE_APPOINTMENTS SERVICE_BOOKMARKS
283 SERVICE_CONTACTS SERVICE_CONVERSATIONS SERVICE_DEVELOPMENT_FILES
284 SERVICE_DOCUMENTS SERVICE_EMAILATTACHMENTS SERVICE_EMAILS
285 SERVICE_FILES SERVICE_FOLDERS SERVICE_HISTORY SERVICE_IMAGES
286 SERVICE_MUSIC SERVICE_OTHER_FILES SERVICE_PLAYLISTS
287 SERVICE_PROJECTS SERVICE_TASKS SERVICE_TEXT_FILES
288 SERVICE_VFS_DEVELOPMENT_FILES SERVICE_VFS_DOCUMENTS
289 SERVICE_VFS_FILES SERVICE_VFS_FOLDERS SERVICE_VFS_IMAGES
290 SERVICE_VFS_MUSIC SERVICE_VFS_OTHER_FILES SERVICE_VFS_TEXT_FILES
291 SERVICE_VFS_VIDEOS SERVICE_VIDEOS));
293 print constant_types(); # macro defs
294 foreach (C_constant ("LibTracker::Client", 'constant', 'IV', $types, undef, 3, @names) ) {
295 print $_, "\n"; # C constant subs
297 print "#### XS Section:\n";
298 print XS_constant ("LibTracker::Client", $types);
304 if (memEQ(name, "DATA_DATE", 9)) {
306 *iv_return = DATA_DATE;
307 return PERL_constant_ISIV;
309 return PERL_constant_NOTDEF;
314 if (memEQ(name, "DATA_STRING", 11)) {
316 *iv_return = DATA_STRING;
317 return PERL_constant_ISIV;
319 return PERL_constant_NOTDEF;
324 if (memEQ(name, "DATA_NUMERIC", 12)) {
326 *iv_return = DATA_NUMERIC;
327 return PERL_constant_ISIV;
329 return PERL_constant_NOTDEF;
334 return constant_13 (aTHX_ name, iv_return);
337 return constant_14 (aTHX_ name, iv_return);
340 /* Names all of length 15. */
341 /* SERVICE_FOLDERS SERVICE_HISTORY */
342 /* Offset 8 gives the best switch position. */
345 if (memEQ(name, "SERVICE_FOLDERS", 15)) {
347 #ifdef SERVICE_FOLDERS
348 *iv_return = SERVICE_FOLDERS;
349 return PERL_constant_ISIV;
351 return PERL_constant_NOTDEF;
356 if (memEQ(name, "SERVICE_HISTORY", 15)) {
358 #ifdef SERVICE_HISTORY
359 *iv_return = SERVICE_HISTORY;
360 return PERL_constant_ISIV;
362 return PERL_constant_NOTDEF;
369 /* Names all of length 16. */
370 /* SERVICE_CONTACTS SERVICE_PROJECTS */
371 /* Offset 10 gives the best switch position. */
374 if (memEQ(name, "SERVICE_CONTACTS", 16)) {
376 #ifdef SERVICE_CONTACTS
377 *iv_return = SERVICE_CONTACTS;
378 return PERL_constant_ISIV;
380 return PERL_constant_NOTDEF;
385 if (memEQ(name, "SERVICE_PROJECTS", 16)) {
387 #ifdef SERVICE_PROJECTS
388 *iv_return = SERVICE_PROJECTS;
389 return PERL_constant_ISIV;
391 return PERL_constant_NOTDEF;
398 return constant_17 (aTHX_ name, iv_return);
401 return constant_18 (aTHX_ name, iv_return);
404 /* Names all of length 19. */
405 /* SERVICE_OTHER_FILES SERVICE_VFS_FOLDERS */
406 /* Offset 15 gives the best switch position. */
409 if (memEQ(name, "SERVICE_VFS_FOLDERS", 19)) {
411 #ifdef SERVICE_VFS_FOLDERS
412 *iv_return = SERVICE_VFS_FOLDERS;
413 return PERL_constant_ISIV;
415 return PERL_constant_NOTDEF;
420 if (memEQ(name, "SERVICE_OTHER_FILES", 19)) {
422 #ifdef SERVICE_OTHER_FILES
423 *iv_return = SERVICE_OTHER_FILES;
424 return PERL_constant_ISIV;
426 return PERL_constant_NOTDEF;
433 /* Names all of length 20. */
434 /* SERVICE_APPLICATIONS SERVICE_APPOINTMENTS */
435 /* Offset 17 gives the best switch position. */
438 if (memEQ(name, "SERVICE_APPOINTMENTS", 20)) {
440 #ifdef SERVICE_APPOINTMENTS
441 *iv_return = SERVICE_APPOINTMENTS;
442 return PERL_constant_ISIV;
444 return PERL_constant_NOTDEF;
449 if (memEQ(name, "SERVICE_APPLICATIONS", 20)) {
451 #ifdef SERVICE_APPLICATIONS
452 *iv_return = SERVICE_APPLICATIONS;
453 return PERL_constant_ISIV;
455 return PERL_constant_NOTDEF;
462 return constant_21 (aTHX_ name, iv_return);
465 if (memEQ(name, "SERVICE_VFS_TEXT_FILES", 22)) {
466 #ifdef SERVICE_VFS_TEXT_FILES
467 *iv_return = SERVICE_VFS_TEXT_FILES;
468 return PERL_constant_ISIV;
470 return PERL_constant_NOTDEF;
475 if (memEQ(name, "SERVICE_VFS_OTHER_FILES", 23)) {
476 #ifdef SERVICE_VFS_OTHER_FILES
477 *iv_return = SERVICE_VFS_OTHER_FILES;
478 return PERL_constant_ISIV;
480 return PERL_constant_NOTDEF;
485 if (memEQ(name, "SERVICE_EMAILATTACHMENTS", 24)) {
486 #ifdef SERVICE_EMAILATTACHMENTS
487 *iv_return = SERVICE_EMAILATTACHMENTS;
488 return PERL_constant_ISIV;
490 return PERL_constant_NOTDEF;
495 if (memEQ(name, "SERVICE_DEVELOPMENT_FILES", 25)) {
496 #ifdef SERVICE_DEVELOPMENT_FILES
497 *iv_return = SERVICE_DEVELOPMENT_FILES;
498 return PERL_constant_ISIV;
500 return PERL_constant_NOTDEF;
505 if (memEQ(name, "SERVICE_VFS_DEVELOPMENT_FILES", 29)) {
506 #ifdef SERVICE_VFS_DEVELOPMENT_FILES
507 *iv_return = SERVICE_VFS_DEVELOPMENT_FILES;
508 return PERL_constant_ISIV;
510 return PERL_constant_NOTDEF;
515 return PERL_constant_NOTFOUND;