The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / libpurple / plugins / perl / common / SavedStatuses.c @ a274da4f

History | View | Annotate | Download (22.1 KB)

1
/*
2
 * This file was generated automatically by ExtUtils::ParseXS version 3.18 from the
3
 * contents of SavedStatuses.xs. Do not edit this file, edit SavedStatuses.xs instead.
4
 *
5
 *    ANY CHANGES MADE HERE WILL BE LOST!
6
 *
7
 */
8

    
9
#line 1 "SavedStatuses.xs"
10
#include "module.h"
11

    
12
/* I can't get this to work, both with and without the const on the return
13
 * type I get errors from gcc. One way about ignoring types in a cast, and the
14
 * other about assigning to read-only variables.
15
const Purple::StatusType
16
purple_savedstatus_substatus_get_type(substatus)
17
        const Purple::SavedStatus::Sub substatus
18
*/
19

    
20
#line 21 "SavedStatuses.c"
21
#ifndef PERL_UNUSED_VAR
22
#  define PERL_UNUSED_VAR(var) if (0) var = var
23
#endif
24

    
25
#ifndef dVAR
26
#  define dVAR                dNOOP
27
#endif
28

    
29

    
30
/* This stuff is not part of the API! You have been warned. */
31
#ifndef PERL_VERSION_DECIMAL
32
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
33
#endif
34
#ifndef PERL_DECIMAL_VERSION
35
#  define PERL_DECIMAL_VERSION \
36
          PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
37
#endif
38
#ifndef PERL_VERSION_GE
39
#  define PERL_VERSION_GE(r,v,s) \
40
          (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
41
#endif
42
#ifndef PERL_VERSION_LE
43
#  define PERL_VERSION_LE(r,v,s) \
44
          (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
45
#endif
46

    
47
/* XS_INTERNAL is the explicit static-linkage variant of the default
48
 * XS macro.
49
 *
50
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
51
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
52
 * for anything but the BOOT XSUB.
53
 *
54
 * See XSUB.h in core!
55
 */
56

    
57

    
58
/* TODO: This might be compatible further back than 5.10.0. */
59
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
60
#  undef XS_EXTERNAL
61
#  undef XS_INTERNAL
62
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
63
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
64
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
65
#  endif
66
#  if defined(__SYMBIAN32__)
67
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
68
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
69
#  endif
70
#  ifndef XS_EXTERNAL
71
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
72
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
73
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
74
#    else
75
#      ifdef __cplusplus
76
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
77
#        define XS_INTERNAL(name) static XSPROTO(name)
78
#      else
79
#        define XS_EXTERNAL(name) XSPROTO(name)
80
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
81
#      endif
82
#    endif
83
#  endif
84
#endif
85

    
86
/* perl >= 5.10.0 && perl <= 5.15.1 */
87

    
88

    
89
/* The XS_EXTERNAL macro is used for functions that must not be static
90
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
91
 * macro defined, the best we can do is assume XS is the same.
92
 * Dito for XS_INTERNAL.
93
 */
94
#ifndef XS_EXTERNAL
95
#  define XS_EXTERNAL(name) XS(name)
96
#endif
97
#ifndef XS_INTERNAL
98
#  define XS_INTERNAL(name) XS(name)
99
#endif
100

    
101
/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
102
 * internal macro that we're free to redefine for varying linkage due
103
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
104
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
105
 */
106

    
107
#undef XS_EUPXS
108
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
109
#  define XS_EUPXS(name) XS_EXTERNAL(name)
110
#else
111
   /* default to internal */
112
#  define XS_EUPXS(name) XS_INTERNAL(name)
113
#endif
114

    
115
#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
116
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
117

    
118
/* prototype to pass -Wmissing-prototypes */
119
STATIC void
120
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);
121

    
122
STATIC void
123
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
124
{
125
    const GV *const gv = CvGV(cv);
126

    
127
    PERL_ARGS_ASSERT_CROAK_XS_USAGE;
128

    
129
    if (gv) {
130
        const char *const gvname = GvNAME(gv);
131
        const HV *const stash = GvSTASH(gv);
132
        const char *const hvname = stash ? HvNAME(stash) : NULL;
133

    
134
        if (hvname)
135
            Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
136
        else
137
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
138
    } else {
139
        /* Pants. I don't think that it should be possible to get here. */
140
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
141
    }
142
}
143
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE
144

    
145
#ifdef PERL_IMPLICIT_CONTEXT
146
#define croak_xs_usage(a,b)    S_croak_xs_usage(aTHX_ a,b)
147
#else
148
#define croak_xs_usage        S_croak_xs_usage
149
#endif
150

    
151
#endif
152

    
153
/* NOTE: the prototype of newXSproto() is different in versions of perls,
154
 * so we define a portable version of newXSproto()
155
 */
156
#ifdef newXS_flags
157
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
158
#else
159
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
160
#endif /* !defined(newXS_flags) */
161

    
162
#line 163 "SavedStatuses.c"
163

    
164
XS_EUPXS(XS_Purple__SavedStatus_new); /* prototype to pass -Wmissing-prototypes */
165
XS_EUPXS(XS_Purple__SavedStatus_new)
166
{
167
    dVAR; dXSARGS;
168
    if (items != 2)
169
       croak_xs_usage(cv,  "title, type");
170
    {
171
        const char *        title = (const char *)SvPV_nolen(ST(0))
172
;
173
        Purple__StatusPrimitive        type = (Purple__StatusPrimitive)SvIV(ST(1))
174
;
175
        Purple__SavedStatus        RETVAL;
176

    
177
        RETVAL = purple_savedstatus_new(title, type);
178
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus");
179
        sv_2mortal(ST(0));
180
    }
181
    XSRETURN(1);
182
}
183

    
184

    
185
XS_EUPXS(XS_Purple__SavedStatus_set_title); /* prototype to pass -Wmissing-prototypes */
186
XS_EUPXS(XS_Purple__SavedStatus_set_title)
187
{
188
    dVAR; dXSARGS;
189
    if (items != 2)
190
       croak_xs_usage(cv,  "status, title");
191
    {
192
        Purple__SavedStatus        status = purple_perl_ref_object(ST(0))
193
;
194
        const char *        title = (const char *)SvPV_nolen(ST(1))
195
;
196

    
197
        purple_savedstatus_set_title(status, title);
198
    }
199
    XSRETURN_EMPTY;
200
}
201

    
202

    
203
XS_EUPXS(XS_Purple__SavedStatus_set_type); /* prototype to pass -Wmissing-prototypes */
204
XS_EUPXS(XS_Purple__SavedStatus_set_type)
205
{
206
    dVAR; dXSARGS;
207
    if (items != 2)
208
       croak_xs_usage(cv,  "status, type");
209
    {
210
        Purple__SavedStatus        status = purple_perl_ref_object(ST(0))
211
;
212
        Purple__StatusPrimitive        type = (Purple__StatusPrimitive)SvIV(ST(1))
213
;
214

    
215
        purple_savedstatus_set_type(status, type);
216
    }
217
    XSRETURN_EMPTY;
218
}
219

    
220

    
221
XS_EUPXS(XS_Purple__SavedStatus_set_message); /* prototype to pass -Wmissing-prototypes */
222
XS_EUPXS(XS_Purple__SavedStatus_set_message)
223
{
224
    dVAR; dXSARGS;
225
    if (items != 2)
226
       croak_xs_usage(cv,  "status, message");
227
    {
228
        Purple__SavedStatus        status = purple_perl_ref_object(ST(0))
229
;
230
        const char *        message = (const char *)SvPV_nolen(ST(1))
231
;
232

    
233
        purple_savedstatus_set_message(status, message);
234
    }
235
    XSRETURN_EMPTY;
236
}
237

    
238

    
239
XS_EUPXS(XS_Purple__SavedStatus_set_substatus); /* prototype to pass -Wmissing-prototypes */
240
XS_EUPXS(XS_Purple__SavedStatus_set_substatus)
241
{
242
    dVAR; dXSARGS;
243
    if (items != 4)
244
       croak_xs_usage(cv,  "status, account, type, message");
245
    {
246
        Purple__SavedStatus        status = purple_perl_ref_object(ST(0))
247
;
248
        Purple__Account        account = purple_perl_ref_object(ST(1))
249
;
250
        Purple__StatusType        type = purple_perl_ref_object(ST(2))
251
;
252
        const char *        message = (const char *)SvPV_nolen(ST(3))
253
;
254

    
255
        purple_savedstatus_set_substatus(status, account, type, message);
256
    }
257
    XSRETURN_EMPTY;
258
}
259

    
260

    
261
XS_EUPXS(XS_Purple__SavedStatus_unset_substatus); /* prototype to pass -Wmissing-prototypes */
262
XS_EUPXS(XS_Purple__SavedStatus_unset_substatus)
263
{
264
    dVAR; dXSARGS;
265
    if (items != 2)
266
       croak_xs_usage(cv,  "status, account");
267
    {
268
        Purple__SavedStatus        status = purple_perl_ref_object(ST(0))
269
;
270
        Purple__Account        account = purple_perl_ref_object(ST(1))
271
;
272

    
273
        purple_savedstatus_unset_substatus(status, account);
274
    }
275
    XSRETURN_EMPTY;
276
}
277

    
278

    
279
XS_EUPXS(XS_Purple__SavedStatus_delete); /* prototype to pass -Wmissing-prototypes */
280
XS_EUPXS(XS_Purple__SavedStatus_delete)
281
{
282
    dVAR; dXSARGS;
283
    if (items != 1)
284
       croak_xs_usage(cv,  "title");
285
    {
286
        const char *        title = (const char *)SvPV_nolen(ST(0))
287
;
288
        gboolean        RETVAL;
289

    
290
        RETVAL = purple_savedstatus_delete(title);
291
        ST(0) = sv_newmortal();
292
        ST(0) = boolSV(RETVAL);
293
    }
294
    XSRETURN(1);
295
}
296

    
297

    
298
XS_EUPXS(XS_Purple__SavedStatus_get_current); /* prototype to pass -Wmissing-prototypes */
299
XS_EUPXS(XS_Purple__SavedStatus_get_current)
300
{
301
    dVAR; dXSARGS;
302
    if (items != 0)
303
       croak_xs_usage(cv,  "");
304
    {
305
        Purple__SavedStatus        RETVAL;
306

    
307
        RETVAL = purple_savedstatus_get_current();
308
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus");
309
        sv_2mortal(ST(0));
310
    }
311
    XSRETURN(1);
312
}
313

    
314

    
315
XS_EUPXS(XS_Purple__SavedStatus_get_default); /* prototype to pass -Wmissing-prototypes */
316
XS_EUPXS(XS_Purple__SavedStatus_get_default)
317
{
318
    dVAR; dXSARGS;
319
    if (items != 0)
320
       croak_xs_usage(cv,  "");
321
    {
322
        Purple__SavedStatus        RETVAL;
323

    
324
        RETVAL = purple_savedstatus_get_default();
325
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus");
326
        sv_2mortal(ST(0));
327
    }
328
    XSRETURN(1);
329
}
330

    
331

    
332
XS_EUPXS(XS_Purple__SavedStatus_get_idleaway); /* prototype to pass -Wmissing-prototypes */
333
XS_EUPXS(XS_Purple__SavedStatus_get_idleaway)
334
{
335
    dVAR; dXSARGS;
336
    if (items != 0)
337
       croak_xs_usage(cv,  "");
338
    {
339
        Purple__SavedStatus        RETVAL;
340

    
341
        RETVAL = purple_savedstatus_get_idleaway();
342
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus");
343
        sv_2mortal(ST(0));
344
    }
345
    XSRETURN(1);
346
}
347

    
348

    
349
XS_EUPXS(XS_Purple__SavedStatus_is_idleaway); /* prototype to pass -Wmissing-prototypes */
350
XS_EUPXS(XS_Purple__SavedStatus_is_idleaway)
351
{
352
    dVAR; dXSARGS;
353
    if (items != 0)
354
       croak_xs_usage(cv,  "");
355
    {
356
        gboolean        RETVAL;
357

    
358
        RETVAL = purple_savedstatus_is_idleaway();
359
        ST(0) = sv_newmortal();
360
        ST(0) = boolSV(RETVAL);
361
    }
362
    XSRETURN(1);
363
}
364

    
365

    
366
XS_EUPXS(XS_Purple__SavedStatus_set_idleaway); /* prototype to pass -Wmissing-prototypes */
367
XS_EUPXS(XS_Purple__SavedStatus_set_idleaway)
368
{
369
    dVAR; dXSARGS;
370
    if (items != 1)
371
       croak_xs_usage(cv,  "idleaway");
372
    {
373
        gboolean        idleaway = (bool)SvTRUE(ST(0))
374
;
375

    
376
        purple_savedstatus_set_idleaway(idleaway);
377
    }
378
    XSRETURN_EMPTY;
379
}
380

    
381

    
382
XS_EUPXS(XS_Purple__SavedStatus_get_startup); /* prototype to pass -Wmissing-prototypes */
383
XS_EUPXS(XS_Purple__SavedStatus_get_startup)
384
{
385
    dVAR; dXSARGS;
386
    if (items != 0)
387
       croak_xs_usage(cv,  "");
388
    {
389
        Purple__SavedStatus        RETVAL;
390

    
391
        RETVAL = purple_savedstatus_get_startup();
392
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus");
393
        sv_2mortal(ST(0));
394
    }
395
    XSRETURN(1);
396
}
397

    
398

    
399
XS_EUPXS(XS_Purple__SavedStatus_find); /* prototype to pass -Wmissing-prototypes */
400
XS_EUPXS(XS_Purple__SavedStatus_find)
401
{
402
    dVAR; dXSARGS;
403
    if (items != 1)
404
       croak_xs_usage(cv,  "title");
405
    {
406
        const char *        title = (const char *)SvPV_nolen(ST(0))
407
;
408
        Purple__SavedStatus        RETVAL;
409

    
410
        RETVAL = purple_savedstatus_find(title);
411
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus");
412
        sv_2mortal(ST(0));
413
    }
414
    XSRETURN(1);
415
}
416

    
417

    
418
XS_EUPXS(XS_Purple__SavedStatus_find_by_creation_time); /* prototype to pass -Wmissing-prototypes */
419
XS_EUPXS(XS_Purple__SavedStatus_find_by_creation_time)
420
{
421
    dVAR; dXSARGS;
422
    if (items != 1)
423
       croak_xs_usage(cv,  "creation_time");
424
    {
425
        time_t        creation_time = (time_t)SvIV(ST(0))
426
;
427
        Purple__SavedStatus        RETVAL;
428

    
429
        RETVAL = purple_savedstatus_find_by_creation_time(creation_time);
430
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus");
431
        sv_2mortal(ST(0));
432
    }
433
    XSRETURN(1);
434
}
435

    
436

    
437
XS_EUPXS(XS_Purple__SavedStatus_find_transient_by_type_and_message); /* prototype to pass -Wmissing-prototypes */
438
XS_EUPXS(XS_Purple__SavedStatus_find_transient_by_type_and_message)
439
{
440
    dVAR; dXSARGS;
441
    if (items != 2)
442
       croak_xs_usage(cv,  "type, message");
443
    {
444
        Purple__StatusPrimitive        type = (Purple__StatusPrimitive)SvIV(ST(0))
445
;
446
        const char *        message = (const char *)SvPV_nolen(ST(1))
447
;
448
        Purple__SavedStatus        RETVAL;
449

    
450
        RETVAL = purple_savedstatus_find_transient_by_type_and_message(type, message);
451
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus");
452
        sv_2mortal(ST(0));
453
    }
454
    XSRETURN(1);
455
}
456

    
457

    
458
XS_EUPXS(XS_Purple__SavedStatus_is_transient); /* prototype to pass -Wmissing-prototypes */
459
XS_EUPXS(XS_Purple__SavedStatus_is_transient)
460
{
461
    dVAR; dXSARGS;
462
    if (items != 1)
463
       croak_xs_usage(cv,  "saved_status");
464
    {
465
        const Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
466
;
467
        gboolean        RETVAL;
468

    
469
        RETVAL = purple_savedstatus_is_transient(saved_status);
470
        ST(0) = sv_newmortal();
471
        ST(0) = boolSV(RETVAL);
472
    }
473
    XSRETURN(1);
474
}
475

    
476

    
477
XS_EUPXS(XS_Purple__SavedStatus_get_title); /* prototype to pass -Wmissing-prototypes */
478
XS_EUPXS(XS_Purple__SavedStatus_get_title)
479
{
480
    dVAR; dXSARGS;
481
    if (items != 1)
482
       croak_xs_usage(cv,  "saved_status");
483
    {
484
        const Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
485
;
486
        const char *        RETVAL;
487
        dXSTARG;
488

    
489
        RETVAL = purple_savedstatus_get_title(saved_status);
490
        sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
491
    }
492
    XSRETURN(1);
493
}
494

    
495

    
496
XS_EUPXS(XS_Purple__SavedStatus_get_type); /* prototype to pass -Wmissing-prototypes */
497
XS_EUPXS(XS_Purple__SavedStatus_get_type)
498
{
499
    dVAR; dXSARGS;
500
    if (items != 1)
501
       croak_xs_usage(cv,  "saved_status");
502
    {
503
        const Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
504
;
505
        Purple__StatusPrimitive        RETVAL;
506
        dXSTARG;
507

    
508
        RETVAL = purple_savedstatus_get_type(saved_status);
509
        XSprePUSH; PUSHi((IV)RETVAL);
510
    }
511
    XSRETURN(1);
512
}
513

    
514

    
515
XS_EUPXS(XS_Purple__SavedStatus_get_message); /* prototype to pass -Wmissing-prototypes */
516
XS_EUPXS(XS_Purple__SavedStatus_get_message)
517
{
518
    dVAR; dXSARGS;
519
    if (items != 1)
520
       croak_xs_usage(cv,  "saved_status");
521
    {
522
        const Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
523
;
524
        const char *        RETVAL;
525
        dXSTARG;
526

    
527
        RETVAL = purple_savedstatus_get_message(saved_status);
528
        sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
529
    }
530
    XSRETURN(1);
531
}
532

    
533

    
534
XS_EUPXS(XS_Purple__SavedStatus_get_creation_time); /* prototype to pass -Wmissing-prototypes */
535
XS_EUPXS(XS_Purple__SavedStatus_get_creation_time)
536
{
537
    dVAR; dXSARGS;
538
    if (items != 1)
539
       croak_xs_usage(cv,  "saved_status");
540
    {
541
        const Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
542
;
543
        time_t        RETVAL;
544
        dXSTARG;
545

    
546
        RETVAL = purple_savedstatus_get_creation_time(saved_status);
547
        XSprePUSH; PUSHi((IV)RETVAL);
548
    }
549
    XSRETURN(1);
550
}
551

    
552

    
553
XS_EUPXS(XS_Purple__SavedStatus_has_substatuses); /* prototype to pass -Wmissing-prototypes */
554
XS_EUPXS(XS_Purple__SavedStatus_has_substatuses)
555
{
556
    dVAR; dXSARGS;
557
    if (items != 1)
558
       croak_xs_usage(cv,  "saved_status");
559
    {
560
        const Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
561
;
562
        gboolean        RETVAL;
563

    
564
        RETVAL = purple_savedstatus_has_substatuses(saved_status);
565
        ST(0) = sv_newmortal();
566
        ST(0) = boolSV(RETVAL);
567
    }
568
    XSRETURN(1);
569
}
570

    
571

    
572
XS_EUPXS(XS_Purple__SavedStatus_get_substatus); /* prototype to pass -Wmissing-prototypes */
573
XS_EUPXS(XS_Purple__SavedStatus_get_substatus)
574
{
575
    dVAR; dXSARGS;
576
    if (items != 2)
577
       croak_xs_usage(cv,  "saved_status, account");
578
    {
579
        Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
580
;
581
        Purple__Account        account = purple_perl_ref_object(ST(1))
582
;
583
        Purple__SavedStatus__Sub        RETVAL;
584

    
585
        RETVAL = purple_savedstatus_get_substatus(saved_status, account);
586
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::SavedStatus::Sub");
587
        sv_2mortal(ST(0));
588
    }
589
    XSRETURN(1);
590
}
591

    
592

    
593
XS_EUPXS(XS_Purple__SavedStatus_activate); /* prototype to pass -Wmissing-prototypes */
594
XS_EUPXS(XS_Purple__SavedStatus_activate)
595
{
596
    dVAR; dXSARGS;
597
    if (items != 1)
598
       croak_xs_usage(cv,  "saved_status");
599
    {
600
        Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
601
;
602

    
603
        purple_savedstatus_activate(saved_status);
604
    }
605
    XSRETURN_EMPTY;
606
}
607

    
608

    
609
XS_EUPXS(XS_Purple__SavedStatus_activate_for_account); /* prototype to pass -Wmissing-prototypes */
610
XS_EUPXS(XS_Purple__SavedStatus_activate_for_account)
611
{
612
    dVAR; dXSARGS;
613
    if (items != 2)
614
       croak_xs_usage(cv,  "saved_status, account");
615
    {
616
        const Purple__SavedStatus        saved_status = purple_perl_ref_object(ST(0))
617
;
618
        Purple__Account        account = purple_perl_ref_object(ST(1))
619
;
620

    
621
        purple_savedstatus_activate_for_account(saved_status, account);
622
    }
623
    XSRETURN_EMPTY;
624
}
625

    
626

    
627
XS_EUPXS(XS_Purple__SavedStatus__Sub_get_message); /* prototype to pass -Wmissing-prototypes */
628
XS_EUPXS(XS_Purple__SavedStatus__Sub_get_message)
629
{
630
    dVAR; dXSARGS;
631
    if (items != 1)
632
       croak_xs_usage(cv,  "substatus");
633
    {
634
        const Purple__SavedStatus__Sub        substatus = purple_perl_ref_object(ST(0))
635
;
636
        const char *        RETVAL;
637
        dXSTARG;
638

    
639
        RETVAL = purple_savedstatus_substatus_get_message(substatus);
640
        sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
641
    }
642
    XSRETURN(1);
643
}
644

    
645

    
646
XS_EUPXS(XS_Purple__SavedStatuses_get_all); /* prototype to pass -Wmissing-prototypes */
647
XS_EUPXS(XS_Purple__SavedStatuses_get_all)
648
{
649
    dVAR; dXSARGS;
650
    if (items != 0)
651
       croak_xs_usage(cv,  "");
652
    PERL_UNUSED_VAR(ax); /* -Wall */
653
    SP -= items;
654
    {
655
#line 133 "SavedStatuses.xs"
656
        GList *l;
657
#line 658 "SavedStatuses.c"
658
#line 135 "SavedStatuses.xs"
659
        for (l = purple_savedstatuses_get_all(); l != NULL; l = l->next) {
660
                XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::SavedStatus")));
661
        }
662
#line 663 "SavedStatuses.c"
663
        PUTBACK;
664
        return;
665
    }
666
}
667

    
668

    
669
XS_EUPXS(XS_Purple__SavedStatuses_get_popular); /* prototype to pass -Wmissing-prototypes */
670
XS_EUPXS(XS_Purple__SavedStatuses_get_popular)
671
{
672
    dVAR; dXSARGS;
673
    if (items != 1)
674
       croak_xs_usage(cv,  "how_many");
675
    PERL_UNUSED_VAR(ax); /* -Wall */
676
    SP -= items;
677
    {
678
        unsigned int        how_many = (unsigned int)SvUV(ST(0))
679
;
680
#line 143 "SavedStatuses.xs"
681
        GList *l, *ll;
682
#line 683 "SavedStatuses.c"
683
#line 145 "SavedStatuses.xs"
684
        ll = purple_savedstatuses_get_popular(how_many);
685
        for (l = ll; l != NULL; l = l->next) {
686
                XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::SavedStatus")));
687
        }
688
        g_list_free(ll);
689
#line 690 "SavedStatuses.c"
690
        PUTBACK;
691
        return;
692
    }
693
}
694

    
695

    
696
XS_EUPXS(XS_Purple__SavedStatuses_get_handle); /* prototype to pass -Wmissing-prototypes */
697
XS_EUPXS(XS_Purple__SavedStatuses_get_handle)
698
{
699
    dVAR; dXSARGS;
700
    if (items != 0)
701
       croak_xs_usage(cv,  "");
702
    {
703
        Purple__Handle        RETVAL;
704

    
705
        RETVAL = purple_savedstatuses_get_handle();
706
        ST(0) = purple_perl_bless_object(RETVAL, "Purple::Handle");
707
        sv_2mortal(ST(0));
708
    }
709
    XSRETURN(1);
710
}
711

    
712
#ifdef __cplusplus
713
extern "C"
714
#endif
715
XS_EXTERNAL(boot_Purple__SavedStatus); /* prototype to pass -Wmissing-prototypes */
716
XS_EXTERNAL(boot_Purple__SavedStatus)
717
{
718
    dVAR; dXSARGS;
719
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
720
    char* file = __FILE__;
721
#else
722
    const char* file = __FILE__;
723
#endif
724

    
725
    PERL_UNUSED_VAR(cv); /* -W */
726
    PERL_UNUSED_VAR(items); /* -W */
727
#ifdef XS_APIVERSION_BOOTCHECK
728
    XS_APIVERSION_BOOTCHECK;
729
#endif
730
    XS_VERSION_BOOTCHECK;
731

    
732
        (void)newXSproto_portable("Purple::SavedStatus::new", XS_Purple__SavedStatus_new, file, "$$");
733
        (void)newXSproto_portable("Purple::SavedStatus::set_title", XS_Purple__SavedStatus_set_title, file, "$$");
734
        (void)newXSproto_portable("Purple::SavedStatus::set_type", XS_Purple__SavedStatus_set_type, file, "$$");
735
        (void)newXSproto_portable("Purple::SavedStatus::set_message", XS_Purple__SavedStatus_set_message, file, "$$");
736
        (void)newXSproto_portable("Purple::SavedStatus::set_substatus", XS_Purple__SavedStatus_set_substatus, file, "$$$$");
737
        (void)newXSproto_portable("Purple::SavedStatus::unset_substatus", XS_Purple__SavedStatus_unset_substatus, file, "$$");
738
        (void)newXSproto_portable("Purple::SavedStatus::delete", XS_Purple__SavedStatus_delete, file, "$");
739
        (void)newXSproto_portable("Purple::SavedStatus::get_current", XS_Purple__SavedStatus_get_current, file, "");
740
        (void)newXSproto_portable("Purple::SavedStatus::get_default", XS_Purple__SavedStatus_get_default, file, "");
741
        (void)newXSproto_portable("Purple::SavedStatus::get_idleaway", XS_Purple__SavedStatus_get_idleaway, file, "");
742
        (void)newXSproto_portable("Purple::SavedStatus::is_idleaway", XS_Purple__SavedStatus_is_idleaway, file, "");
743
        (void)newXSproto_portable("Purple::SavedStatus::set_idleaway", XS_Purple__SavedStatus_set_idleaway, file, "$");
744
        (void)newXSproto_portable("Purple::SavedStatus::get_startup", XS_Purple__SavedStatus_get_startup, file, "");
745
        (void)newXSproto_portable("Purple::SavedStatus::find", XS_Purple__SavedStatus_find, file, "$");
746
        (void)newXSproto_portable("Purple::SavedStatus::find_by_creation_time", XS_Purple__SavedStatus_find_by_creation_time, file, "$");
747
        (void)newXSproto_portable("Purple::SavedStatus::find_transient_by_type_and_message", XS_Purple__SavedStatus_find_transient_by_type_and_message, file, "$$");
748
        (void)newXSproto_portable("Purple::SavedStatus::is_transient", XS_Purple__SavedStatus_is_transient, file, "$");
749
        (void)newXSproto_portable("Purple::SavedStatus::get_title", XS_Purple__SavedStatus_get_title, file, "$");
750
        (void)newXSproto_portable("Purple::SavedStatus::get_type", XS_Purple__SavedStatus_get_type, file, "$");
751
        (void)newXSproto_portable("Purple::SavedStatus::get_message", XS_Purple__SavedStatus_get_message, file, "$");
752
        (void)newXSproto_portable("Purple::SavedStatus::get_creation_time", XS_Purple__SavedStatus_get_creation_time, file, "$");
753
        (void)newXSproto_portable("Purple::SavedStatus::has_substatuses", XS_Purple__SavedStatus_has_substatuses, file, "$");
754
        (void)newXSproto_portable("Purple::SavedStatus::get_substatus", XS_Purple__SavedStatus_get_substatus, file, "$$");
755
        (void)newXSproto_portable("Purple::SavedStatus::activate", XS_Purple__SavedStatus_activate, file, "$");
756
        (void)newXSproto_portable("Purple::SavedStatus::activate_for_account", XS_Purple__SavedStatus_activate_for_account, file, "$$");
757
        (void)newXSproto_portable("Purple::SavedStatus::Sub::get_message", XS_Purple__SavedStatus__Sub_get_message, file, "$");
758
        (void)newXSproto_portable("Purple::SavedStatuses::get_all", XS_Purple__SavedStatuses_get_all, file, "");
759
        (void)newXSproto_portable("Purple::SavedStatuses::get_popular", XS_Purple__SavedStatuses_get_popular, file, "$");
760
        (void)newXSproto_portable("Purple::SavedStatuses::get_handle", XS_Purple__SavedStatuses_get_handle, file, "");
761
#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
762
  if (PL_unitcheckav)
763
       call_list(PL_scopestack_ix, PL_unitcheckav);
764
#endif
765
    XSRETURN_YES;
766
}
767