summaryrefslogtreecommitdiff
path: root/plugins/authenticator/shotwell/TumblrAuthenticator.c
blob: 1ebc0f47ab04dfa125f6a0aa859ccc0584d2d103 (plain)
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
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
/* TumblrAuthenticator.c generated by valac 0.36.6, the Vala compiler
 * generated from TumblrAuthenticator.vala, do not modify */

/* Copyright 2012 BJA Electronics
 * Copyright 2017 Jens Georg
 * Author: Jeroen Arnoldus (b.j.arnoldus@bja-electronics.nl)
 * Author: 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 <stdlib.h>
#include <string.h>
#include "shotwell-plugin-dev-1.0.h"
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include "shotwell-plugin-common.h"
#include <libsoup/soup.h>


#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE (publishing_authenticator_shotwell_tumblr_authentication_pane_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass))

typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPane PublishingAuthenticatorShotwellTumblrAuthenticationPane;
typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass;
typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate;

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_TYPE_MODE (publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL,
	PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LAST_SIGNAL
};
static guint publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LAST_SIGNAL] = {0};

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION (publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass))

typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction;
typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass;
typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate;

#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;

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR (publishing_authenticator_shotwell_tumblr_tumblr_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass))

typedef struct _PublishingAuthenticatorShotwellTumblrTumblr PublishingAuthenticatorShotwellTumblrTumblr;
typedef struct _PublishingAuthenticatorShotwellTumblrTumblrClass PublishingAuthenticatorShotwellTumblrTumblrClass;
typedef struct _PublishingAuthenticatorShotwellTumblrTumblrPrivate PublishingAuthenticatorShotwellTumblrTumblrPrivate;
#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

struct _PublishingAuthenticatorShotwellTumblrAuthenticationPane {
	GObject parent_instance;
	PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate * priv;
};

struct _PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass {
	GObjectClass parent_class;
};

struct _PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate {
	GtkBox* pane_widget;
	GtkBuilder* builder;
	GtkEntry* username_entry;
	GtkEntry* password_entry;
	GtkButton* login_button;
};

typedef enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO,
	PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER
} PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode;

struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction {
	PublishingRESTSupportOAuth1Transaction parent_instance;
	PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate * priv;
};

struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass {
	PublishingRESTSupportOAuth1TransactionClass parent_class;
};

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);
};

struct _PublishingAuthenticatorShotwellTumblrTumblr {
	PublishingAuthenticatorShotwellOAuth1Authenticator parent_instance;
	PublishingAuthenticatorShotwellTumblrTumblrPrivate * priv;
};

struct _PublishingAuthenticatorShotwellTumblrTumblrClass {
	PublishingAuthenticatorShotwellOAuth1AuthenticatorClass parent_class;
};


static gpointer publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class = NULL;
static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE;
static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE = NULL;
static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE;
static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE = NULL;
static SpitPublishingDialogPaneIface * publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_parent_iface = NULL;
static gpointer publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_parent_class = NULL;
static gpointer publishing_authenticator_shotwell_tumblr_tumblr_parent_class = NULL;

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENDPOINT_URL "https://www.tumblr.com/"
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_KEY "NdXvXQuKVccOsCOj0H4k9HUJcbcjDBYSo2AkaHzXFECHGNuP9k"
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_SECRET "BN0Uoig0MwbeD27OgA0IwYlp3Uvonyfsrl9pf1cnnMj1QoEUvi"
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\"
GType publishing_authenticator_shotwell_tumblr_authentication_pane_get_type (void) G_GNUC_CONST;
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate))
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_DUMMY_PROPERTY
};
GType publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type (void) G_GNUC_CONST;
PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_new (PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode);
PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_construct (GType object_type, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode);
static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self);
static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self);
static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self);
static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self);
static void publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self);
static GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget (SpitPublishingDialogPane* base);
static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base);
static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base);
static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base);
static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void publishing_authenticator_shotwell_tumblr_authentication_pane_finalize (GObject * obj);
GType publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type (void) G_GNUC_CONST;
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_DUMMY_PROPERTY
};
PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, const gchar* username, const gchar* password);
PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* username, const gchar* password);
GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST;
GType publishing_authenticator_shotwell_tumblr_tumblr_get_type (void) G_GNUC_CONST;
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_DUMMY_PROPERTY
};
PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_new (SpitPublishingPluginHost* host);
PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_construct (GType object_type, SpitPublishingPluginHost* host);
PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, const gchar* api_key, const gchar* api_secret, SpitPublishingPluginHost* host);
static void publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base);
gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (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 void publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode);
static gboolean publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base);
static void publishing_authenticator_shotwell_tumblr_tumblr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base);
void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
static void publishing_authenticator_shotwell_tumblr_tumblr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base);
static void publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* username, const gchar* password);
static void _publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login (PublishingAuthenticatorShotwellTumblrAuthenticationPane* _sender, const gchar* user, const gchar* password, gpointer self);
static void publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* username, const gchar* password);
static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn);
static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self);
static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn, GError* err);
static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self);
static void publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* response);


GType publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO, "PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO", "intro"}, {PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER, "PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER", "failed-retry-user"}, {0, NULL, NULL}};
		GType publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id;
		publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id = g_enum_register_static ("PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode", values);
		g_once_init_leave (&publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile, publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id);
	}
	return publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile;
}


static gpointer _g_object_ref0 (gpointer self) {
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return self ? g_object_ref (self) : NULL;
#line 221 "TumblrAuthenticator.c"
}


static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) {
#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self);
#line 228 "TumblrAuthenticator.c"
}


static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) {
#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self);
#line 235 "TumblrAuthenticator.c"
}


static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self);
#line 242 "TumblrAuthenticator.c"
}


PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_construct (GType object_type, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) {
	PublishingAuthenticatorShotwellTumblrAuthenticationPane * self = NULL;
	GtkBox* _tmp0_;
	GError * _inner_error_ = NULL;
#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellTumblrAuthenticationPane*) g_object_new (object_type, NULL);
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_object_ref_sink (_tmp0_);
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_object_unref0 (self->priv->pane_widget);
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self->priv->pane_widget = _tmp0_;
#line 260 "TumblrAuthenticator.c"
	{
		GtkBuilder* _tmp1_;
		GtkBuilder* _tmp2_;
		GtkBuilder* _tmp3_;
		GtkWidget* content = NULL;
		GtkBuilder* _tmp4_;
		GObject* _tmp5_;
		GtkWidget* _tmp6_;
		GtkLabel* message_label = NULL;
		GtkBuilder* _tmp7_;
		GObject* _tmp8_;
		GtkLabel* _tmp9_;
		PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode _tmp10_;
		GtkBuilder* _tmp17_;
		GObject* _tmp18_;
		GtkEntry* _tmp19_;
		GtkBuilder* _tmp20_;
		GObject* _tmp21_;
		GtkEntry* _tmp22_;
		GtkBuilder* _tmp23_;
		GObject* _tmp24_;
		GtkButton* _tmp25_;
		GtkEntry* _tmp26_;
		GtkEntry* _tmp27_;
		GtkButton* _tmp28_;
		GtkWidget* _tmp29_;
		GtkContainer* _tmp30_;
		GtkContainer* _tmp31_;
		GtkWidget* _tmp32_;
		GtkBox* _tmp33_;
		GtkWidget* _tmp34_;
#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp1_ = gtk_builder_new ();
#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_object_unref0 (self->priv->builder);
#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		self->priv->builder = _tmp1_;
#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp2_ = self->priv->builder;
#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		gtk_builder_add_from_resource (_tmp2_, PLUGIN_RESOURCE_PATH "/tumblr_authentication_pane.ui", &_inner_error_);
#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 304 "TumblrAuthenticator.c"
			goto __catch8_g_error;
		}
#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp3_ = self->priv->builder;
#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		gtk_builder_connect_signals (_tmp3_, NULL);
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp4_ = self->priv->builder;
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp5_ = gtk_builder_get_object (_tmp4_, "content");
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp5_) : NULL);
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		content = _tmp6_;
#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp7_ = self->priv->builder;
#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp8_ = gtk_builder_get_object (_tmp7_, "message_label");
#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp8_) : NULL);
#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		message_label = _tmp9_;
#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp10_ = mode;
#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		switch (_tmp10_) {
#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
			case PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO:
#line 333 "TumblrAuthenticator.c"
			{
				GtkLabel* _tmp11_;
				const gchar* _tmp12_;
#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				_tmp11_ = message_label;
#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				_tmp12_ = publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE;
#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				gtk_label_set_text (_tmp11_, _tmp12_);
#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				break;
#line 345 "TumblrAuthenticator.c"
			}
#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
			case PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER:
#line 349 "TumblrAuthenticator.c"
			{
				GtkLabel* _tmp13_;
				const gchar* _tmp14_;
				gchar* _tmp15_;
				gchar* _tmp16_;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				_tmp13_ = message_label;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				_tmp14_ = publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				_tmp15_ = g_strdup_printf ("<b>%s</b>\n\n%s", _ ("Invalid User Name or Password"), _tmp14_);
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				_tmp16_ = _tmp15_;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				gtk_label_set_markup (_tmp13_, _tmp16_);
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				_g_free0 (_tmp16_);
#line 54 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
				break;
#line 369 "TumblrAuthenticator.c"
			}
			default:
#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
			break;
#line 374 "TumblrAuthenticator.c"
		}
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp17_ = self->priv->builder;
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp18_ = gtk_builder_get_object (_tmp17_, "username_entry");
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp18_) : NULL);
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_object_unref0 (self->priv->username_entry);
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		self->priv->username_entry = _tmp19_;
#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp20_ = self->priv->builder;
#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp21_ = gtk_builder_get_object (_tmp20_, "password_entry");
#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp21_) : NULL);
#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_object_unref0 (self->priv->password_entry);
#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		self->priv->password_entry = _tmp22_;
#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp23_ = self->priv->builder;
#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp24_ = gtk_builder_get_object (_tmp23_, "login_button");
#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, gtk_button_get_type ()) ? ((GtkButton*) _tmp24_) : NULL);
#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_object_unref0 (self->priv->login_button);
#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		self->priv->login_button = _tmp25_;
#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp26_ = self->priv->username_entry;
#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed, self, 0);
#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp27_ = self->priv->password_entry;
#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed, self, 0);
#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp28_ = self->priv->login_button;
#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_signal_connect_object (_tmp28_, "clicked", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked, self, 0);
#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp29_ = content;
#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp30_ = gtk_widget_get_parent (_tmp29_);
#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp31_ = _tmp30_;
#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp32_ = content;
#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		gtk_container_remove (_tmp31_, _tmp32_);
#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp33_ = self->priv->pane_widget;
#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp34_ = content;
#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_container_get_type (), GtkContainer), _tmp34_);
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_object_unref0 (message_label);
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_object_unref0 (content);
#line 438 "TumblrAuthenticator.c"
	}
	goto __finally8;
	__catch8_g_error:
	{
		GError* e = NULL;
		GError* _tmp35_;
		const gchar* _tmp36_;
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		e = _inner_error_;
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_inner_error_ = NULL;
#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp35_ = e;
#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp36_ = _tmp35_->message;
#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_warning (_ ("Could not load UI: %s"), _tmp36_);
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_error_free0 (e);
#line 458 "TumblrAuthenticator.c"
	}
	__finally8:
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_clear_error (&_inner_error_);
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		return NULL;
#line 469 "TumblrAuthenticator.c"
	}
#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return self;
#line 473 "TumblrAuthenticator.c"
}


PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_new (PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) {
#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return publishing_authenticator_shotwell_tumblr_authentication_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, mode);
#line 480 "TumblrAuthenticator.c"
}


GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) {
	GtkWidget* result = NULL;
	GtkButton* _tmp0_;
	GtkWidget* _tmp1_;
#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self), NULL);
#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = self->priv->login_button;
#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	result = _tmp1_;
#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return result;
#line 498 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) {
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	GtkEntry* _tmp2_;
	const gchar* _tmp3_;
#line 80 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self));
#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = self->priv->username_entry;
#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = gtk_entry_get_text (_tmp0_);
#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = self->priv->password_entry;
#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp3_ = gtk_entry_get_text (_tmp2_);
#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_emit (self, publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL], 0, _tmp1_, _tmp3_);
#line 519 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) {
#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self));
#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self);
#line 528 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) {
#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self));
#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self);
#line 537 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) {
	gboolean _tmp0_ = FALSE;
	GtkEntry* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	GtkButton* _tmp7_;
#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self));
#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = self->priv->username_entry;
#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = gtk_entry_get_text_length (_tmp1_);
#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp3_ = _tmp2_;
#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	if (_tmp3_ > ((guint) 0)) {
#line 557 "TumblrAuthenticator.c"
		GtkEntry* _tmp4_;
		guint _tmp5_;
		guint _tmp6_;
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp4_ = self->priv->password_entry;
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp5_ = gtk_entry_get_text_length (_tmp4_);
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp6_ = _tmp5_;
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp0_ = _tmp6_ > ((guint) 0);
#line 569 "TumblrAuthenticator.c"
	} else {
#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp0_ = FALSE;
#line 573 "TumblrAuthenticator.c"
	}
#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp7_ = self->priv->login_button;
#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), _tmp0_);
#line 579 "TumblrAuthenticator.c"
}


static GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget (SpitPublishingDialogPane* base) {
	PublishingAuthenticatorShotwellTumblrAuthenticationPane * self;
	GtkWidget* result = NULL;
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane);
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = self->priv->pane_widget;
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	result = _tmp1_;
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return result;
#line 598 "TumblrAuthenticator.c"
}


static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) {
	PublishingAuthenticatorShotwellTumblrAuthenticationPane * self;
	SpitPublishingDialogPaneGeometryOptions result = 0;
#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane);
#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE;
#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return result;
#line 611 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base) {
	PublishingAuthenticatorShotwellTumblrAuthenticationPane * self;
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	GtkButton* _tmp2_;
#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane);
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = self->priv->username_entry;
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = self->priv->password_entry;
#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	gtk_entry_set_activates_default (_tmp1_, TRUE);
#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = self->priv->login_button;
#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	gtk_widget_set_can_default (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE);
#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self);
#line 636 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) {
	PublishingAuthenticatorShotwellTumblrAuthenticationPane * self;
#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane);
#line 644 "TumblrAuthenticator.c"
}


static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (n_param_values == 3);
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		data1 = closure->data;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		data2 = param_values->data[0].v_pointer;
#line 663 "TumblrAuthenticator.c"
	} else {
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		data1 = param_values->data[0].v_pointer;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		data2 = closure->data;
#line 669 "TumblrAuthenticator.c"
	}
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2);
#line 675 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_class_init (PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass * klass) {
	gchar* _tmp0_;
	gchar* _tmp1_;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class = g_type_class_peek_parent (klass);
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate));
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_tumblr_authentication_pane_finalize;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL] = g_signal_new ("login", PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = g_strdup (_ ("Enter the username and password associated with your Tumblr account."));
#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE = _tmp0_;
#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = g_strdup (_ ("Username and/or password invalid. Please try again"));
#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE = _tmp1_;
#line 698 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) {
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface);
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled;
#line 713 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_instance_init (PublishingAuthenticatorShotwellTumblrAuthenticationPane * self) {
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_PRIVATE (self);
#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self->priv->pane_widget = NULL;
#line 722 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_authentication_pane_finalize (GObject * obj) {
	PublishingAuthenticatorShotwellTumblrAuthenticationPane * self;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane);
#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_object_unref0 (self->priv->pane_widget);
#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_object_unref0 (self->priv->builder);
#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_object_unref0 (self->priv->username_entry);
#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_object_unref0 (self->priv->password_entry);
#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_object_unref0 (self->priv->login_button);
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	G_OBJECT_CLASS (publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class)->finalize (obj);
#line 742 "TumblrAuthenticator.c"
}


/**
     * The authentication pane used when asking service URL, user name and password
     * from the user.
     */
GType publishing_authenticator_shotwell_tumblr_authentication_pane_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_instance_init, NULL };
		static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType publishing_authenticator_shotwell_tumblr_authentication_pane_type_id;
		publishing_authenticator_shotwell_tumblr_authentication_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellTumblrAuthenticationPane", &g_define_type_info, 0);
		g_type_add_interface_static (publishing_authenticator_shotwell_tumblr_authentication_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info);
		g_once_init_leave (&publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile, publishing_authenticator_shotwell_tumblr_authentication_pane_type_id);
	}
	return publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile;
}


PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* username, const gchar* password) {
	PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* self = NULL;
	PublishingRESTSupportOAuth1Session* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL);
#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_val_if_fail (username != NULL, NULL);
#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_val_if_fail (password != NULL, NULL);
#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = session;
#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, _tmp0_, "https://www.tumblr.com/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = username;
#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = soup_uri_encode (_tmp1_, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENCODE_RFC_3986_EXTRA);
#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp3_ = _tmp2_;
#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_username", _tmp3_);
#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_free0 (_tmp3_);
#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp4_ = password;
#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_password", _tmp4_);
#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_mode", "client_auth");
#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return self;
#line 799 "TumblrAuthenticator.c"
}


PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, const gchar* username, const gchar* password) {
#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, session, username, password);
#line 806 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_class_init (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass * klass) {
#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_parent_class = g_type_class_peek_parent (klass);
#line 813 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_instance_init (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction * self) {
}


GType publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_instance_init, NULL };
		GType publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id;
		publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile, publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id);
	}
	return publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile;
}


PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_construct (GType object_type, SpitPublishingPluginHost* host) {
	PublishingAuthenticatorShotwellTumblrTumblr * self = NULL;
	SpitPublishingPluginHost* _tmp0_;
#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL);
#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = host;
#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellTumblrTumblr*) publishing_authenticator_shotwell_oauth1_authenticator_construct (object_type, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_KEY, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_SECRET, _tmp0_);
#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return self;
#line 844 "TumblrAuthenticator.c"
}


PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_new (SpitPublishingPluginHost* host) {
#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return publishing_authenticator_shotwell_tumblr_tumblr_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, host);
#line 851 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
	PublishingAuthenticatorShotwellTumblrTumblr * self;
	gboolean _tmp0_;
#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr);
#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator));
#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	if (_tmp0_) {
#line 864 "TumblrAuthenticator.c"
		PublishingRESTSupportOAuth1Session* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_debug ("TumblrAuthenticator.vala:135: attempt start: a persistent session is a" \
"vailable; using it");
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session;
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp2_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator));
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp3_ = _tmp2_;
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp4_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator));
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp5_ = _tmp4_;
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (_tmp1_, _tmp3_, _tmp5_, "");
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_free0 (_tmp5_);
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_free0 (_tmp3_);
#line 888 "TumblrAuthenticator.c"
	} else {
#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_debug ("TumblrAuthenticator.vala:140: attempt start: no persistent session ava" \
"ilable; showing login welcome pane");
#line 142 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO);
#line 894 "TumblrAuthenticator.c"
	}
}


static gboolean publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
	PublishingAuthenticatorShotwellTumblrTumblr * self;
	gboolean result = FALSE;
#line 146 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr);
#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	result = TRUE;
#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	return result;
#line 908 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
	PublishingAuthenticatorShotwellTumblrTumblr * self;
	PublishingRESTSupportOAuth1Session* _tmp0_;
#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr);
#line 151 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session;
#line 151 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_rest_support_oauth1_session_deauthenticate (_tmp0_);
#line 152 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator));
#line 923 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
	PublishingAuthenticatorShotwellTumblrTumblr * self;
#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr);
#line 931 "TumblrAuthenticator.c"
}


/**
         * Action that shows the authentication pane.
         *
         * This action method shows the authentication pane. It is shown at the
         * very beginning of the interaction when no persistent parameters are found
         * or after a failed login attempt using persisted parameters. It can be
         * given a mode flag to specify whether it should be displayed in initial
         * mode or in any of the error modes that it supports.
         *
         * @param mode the mode for the authentication pane
         */
static void _publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login (PublishingAuthenticatorShotwellTumblrAuthenticationPane* _sender, const gchar* user, const gchar* password, gpointer self) {
#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked ((PublishingAuthenticatorShotwellTumblrTumblr*) self, user, password);
#line 949 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) {
	SpitPublishingPluginHost* _tmp0_;
	PublishingAuthenticatorShotwellTumblrAuthenticationPane* authentication_pane = NULL;
	PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode _tmp1_;
	PublishingAuthenticatorShotwellTumblrAuthenticationPane* _tmp2_;
	SpitPublishingPluginHost* _tmp3_;
	SpitPublishingPluginHost* _tmp4_;
	GtkWidget* _tmp5_;
	GtkWidget* _tmp6_;
#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self));
#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_debug ("TumblrAuthenticator.vala:171: ACTION: installing authentication pane");
#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host;
#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE);
#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = mode;
#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = publishing_authenticator_shotwell_tumblr_authentication_pane_new (_tmp1_);
#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	authentication_pane = _tmp2_;
#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_connect_object (authentication_pane, "login", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login, self, 0);
#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host;
#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	spit_publishing_plugin_host_install_dialog_pane (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (authentication_pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CLOSE);
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host;
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp5_ = publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (authentication_pane);
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp6_ = _tmp5_;
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	spit_publishing_plugin_host_set_dialog_default_widget (_tmp4_, _tmp6_);
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_object_unref0 (_tmp6_);
#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_object_unref0 (authentication_pane);
#line 994 "TumblrAuthenticator.c"
}


/**
         * Event triggered when the login button in the authentication panel is
         * clicked.
         *
         * This event is triggered when the login button in the authentication
         * panel is clicked. It then triggers a network login interaction.
         *
         * @param username the name of the Tumblr user as entered in the dialog
         * @param password the password of the Tumblr as entered in the dialog
         */
static void publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* username, const gchar* password) {
	const gchar* _tmp0_;
	const gchar* _tmp1_;
#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self));
#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (username != NULL);
#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (password != NULL);
#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_debug ("TumblrAuthenticator.vala:191: EVENT: on_authentication_pane_login_clic" \
"ked");
#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = username;
#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = password;
#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (self, _tmp0_, _tmp1_);
#line 1025 "TumblrAuthenticator.c"
}


/**
         * Action to perform a network login to a Tumblr blog.
         *
         * This action performs a network login a Tumblr blog specified the given user name and password as credentials.
         *
         * @param username the name of the Tumblr user used to login
         * @param password the password of the Tumblr user used to login
         */
static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) {
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed ((PublishingAuthenticatorShotwellTumblrTumblr*) self, _sender);
#line 1040 "TumblrAuthenticator.c"
}


static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) {
#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error ((PublishingAuthenticatorShotwellTumblrTumblr*) self, _sender, err);
#line 1047 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* username, const gchar* password) {
	SpitPublishingPluginHost* _tmp0_;
	SpitPublishingPluginHost* _tmp1_;
	PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* txn = NULL;
	PublishingRESTSupportOAuth1Session* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* _tmp5_;
	GError * _inner_error_ = NULL;
#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self));
#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (username != NULL);
#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (password != NULL);
#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_debug ("TumblrAuthenticator.vala:205: ACTION: logging in");
#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host;
#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE);
#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host;
#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	spit_publishing_plugin_host_install_login_wait_pane (_tmp1_);
#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session;
#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp3_ = username;
#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp4_ = password;
#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp5_ = publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (_tmp2_, _tmp3_, _tmp4_);
#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	txn = _tmp5_;
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self, 0);
#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self, 0);
#line 1090 "TumblrAuthenticator.c"
	{
#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 1098 "TumblrAuthenticator.c"
				goto __catch9_spit_publishing_publishing_error;
			}
#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
			_publishing_rest_support_transaction_unref0 (txn);
#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
			g_clear_error (&_inner_error_);
#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
			return;
#line 1109 "TumblrAuthenticator.c"
		}
	}
	goto __finally9;
	__catch9_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp6_;
		GError* _tmp7_;
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		err = _inner_error_;
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_inner_error_ = NULL;
#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host;
#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp7_ = err;
#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		spit_publishing_plugin_host_post_error (_tmp6_, _tmp7_);
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_error_free0 (err);
#line 1130 "TumblrAuthenticator.c"
	}
	__finally9:
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_publishing_rest_support_transaction_unref0 (txn);
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_clear_error (&_inner_error_);
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		return;
#line 1143 "TumblrAuthenticator.c"
	}
#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_publishing_rest_support_transaction_unref0 (txn);
#line 1147 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_;
	guint _tmp1_;
	PublishingRESTSupportTransaction* _tmp2_;
	guint _tmp3_;
	PublishingRESTSupportTransaction* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	PublishingRESTSupportTransaction* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self));
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = txn;
#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self);
#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = txn;
#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self);
#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp4_ = txn;
#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_);
#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp6_ = _tmp5_;
#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_debug ("TumblrAuthenticator.vala:224: EVENT: OAuth authentication request tran" \
"saction completed; response = '%s'", _tmp6_);
#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_free0 (_tmp6_);
#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp7_ = txn;
#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp8_ = publishing_rest_support_transaction_get_response (_tmp7_);
#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp9_ = _tmp8_;
#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (self, _tmp9_);
#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_free0 (_tmp9_);
#line 1198 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_;
	guint _tmp1_;
	PublishingRESTSupportTransaction* _tmp2_;
	guint _tmp3_;
	SpitPublishingPluginHost* _tmp4_;
	GError* _tmp5_;
#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self));
#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = txn;
#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self);
#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = txn;
#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self);
#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_debug ("TumblrAuthenticator.vala:235: EVENT: OAuth authentication request tran" \
"saction caused a network error");
#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host;
#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp5_ = err;
#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
#line 1233 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* response) {
	const gchar* _tmp0_;
	gchar* token = NULL;
	gchar* token_secret = NULL;
	GHashTable* data = NULL;
	const gchar* _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	gconstpointer _tmp4_ = NULL;
	gchar* _tmp5_;
	GHashTable* _tmp6_;
	gconstpointer _tmp7_ = NULL;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gboolean _tmp11_ = FALSE;
	const gchar* _tmp12_;
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self));
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_return_if_fail (response != NULL);
#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp0_ = response;
#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_debug ("TumblrAuthenticator.vala:240: ACTION: extracting access phase credenti" \
"als from '%s'", _tmp0_);
#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	token = NULL;
#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	token_secret = NULL;
#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp1_ = response;
#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp2_ = soup_form_decode (_tmp1_);
#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	data = _tmp2_;
#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp3_ = data;
#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_hash_table_lookup_extended (_tmp3_, "oauth_token", NULL, &_tmp4_);
#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_free0 (token);
#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	token = _tmp5_;
#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp6_ = data;
#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_hash_table_lookup_extended (_tmp6_, "oauth_token_secret", NULL, &_tmp7_);
#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_free0 (token_secret);
#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp8_ = g_strdup (_tmp7_);
#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	token_secret = _tmp8_;
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp9_ = token;
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp10_ = token_secret;
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	g_debug ("TumblrAuthenticator.vala:249: access phase credentials: { token = '%s'" \
"; token_secret = '%s' }", _tmp9_, _tmp10_);
#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_tmp12_ = token;
#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	if (_tmp12_ == NULL) {
#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp11_ = TRUE;
#line 1304 "TumblrAuthenticator.c"
	} else {
		const gchar* _tmp13_;
#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp13_ = token_secret;
#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp11_ = _tmp13_ == NULL;
#line 1311 "TumblrAuthenticator.c"
	}
#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	if (_tmp11_) {
#line 1315 "TumblrAuthenticator.c"
		SpitPublishingPluginHost* _tmp14_;
		GError* _tmp15_;
		GError* _tmp16_;
#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp14_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host;
#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp15_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Expected " "access phase credentials to contain token and token secret but at " "least one of these is absent");
#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp16_ = _tmp15_;
#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		spit_publishing_plugin_host_post_error (_tmp14_, _tmp16_);
#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_g_error_free0 (_tmp16_);
#line 256 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed");
#line 1331 "TumblrAuthenticator.c"
	} else {
		PublishingRESTSupportOAuth1Session* _tmp17_;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp17_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session;
#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp18_ = token;
#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		_tmp19_ = token_secret;
#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
		publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp17_, _tmp18_, _tmp19_, "");
#line 1344 "TumblrAuthenticator.c"
	}
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_hash_table_unref0 (data);
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_free0 (token_secret);
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	_g_free0 (token);
#line 1352 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_class_init (PublishingAuthenticatorShotwellTumblrTumblrClass * klass) {
#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	publishing_authenticator_shotwell_tumblr_tumblr_parent_class = g_type_class_peek_parent (klass);
#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->authenticate = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate;
#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->can_logout = (gboolean (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout;
#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->logout = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_logout;
#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
	((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->refresh = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_refresh;
#line 1367 "TumblrAuthenticator.c"
}


static void publishing_authenticator_shotwell_tumblr_tumblr_instance_init (PublishingAuthenticatorShotwellTumblrTumblr * self) {
}


GType publishing_authenticator_shotwell_tumblr_tumblr_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrTumblrClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_tumblr_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrTumblr), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_tumblr_instance_init, NULL };
		GType publishing_authenticator_shotwell_tumblr_tumblr_type_id;
		publishing_authenticator_shotwell_tumblr_tumblr_type_id = g_type_register_static (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, "PublishingAuthenticatorShotwellTumblrTumblr", &g_define_type_info, 0);
		g_once_init_leave (&publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile, publishing_authenticator_shotwell_tumblr_tumblr_type_id);
	}
	return publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile;
}