1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
|
/* OAuth1Authenticator.c generated by valac 0.40.4, the Vala compiler
* generated from OAuth1Authenticator.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
* Copyright 2017 Jens Georg <mail@jensge.org>
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
#include <glib.h>
#include <glib-object.h>
#include "shotwell-plugin-dev-1.0.h"
#include <stdlib.h>
#include <string.h>
#include "shotwell-plugin-common.h"
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass))
typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator;
typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass;
typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate;
enum {
PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_0_PROPERTY,
PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_NUM_PROPERTIES
};
static GParamSpec* publishing_authenticator_shotwell_oauth1_authenticator_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
struct _PublishingAuthenticatorShotwellOAuth1Authenticator {
GObject parent_instance;
PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate * priv;
GHashTable* params;
PublishingRESTSupportOAuth1Session* session;
SpitPublishingPluginHost* host;
};
struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass {
GObjectClass parent_class;
void (*authenticate) (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
gboolean (*can_logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
void (*logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
void (*refresh) (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
};
static gpointer publishing_authenticator_shotwell_oauth1_authenticator_parent_class = NULL;
static SpitPublishingAuthenticatorIface * publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_parent_iface = NULL;
GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST;
void publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
static void _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender,
gpointer self);
PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type,
const gchar* api_key,
const gchar* api_secret,
SpitPublishingPluginHost* host);
static void _g_free0_ (gpointer var);
static void _g_variant_unref0_ (gpointer var);
static GVariant* _variant_new1 (const gchar* value);
static GVariant* _variant_new2 (const gchar* value);
void publishing_authenticator_shotwell_oauth1_authenticator_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
static void publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
gboolean publishing_authenticator_shotwell_oauth1_authenticator_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
static gboolean publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
static GHashTable* publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter (SpitPublishingAuthenticator* base);
void publishing_authenticator_shotwell_oauth1_authenticator_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
static void publishing_authenticator_shotwell_oauth1_authenticator_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
void publishing_authenticator_shotwell_oauth1_authenticator_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
static void publishing_authenticator_shotwell_oauth1_authenticator_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self,
const gchar* token);
void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self,
const gchar* secret);
void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self,
const gchar* username);
gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
static GVariant* _variant_new3 (gchar* value);
static GVariant* _variant_new4 (gchar* value);
static GVariant* _variant_new5 (gchar* value);
static void publishing_authenticator_shotwell_oauth1_authenticator_finalize (GObject * obj);
static void
_publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender,
gpointer self)
{
#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated ((PublishingAuthenticatorShotwellOAuth1Authenticator*) self);
#line 105 "OAuth1Authenticator.c"
}
static gpointer
_g_object_ref0 (gpointer self)
{
#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return self ? g_object_ref (self) : NULL;
#line 114 "OAuth1Authenticator.c"
}
static void
_g_free0_ (gpointer var)
{
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
var = (g_free (var), NULL);
#line 123 "OAuth1Authenticator.c"
}
static void
_g_variant_unref0_ (gpointer var)
{
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
(var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
#line 132 "OAuth1Authenticator.c"
}
static GVariant*
_variant_new1 (const gchar* value)
{
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return g_variant_ref_sink (g_variant_new_string (value));
#line 141 "OAuth1Authenticator.c"
}
static GVariant*
_variant_new2 (const gchar* value)
{
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return g_variant_ref_sink (g_variant_new_string (value));
#line 150 "OAuth1Authenticator.c"
}
PublishingAuthenticatorShotwellOAuth1Authenticator*
publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type,
const gchar* api_key,
const gchar* api_secret,
SpitPublishingPluginHost* host)
{
PublishingAuthenticatorShotwellOAuth1Authenticator * self = NULL;
SpitPublishingPluginHost* _tmp0_;
GHashFunc _tmp1_;
GEqualFunc _tmp2_;
GHashTable* _tmp3_;
GHashTable* _tmp4_;
gchar* _tmp5_;
GVariant* _tmp6_;
GHashTable* _tmp7_;
gchar* _tmp8_;
GVariant* _tmp9_;
PublishingRESTSupportOAuth1Session* _tmp10_;
PublishingRESTSupportOAuth1Session* _tmp11_;
PublishingRESTSupportOAuth1Session* _tmp12_;
#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (api_key != NULL, NULL);
#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (api_secret != NULL, NULL);
#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL);
#line 16 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
self = (PublishingAuthenticatorShotwellOAuth1Authenticator*) g_object_new (object_type, NULL);
#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = _g_object_ref0 (host);
#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_object_unref0 (self->host);
#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
self->host = _tmp0_;
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = g_str_hash;
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp2_ = g_str_equal;
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _g_free0_, _g_variant_unref0_);
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_hash_table_unref0 (self->params);
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
self->params = _tmp3_;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp4_ = self->params;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp5_ = g_strdup ("ConsumerKey");
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp6_ = _variant_new1 (api_key);
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_hash_table_insert (_tmp4_, _tmp5_, _tmp6_);
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp7_ = self->params;
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp8_ = g_strdup ("ConsumerSecret");
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp9_ = _variant_new2 (api_secret);
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_hash_table_insert (_tmp7_, _tmp8_, _tmp9_);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp10_ = publishing_rest_support_oauth1_session_new (NULL);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_publishing_rest_support_session_unref0 (self->session);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
self->session = _tmp10_;
#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp11_ = self->session;
#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_rest_support_oauth1_session_set_api_credentials (_tmp11_, api_key, api_secret);
#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp12_ = self->session;
#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated", (GCallback) _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated, self, 0);
#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return self;
#line 230 "OAuth1Authenticator.c"
}
static void
publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_authenticate'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return;
#line 241 "OAuth1Authenticator.c"
}
void
publishing_authenticator_shotwell_oauth1_authenticator_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self));
#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->authenticate (self);
#line 252 "OAuth1Authenticator.c"
}
static gboolean
publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
gboolean _tmp0_ = FALSE;
#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_can_logout'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return _tmp0_;
#line 264 "OAuth1Authenticator.c"
}
gboolean
publishing_authenticator_shotwell_oauth1_authenticator_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), FALSE);
#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->can_logout (self);
#line 275 "OAuth1Authenticator.c"
}
static gpointer
_g_hash_table_ref0 (gpointer self)
{
#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return self ? g_hash_table_ref (self) : NULL;
#line 284 "OAuth1Authenticator.c"
}
static GHashTable*
publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter (SpitPublishingAuthenticator* base)
{
PublishingAuthenticatorShotwellOAuth1Authenticator * self;
GHashTable* result = NULL;
GHashTable* _tmp0_;
GHashTable* _tmp1_;
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator);
#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->params;
#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = _g_hash_table_ref0 (_tmp0_);
#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
result = _tmp1_;
#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
#line 305 "OAuth1Authenticator.c"
}
static void
publishing_authenticator_shotwell_oauth1_authenticator_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_logout'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return;
#line 316 "OAuth1Authenticator.c"
}
void
publishing_authenticator_shotwell_oauth1_authenticator_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self));
#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->logout (self);
#line 327 "OAuth1Authenticator.c"
}
static void
publishing_authenticator_shotwell_oauth1_authenticator_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_refresh'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return;
#line 338 "OAuth1Authenticator.c"
}
void
publishing_authenticator_shotwell_oauth1_authenticator_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self));
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->refresh (self);
#line 349 "OAuth1Authenticator.c"
}
void
publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self));
#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (self, "");
#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (self, "");
#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (self, "");
#line 364 "OAuth1Authenticator.c"
}
gboolean
publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
gchar* _tmp2_;
gchar* _tmp3_;
gboolean _tmp4_;
#line 50 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), FALSE);
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp2_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (self);
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp3_ = _tmp2_;
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp4_ = _tmp3_ != NULL;
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp3_);
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
if (_tmp4_) {
#line 389 "OAuth1Authenticator.c"
gchar* _tmp5_;
gchar* _tmp6_;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp5_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (self);
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp6_ = _tmp5_;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = _tmp6_ != NULL;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp6_);
#line 400 "OAuth1Authenticator.c"
} else {
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = FALSE;
#line 404 "OAuth1Authenticator.c"
}
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
if (_tmp1_) {
#line 408 "OAuth1Authenticator.c"
gchar* _tmp7_;
gchar* _tmp8_;
#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp7_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (self);
#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp8_ = _tmp7_;
#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = _tmp8_ != NULL;
#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp8_);
#line 419 "OAuth1Authenticator.c"
} else {
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = FALSE;
#line 423 "OAuth1Authenticator.c"
}
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
result = _tmp0_;
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
#line 429 "OAuth1Authenticator.c"
}
gchar*
publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
gchar* result = NULL;
SpitPublishingPluginHost* _tmp0_;
gchar* _tmp1_;
#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL);
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->host;
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", NULL);
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
result = _tmp1_;
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
#line 449 "OAuth1Authenticator.c"
}
void
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self,
const gchar* username)
{
SpitPublishingPluginHost* _tmp0_;
#line 60 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self));
#line 60 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (username != NULL);
#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->host;
#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", username);
#line 466 "OAuth1Authenticator.c"
}
gchar*
publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
gchar* result = NULL;
SpitPublishingPluginHost* _tmp0_;
gchar* _tmp1_;
#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL);
#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->host;
#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", NULL);
#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
result = _tmp1_;
#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
#line 486 "OAuth1Authenticator.c"
}
void
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self,
const gchar* token)
{
SpitPublishingPluginHost* _tmp0_;
#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self));
#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (token != NULL);
#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->host;
#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", token);
#line 503 "OAuth1Authenticator.c"
}
gchar*
publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
gchar* result = NULL;
SpitPublishingPluginHost* _tmp0_;
gchar* _tmp1_;
#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL);
#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->host;
#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", NULL);
#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
result = _tmp1_;
#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
#line 523 "OAuth1Authenticator.c"
}
void
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self,
const gchar* secret)
{
SpitPublishingPluginHost* _tmp0_;
#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self));
#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (secret != NULL);
#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->host;
#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", secret);
#line 540 "OAuth1Authenticator.c"
}
static GVariant*
_variant_new3 (gchar* value)
{
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return g_variant_ref_sink (g_variant_new_string (value));
#line 549 "OAuth1Authenticator.c"
}
static GVariant*
_variant_new4 (gchar* value)
{
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return g_variant_ref_sink (g_variant_new_string (value));
#line 558 "OAuth1Authenticator.c"
}
static GVariant*
_variant_new5 (gchar* value)
{
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return g_variant_ref_sink (g_variant_new_string (value));
#line 567 "OAuth1Authenticator.c"
}
void
publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
{
GHashTable* _tmp0_;
gchar* _tmp1_;
PublishingRESTSupportOAuth1Session* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
GVariant* _tmp5_;
GHashTable* _tmp6_;
gchar* _tmp7_;
PublishingRESTSupportOAuth1Session* _tmp8_;
gchar* _tmp9_;
gchar* _tmp10_;
GVariant* _tmp11_;
GHashTable* _tmp12_;
gchar* _tmp13_;
PublishingRESTSupportOAuth1Session* _tmp14_;
gchar* _tmp15_;
gchar* _tmp16_;
GVariant* _tmp17_;
PublishingRESTSupportOAuth1Session* _tmp18_;
gchar* _tmp19_;
gchar* _tmp20_;
PublishingRESTSupportOAuth1Session* _tmp21_;
gchar* _tmp22_;
gchar* _tmp23_;
PublishingRESTSupportOAuth1Session* _tmp24_;
gchar* _tmp25_;
gchar* _tmp26_;
#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self));
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->params;
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = g_strdup ("AuthToken");
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp2_ = self->session;
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp3_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp2_);
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp4_ = _tmp3_;
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp5_ = _variant_new3 (_tmp4_);
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_hash_table_insert (_tmp0_, _tmp1_, _tmp5_);
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp4_);
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp6_ = self->params;
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp7_ = g_strdup ("AuthTokenSecret");
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp8_ = self->session;
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp9_ = publishing_rest_support_oauth1_session_get_access_phase_token_secret (_tmp8_);
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp10_ = _tmp9_;
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp11_ = _variant_new4 (_tmp10_);
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_hash_table_insert (_tmp6_, _tmp7_, _tmp11_);
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp10_);
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp12_ = self->params;
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp13_ = g_strdup ("Username");
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp14_ = self->session;
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp15_ = publishing_rest_support_oauth1_session_get_username (_tmp14_);
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp16_ = _tmp15_;
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp17_ = _variant_new5 (_tmp16_);
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_hash_table_insert (_tmp12_, _tmp13_, _tmp17_);
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp16_);
#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp18_ = self->session;
#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp19_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp18_);
#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp20_ = _tmp19_;
#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (self, _tmp20_);
#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp20_);
#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp21_ = self->session;
#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp22_ = publishing_rest_support_oauth1_session_get_access_phase_token_secret (_tmp21_);
#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp23_ = _tmp22_;
#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (self, _tmp23_);
#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp23_);
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp24_ = self->session;
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp25_ = publishing_rest_support_oauth1_session_get_username (_tmp24_);
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp26_ = _tmp25_;
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (self, _tmp26_);
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp26_);
#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authenticated");
#line 683 "OAuth1Authenticator.c"
}
static void
publishing_authenticator_shotwell_oauth1_authenticator_class_init (PublishingAuthenticatorShotwellOAuth1AuthenticatorClass * klass)
{
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_parent_class = g_type_class_peek_parent (klass);
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->authenticate = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->can_logout = (gboolean (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->logout = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_logout;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->refresh = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_refresh;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_oauth1_authenticator_finalize;
#line 702 "OAuth1Authenticator.c"
}
static void
publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface)
{
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_parent_iface = g_type_interface_peek_parent (iface);
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
iface->authenticate = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_authenticate;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
iface->can_logout = (gboolean (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_can_logout;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
iface->get_authentication_parameter = (GHashTable* (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
iface->logout = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_logout;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
iface->refresh = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_refresh;
#line 721 "OAuth1Authenticator.c"
}
static void
publishing_authenticator_shotwell_oauth1_authenticator_instance_init (PublishingAuthenticatorShotwellOAuth1Authenticator * self)
{
}
static void
publishing_authenticator_shotwell_oauth1_authenticator_finalize (GObject * obj)
{
PublishingAuthenticatorShotwellOAuth1Authenticator * self;
PublishingRESTSupportOAuth1Session* _tmp0_;
guint _tmp1_;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator);
#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = self->session;
#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_signal_parse_name ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp1_, NULL, FALSE);
#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated, self);
#line 11 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_hash_table_unref0 (self->params);
#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_publishing_rest_support_session_unref0 (self->session);
#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_object_unref0 (self->host);
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
G_OBJECT_CLASS (publishing_authenticator_shotwell_oauth1_authenticator_parent_class)->finalize (obj);
#line 753 "OAuth1Authenticator.c"
}
GType
publishing_authenticator_shotwell_oauth1_authenticator_get_type (void)
{
static volatile gsize publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile = 0;
if (g_once_init_enter (&publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellOAuth1AuthenticatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellOAuth1Authenticator), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_instance_init, NULL };
static const GInterfaceInfo spit_publishing_authenticator_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType publishing_authenticator_shotwell_oauth1_authenticator_type_id;
publishing_authenticator_shotwell_oauth1_authenticator_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellOAuth1Authenticator", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
g_type_add_interface_static (publishing_authenticator_shotwell_oauth1_authenticator_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &spit_publishing_authenticator_info);
g_once_init_leave (&publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile, publishing_authenticator_shotwell_oauth1_authenticator_type_id);
}
return publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile;
}
|