File: subsystem.c

package info (click to toggle)
libfsoframework 0.11.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,052 kB
  • sloc: sh: 11,311; ansic: 7,896; makefile: 89
file content (1902 lines) | stat: -rw-r--r-- 77,685 bytes parent folder | download
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
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
/* subsystem.c generated by valac 0.14.2, the Vala compiler
 * generated from subsystem.vala, do not modify */

/*
 * Copyright (C) 2009-2011 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 */
/**
 * Subsystem query interface
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <fsobasics.h>
#include <config.h>
#include <gio/gio.h>
#include <gee.h>
#include <gobject/gvaluecollector.h>


#define FSO_FRAMEWORK_TYPE_SUBSYSTEM (fso_framework_subsystem_get_type ())
#define FSO_FRAMEWORK_SUBSYSTEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_FRAMEWORK_TYPE_SUBSYSTEM, FsoFrameworkSubsystem))
#define FSO_FRAMEWORK_IS_SUBSYSTEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_FRAMEWORK_TYPE_SUBSYSTEM))
#define FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_FRAMEWORK_TYPE_SUBSYSTEM, FsoFrameworkSubsystemIface))

typedef struct _FsoFrameworkSubsystem FsoFrameworkSubsystem;
typedef struct _FsoFrameworkSubsystemIface FsoFrameworkSubsystemIface;

#define FSO_FRAMEWORK_TYPE_PLUGIN_INFO (fso_framework_plugin_info_get_type ())
typedef struct _FsoFrameworkPluginInfo FsoFrameworkPluginInfo;

#define FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM (fso_framework_abstract_subsystem_get_type ())
#define FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM, FsoFrameworkAbstractSubsystem))
#define FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM, FsoFrameworkAbstractSubsystemClass))
#define FSO_FRAMEWORK_IS_ABSTRACT_SUBSYSTEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM))
#define FSO_FRAMEWORK_IS_ABSTRACT_SUBSYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM))
#define FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM, FsoFrameworkAbstractSubsystemClass))

typedef struct _FsoFrameworkAbstractSubsystem FsoFrameworkAbstractSubsystem;
typedef struct _FsoFrameworkAbstractSubsystemClass FsoFrameworkAbstractSubsystemClass;
typedef struct _FsoFrameworkAbstractSubsystemPrivate FsoFrameworkAbstractSubsystemPrivate;

#define FSO_FRAMEWORK_TYPE_PLUGIN (fso_framework_plugin_get_type ())
#define FSO_FRAMEWORK_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_FRAMEWORK_TYPE_PLUGIN, FsoFrameworkPlugin))
#define FSO_FRAMEWORK_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_FRAMEWORK_TYPE_PLUGIN))
#define FSO_FRAMEWORK_PLUGIN_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_FRAMEWORK_TYPE_PLUGIN, FsoFrameworkPluginIface))

typedef struct _FsoFrameworkPlugin FsoFrameworkPlugin;
typedef struct _FsoFrameworkPluginIface FsoFrameworkPluginIface;
#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_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define FSO_FRAMEWORK_TYPE_BASE_PLUGIN (fso_framework_base_plugin_get_type ())
#define FSO_FRAMEWORK_BASE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_FRAMEWORK_TYPE_BASE_PLUGIN, FsoFrameworkBasePlugin))
#define FSO_FRAMEWORK_BASE_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_FRAMEWORK_TYPE_BASE_PLUGIN, FsoFrameworkBasePluginClass))
#define FSO_FRAMEWORK_IS_BASE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_FRAMEWORK_TYPE_BASE_PLUGIN))
#define FSO_FRAMEWORK_IS_BASE_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_FRAMEWORK_TYPE_BASE_PLUGIN))
#define FSO_FRAMEWORK_BASE_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_FRAMEWORK_TYPE_BASE_PLUGIN, FsoFrameworkBasePluginClass))

typedef struct _FsoFrameworkBasePlugin FsoFrameworkBasePlugin;
typedef struct _FsoFrameworkBasePluginClass FsoFrameworkBasePluginClass;
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
#define __g_list_free__fso_framework_plugin_info_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__fso_framework_plugin_info_free0_ (var), NULL)))

#define FSO_FRAMEWORK_TYPE_BASE_SUBSYSTEM (fso_framework_base_subsystem_get_type ())
#define FSO_FRAMEWORK_BASE_SUBSYSTEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_FRAMEWORK_TYPE_BASE_SUBSYSTEM, FsoFrameworkBaseSubsystem))
#define FSO_FRAMEWORK_BASE_SUBSYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_FRAMEWORK_TYPE_BASE_SUBSYSTEM, FsoFrameworkBaseSubsystemClass))
#define FSO_FRAMEWORK_IS_BASE_SUBSYSTEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_FRAMEWORK_TYPE_BASE_SUBSYSTEM))
#define FSO_FRAMEWORK_IS_BASE_SUBSYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_FRAMEWORK_TYPE_BASE_SUBSYSTEM))
#define FSO_FRAMEWORK_BASE_SUBSYSTEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_FRAMEWORK_TYPE_BASE_SUBSYSTEM, FsoFrameworkBaseSubsystemClass))

typedef struct _FsoFrameworkBaseSubsystem FsoFrameworkBaseSubsystem;
typedef struct _FsoFrameworkBaseSubsystemClass FsoFrameworkBaseSubsystemClass;
typedef struct _FsoFrameworkBaseSubsystemPrivate FsoFrameworkBaseSubsystemPrivate;

#define FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT (fso_framework_dbus_export_object_get_type ())
#define FSO_FRAMEWORK_DBUS_EXPORT_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT, FsoFrameworkDBusExportObject))
#define FSO_FRAMEWORK_DBUS_EXPORT_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT, FsoFrameworkDBusExportObjectClass))
#define FSO_FRAMEWORK_IS_DBUS_EXPORT_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT))
#define FSO_FRAMEWORK_IS_DBUS_EXPORT_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT))
#define FSO_FRAMEWORK_DBUS_EXPORT_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT, FsoFrameworkDBusExportObjectClass))

typedef struct _FsoFrameworkDBusExportObject FsoFrameworkDBusExportObject;
typedef struct _FsoFrameworkDBusExportObjectClass FsoFrameworkDBusExportObjectClass;
typedef struct _FsoFrameworkDBusExportObjectPrivate FsoFrameworkDBusExportObjectPrivate;
typedef struct _FsoFrameworkParamSpecDBusExportObject FsoFrameworkParamSpecDBusExportObject;

#define FSO_FRAMEWORK_TYPE_DBUS_SUBSYSTEM (fso_framework_dbus_subsystem_get_type ())
#define FSO_FRAMEWORK_DBUS_SUBSYSTEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_FRAMEWORK_TYPE_DBUS_SUBSYSTEM, FsoFrameworkDBusSubsystem))
#define FSO_FRAMEWORK_DBUS_SUBSYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_FRAMEWORK_TYPE_DBUS_SUBSYSTEM, FsoFrameworkDBusSubsystemClass))
#define FSO_FRAMEWORK_IS_DBUS_SUBSYSTEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_FRAMEWORK_TYPE_DBUS_SUBSYSTEM))
#define FSO_FRAMEWORK_IS_DBUS_SUBSYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_FRAMEWORK_TYPE_DBUS_SUBSYSTEM))
#define FSO_FRAMEWORK_DBUS_SUBSYSTEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_FRAMEWORK_TYPE_DBUS_SUBSYSTEM, FsoFrameworkDBusSubsystemClass))

typedef struct _FsoFrameworkDBusSubsystem FsoFrameworkDBusSubsystem;
typedef struct _FsoFrameworkDBusSubsystemClass FsoFrameworkDBusSubsystemClass;
typedef struct _FsoFrameworkDBusSubsystemPrivate FsoFrameworkDBusSubsystemPrivate;
typedef struct _Block1Data Block1Data;
typedef struct _Block2Data Block2Data;

struct _FsoFrameworkPluginInfo {
	gchar* name;
	gboolean loaded;
};

struct _FsoFrameworkSubsystemIface {
	GTypeInterface parent_iface;
	guint (*registerPlugins) (FsoFrameworkSubsystem* self);
	guint (*loadPlugins) (FsoFrameworkSubsystem* self);
	gchar* (*name) (FsoFrameworkSubsystem* self);
	GList* (*pluginsInfo) (FsoFrameworkSubsystem* self);
	void (*registerObjectForService) (FsoFrameworkSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj);
	void (*registerObjectForServiceWithPrefix) (FsoFrameworkSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefixpath, gconstpointer obj);
	GObject** (*allObjectsWithPrefix) (FsoFrameworkSubsystem* self, const gchar* prefix, int* result_length1);
	void (*shutdown) (FsoFrameworkSubsystem* self);
};

struct _FsoFrameworkAbstractSubsystem {
	GObject parent_instance;
	FsoFrameworkAbstractSubsystemPrivate * priv;
	FsoFrameworkLogger* logger;
};

struct _FsoFrameworkAbstractSubsystemClass {
	GObjectClass parent_class;
	void (*registerObjectForService) (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj);
	void (*registerObjectForServiceWithPrefix) (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefixpath, gconstpointer obj);
	gboolean (*registerServiceObjectWithPrefix) (FsoFrameworkAbstractSubsystem* self, const gchar* servicename, const gchar* prefix, GObject* obj);
	GObject** (*allObjectsWithPrefix) (FsoFrameworkAbstractSubsystem* self, const gchar* prefix, int* result_length1);
};

typedef enum  {
	FSO_FRAMEWORK_PLUGIN_ERROR_UNABLE_TO_LOAD,
	FSO_FRAMEWORK_PLUGIN_ERROR_REGISTER_NOT_FOUND,
	FSO_FRAMEWORK_PLUGIN_ERROR_FACTORY_NOT_FOUND,
	FSO_FRAMEWORK_PLUGIN_ERROR_UNABLE_TO_INITIALIZE
} FsoFrameworkPluginError;
#define FSO_FRAMEWORK_PLUGIN_ERROR fso_framework_plugin_error_quark ()
struct _FsoFrameworkPluginIface {
	GTypeInterface parent_iface;
	void (*loadAndInit) (FsoFrameworkPlugin* self, GError** error);
	void (*info) (FsoFrameworkPlugin* self, FsoFrameworkPluginInfo* result);
	void (*shutdown) (FsoFrameworkPlugin* self);
};

struct _FsoFrameworkAbstractSubsystemPrivate {
	gchar* _name;
	GList* _plugins;
};

struct _FsoFrameworkBaseSubsystem {
	FsoFrameworkAbstractSubsystem parent_instance;
	FsoFrameworkBaseSubsystemPrivate * priv;
};

struct _FsoFrameworkBaseSubsystemClass {
	FsoFrameworkAbstractSubsystemClass parent_class;
};

struct _FsoFrameworkDBusExportObject {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FsoFrameworkDBusExportObjectPrivate * priv;
	GObject* object;
	gint* refids;
	gint refids_length1;
};

struct _FsoFrameworkDBusExportObjectClass {
	GTypeClass parent_class;
	void (*finalize) (FsoFrameworkDBusExportObject *self);
};

struct _FsoFrameworkParamSpecDBusExportObject {
	GParamSpec parent_instance;
};

struct _FsoFrameworkDBusSubsystem {
	FsoFrameworkAbstractSubsystem parent_instance;
	FsoFrameworkDBusSubsystemPrivate * priv;
};

struct _FsoFrameworkDBusSubsystemClass {
	FsoFrameworkAbstractSubsystemClass parent_class;
};

struct _FsoFrameworkDBusSubsystemPrivate {
	GDBusConnection* connection;
	GeeHashMap* refids;
	GeeHashMap* dbusobjects;
	GeeHashMap* counters;
	GeeHashSet* busnames;
	guint watch;
};

struct _Block1Data {
	int _ref_count_;
	FsoFrameworkDBusSubsystem * self;
	gchar* servicename;
};

struct _Block2Data {
	int _ref_count_;
	FsoFrameworkDBusSubsystem * self;
	GType t_type;
	GBoxedCopyFunc t_dup_func;
	GDestroyNotify t_destroy_func;
};


static gpointer fso_framework_abstract_subsystem_parent_class = NULL;
static FsoFrameworkSubsystemIface* fso_framework_abstract_subsystem_fso_framework_subsystem_parent_iface = NULL;
static gpointer fso_framework_base_subsystem_parent_class = NULL;
static gpointer fso_framework_dbus_export_object_parent_class = NULL;
static gpointer fso_framework_dbus_subsystem_parent_class = NULL;

GType fso_framework_plugin_info_get_type (void) G_GNUC_CONST;
FsoFrameworkPluginInfo* fso_framework_plugin_info_dup (const FsoFrameworkPluginInfo* self);
void fso_framework_plugin_info_free (FsoFrameworkPluginInfo* self);
void fso_framework_plugin_info_copy (const FsoFrameworkPluginInfo* self, FsoFrameworkPluginInfo* dest);
void fso_framework_plugin_info_destroy (FsoFrameworkPluginInfo* self);
GType fso_framework_subsystem_get_type (void) G_GNUC_CONST;
guint fso_framework_subsystem_registerPlugins (FsoFrameworkSubsystem* self);
guint fso_framework_subsystem_loadPlugins (FsoFrameworkSubsystem* self);
gchar* fso_framework_subsystem_name (FsoFrameworkSubsystem* self);
GList* fso_framework_subsystem_pluginsInfo (FsoFrameworkSubsystem* self);
void fso_framework_subsystem_registerObjectForService (FsoFrameworkSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj);
void fso_framework_subsystem_registerObjectForServiceWithPrefix (FsoFrameworkSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefixpath, gconstpointer obj);
GObject** fso_framework_subsystem_allObjectsWithPrefix (FsoFrameworkSubsystem* self, const gchar* prefix, int* result_length1);
void fso_framework_subsystem_shutdown (FsoFrameworkSubsystem* self);
GType fso_framework_abstract_subsystem_get_type (void) G_GNUC_CONST;
GQuark fso_framework_plugin_error_quark (void);
GType fso_framework_plugin_get_type (void) G_GNUC_CONST;
#define FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM, FsoFrameworkAbstractSubsystemPrivate))
enum  {
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_DUMMY_PROPERTY
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
FsoFrameworkAbstractSubsystem* fso_framework_abstract_subsystem_construct (GType object_type, const gchar* name);
static guint fso_framework_abstract_subsystem_real_registerPlugins (FsoFrameworkSubsystem* base);
FsoFrameworkBasePlugin* fso_framework_base_plugin_new (const gchar* filename, FsoFrameworkSubsystem* subsystem);
FsoFrameworkBasePlugin* fso_framework_base_plugin_construct (GType object_type, const gchar* filename, FsoFrameworkSubsystem* subsystem);
GType fso_framework_base_plugin_get_type (void) G_GNUC_CONST;
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
static guint fso_framework_abstract_subsystem_real_loadPlugins (FsoFrameworkSubsystem* base);
void fso_framework_plugin_loadAndInit (FsoFrameworkPlugin* self, GError** error);
static gchar* fso_framework_abstract_subsystem_real_name (FsoFrameworkSubsystem* base);
static GList* fso_framework_abstract_subsystem_real_pluginsInfo (FsoFrameworkSubsystem* base);
void fso_framework_plugin_info (FsoFrameworkPlugin* self, FsoFrameworkPluginInfo* result);
static void _fso_framework_plugin_info_free0_ (gpointer var);
static void _g_list_free__fso_framework_plugin_info_free0_ (GList* self);
void fso_framework_abstract_subsystem_registerObjectForService (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj);
static void fso_framework_abstract_subsystem_real_registerObjectForService (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj);
void fso_framework_abstract_subsystem_registerObjectForServiceWithPrefix (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefixpath, gconstpointer obj);
static void fso_framework_abstract_subsystem_real_registerObjectForServiceWithPrefix (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefixpath, gconstpointer obj);
gboolean fso_framework_abstract_subsystem_registerServiceObjectWithPrefix (FsoFrameworkAbstractSubsystem* self, const gchar* servicename, const gchar* prefix, GObject* obj);
static gboolean fso_framework_abstract_subsystem_real_registerServiceObjectWithPrefix (FsoFrameworkAbstractSubsystem* self, const gchar* servicename, const gchar* prefix, GObject* obj);
GObject** fso_framework_abstract_subsystem_allObjectsWithPrefix (FsoFrameworkAbstractSubsystem* self, const gchar* prefix, int* result_length1);
static GObject** fso_framework_abstract_subsystem_real_allObjectsWithPrefix (FsoFrameworkAbstractSubsystem* self, const gchar* prefix, int* result_length1);
static void fso_framework_abstract_subsystem_real_shutdown (FsoFrameworkSubsystem* base);
void fso_framework_plugin_shutdown (FsoFrameworkPlugin* self);
static void fso_framework_abstract_subsystem_finalize (GObject* obj);
GType fso_framework_base_subsystem_get_type (void) G_GNUC_CONST;
enum  {
	FSO_FRAMEWORK_BASE_SUBSYSTEM_DUMMY_PROPERTY
};
FsoFrameworkBaseSubsystem* fso_framework_base_subsystem_new (const gchar* name);
FsoFrameworkBaseSubsystem* fso_framework_base_subsystem_construct (GType object_type, const gchar* name);
gpointer fso_framework_dbus_export_object_ref (gpointer instance);
void fso_framework_dbus_export_object_unref (gpointer instance);
GParamSpec* fso_framework_param_spec_dbus_export_object (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_framework_value_set_dbus_export_object (GValue* value, gpointer v_object);
void fso_framework_value_take_dbus_export_object (GValue* value, gpointer v_object);
gpointer fso_framework_value_get_dbus_export_object (const GValue* value);
GType fso_framework_dbus_export_object_get_type (void) G_GNUC_CONST;
enum  {
	FSO_FRAMEWORK_DBUS_EXPORT_OBJECT_DUMMY_PROPERTY
};
FsoFrameworkDBusExportObject* fso_framework_dbus_export_object_new (void);
FsoFrameworkDBusExportObject* fso_framework_dbus_export_object_construct (GType object_type);
static void fso_framework_dbus_export_object_finalize (FsoFrameworkDBusExportObject* obj);
GType fso_framework_dbus_subsystem_get_type (void) G_GNUC_CONST;
#define FSO_FRAMEWORK_DBUS_SUBSYSTEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FSO_FRAMEWORK_TYPE_DBUS_SUBSYSTEM, FsoFrameworkDBusSubsystemPrivate))
enum  {
	FSO_FRAMEWORK_DBUS_SUBSYSTEM_DUMMY_PROPERTY
};
FsoFrameworkDBusSubsystem* fso_framework_dbus_subsystem_new (const gchar* name);
FsoFrameworkDBusSubsystem* fso_framework_dbus_subsystem_construct (GType object_type, const gchar* name);
static void fso_framework_dbus_subsystem_ensureConnection (FsoFrameworkDBusSubsystem* self);
void fso_framework_dbus_subsystem_exportBusnames (FsoFrameworkDBusSubsystem* self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (Block1Data* _data1_);
static void ____lambda0_ (Block1Data* _data1_, GDBusConnection* conn, const gchar* name);
static void _____lambda0__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
static void ____lambda1_ (Block1Data* _data1_);
static void _____lambda1__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self);
static void fso_framework_dbus_subsystem_real_registerObjectForService (FsoFrameworkAbstractSubsystem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (Block2Data* _data2_);
static guint _vala_g_dbus_connection_register_object (GType type, void* object, GDBusConnection* connection, const gchar* path, GError** error);
static gboolean ___lambda2_ (Block2Data* _data2_);
static gboolean ____lambda2__gsource_func (gpointer self);
static void fso_framework_dbus_subsystem_real_registerObjectForServiceWithPrefix (FsoFrameworkAbstractSubsystem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefix, gconstpointer obj);
GDBusConnection* fso_framework_dbus_subsystem_dbusConnection (FsoFrameworkDBusSubsystem* self);
static GObject** fso_framework_dbus_subsystem_real_allObjectsWithPrefix (FsoFrameworkAbstractSubsystem* base, const gchar* prefix, int* result_length1);
static void _vala_array_add1 (GObject*** array, int* length, int* size, GObject* value);
static void fso_framework_dbus_subsystem_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


/**
     * Register plugins for this subsystem.
     * @return the number of registered plugins.
     **/
guint fso_framework_subsystem_registerPlugins (FsoFrameworkSubsystem* self) {
	g_return_val_if_fail (self != NULL, 0U);
	return FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE (self)->registerPlugins (self);
}


/**
     * Load registered plugins for this subsystem.
     * @return the number of loaded plugins.
     * Plugins are loaded in the order they appear in the register,
     * which in turn is the order they are defined in the configuration
     * file. You can use this to express dependencies.
     **/
guint fso_framework_subsystem_loadPlugins (FsoFrameworkSubsystem* self) {
	g_return_val_if_fail (self != NULL, 0U);
	return FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE (self)->loadPlugins (self);
}


/**
     * @return the name of this subsystem.
     **/
gchar* fso_framework_subsystem_name (FsoFrameworkSubsystem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE (self)->name (self);
}


/**
     * @return plugin information.
     **/
GList* fso_framework_subsystem_pluginsInfo (FsoFrameworkSubsystem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE (self)->pluginsInfo (self);
}


/**
     * Register an object with the IPC mechanism.
     * If the service name is not claimed yet, attempt to claim it.
     **/
void fso_framework_subsystem_registerObjectForService (FsoFrameworkSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj) {
	g_return_if_fail (self != NULL);
	FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE (self)->registerObjectForService (self, t_type, t_dup_func, t_destroy_func, servicename, objectpath, obj);
}


/**
     * Register an object with the IPC mechanism.
     * If the service name is not claimed yet, attempt to claim it.
     **/
void fso_framework_subsystem_registerObjectForServiceWithPrefix (FsoFrameworkSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefixpath, gconstpointer obj) {
	g_return_if_fail (self != NULL);
	FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE (self)->registerObjectForServiceWithPrefix (self, t_type, t_dup_func, t_destroy_func, servicename, prefixpath, obj);
}


/**
     * Query registered plugins with a certain path prefix.
     **/
GObject** fso_framework_subsystem_allObjectsWithPrefix (FsoFrameworkSubsystem* self, const gchar* prefix, int* result_length1) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE (self)->allObjectsWithPrefix (self, prefix, result_length1);
}


/**
     * Shutdown the subsystem. This will call shutdown on all plugins.
     **/
void fso_framework_subsystem_shutdown (FsoFrameworkSubsystem* self) {
	g_return_if_fail (self != NULL);
	FSO_FRAMEWORK_SUBSYSTEM_GET_INTERFACE (self)->shutdown (self);
}


static void fso_framework_subsystem_base_init (FsoFrameworkSubsystemIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		/**
		     * Signal sent, when a servicename has been acquired.
		     **/
		g_signal_new ("service_name_acquired", FSO_FRAMEWORK_TYPE_SUBSYSTEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	}
}


/**
 * Subsystem Interface
 *
 * A subsystem hosts a number of plugins that can expose service objects
 * via an IPC mechanism such as DBus.
 */
GType fso_framework_subsystem_get_type (void) {
	static volatile gsize fso_framework_subsystem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_framework_subsystem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoFrameworkSubsystemIface), (GBaseInitFunc) fso_framework_subsystem_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType fso_framework_subsystem_type_id;
		fso_framework_subsystem_type_id = g_type_register_static (G_TYPE_INTERFACE, "FsoFrameworkSubsystem", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (fso_framework_subsystem_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&fso_framework_subsystem_type_id__volatile, fso_framework_subsystem_type_id);
	}
	return fso_framework_subsystem_type_id__volatile;
}


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


FsoFrameworkAbstractSubsystem* fso_framework_abstract_subsystem_construct (GType object_type, const gchar* name) {
	FsoFrameworkAbstractSubsystem * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	FsoFrameworkLogger* _tmp2_ = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	self = (FsoFrameworkAbstractSubsystem*) g_object_new (object_type, NULL);
	_tmp0_ = name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_name);
	self->priv->_name = _tmp1_;
	_tmp2_ = fso_framework_logger_createLogger ("libfsoframework", "subsystem");
	_g_object_unref0 (self->logger);
	self->logger = _tmp2_;
	return self;
}


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	{
		const gchar* _tmp0_;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_;
		GRegex* _tmp3_;
		GRegex* _tmp4_;
		GRegex* regex;
		GRegex* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_;
		_tmp0_ = old;
		_tmp1_ = g_regex_escape_string (_tmp0_, -1);
		_tmp2_ = _tmp1_;
		_tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
		_tmp4_ = _tmp3_;
		_g_free0 (_tmp2_);
		regex = _tmp4_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch2_g_regex_error;
			}
			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);
			g_clear_error (&_inner_error_);
			return NULL;
		}
		_tmp5_ = regex;
		_tmp6_ = replacement;
		_tmp7_ = g_regex_replace_literal (_tmp5_, self, (gssize) (-1), 0, _tmp6_, 0, &_inner_error_);
		_tmp8_ = _tmp7_;
		if (_inner_error_ != NULL) {
			_g_regex_unref0 (regex);
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch2_g_regex_error;
			}
			_g_regex_unref0 (regex);
			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);
			g_clear_error (&_inner_error_);
			return NULL;
		}
		result = _tmp8_;
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally2;
	__catch2_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally2:
	if (_inner_error_ != NULL) {
		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);
		g_clear_error (&_inner_error_);
		return NULL;
	}
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = needle;
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
	result = _tmp1_ != NULL;
	return result;
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void _g_list_free__g_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
	g_list_free (self);
}


static guint fso_framework_abstract_subsystem_real_registerPlugins (FsoFrameworkSubsystem* base) {
	FsoFrameworkAbstractSubsystem * self;
	guint result = 0U;
	GList* _tmp0_;
	FsoFrameworkSmartKeyFile* _tmp1_ = NULL;
	FsoFrameworkSmartKeyFile* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_;
	FsoFrameworkSmartKeyFile* _tmp11_ = NULL;
	FsoFrameworkSmartKeyFile* _tmp12_;
	const gchar* _tmp13_;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_;
	FsoFrameworkSmartKeyFile* _tmp21_ = NULL;
	FsoFrameworkSmartKeyFile* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GList* _tmp26_ = NULL;
	GList* _tmp27_;
	GList* names;
	gchar* _tmp28_ = NULL;
	gchar* defaultpath;
	FsoFrameworkSmartKeyFile* _tmp29_ = NULL;
	FsoFrameworkSmartKeyFile* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_ = NULL;
	gchar* _tmp33_;
	gchar* pluginpath;
	FsoFrameworkLogger* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_ = NULL;
	gchar* _tmp37_ = NULL;
	gchar* _tmp38_;
	gboolean _tmp39_ = FALSE;
	GList* _tmp40_;
	FsoFrameworkLogger* _tmp61_;
	GList* _tmp62_;
	guint _tmp63_ = 0U;
	gchar* _tmp64_ = NULL;
	gchar* _tmp65_;
	gchar* _tmp66_ = NULL;
	gchar* _tmp67_;
	gboolean _tmp68_ = FALSE;
	GList* _tmp69_;
	guint _tmp70_ = 0U;
	self = (FsoFrameworkAbstractSubsystem*) base;
	_tmp0_ = self->priv->_plugins;
	g_assert (_tmp0_ == NULL);
	__g_list_free__g_object_unref0_0 (self->priv->_plugins);
	self->priv->_plugins = NULL;
	_tmp1_ = fso_framework_smart_key_file_defaultKeyFile ();
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_name;
	_tmp4_ = fso_framework_smart_key_file_hasSection (_tmp2_, _tmp3_);
	_tmp5_ = !_tmp4_;
	_g_object_unref0 (_tmp2_);
	if (_tmp5_) {
		FsoFrameworkLogger* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_;
		_tmp6_ = self->logger;
		_tmp7_ = self->priv->_name;
		_tmp8_ = string_to_string (_tmp7_);
		_tmp9_ = g_strconcat ("No section for ", _tmp8_, " in configuration file. Not looking for plugins.", NULL);
		_tmp10_ = _tmp9_;
		fso_framework_logger_warning (_tmp6_, _tmp10_);
		_g_free0 (_tmp10_);
		result = (guint) 0;
		return result;
	}
	_tmp11_ = fso_framework_smart_key_file_defaultKeyFile ();
	_tmp12_ = _tmp11_;
	_tmp13_ = self->priv->_name;
	_tmp14_ = fso_framework_smart_key_file_boolValue (_tmp12_, _tmp13_, "disabled", FALSE);
	_tmp15_ = _tmp14_;
	_g_object_unref0 (_tmp12_);
	if (_tmp15_) {
		FsoFrameworkLogger* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_;
		_tmp16_ = self->logger;
		_tmp17_ = self->priv->_name;
		_tmp18_ = string_to_string (_tmp17_);
		_tmp19_ = g_strconcat ("Subsystem ", _tmp18_, " has been disabled in configuration file. Not looking for plugins.", NULL);
		_tmp20_ = _tmp19_;
		fso_framework_logger_info (_tmp16_, _tmp20_);
		_g_free0 (_tmp20_);
		result = (guint) 0;
		return result;
	}
	_tmp21_ = fso_framework_smart_key_file_defaultKeyFile ();
	_tmp22_ = _tmp21_;
	_tmp23_ = self->priv->_name;
	_tmp24_ = g_strconcat (_tmp23_, ".", NULL);
	_tmp25_ = _tmp24_;
	_tmp26_ = fso_framework_smart_key_file_sectionsWithPrefix (_tmp22_, _tmp25_);
	_tmp27_ = _tmp26_;
	_g_free0 (_tmp25_);
	_g_object_unref0 (_tmp22_);
	names = _tmp27_;
	_tmp28_ = g_build_filename (PACKAGE_LIBDIR, "modules", NULL);
	defaultpath = _tmp28_;
	_tmp29_ = fso_framework_smart_key_file_defaultKeyFile ();
	_tmp30_ = _tmp29_;
	_tmp31_ = defaultpath;
	_tmp32_ = fso_framework_smart_key_file_stringValue (_tmp30_, "cornucopia", "plugin_path", _tmp31_);
	_tmp33_ = _tmp32_;
	_g_object_unref0 (_tmp30_);
	pluginpath = _tmp33_;
	_tmp34_ = self->logger;
	_tmp35_ = pluginpath;
	_tmp36_ = string_to_string (_tmp35_);
	_tmp37_ = g_strconcat ("Pluginpath is ", _tmp36_, NULL);
	_tmp38_ = _tmp37_;
	_tmp39_ = fso_framework_logger_debug (_tmp34_, _tmp38_);
	g_assert (_tmp39_);
	_g_free0 (_tmp38_);
	_tmp40_ = names;
	{
		GList* name_collection = NULL;
		GList* name_it = NULL;
		name_collection = _tmp40_;
		for (name_it = name_collection; name_it != NULL; name_it = name_it->next) {
			gchar* _tmp41_;
			gchar* name = NULL;
			_tmp41_ = g_strdup ((const gchar*) name_it->data);
			name = _tmp41_;
			{
				const gchar* _tmp42_;
				const gchar* _tmp43_;
				gchar* _tmp44_;
				gchar* _tmp45_;
				gchar* _tmp46_ = NULL;
				gchar* _tmp47_;
				gchar* realname;
				gchar* filename = NULL;
				const gchar* _tmp48_;
				gboolean _tmp49_ = FALSE;
				const gchar* _tmp57_;
				FsoFrameworkBasePlugin* _tmp58_;
				FsoFrameworkBasePlugin* plugin;
				FsoFrameworkBasePlugin* _tmp59_;
				FsoFrameworkPlugin* _tmp60_;
				_tmp42_ = name;
				_tmp43_ = self->priv->_name;
				_tmp44_ = g_strconcat (_tmp43_, ".", NULL);
				_tmp45_ = _tmp44_;
				_tmp46_ = string_replace (_tmp42_, _tmp45_, "");
				_tmp47_ = _tmp46_;
				_g_free0 (_tmp45_);
				realname = _tmp47_;
				_tmp48_ = pluginpath;
				_tmp49_ = string_contains (_tmp48_, "./.libs");
				if (_tmp49_) {
					const gchar* _tmp50_;
					const gchar* _tmp51_;
					gchar* _tmp52_ = NULL;
					_tmp50_ = pluginpath;
					_tmp51_ = realname;
					_tmp52_ = g_strdup_printf (_tmp50_, _tmp51_);
					_g_free0 (filename);
					filename = _tmp52_;
				} else {
					const gchar* _tmp53_;
					const gchar* _tmp54_;
					const gchar* _tmp55_;
					gchar* _tmp56_ = NULL;
					_tmp53_ = pluginpath;
					_tmp54_ = self->priv->_name;
					_tmp55_ = realname;
					_tmp56_ = g_strdup_printf ("%s/%s/%s", _tmp53_, _tmp54_, _tmp55_);
					_g_free0 (filename);
					filename = _tmp56_;
				}
				_tmp57_ = filename;
				_tmp58_ = fso_framework_base_plugin_new (_tmp57_, (FsoFrameworkSubsystem*) self);
				plugin = _tmp58_;
				_tmp59_ = plugin;
				_tmp60_ = _g_object_ref0 ((FsoFrameworkPlugin*) _tmp59_);
				self->priv->_plugins = g_list_append (self->priv->_plugins, _tmp60_);
				_g_object_unref0 (plugin);
				_g_free0 (filename);
				_g_free0 (realname);
				_g_free0 (name);
			}
		}
	}
	_tmp61_ = self->logger;
	_tmp62_ = self->priv->_plugins;
	_tmp63_ = g_list_length (_tmp62_);
	_tmp64_ = g_strdup_printf ("%u", _tmp63_);
	_tmp65_ = _tmp64_;
	_tmp66_ = g_strconcat ("Registered ", _tmp65_, " plugins", NULL);
	_tmp67_ = _tmp66_;
	_tmp68_ = fso_framework_logger_debug (_tmp61_, _tmp67_);
	g_assert (_tmp68_);
	_g_free0 (_tmp67_);
	_g_free0 (_tmp65_);
	_tmp69_ = self->priv->_plugins;
	_tmp70_ = g_list_length (_tmp69_);
	result = _tmp70_;
	_g_free0 (pluginpath);
	_g_free0 (defaultpath);
	__g_list_free__g_free0_0 (names);
	return result;
}


static guint fso_framework_abstract_subsystem_real_loadPlugins (FsoFrameworkSubsystem* base) {
	FsoFrameworkAbstractSubsystem * self;
	guint result = 0U;
	guint counter;
	GList* _tmp0_;
	GError * _inner_error_ = NULL;
	self = (FsoFrameworkAbstractSubsystem*) base;
	counter = (guint) 0;
	_tmp0_ = self->priv->_plugins;
	{
		GList* plugin_collection = NULL;
		GList* plugin_it = NULL;
		plugin_collection = _tmp0_;
		for (plugin_it = plugin_collection; plugin_it != NULL; plugin_it = plugin_it->next) {
			FsoFrameworkPlugin* _tmp1_;
			FsoFrameworkPlugin* plugin = NULL;
			_tmp1_ = _g_object_ref0 ((FsoFrameworkPlugin*) plugin_it->data);
			plugin = _tmp1_;
			{
				{
					FsoFrameworkPlugin* _tmp2_;
					guint _tmp3_;
					_tmp2_ = plugin;
					fso_framework_plugin_loadAndInit (_tmp2_, &_inner_error_);
					if (_inner_error_ != NULL) {
						if (_inner_error_->domain == FSO_FRAMEWORK_PLUGIN_ERROR) {
							goto __catch3_fso_framework_plugin_error;
						}
						_g_object_unref0 (plugin);
						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);
						g_clear_error (&_inner_error_);
						return 0U;
					}
					_tmp3_ = counter;
					counter = _tmp3_ + 1;
				}
				goto __finally3;
				__catch3_fso_framework_plugin_error:
				{
					GError* e = NULL;
					FsoFrameworkLogger* _tmp4_;
					GError* _tmp5_;
					const gchar* _tmp6_;
					const gchar* _tmp7_ = NULL;
					gchar* _tmp8_ = NULL;
					gchar* _tmp9_;
					e = _inner_error_;
					_inner_error_ = NULL;
					_tmp4_ = self->logger;
					_tmp5_ = e;
					_tmp6_ = _tmp5_->message;
					_tmp7_ = string_to_string (_tmp6_);
					_tmp8_ = g_strconcat ("Could not load plugin: ", _tmp7_, NULL);
					_tmp9_ = _tmp8_;
					fso_framework_logger_warning (_tmp4_, _tmp9_);
					_g_free0 (_tmp9_);
					_g_error_free0 (e);
				}
				__finally3:
				if (_inner_error_ != NULL) {
					_g_object_unref0 (plugin);
					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);
					g_clear_error (&_inner_error_);
					return 0U;
				}
				_g_object_unref0 (plugin);
			}
		}
	}
	result = counter;
	return result;
}


static gchar* fso_framework_abstract_subsystem_real_name (FsoFrameworkSubsystem* base) {
	FsoFrameworkAbstractSubsystem * self;
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (FsoFrameworkAbstractSubsystem*) base;
	_tmp0_ = self->priv->_name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


static gpointer _fso_framework_plugin_info_dup0 (gpointer self) {
	return self ? fso_framework_plugin_info_dup (self) : NULL;
}


static void _fso_framework_plugin_info_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (fso_framework_plugin_info_free (var), NULL));
}


static void _g_list_free__fso_framework_plugin_info_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _fso_framework_plugin_info_free0_, NULL);
	g_list_free (self);
}


static GList* fso_framework_abstract_subsystem_real_pluginsInfo (FsoFrameworkSubsystem* base) {
	FsoFrameworkAbstractSubsystem * self;
	GList* result = NULL;
	GList* list;
	GList* _tmp0_;
	self = (FsoFrameworkAbstractSubsystem*) base;
	list = NULL;
	_tmp0_ = self->priv->_plugins;
	{
		GList* plugin_collection = NULL;
		GList* plugin_it = NULL;
		plugin_collection = _tmp0_;
		for (plugin_it = plugin_collection; plugin_it != NULL; plugin_it = plugin_it->next) {
			FsoFrameworkPlugin* _tmp1_;
			FsoFrameworkPlugin* plugin = NULL;
			_tmp1_ = _g_object_ref0 ((FsoFrameworkPlugin*) plugin_it->data);
			plugin = _tmp1_;
			{
				FsoFrameworkPlugin* _tmp2_;
				FsoFrameworkPluginInfo _tmp3_ = {0};
				FsoFrameworkPluginInfo _tmp4_;
				FsoFrameworkPluginInfo* _tmp5_;
				_tmp2_ = plugin;
				fso_framework_plugin_info (_tmp2_, &_tmp3_);
				_tmp4_ = _tmp3_;
				_tmp5_ = _fso_framework_plugin_info_dup0 (&_tmp4_);
				list = g_list_append (list, _tmp5_);
				fso_framework_plugin_info_destroy (&_tmp4_);
				_g_object_unref0 (plugin);
			}
		}
	}
	result = list;
	return result;
}


static void fso_framework_abstract_subsystem_real_registerObjectForService (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj) {
	g_return_if_fail (servicename != NULL);
	g_return_if_fail (objectpath != NULL);
	g_assert_not_reached ();
}


void fso_framework_abstract_subsystem_registerObjectForService (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj) {
	g_return_if_fail (self != NULL);
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_GET_CLASS (self)->registerObjectForService (self, t_type, t_dup_func, t_destroy_func, servicename, objectpath, obj);
}


static void fso_framework_abstract_subsystem_real_registerObjectForServiceWithPrefix (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefixpath, gconstpointer obj) {
	g_return_if_fail (servicename != NULL);
	g_return_if_fail (prefixpath != NULL);
	g_assert_not_reached ();
}


void fso_framework_abstract_subsystem_registerObjectForServiceWithPrefix (FsoFrameworkAbstractSubsystem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefixpath, gconstpointer obj) {
	g_return_if_fail (self != NULL);
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_GET_CLASS (self)->registerObjectForServiceWithPrefix (self, t_type, t_dup_func, t_destroy_func, servicename, prefixpath, obj);
}


static gboolean fso_framework_abstract_subsystem_real_registerServiceObjectWithPrefix (FsoFrameworkAbstractSubsystem* self, const gchar* servicename, const gchar* prefix, GObject* obj) {
	gboolean result = FALSE;
	g_return_val_if_fail (servicename != NULL, FALSE);
	g_return_val_if_fail (prefix != NULL, FALSE);
	g_return_val_if_fail (obj != NULL, FALSE);
	g_assert_not_reached ();
	return result;
}


gboolean fso_framework_abstract_subsystem_registerServiceObjectWithPrefix (FsoFrameworkAbstractSubsystem* self, const gchar* servicename, const gchar* prefix, GObject* obj) {
	g_return_val_if_fail (self != NULL, FALSE);
	return FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_GET_CLASS (self)->registerServiceObjectWithPrefix (self, servicename, prefix, obj);
}


static GObject** fso_framework_abstract_subsystem_real_allObjectsWithPrefix (FsoFrameworkAbstractSubsystem* self, const gchar* prefix, int* result_length1) {
	GObject** result = NULL;
	g_assert_not_reached ();
	return result;
}


GObject** fso_framework_abstract_subsystem_allObjectsWithPrefix (FsoFrameworkAbstractSubsystem* self, const gchar* prefix, int* result_length1) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_GET_CLASS (self)->allObjectsWithPrefix (self, prefix, result_length1);
}


static void fso_framework_abstract_subsystem_real_shutdown (FsoFrameworkSubsystem* base) {
	FsoFrameworkAbstractSubsystem * self;
	GList* _tmp0_;
	self = (FsoFrameworkAbstractSubsystem*) base;
	_tmp0_ = self->priv->_plugins;
	{
		GList* plugin_collection = NULL;
		GList* plugin_it = NULL;
		plugin_collection = _tmp0_;
		for (plugin_it = plugin_collection; plugin_it != NULL; plugin_it = plugin_it->next) {
			FsoFrameworkPlugin* _tmp1_;
			FsoFrameworkPlugin* plugin = NULL;
			_tmp1_ = _g_object_ref0 ((FsoFrameworkPlugin*) plugin_it->data);
			plugin = _tmp1_;
			{
				FsoFrameworkPlugin* _tmp2_;
				_tmp2_ = plugin;
				fso_framework_plugin_shutdown (_tmp2_);
				_g_object_unref0 (plugin);
			}
		}
	}
}


static void fso_framework_abstract_subsystem_class_init (FsoFrameworkAbstractSubsystemClass * klass) {
	fso_framework_abstract_subsystem_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FsoFrameworkAbstractSubsystemPrivate));
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_CLASS (klass)->registerObjectForService = fso_framework_abstract_subsystem_real_registerObjectForService;
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_CLASS (klass)->registerObjectForServiceWithPrefix = fso_framework_abstract_subsystem_real_registerObjectForServiceWithPrefix;
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_CLASS (klass)->registerServiceObjectWithPrefix = fso_framework_abstract_subsystem_real_registerServiceObjectWithPrefix;
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_CLASS (klass)->allObjectsWithPrefix = fso_framework_abstract_subsystem_real_allObjectsWithPrefix;
	G_OBJECT_CLASS (klass)->finalize = fso_framework_abstract_subsystem_finalize;
}


static void fso_framework_abstract_subsystem_fso_framework_subsystem_interface_init (FsoFrameworkSubsystemIface * iface) {
	fso_framework_abstract_subsystem_fso_framework_subsystem_parent_iface = g_type_interface_peek_parent (iface);
	iface->registerPlugins = (guint (*)(FsoFrameworkSubsystem*)) fso_framework_abstract_subsystem_real_registerPlugins;
	iface->loadPlugins = (guint (*)(FsoFrameworkSubsystem*)) fso_framework_abstract_subsystem_real_loadPlugins;
	iface->name = (gchar* (*)(FsoFrameworkSubsystem*)) fso_framework_abstract_subsystem_real_name;
	iface->pluginsInfo = (GList* (*)(FsoFrameworkSubsystem*)) fso_framework_abstract_subsystem_real_pluginsInfo;
	iface->registerObjectForService = (void (*)(FsoFrameworkSubsystem*, GType, GBoxedCopyFunc, GDestroyNotify, const gchar*, const gchar*, gconstpointer)) fso_framework_abstract_subsystem_registerObjectForService;
	iface->registerObjectForServiceWithPrefix = (void (*)(FsoFrameworkSubsystem*, GType, GBoxedCopyFunc, GDestroyNotify, const gchar*, const gchar*, gconstpointer)) fso_framework_abstract_subsystem_registerObjectForServiceWithPrefix;
	iface->allObjectsWithPrefix = (GObject** (*)(FsoFrameworkSubsystem*, const gchar*, int*)) fso_framework_abstract_subsystem_allObjectsWithPrefix;
	iface->shutdown = (void (*)(FsoFrameworkSubsystem*)) fso_framework_abstract_subsystem_real_shutdown;
}


static void fso_framework_abstract_subsystem_instance_init (FsoFrameworkAbstractSubsystem * self) {
	self->priv = FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_GET_PRIVATE (self);
}


static void fso_framework_abstract_subsystem_finalize (GObject* obj) {
	FsoFrameworkAbstractSubsystem * self;
	self = FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM (obj);
	_g_object_unref0 (self->logger);
	_g_free0 (self->priv->_name);
	__g_list_free__g_object_unref0_0 (self->priv->_plugins);
	G_OBJECT_CLASS (fso_framework_abstract_subsystem_parent_class)->finalize (obj);
}


/**
 * AbstractSubsystem
 */
GType fso_framework_abstract_subsystem_get_type (void) {
	static volatile gsize fso_framework_abstract_subsystem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_framework_abstract_subsystem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoFrameworkAbstractSubsystemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_framework_abstract_subsystem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoFrameworkAbstractSubsystem), 0, (GInstanceInitFunc) fso_framework_abstract_subsystem_instance_init, NULL };
		static const GInterfaceInfo fso_framework_subsystem_info = { (GInterfaceInitFunc) fso_framework_abstract_subsystem_fso_framework_subsystem_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType fso_framework_abstract_subsystem_type_id;
		fso_framework_abstract_subsystem_type_id = g_type_register_static (G_TYPE_OBJECT, "FsoFrameworkAbstractSubsystem", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (fso_framework_abstract_subsystem_type_id, FSO_FRAMEWORK_TYPE_SUBSYSTEM, &fso_framework_subsystem_info);
		g_once_init_leave (&fso_framework_abstract_subsystem_type_id__volatile, fso_framework_abstract_subsystem_type_id);
	}
	return fso_framework_abstract_subsystem_type_id__volatile;
}


FsoFrameworkBaseSubsystem* fso_framework_base_subsystem_construct (GType object_type, const gchar* name) {
	FsoFrameworkBaseSubsystem * self = NULL;
	const gchar* _tmp0_;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = name;
	self = (FsoFrameworkBaseSubsystem*) fso_framework_abstract_subsystem_construct (object_type, _tmp0_);
	return self;
}


FsoFrameworkBaseSubsystem* fso_framework_base_subsystem_new (const gchar* name) {
	return fso_framework_base_subsystem_construct (FSO_FRAMEWORK_TYPE_BASE_SUBSYSTEM, name);
}


static void fso_framework_base_subsystem_class_init (FsoFrameworkBaseSubsystemClass * klass) {
	fso_framework_base_subsystem_parent_class = g_type_class_peek_parent (klass);
}


static void fso_framework_base_subsystem_instance_init (FsoFrameworkBaseSubsystem * self) {
}


/**
 * BaseSubsystem
 */
GType fso_framework_base_subsystem_get_type (void) {
	static volatile gsize fso_framework_base_subsystem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_framework_base_subsystem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoFrameworkBaseSubsystemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_framework_base_subsystem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoFrameworkBaseSubsystem), 0, (GInstanceInitFunc) fso_framework_base_subsystem_instance_init, NULL };
		GType fso_framework_base_subsystem_type_id;
		fso_framework_base_subsystem_type_id = g_type_register_static (FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM, "FsoFrameworkBaseSubsystem", &g_define_type_info, 0);
		g_once_init_leave (&fso_framework_base_subsystem_type_id__volatile, fso_framework_base_subsystem_type_id);
	}
	return fso_framework_base_subsystem_type_id__volatile;
}


FsoFrameworkDBusExportObject* fso_framework_dbus_export_object_construct (GType object_type) {
	FsoFrameworkDBusExportObject* self = NULL;
	self = (FsoFrameworkDBusExportObject*) g_type_create_instance (object_type);
	return self;
}


FsoFrameworkDBusExportObject* fso_framework_dbus_export_object_new (void) {
	return fso_framework_dbus_export_object_construct (FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT);
}


static void fso_framework_value_dbus_export_object_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void fso_framework_value_dbus_export_object_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		fso_framework_dbus_export_object_unref (value->data[0].v_pointer);
	}
}


static void fso_framework_value_dbus_export_object_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = fso_framework_dbus_export_object_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer fso_framework_value_dbus_export_object_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* fso_framework_value_dbus_export_object_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		FsoFrameworkDBusExportObject* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = fso_framework_dbus_export_object_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* fso_framework_value_dbus_export_object_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FsoFrameworkDBusExportObject** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = fso_framework_dbus_export_object_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* fso_framework_param_spec_dbus_export_object (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	FsoFrameworkParamSpecDBusExportObject* spec;
	g_return_val_if_fail (g_type_is_a (object_type, FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer fso_framework_value_get_dbus_export_object (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT), NULL);
	return value->data[0].v_pointer;
}


void fso_framework_value_set_dbus_export_object (GValue* value, gpointer v_object) {
	FsoFrameworkDBusExportObject* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		fso_framework_dbus_export_object_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		fso_framework_dbus_export_object_unref (old);
	}
}


void fso_framework_value_take_dbus_export_object (GValue* value, gpointer v_object) {
	FsoFrameworkDBusExportObject* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FSO_FRAMEWORK_TYPE_DBUS_EXPORT_OBJECT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		fso_framework_dbus_export_object_unref (old);
	}
}


static void fso_framework_dbus_export_object_class_init (FsoFrameworkDBusExportObjectClass * klass) {
	fso_framework_dbus_export_object_parent_class = g_type_class_peek_parent (klass);
	FSO_FRAMEWORK_DBUS_EXPORT_OBJECT_CLASS (klass)->finalize = fso_framework_dbus_export_object_finalize;
}


static void fso_framework_dbus_export_object_instance_init (FsoFrameworkDBusExportObject * self) {
	self->ref_count = 1;
}


static void fso_framework_dbus_export_object_finalize (FsoFrameworkDBusExportObject* obj) {
	FsoFrameworkDBusExportObject * self;
	self = FSO_FRAMEWORK_DBUS_EXPORT_OBJECT (obj);
	_g_object_unref0 (self->object);
	self->refids = (g_free (self->refids), NULL);
}


/**
 * DBusExportObject
 **/
GType fso_framework_dbus_export_object_get_type (void) {
	static volatile gsize fso_framework_dbus_export_object_type_id__volatile = 0;
	if (g_once_init_enter (&fso_framework_dbus_export_object_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { fso_framework_value_dbus_export_object_init, fso_framework_value_dbus_export_object_free_value, fso_framework_value_dbus_export_object_copy_value, fso_framework_value_dbus_export_object_peek_pointer, "p", fso_framework_value_dbus_export_object_collect_value, "p", fso_framework_value_dbus_export_object_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FsoFrameworkDBusExportObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_framework_dbus_export_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoFrameworkDBusExportObject), 0, (GInstanceInitFunc) fso_framework_dbus_export_object_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType fso_framework_dbus_export_object_type_id;
		fso_framework_dbus_export_object_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FsoFrameworkDBusExportObject", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&fso_framework_dbus_export_object_type_id__volatile, fso_framework_dbus_export_object_type_id);
	}
	return fso_framework_dbus_export_object_type_id__volatile;
}


gpointer fso_framework_dbus_export_object_ref (gpointer instance) {
	FsoFrameworkDBusExportObject* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void fso_framework_dbus_export_object_unref (gpointer instance) {
	FsoFrameworkDBusExportObject* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		FSO_FRAMEWORK_DBUS_EXPORT_OBJECT_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


FsoFrameworkDBusSubsystem* fso_framework_dbus_subsystem_construct (GType object_type, const gchar* name) {
	FsoFrameworkDBusSubsystem * self = NULL;
	const gchar* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	GeeHashMap* _tmp3_;
	GeeHashSet* _tmp4_;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = name;
	self = (FsoFrameworkDBusSubsystem*) fso_framework_abstract_subsystem_construct (object_type, _tmp0_);
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GEE_TYPE_ARRAY_LIST, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->refids);
	self->priv->refids = _tmp1_;
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_OBJECT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->dbusobjects);
	self->priv->dbusobjects = _tmp2_;
	_tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->counters);
	self->priv->counters = _tmp3_;
	_tmp4_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
	_g_object_unref0 (self->priv->busnames);
	self->priv->busnames = _tmp4_;
	return self;
}


FsoFrameworkDBusSubsystem* fso_framework_dbus_subsystem_new (const gchar* name) {
	return fso_framework_dbus_subsystem_construct (FSO_FRAMEWORK_TYPE_DBUS_SUBSYSTEM, name);
}


static void fso_framework_dbus_subsystem_ensureConnection (FsoFrameworkDBusSubsystem* self) {
	GDBusConnection* _tmp0_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->connection;
	if (_tmp0_ == NULL) {
		FsoFrameworkLogger* _tmp1_;
		gboolean _tmp2_ = FALSE;
		GDBusConnection* _tmp11_;
		_tmp1_ = ((FsoFrameworkAbstractSubsystem*) self)->logger;
		_tmp2_ = fso_framework_logger_debug (_tmp1_, "Connection not present yet; creating.");
		g_assert (_tmp2_);
		{
			GDBusConnection* _tmp3_ = NULL;
			GDBusConnection* _tmp4_;
			_tmp3_ = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &_inner_error_);
			_tmp4_ = _tmp3_;
			if (_inner_error_ != NULL) {
				goto __catch4_g_error;
			}
			_g_object_unref0 (self->priv->connection);
			self->priv->connection = _tmp4_;
		}
		goto __finally4;
		__catch4_g_error:
		{
			GError* e = NULL;
			FsoFrameworkLogger* _tmp5_;
			GError* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_ = NULL;
			gchar* _tmp9_ = NULL;
			gchar* _tmp10_;
			e = _inner_error_;
			_inner_error_ = NULL;
			_tmp5_ = ((FsoFrameworkAbstractSubsystem*) self)->logger;
			_tmp6_ = e;
			_tmp7_ = _tmp6_->message;
			_tmp8_ = string_to_string (_tmp7_);
			_tmp9_ = g_strconcat ("Could not connect to DBus System bus: ", _tmp8_, ". dbus-daemon started?", NULL);
			_tmp10_ = _tmp9_;
			fso_framework_logger_critical (_tmp5_, _tmp10_);
			_g_free0 (_tmp10_);
			exit (-1);
			_g_error_free0 (e);
		}
		__finally4:
		if (_inner_error_ != NULL) {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp11_ = self->priv->connection;
		g_assert (_tmp11_ != NULL);
	}
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void block1_data_unref (Block1Data* _data1_) {
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		_g_object_unref0 (_data1_->self);
		_g_free0 (_data1_->servicename);
		g_slice_free (Block1Data, _data1_);
	}
}


static void ____lambda0_ (Block1Data* _data1_, GDBusConnection* conn, const gchar* name) {
	FsoFrameworkDBusSubsystem * self;
	FsoFrameworkLogger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_;
	gboolean _tmp5_ = FALSE;
	const gchar* _tmp6_;
	self = _data1_->self;
	g_return_if_fail (conn != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = ((FsoFrameworkAbstractSubsystem*) self)->logger;
	_tmp1_ = name;
	_tmp2_ = string_to_string (_tmp1_);
	_tmp3_ = g_strconcat ("Successfully claimed ", _tmp2_, NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = fso_framework_logger_debug (_tmp0_, _tmp4_);
	g_assert (_tmp5_);
	_g_free0 (_tmp4_);
	_tmp6_ = _data1_->servicename;
	g_signal_emit_by_name ((FsoFrameworkSubsystem*) self, "service-name-acquired", _tmp6_);
}


static void _____lambda0__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
	____lambda0_ (self, connection, name);
}


static void ____lambda1_ (Block1Data* _data1_) {
	FsoFrameworkDBusSubsystem * self;
	FsoFrameworkLogger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_;
	self = _data1_->self;
	_tmp0_ = ((FsoFrameworkAbstractSubsystem*) self)->logger;
	_tmp1_ = _data1_->servicename;
	_tmp2_ = string_to_string (_tmp1_);
	_tmp3_ = g_strconcat ("Can't claim busname ", _tmp2_, NULL);
	_tmp4_ = _tmp3_;
	fso_framework_logger_critical (_tmp0_, _tmp4_);
	_g_free0 (_tmp4_);
	exit (-1);
}


static void _____lambda1__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
	____lambda1_ (self);
}


void fso_framework_dbus_subsystem_exportBusnames (FsoFrameworkDBusSubsystem* self) {
	g_return_if_fail (self != NULL);
	{
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_ = NULL;
		GeeIterator* _servicename_it;
		_tmp0_ = self->priv->busnames;
		_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp0_);
		_servicename_it = _tmp1_;
		while (TRUE) {
			Block1Data* _data1_;
			GeeIterator* _tmp2_;
			gboolean _tmp3_ = FALSE;
			GeeIterator* _tmp4_;
			gpointer _tmp5_ = NULL;
			GDBusConnection* _tmp6_;
			const gchar* _tmp7_;
			_data1_ = g_slice_new0 (Block1Data);
			_data1_->_ref_count_ = 1;
			_data1_->self = g_object_ref (self);
			_tmp2_ = _servicename_it;
			_tmp3_ = gee_iterator_next (_tmp2_);
			if (!_tmp3_) {
				block1_data_unref (_data1_);
				_data1_ = NULL;
				break;
			}
			_tmp4_ = _servicename_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			_data1_->servicename = (gchar*) _tmp5_;
			_tmp6_ = self->priv->connection;
			_tmp7_ = _data1_->servicename;
			g_bus_own_name_on_connection_with_closures (_tmp6_, _tmp7_, 0, (GClosure*) ((_____lambda0__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _____lambda0__gbus_name_acquired_callback, block1_data_ref (_data1_), block1_data_unref)), (GClosure*) ((_____lambda1__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _____lambda1__gbus_name_lost_callback, block1_data_ref (_data1_), block1_data_unref)));
			block1_data_unref (_data1_);
			_data1_ = NULL;
		}
		_g_object_unref0 (_servicename_it);
	}
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void block2_data_unref (Block2Data* _data2_) {
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		_g_object_unref0 (_data2_->self);
		g_slice_free (Block2Data, _data2_);
	}
}


static guint _vala_g_dbus_connection_register_object (GType type, void* object, GDBusConnection* connection, const gchar* path, GError** error) {
	void *func;
	func = g_type_get_qdata (type, g_quark_from_static_string ("vala-dbus-register-object"));
	if (!func) {
		g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "The specified type does not support D-Bus registration");
		return 0;
	}
	return ((guint (*) (void *, GDBusConnection *, const gchar *, GError **)) func) (object, connection, path, error);
}


static gboolean ___lambda2_ (Block2Data* _data2_) {
	FsoFrameworkDBusSubsystem * self;
	GType t_type;
	GBoxedCopyFunc t_dup_func;
	GDestroyNotify t_destroy_func;
	gboolean result = FALSE;
	self = _data2_->self;
	t_type = _data2_->t_type;
	t_dup_func = _data2_->t_dup_func;
	t_destroy_func = _data2_->t_destroy_func;
	fso_framework_dbus_subsystem_exportBusnames (self);
	result = FALSE;
	return result;
}


static gboolean ____lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda2_ (self);
	return result;
}


static void fso_framework_dbus_subsystem_real_registerObjectForService (FsoFrameworkAbstractSubsystem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* objectpath, gconstpointer obj) {
	FsoFrameworkDBusSubsystem * self;
	Block2Data* _data2_;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_;
	gchar* cleanedname;
	FsoFrameworkLogger* _tmp29_;
	const gchar* _tmp30_ = NULL;
	const gchar* _tmp31_ = NULL;
	const gchar* _tmp32_;
	const gchar* _tmp33_ = NULL;
	gchar* _tmp34_ = NULL;
	gchar* _tmp35_;
	gboolean _tmp36_ = FALSE;
	GeeHashSet* _tmp37_;
	const gchar* _tmp38_;
	guint _tmp39_;
	GError * _inner_error_ = NULL;
	self = (FsoFrameworkDBusSubsystem*) base;
	g_return_if_fail (servicename != NULL);
	g_return_if_fail (objectpath != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_data2_->t_type = t_type;
	_data2_->t_dup_func = t_dup_func;
	_data2_->t_destroy_func = t_destroy_func;
	fso_framework_dbus_subsystem_ensureConnection (self);
	_tmp0_ = objectpath;
	_tmp1_ = string_replace (_tmp0_, "-", "_");
	_tmp2_ = _tmp1_;
	_tmp3_ = string_replace (_tmp2_, ":", "_");
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	cleanedname = _tmp4_;
	{
		GDBusConnection* _tmp5_;
		gconstpointer _tmp6_;
		guint _tmp7_ = 0U;
		guint refid;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		gpointer _tmp10_ = NULL;
		GeeArrayList* refidsForObject;
		GeeArrayList* _tmp11_;
		GeeArrayList* _tmp16_;
		GeeHashMap* _tmp17_;
		gconstpointer _tmp18_;
		_tmp5_ = self->priv->connection;
		_tmp6_ = obj;
		_tmp7_ = _vala_g_dbus_connection_register_object (t_type, _tmp6_, _tmp5_, cleanedname, &_inner_error_);
		refid = _tmp7_;
		if (_inner_error_ != NULL) {
			goto __catch5_g_error;
		}
		_tmp8_ = self->priv->refids;
		_tmp9_ = servicename;
		_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _tmp9_);
		refidsForObject = (GeeArrayList*) _tmp10_;
		_tmp11_ = refidsForObject;
		if (_tmp11_ == NULL) {
			GeeArrayList* _tmp12_;
			GeeHashMap* _tmp13_;
			const gchar* _tmp14_;
			GeeArrayList* _tmp15_;
			_tmp12_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL);
			_g_object_unref0 (refidsForObject);
			refidsForObject = _tmp12_;
			_tmp13_ = self->priv->refids;
			_tmp14_ = servicename;
			_tmp15_ = refidsForObject;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, _tmp14_, _tmp15_);
		}
		_tmp16_ = refidsForObject;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, GUINT_TO_POINTER (refid));
		_tmp17_ = self->priv->dbusobjects;
		_tmp18_ = obj;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp17_, cleanedname, G_OBJECT (_tmp18_));
		_g_object_unref0 (refidsForObject);
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e = NULL;
		FsoFrameworkLogger* _tmp19_;
		const gchar* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		const gchar* _tmp22_;
		const gchar* _tmp23_ = NULL;
		GError* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_ = NULL;
		gchar* _tmp27_ = NULL;
		gchar* _tmp28_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp19_ = ((FsoFrameworkAbstractSubsystem*) self)->logger;
		_tmp20_ = g_type_name (t_type);
		_tmp21_ = string_to_string (_tmp20_);
		_tmp22_ = objectpath;
		_tmp23_ = string_to_string (_tmp22_);
		_tmp24_ = e;
		_tmp25_ = _tmp24_->message;
		_tmp26_ = string_to_string (_tmp25_);
		_tmp27_ = g_strconcat ("Could not register ", _tmp21_, " at ", _tmp23_, ": ", _tmp26_, NULL);
		_tmp28_ = _tmp27_;
		fso_framework_logger_error (_tmp19_, _tmp28_);
		_g_free0 (_tmp28_);
		_g_error_free0 (e);
	}
	__finally5:
	if (_inner_error_ != NULL) {
		_g_free0 (cleanedname);
		block2_data_unref (_data2_);
		_data2_ = NULL;
		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);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp29_ = ((FsoFrameworkAbstractSubsystem*) self)->logger;
	_tmp30_ = g_type_name (t_type);
	_tmp31_ = string_to_string (_tmp30_);
	_tmp32_ = objectpath;
	_tmp33_ = string_to_string (_tmp32_);
	_tmp34_ = g_strconcat ("Registered ", _tmp31_, " at ", _tmp33_, NULL);
	_tmp35_ = _tmp34_;
	_tmp36_ = fso_framework_logger_debug (_tmp29_, _tmp35_);
	g_assert (_tmp36_);
	_g_free0 (_tmp35_);
	_tmp37_ = self->priv->busnames;
	_tmp38_ = servicename;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp37_, _tmp38_);
	_tmp39_ = self->priv->watch;
	if (_tmp39_ == ((guint) 0)) {
		guint _tmp40_ = 0U;
		_tmp40_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda2__gsource_func, block2_data_ref (_data2_), block2_data_unref);
		self->priv->watch = _tmp40_;
	}
	_g_free0 (cleanedname);
	block2_data_unref (_data2_);
	_data2_ = NULL;
}


static void fso_framework_dbus_subsystem_real_registerObjectForServiceWithPrefix (FsoFrameworkAbstractSubsystem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* servicename, const gchar* prefix, gconstpointer obj) {
	FsoFrameworkDBusSubsystem * self;
	const gchar* _tmp0_;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* hash;
	GeeHashMap* _tmp5_;
	gpointer _tmp6_ = NULL;
	gint counter;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_ = NULL;
	gint _tmp10_;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_;
	gconstpointer _tmp15_;
	GeeHashMap* _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	self = (FsoFrameworkDBusSubsystem*) base;
	g_return_if_fail (servicename != NULL);
	g_return_if_fail (prefix != NULL);
	_tmp0_ = servicename;
	_tmp1_ = string_to_string (_tmp0_);
	_tmp2_ = prefix;
	_tmp3_ = string_to_string (_tmp2_);
	_tmp4_ = g_strconcat (_tmp1_, ":", _tmp3_, NULL);
	hash = _tmp4_;
	_tmp5_ = self->priv->counters;
	_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, hash);
	counter = GPOINTER_TO_INT (_tmp6_);
	_tmp7_ = servicename;
	_tmp8_ = prefix;
	_tmp9_ = string_to_string (_tmp8_);
	_tmp10_ = counter;
	_tmp11_ = g_strdup_printf ("%i", _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_strconcat (_tmp9_, "/", _tmp12_, NULL);
	_tmp14_ = _tmp13_;
	_tmp15_ = obj;
	fso_framework_abstract_subsystem_registerObjectForService ((FsoFrameworkAbstractSubsystem*) self, t_type, (GBoxedCopyFunc) t_dup_func, t_destroy_func, _tmp7_, _tmp14_, _tmp15_);
	_g_free0 (_tmp14_);
	_g_free0 (_tmp12_);
	_tmp16_ = self->priv->counters;
	_tmp17_ = counter;
	counter = _tmp17_ + 1;
	_tmp18_ = counter;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, hash, _tmp18_);
	_g_free0 (hash);
}


GDBusConnection* fso_framework_dbus_subsystem_dbusConnection (FsoFrameworkDBusSubsystem* self) {
	GDBusConnection* result = NULL;
	GDBusConnection* _tmp0_;
	GDBusConnection* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	fso_framework_dbus_subsystem_ensureConnection (self);
	_tmp0_ = self->priv->connection;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


static void _vala_array_add1 (GObject*** array, int* length, int* size, GObject* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GObject*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static GObject** fso_framework_dbus_subsystem_real_allObjectsWithPrefix (FsoFrameworkAbstractSubsystem* base, const gchar* prefix, int* result_length1) {
	FsoFrameworkDBusSubsystem * self;
	GObject** result = NULL;
	GObject** _tmp0_ = NULL;
	GObject** _result_;
	gint _result__length1;
	gint __result__size_;
	GObject** _tmp21_;
	gint _tmp21__length1;
	self = (FsoFrameworkDBusSubsystem*) base;
	_tmp0_ = g_new0 (GObject*, 0 + 1);
	_result_ = _tmp0_;
	_result__length1 = 0;
	__result__size_ = _result__length1;
	{
		GeeHashMap* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeSet* _tmp4_;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_;
		GeeIterator* _objectname_it;
		_tmp1_ = self->priv->dbusobjects;
		_tmp2_ = gee_abstract_map_get_keys ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_objectname_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_;
			gboolean _tmp8_ = FALSE;
			GeeIterator* _tmp9_;
			gpointer _tmp10_ = NULL;
			gchar* objectname;
			gboolean _tmp11_ = FALSE;
			const gchar* _tmp12_;
			gboolean _tmp16_;
			_tmp7_ = _objectname_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _objectname_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			objectname = (gchar*) _tmp10_;
			_tmp12_ = prefix;
			if (_tmp12_ == NULL) {
				_tmp11_ = TRUE;
			} else {
				const gchar* _tmp13_;
				const gchar* _tmp14_;
				gboolean _tmp15_ = FALSE;
				_tmp13_ = objectname;
				_tmp14_ = prefix;
				_tmp15_ = g_str_has_prefix (_tmp13_, _tmp14_);
				_tmp11_ = _tmp15_;
			}
			_tmp16_ = _tmp11_;
			if (_tmp16_) {
				GObject** _tmp17_;
				gint _tmp17__length1;
				GeeHashMap* _tmp18_;
				const gchar* _tmp19_;
				gpointer _tmp20_ = NULL;
				_tmp17_ = _result_;
				_tmp17__length1 = _result__length1;
				_tmp18_ = self->priv->dbusobjects;
				_tmp19_ = objectname;
				_tmp20_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp18_, _tmp19_);
				_vala_array_add1 (&_result_, &_result__length1, &__result__size_, (GObject*) _tmp20_);
			}
			_g_free0 (objectname);
		}
		_g_object_unref0 (_objectname_it);
	}
	_tmp21_ = _result_;
	_tmp21__length1 = _result__length1;
	if (result_length1) {
		*result_length1 = _tmp21__length1;
	}
	result = _tmp21_;
	return result;
}


static void fso_framework_dbus_subsystem_class_init (FsoFrameworkDBusSubsystemClass * klass) {
	fso_framework_dbus_subsystem_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FsoFrameworkDBusSubsystemPrivate));
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_CLASS (klass)->registerObjectForService = fso_framework_dbus_subsystem_real_registerObjectForService;
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_CLASS (klass)->registerObjectForServiceWithPrefix = fso_framework_dbus_subsystem_real_registerObjectForServiceWithPrefix;
	FSO_FRAMEWORK_ABSTRACT_SUBSYSTEM_CLASS (klass)->allObjectsWithPrefix = fso_framework_dbus_subsystem_real_allObjectsWithPrefix;
	G_OBJECT_CLASS (klass)->finalize = fso_framework_dbus_subsystem_finalize;
}


static void fso_framework_dbus_subsystem_instance_init (FsoFrameworkDBusSubsystem * self) {
	self->priv = FSO_FRAMEWORK_DBUS_SUBSYSTEM_GET_PRIVATE (self);
}


static void fso_framework_dbus_subsystem_finalize (GObject* obj) {
	FsoFrameworkDBusSubsystem * self;
	self = FSO_FRAMEWORK_DBUS_SUBSYSTEM (obj);
	_g_object_unref0 (self->priv->connection);
	_g_object_unref0 (self->priv->refids);
	_g_object_unref0 (self->priv->dbusobjects);
	_g_object_unref0 (self->priv->counters);
	_g_object_unref0 (self->priv->busnames);
	G_OBJECT_CLASS (fso_framework_dbus_subsystem_parent_class)->finalize (obj);
}


/**
 * DBusSubsystem
 */
GType fso_framework_dbus_subsystem_get_type (void) {
	static volatile gsize fso_framework_dbus_subsystem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_framework_dbus_subsystem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoFrameworkDBusSubsystemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_framework_dbus_subsystem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoFrameworkDBusSubsystem), 0, (GInstanceInitFunc) fso_framework_dbus_subsystem_instance_init, NULL };
		GType fso_framework_dbus_subsystem_type_id;
		fso_framework_dbus_subsystem_type_id = g_type_register_static (FSO_FRAMEWORK_TYPE_ABSTRACT_SUBSYSTEM, "FsoFrameworkDBusSubsystem", &g_define_type_info, 0);
		g_once_init_leave (&fso_framework_dbus_subsystem_type_id__volatile, fso_framework_dbus_subsystem_type_id);
	}
	return fso_framework_dbus_subsystem_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}