summaryrefslogtreecommitdiff
path: root/src/poi-service/poi-common/poi-common-dbus-data-model-new-variant.h
blob: 764ab25324bd7edba69c604c3e8114473f18c9d7 (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
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
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
/**
* @licence app begin@
* SPDX-License-Identifier: MPL-2.0
*
* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
*
* \file poi-common-dbus-data-model.h
*
* \brief This file is part of the poi proof of concept.
*
* \author Philippe Colliot <philippe.colliot@mpsa.com>
*
* \version 1.1
*
* This Source Code Form is subject to the terms of the
* Mozilla Public License (MPL), v. 2.0.
* If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* For further information see http://www.genivi.org/.
*
* List of changes:
* 10-02-2014, Philippe Colliot, refinement and migration to the new repository
* <date>, <name>, <description of change>
*
* @licence end@
*/
#ifndef __POICOMMONDBUSDATAMODEL_H__
#define __POICOMMONDBUSDATAMODEL_H__

#include <stdbool.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <iostream>
#include <fstream>


#include <dbus-c++/dbus.h>

#include "poi-common-data-model.h"

/* How to
  The below classes are gateways between internal data and DBus data
  Internal access is provided by set and get
  DBus access is provided by setDBus and getDBus
  Code rules:
  if data name is MYNAME:
class DBus_MYNAME // DBus data type ex:(qqqs)
{
public:
    struct MYNAME_t //no class used into this public structure
    {
...
    };

    typedef ... DBus_MYNAME_t;

    DBus_MYNAME(){
...
    }

    ~DBus_MYNAME(){}

    void set(MYNAME_t value){
...
    }

    MYNAME_t get(){
...
        return(m_MYNAME);
    }

    void setDBus(DBus_MYNAME_t value){
...
    }

    DBus_MYNAME_t getDBus(){
        DBus_MYNAME_t return_value;
...
        return(return_value);
    }

private:
    MYNAME_t m_MYNAME;
};

*/

class DBus_dataFormatConverter
{
public:
    DBus_dataFormatConverter()
    {
    }
    ~ DBus_dataFormatConverter()
    {
    }
    DBus::Variant createVariantString(std::string str)
    {
        DBus::Variant var;
        DBus::MessageIter iter = var.writer();
        iter.append_string(str.c_str());
        return var;
    }

    DBus::Variant createVariantBool(bool value)
    {
        DBus::Variant var;
        DBus::MessageIter iter = var.writer();
        iter.append_bool(value);
        return var;
    }

    DBus::Variant createVariantUint16(uint16_t value)
    {
        DBus::Variant var;
        DBus::MessageIter iter = var.writer();
        iter.append_uint16(value);
        return var;
    }

    DBus::Variant createVariantInt32(int32_t value)
    {
        DBus::Variant var;
        DBus::MessageIter iter = var.writer();
        iter.append_int32(value);
        return var;
    }

    DBus::Variant createVariantArrayUint16(std::vector< uint16_t > value)
    {
        DBus::Variant var;
        DBus::MessageIter iter=var.writer();
        iter << value;
        return var;
    }

    DBus::Variant createVariantUint32(uint32_t value)
    {
        DBus::Variant var;
        DBus::MessageIter iter = var.writer();
        iter.append_uint32(value);
        return var;
    }

    DBus::Variant createVariantArrayUint32(std::vector< uint32_t > value)
    {
        DBus::Variant var;
        DBus::MessageIter iter=var.writer();
        iter << value;
        return var;
    }

};

class DBus_variantIcon : DBus_dataFormatConverter // (yv)
{
public:
    enum {
        AS_VECTOR_OF_ID = 0,
        AS_STRING = 1,
    };

    struct Icon_t
    {
        std::vector<resourceId_t> id;
        std::string url;
    };

    struct variantIcon_t
    {
        uint8_t index;
        Icon_t content;
    };

    typedef ::DBus::Struct< uint8_t, ::DBus::Variant > DBus_variantIcon_t;


    DBus_variantIcon(){
        m_variantIcon.index = AS_STRING;
        m_variantIcon.content.id.clear();
        m_variantIcon.content.url = "";
    }

    ~DBus_variantIcon(){}

    void set(variantIcon_t value){
        size_t index;

        m_variantIcon.index = value.index;
        switch (value.index) {
        case 0:
            m_variantIcon.content.id.clear();
            for (index=0;index<value.content.id.size();index++)
            {
                m_variantIcon.content.id.push_back(value.content.id.at(index));
            }
            break;
        case 1:
            m_variantIcon.content.url = value.content.url;
            break;
        default:
            break;
        }
    }

    variantIcon_t get(){
        return(m_variantIcon);
    }

    void setDBus(DBus_variantIcon_t value){
        size_t index;
        std::string *str;

        m_variantIcon.index = value._1;
        switch (value._1) {
        case 0:
            value._2.reader().get_array(str);
            m_variantIcon.content.id.clear();

            for (index=0;index<str->size();index++)
            {
                m_variantIcon.content.id.push_back(str->at(index));
            }
            break;
        case 1:
            m_variantIcon.content.url = value._2.reader().get_string();
            break;
        default:
            break;
        }
    }

    DBus_variantIcon_t getDBus(){
        size_t index;
        DBus_variantIcon_t return_value;

        return_value._1 = m_variantIcon.index;

        switch (m_variantIcon.index) {
        case 0:
            return_value._2.clear();
            for (index=0;index<m_variantIcon.content.id.size();index++)
            {
                return_value._2 = createVariantArrayUint32(m_variantIcon.content.id);
            }
            break;
        case 1:
            return_value._2 = createVariantString(m_variantIcon.content.url);
            break;
        default:
            break;
        }

        return(return_value);
    }

private:
    variantIcon_t m_variantIcon;
};

class DBus_variantMedia : DBus_dataFormatConverter // (yv)
{
public:
    enum {
        AS_VECTOR_OF_ID = 0,
        AS_STRING = 1,
    };

    struct Media_t
    {
        std::vector<resourceId_t> id;
        std::string url;
    };

    struct variantMedia_t
    {
        uint8_t index;
        Media_t content;
    };

    typedef ::DBus::Struct< uint8_t, ::DBus::Variant > DBus_variantMedia_t;

    DBus_variantMedia(){
        m_variantMedia.index = AS_STRING;
        m_variantMedia.content.id.clear();
        m_variantMedia.content.url = "";
    }

    ~DBus_variantMedia(){}

    void set(variantMedia_t value){
        size_t index;

        m_variantMedia.index = value.index;
        switch (value.index) {
        case 0:
            m_variantMedia.content.id.clear();
            for (index=0;index<value.content.id.size();index++)
            {
                m_variantMedia.content.id.push_back(value.content.id.at(index));
            }
            break;
        case 1:
            m_variantMedia.content.url = value.content.url;
            break;
        default:
            break;
        }
    }

    variantMedia_t get(){
        return(m_variantMedia);
    }

    void setDBus(DBus_variantMedia_t value){
        size_t index;
        std::string *str;

        m_variantMedia.index = value._1;
        switch (value._1) {
        case 0:
            value._2.reader().get_array(str);
            m_variantMedia.content.id.clear();

            for (index=0;index<str->size();index++)
            {
                m_variantMedia.content.id.push_back(str->at(index));
            }
            break;
        case 1:
            m_variantMedia.content.url = value._2.reader().get_string();
            break;
        default:
            break;
        }
    }

    DBus_variantMedia_t getDBus(){
        size_t index;
        DBus_variantMedia_t return_value;

        return_value._1 = m_variantMedia.index;

        switch (m_variantMedia.index) {
        case 0:
            return_value._2.clear();
            for (index=0;index<m_variantMedia.content.id.size();index++)
            {
                return_value._2 = createVariantArrayUint32(m_variantMedia.content.id);
            }
            break;
        case 1:
            return_value._2 = createVariantString(m_variantMedia.content.url);
            break;
        default:
            break;
        }

        return(return_value);
    }

private:
    variantMedia_t m_variantMedia;
};

class DBus_variantAttributeValue : DBus_dataFormatConverter // (yv)
{
public:
    enum {
        AS_INT32 = 0,
        AS_STRING = 1,
        AS_BOOL = 2
    };

    struct AttributeValue_t
    {
        int32_t intValue;
        std::string stringValue;
        bool boolValue;
    };

    struct variantAttributeValue_t
    {
        uint8_t index;
        AttributeValue_t content;
    };

    typedef ::DBus::Struct< uint8_t, ::DBus::Variant > DBus_variantAttributeValue_t;

    DBus_variantAttributeValue(){
        m_variantAttributeValue.index = AS_STRING;
        m_variantAttributeValue.content.intValue = 0;
        m_variantAttributeValue.content.stringValue = "";
        m_variantAttributeValue.content.boolValue = false;
    }

    ~DBus_variantAttributeValue(){}

    void set(variantAttributeValue_t value){

        m_variantAttributeValue.index = value.index;
        switch (value.index) {
        case 0:
            m_variantAttributeValue.content.intValue = value.content.intValue;
            break;
        case 1:
            m_variantAttributeValue.content.stringValue = value.content.stringValue;
            break;
        case 2:
            m_variantAttributeValue.content.boolValue = value.content.boolValue;
            break;
        default:
            break;
        }
    }

    variantAttributeValue_t get(){
        return(m_variantAttributeValue);
    }

    void setDBus(DBus_variantAttributeValue_t value){
        m_variantAttributeValue.index = value._1;
        switch (value._1) {
        case 0:
            m_variantAttributeValue.content.intValue = value._2.reader().get_int32();
            break;
        case 1:
            m_variantAttributeValue.content.stringValue = value._2.reader().get_string();
            break;
        case 2:
            m_variantAttributeValue.content.boolValue = value._2.reader().get_bool();
            break;
        default:
            break;
        }
    }

    DBus_variantAttributeValue_t getDBus(){
        DBus_variantAttributeValue_t return_value;

        return_value._1 = m_variantAttributeValue.index;

        switch (m_variantAttributeValue.index) {
        case 0:
            return_value._2 = createVariantInt32(m_variantAttributeValue.content.intValue);
            break;
        case 1:
            return_value._2 = createVariantString(m_variantAttributeValue.content.stringValue);
            break;
        case 2:
            return_value._2 = createVariantBool(m_variantAttributeValue.content.boolValue);
            break;
        default:
            break;
        }

        return(return_value);
    }

private:
    variantAttributeValue_t m_variantAttributeValue;
};

class DBus_version : DBus_dataFormatConverter // (qqqs)
{
public:
    struct version_t
    {
        ushort major;
        ushort minor;
        ushort micro;
        std::string date;
    };

    typedef ::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string > DBus_version_t;

    DBus_version(){
        m_version.major = 0;
        m_version.minor = 0;
        m_version.micro = 0;
        m_version.date = "";
    }

    ~DBus_version(){}

    void set(version_t value){
        m_version.major = value.major;
        m_version.minor = value.minor;
        m_version.micro = value.micro;
        m_version.date = value.date;
    }

    version_t get(){
        return(m_version);
    }

    void setDBus(DBus_version_t value){
        m_version.major = value._1;
        m_version.minor = value._2;
        m_version.micro = value._3;
        m_version.date = value._4;
    }

    DBus_version_t getDBus(){
        DBus_version_t return_value;
        return_value._1 = m_version.major;
        return_value._2 = m_version.minor;
        return_value._3 = m_version.micro;
        return_value._4 = m_version.date;
        return(return_value);
    }

private:
    version_t m_version;
};

class DBus_categoryDetails : DBus_dataFormatConverter // (uau(yv)sbs(yv))
{
public:
    struct categoryDetails_t
    {
        categoryId_t id; //Category unique id
        std::vector<categoryId_t> parents_id; //list of parent categories unique id
        DBus_variantIcon::variantIcon_t icons; //visual icons set
        std::string name;
        bool top_level; //false if predefined, true if created by plugin
        std::string description; //short category description (optional)
        DBus_variantMedia::variantMedia_t media; //media associated (html web site, audio, video, ...) (optional)
    };

    typedef ::DBus::Struct< uint32_t, std::vector< uint32_t >, ::DBus::Struct< uint8_t, ::DBus::Variant >, std::string, bool, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > DBus_categoryDetails_t;

    DBus_categoryDetails()
    {
        DBus_variantIcon icons;
        DBus_variantMedia media;

        m_categoryDetails.id = 0;
        m_categoryDetails.parents_id.clear();
        m_categoryDetails.icons = icons.get();
        m_categoryDetails.name = "";
        m_categoryDetails.top_level = true;
        m_categoryDetails.description = "";
        m_categoryDetails.media = media.get();
    }

    ~DBus_categoryDetails(){}

    void set(categoryDetails_t value)
    {
        size_t index;
        m_categoryDetails.id = value.id;
        m_categoryDetails.parents_id.clear();
        for (index=0;index<value.parents_id.size();index++)
        {
            m_categoryDetails.parents_id.push_back(value.parents_id.at(index));
        }
        m_categoryDetails.icons = value.icons;
        m_categoryDetails.name = value.name;
        m_categoryDetails.top_level = value.top_level;
        m_categoryDetails.description = value.description;
        m_categoryDetails.media = value.media;
    }

    categoryDetails_t get()
    {
        return(m_categoryDetails);
    }

    void setDBus(DBus_categoryDetails_t value)
    {
        size_t index;
        DBus_variantIcon icons;
        DBus_variantMedia media;

        m_categoryDetails.id =  value._1;
        m_categoryDetails.parents_id.clear();
        for (index=0;index<value._2.size();index++)
        {
            m_categoryDetails.parents_id.push_back(value._2.at(index));
        }
        icons.setDBus(value._3);
        m_categoryDetails.icons = icons.get();
        m_categoryDetails.name = value._4;
        m_categoryDetails.top_level = value._5;
        m_categoryDetails.description = value._6;
        media.setDBus(value._7);
        m_categoryDetails.media = media.get();
    }

    DBus_categoryDetails_t getDBus()
    {
        size_t index;
        DBus_variantIcon icons;
        DBus_variantMedia media;
        DBus_categoryDetails_t return_value;

        return_value._1 = m_categoryDetails.id;
        return_value._2.clear();
        for (index=0;index<m_categoryDetails.parents_id.size();index++)
        {
            return_value._2.push_back(m_categoryDetails.parents_id.at(index));
        }
        icons.set(m_categoryDetails.icons);
        return_value._3 = icons.getDBus();
        return_value._4 = m_categoryDetails.name;
        return_value._5 = m_categoryDetails.top_level;
        return_value._6 = m_categoryDetails.description;
        media.set(m_categoryDetails.media);
        return_value._7 = media.getDBus();
        return(return_value);
    }

private:
    categoryDetails_t m_categoryDetails;
};

class DBus_categoryOperator : DBus_dataFormatConverter // (is(yv))
{
public:
    struct categoryOperator_t
    {
        int32_t type; //attribute operator type enum(INVALID,MORE_THAN,LESS_THAN,EQUAL, ....)
        std::string name; //attribute operator name
        DBus_variantAttributeValue::variantAttributeValue_t value; //attribute operator value
    };

    typedef ::DBus::Struct< int32_t, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > DBus_categoryOperator_t;

    DBus_categoryOperator(){
        DBus_variantAttributeValue attributeValue;

        m_categoryOperator.type = 0;
        m_categoryOperator.name = "";
        m_categoryOperator.value = attributeValue.get();
    }

    ~DBus_categoryOperator(){
    }

    void set(categoryOperator_t value){
        m_categoryOperator.type = value.type;
        m_categoryOperator.name = value.name;
        m_categoryOperator.value = value.value;
    }

    categoryOperator_t get(){
        return(m_categoryOperator);
    }

    void setDBus(DBus_categoryOperator_t value){
        DBus_variantAttributeValue attributeValue;

        m_categoryOperator.type = value._1;
        m_categoryOperator.name = value._2;

        attributeValue.setDBus(value._3);
        m_categoryOperator.value = attributeValue.get();
    }

    DBus_categoryOperator_t getDBus(){
        DBus_categoryOperator_t return_value;
        DBus_variantAttributeValue attributeValue;

        return_value._1 = m_categoryOperator.type;
        return_value._2 = m_categoryOperator.name;

        attributeValue.set(m_categoryOperator.value);
        return_value._3 = attributeValue.getDBus();

        return(return_value);
    }

private:
    categoryOperator_t m_categoryOperator;
};

class DBus_categoryAttribute : DBus_dataFormatConverter // (usia(is(yv)))
{
public:
    struct categoryAttribute_t
    {
        attributeId_t id; //attribute unique id
        std::string name; //attribute unique name
        int32_t type; //enum(INVALID,STRING,INTEGER,COORDINATES ...)
        std::vector<DBus_categoryOperator::categoryOperator_t > oper;
    };

    typedef ::DBus::Struct< uint32_t, std::string, int32_t, std::vector< ::DBus::Struct< int32_t, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > DBus_categoryAttribute_t;

    DBus_categoryAttribute(){
        m_categoryAttribute.id = 0;
        m_categoryAttribute.name = "";
        m_categoryAttribute.type = 0;
        m_categoryAttribute.oper.clear();
    }

    ~DBus_categoryAttribute(){
    }

    void set(categoryAttribute_t value){
        size_t index;
        m_categoryAttribute.id = value.id;
        m_categoryAttribute.name = value.name;
        m_categoryAttribute.type = value.type;
        m_categoryAttribute.oper.clear();
        for (index=0;index<value.oper.size();index++)
        {
            m_categoryAttribute.oper.push_back(value.oper.at(index));
        }
    }

    categoryAttribute_t get(){
        return(m_categoryAttribute);
    }

    void setDBus(DBus_categoryAttribute_t value){
        size_t index;
        DBus_categoryOperator op;
        m_categoryAttribute.id = value._1;
        m_categoryAttribute.name = value._2;
        m_categoryAttribute.type = value._3;
        m_categoryAttribute.oper.clear();
        for (index=0;index<value._4.size();index++)
        {
            op.setDBus(value._4.at(index));
            m_categoryAttribute.oper.push_back(op.get());
        }
    }

    DBus_categoryAttribute_t getDBus(){
        DBus_categoryAttribute_t return_value;
        size_t index;
        DBus_categoryOperator op;
        return_value._1 = m_categoryAttribute.id;
        return_value._2 = m_categoryAttribute.name;
        return_value._3 = m_categoryAttribute.type;
        return_value._4.clear();
        for (index=0;index<m_categoryAttribute.oper.size();index++)
        {
            op.set(m_categoryAttribute.oper.at(index));
            return_value._4.push_back(op.getDBus());
        }
        return(return_value);
    }

private:
    categoryAttribute_t m_categoryAttribute;
};

class DBus_categorySortOption : DBus_dataFormatConverter // (us)
{
public:
    struct categorySortOption_t
    {
        uint32_t id; //enum(GENIVI_POISERVICE_SORT_DEFAULT,GENIVI_POISERVICE_SORT_BY_DISTANCE,GENIVI_POISERVICE_SORT_BY_TIME ... )
        std::string name; //name to be displayed by application
    };

    typedef ::DBus::Struct< uint32_t, std::string > DBus_categorySortOption_t;

    DBus_categorySortOption(){
        m_categorySortOption.id = 0;
        m_categorySortOption.name = "";
    }

    ~DBus_categorySortOption(){
    }

    void set(categorySortOption_t value){
        m_categorySortOption.id = value.id;
        m_categorySortOption.name = value.name;
    }

    categorySortOption_t get(){
        return(m_categorySortOption);
    }

    void setDBus(DBus_categorySortOption_t value){
        m_categorySortOption.id = value._1;
        m_categorySortOption.name = value._2;
    }

    DBus_categorySortOption_t getDBus(){
        DBus_categorySortOption_t return_value;
        return_value._1 = m_categorySortOption.id;
        return_value._2 = m_categorySortOption.name;
        return(return_value);
    }

private:
    categorySortOption_t m_categorySortOption;
};

class DBus_category : DBus_dataFormatConverter // ( (uau(yv)sbs(yv)) a(usia(is(yv))) a(us) )
{
public:
    struct category_t
    {
        DBus_categoryDetails::categoryDetails_t details;
        std::vector<DBus_categoryAttribute::categoryAttribute_t> attributes;
        std::vector<DBus_categorySortOption::categorySortOption_t> sortOptions;
    };

    typedef ::DBus::Struct< ::DBus::Struct< uint32_t, std::vector< uint32_t >, ::DBus::Struct< uint8_t, ::DBus::Variant >, std::string, bool, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > >, std::vector< ::DBus::Struct< uint32_t, std::string, int32_t, std::vector< ::DBus::Struct< int32_t, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > >, std::vector< ::DBus::Struct< uint32_t, std::string > > > DBus_category_t;

    DBus_category()
    {
        DBus_categoryDetails details;

        m_category.details = details.get();
        m_category.attributes.clear();
        m_category.sortOptions.clear();
    }

    ~ DBus_category(){}

    void set(category_t value)
    {
        size_t index;
        m_category.details = value.details;
        m_category.attributes.clear();
        for (index=0;index<value.attributes.size();index++)
        {
            m_category.attributes.push_back(value.attributes.at(index));
        }
        m_category.sortOptions.clear();
        for (index=0;index<value.sortOptions.size();index++)
        {
            m_category.sortOptions.push_back(value.sortOptions.at(index));
        }
    }

    category_t get()
    {
        return(m_category);
    }

    void setDBus(DBus_category_t value)
    {
        size_t index;
        DBus_categoryDetails details;
        DBus_categoryAttribute attrib;
        DBus_categorySortOption sortOption;

        details.setDBus(value._1);
        m_category.details = details.get();
        m_category.attributes.clear();
        for (index=0;index<value._2.size();index++)
        {
            attrib.setDBus(value._2.at(index));
            m_category.attributes.push_back(attrib.get());
        }
        m_category.sortOptions.clear();
        for (index=0;index<value._3.size();index++)
        {
            sortOption.setDBus(value._3.at(index));
            m_category.sortOptions.push_back(sortOption.get());
        }
    }

    DBus_category_t getDBus()
    {
        DBus_category_t return_value;
        size_t index;
        DBus_categoryDetails details;
        DBus_categoryAttribute attrib;
        DBus_categorySortOption sortOption;

        details.set(m_category.details);
        return_value._1 = details.getDBus();
        return_value._2.clear();
        for(index=0;index<m_category.attributes.size();index++)
        {
            attrib.set(m_category.attributes.at(index));
            return_value._2.push_back(attrib.getDBus());
        }
        return_value._3.clear();
        for(index=0;index<m_category.sortOptions.size();index++)
        {
            sortOption.set(m_category.sortOptions.at(index));
            return_value._3.push_back(sortOption.getDBus());
        }
        return(return_value);
    }

private:
    category_t m_category;
};

class DBus_categoryIdLevel : DBus_dataFormatConverter // (ub)
{
public:
    struct categoryIdLevel_t
    {
        categoryId_t id;
        bool top_level; //false if predefined, true if created by plugin
    };

    typedef ::DBus::Struct< uint32_t, bool > DBus_categoryIdLevel_t;


    DBus_categoryIdLevel(){
        m_categoryIdLevel.id = 0;
        m_categoryIdLevel.top_level = true;
    }

    ~DBus_categoryIdLevel(){}

    void set(categoryIdLevel_t value){
        m_categoryIdLevel.id = value.id;
        m_categoryIdLevel.top_level = value.top_level;
    }

    categoryIdLevel_t get(){
        return(m_categoryIdLevel);
    }

    void setDBus(DBus_categoryIdLevel_t value){
        m_categoryIdLevel.id = value._1;
        m_categoryIdLevel.top_level = value._2;
    }

    DBus_categoryIdLevel_t getDBus(){
        DBus_categoryIdLevel_t return_value;
        return_value._1 = m_categoryIdLevel.id;
        return_value._2 = m_categoryIdLevel.top_level;
        return(return_value);
    }

private:
    categoryIdLevel_t m_categoryIdLevel;
};

class DBus_categoryReason : DBus_dataFormatConverter // (uq)
{
public:
    struct categoryReason_t
    {
        categoryId_t id;
        ushort reason; //enum(ADDED,REMOVED,ATTR_ADDED,ATTR_MODIFIED,ATTR_REMOVED, ... )
    };

    typedef ::DBus::Struct< uint32_t,  uint16_t > DBus_categoryReason_t;


    DBus_categoryReason(){
        m_categoryReason.id = 0;
        m_categoryReason.reason = true;
    }

    ~DBus_categoryReason(){}

    void set(categoryReason_t value){
        m_categoryReason.id = value.id;
        m_categoryReason.reason = value.reason;
    }

    categoryReason_t get(){
        return(m_categoryReason);
    }

    void setDBus(DBus_categoryReason_t value){
        m_categoryReason.id = value._1;
        m_categoryReason.reason = value._2;
    }

    DBus_categoryReason_t getDBus(){
        DBus_categoryReason_t return_value;
        return_value._1 = m_categoryReason.id;
        return_value._2 = m_categoryReason.reason;
        return(return_value);
    }

private:
    categoryReason_t m_categoryReason;
};

class DBus_categoryIdName : DBus_categoryIdLevel // (usb)
{
public:

    struct categoryIdName_t
    {
        DBus_categoryIdLevel::categoryIdLevel_t id;
        std::string name;
    };

    typedef ::DBus::Struct< uint32_t, std::string, bool > DBus_categoryIdName_t;


    DBus_categoryIdName(){
        m_categoryIdName = "";
    }

    ~DBus_categoryIdName(){}

    void set(categoryIdName_t value){
        DBus_categoryIdLevel::set(value.id);
        m_categoryIdName = value.name;
    }

    categoryIdName_t get(){
        categoryIdName_t return_value;
        return_value.id = DBus_categoryIdLevel::get();
        return_value.name = m_categoryIdName;
        return(return_value);
    }

    void setDBus(DBus_categoryIdName_t value){
        DBus_categoryIdLevel::DBus_categoryIdLevel_t id;
        id._1 = value._1;
        id._2 = value._3;
        DBus_categoryIdLevel::setDBus(id);
        m_categoryIdName = value._2;
    }

    DBus_categoryIdName_t getDBus(){
        DBus_categoryIdName_t return_value;
        DBus_categoryIdLevel::DBus_categoryIdLevel_t id;
        id = DBus_categoryIdLevel::getDBus();
        return_value._1 = id._1;
        return_value._2 = m_categoryIdName;
        return_value._3 = id._2;
        return(return_value);
    }

private:
    std::string m_categoryIdName;
};

class DBus_categoryRadius : DBus_dataFormatConverter // (uu)
{
public:
    struct categoryRadius_t
    {
        categoryId_t id;
        uint radius;
    };

    typedef ::DBus::Struct< uint32_t, uint32_t > DBus_categoryRadius_t;

    DBus_categoryRadius(){
        m_categoryRadius.id = 0;
        m_categoryRadius.radius = 0;
    }

    ~DBus_categoryRadius(){}

    void set(categoryRadius_t value){
        m_categoryRadius.id = value.id;
        m_categoryRadius.radius = value.radius;
    }

    categoryRadius_t get(){
        return(m_categoryRadius);
    }

    void setDBus(DBus_categoryRadius_t value){
        m_categoryRadius.id = value._1;
        m_categoryRadius.radius = value._2;
    }

    DBus_categoryRadius_t getDBus(){
        DBus_categoryRadius_t return_value;
        return_value._1 = m_categoryRadius.id;
        return_value._2 = m_categoryRadius.radius;
        return(return_value);
    }

private:
    categoryRadius_t m_categoryRadius;
};

class DBus_poiAttribute : DBus_dataFormatConverter // (ui(yv))
{
public:
    struct poiAttribute_t
    {
        attributeId_t id;
        int32_t type;
        DBus_variantAttributeValue::variantAttributeValue_t value;
    };

    typedef ::DBus::Struct< uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant  > > DBus_poiAttribute_t;


    DBus_poiAttribute(){
        DBus_variantAttributeValue attributeValue;

        m_attribute.id = 0;
        m_attribute.type = 0;
        m_attribute.value = attributeValue.get();
    }

    ~DBus_poiAttribute(){}

    void set(poiAttribute_t value){
        DBus_variantAttributeValue attributeValue;

        m_attribute.id = value.id;
        m_attribute.type = value.type;
        attributeValue.set(value.value);
        m_attribute.value = attributeValue.get();
    }

    poiAttribute_t get(){
        return(m_attribute);
    }

    void setDBus(DBus_poiAttribute_t value){
        DBus_variantAttributeValue attributeValue;

        m_attribute.id = value._1;
        m_attribute.type = value._2;
        attributeValue.setDBus(value._3);
        m_attribute.value = attributeValue.get();
    }

    DBus_poiAttribute_t getDBus(){
        DBus_poiAttribute_t return_value;
        DBus_variantAttributeValue attributeValue;

        return_value._1 = m_attribute.id;
        return_value._2 = m_attribute.type;
        attributeValue.set(m_attribute.value);
        return_value._3 = attributeValue.getDBus();
        return(return_value);
    }

private:
    poiAttribute_t m_attribute;
};

class DBus_attributeDetails : DBus_poiAttribute //(uui(yv)ib)
{
public:
    struct attributeDetails_t
    {
        DBus_poiAttribute::poiAttribute_t attribute;
        categoryId_t categoryId; //Category unique id
        int32_t oper; //enum(INVALID,MORE_THAN,LESS_THAN,EQUAL, ....)
        bool mandatory; //true if the attribute is mandatory for the search and false for optional
    };

    typedef ::DBus::Struct< uint32_t, uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant >, int32_t, bool > DBus_attributeDetails_t;


    DBus_attributeDetails(){
        DBus_poiAttribute attribute;

        m_attributeDetails.attribute = attribute.get();
        m_attributeDetails.categoryId = 0;
        m_attributeDetails.oper = 0;
        m_attributeDetails.mandatory = true;
    }

    ~DBus_attributeDetails(){}

    void set(attributeDetails_t value){
        DBus_poiAttribute::set(value.attribute);
        m_attributeDetails.categoryId = value.categoryId;
        m_attributeDetails.oper = value.oper;
        m_attributeDetails.mandatory = value.mandatory;
    }

    attributeDetails_t get(){
        attributeDetails_t return_value;
        return_value.attribute = DBus_poiAttribute::get();
        return_value.categoryId = m_attributeDetails.categoryId;
        return_value.oper = m_attributeDetails.oper;
        return_value.mandatory = m_attributeDetails.mandatory;
        return(return_value);
    }

    void setDBus(DBus_attributeDetails_t value){
        DBus_poiAttribute::DBus_poiAttribute_t attribute;
        attribute._1 = value._1;
        attribute._2 = value._3;
        attribute._3 = value._4;
        DBus_poiAttribute::setDBus(attribute);
        m_attributeDetails.categoryId = value._2;
        m_attributeDetails.oper = value._5;
        m_attributeDetails.mandatory = value._6;
    }

    DBus_attributeDetails_t getDBus(){
        DBus_attributeDetails_t return_value;
        DBus_poiAttribute::DBus_poiAttribute_t attribute;
        attribute = DBus_poiAttribute::getDBus();
        return_value._1 = attribute._1;
        return_value._2 = m_attributeDetails.categoryId;
        return_value._3 = attribute._2;
        return_value._4 = attribute._3;
        return_value._5 = m_attributeDetails.oper;
        return_value._6 = m_attributeDetails.mandatory;
        return(return_value);
    }

private:
    attributeDetails_t m_attributeDetails;
};

class DBus_geoCoordinate3D : DBus_dataFormatConverter //(ddi)
{
public:
    struct geoCoordinate3D_t
    {
        double latitude;
        double longitude;
        int altitude;
    };
    typedef ::DBus::Struct< double, double, int32_t > DBus_geoCoordinate3D_t;

    DBus_geoCoordinate3D(){
        m_geoCoordinate3D.latitude = 48.85792; //by default center of Paris
        m_geoCoordinate3D.longitude = 2.3383145;
        m_geoCoordinate3D.altitude = 0;
    }

    ~DBus_geoCoordinate3D(){}

    void set(geoCoordinate3D_t value){
        m_geoCoordinate3D.latitude = value.latitude;
        m_geoCoordinate3D.longitude = value.longitude;
        m_geoCoordinate3D.altitude = value.altitude;
    }

    geoCoordinate3D_t get(){
        return(m_geoCoordinate3D);
    }

    void setDBus(DBus_geoCoordinate3D_t value){
        m_geoCoordinate3D.latitude = value._1;
        m_geoCoordinate3D.longitude = value._2;
        m_geoCoordinate3D.altitude = value._3;
    }

    DBus_geoCoordinate3D_t getDBus(){
        DBus_geoCoordinate3D_t return_value;
        return_value._1 = m_geoCoordinate3D.latitude;
        return_value._2 = m_geoCoordinate3D.longitude;
        return_value._3 = m_geoCoordinate3D.altitude;
        return(return_value);
    }

private:
    geoCoordinate3D_t m_geoCoordinate3D;
};

class DBus_poiDetails : DBus_dataFormatConverter //(us(ddi))
{
public:
    struct poiDetails_t
    {
        poiId_t id;
        std::string name;
        DBus_geoCoordinate3D::geoCoordinate3D_t location;
    };
    typedef ::DBus::Struct< uint32_t, std::string, ::DBus::Struct< double, double, int32_t > > DBus_poiDetails_t;

    DBus_poiDetails(){
        DBus_geoCoordinate3D loc;

        m_poiDetails.id = 0;
        m_poiDetails.name = "";
        m_poiDetails.location = loc.get();
    }

    ~DBus_poiDetails(){}

    void set(poiDetails_t value){
        m_poiDetails.id = value.id;
        m_poiDetails.name = value.name;
        m_poiDetails.location = value.location;
    }

    poiDetails_t get(){
        return(m_poiDetails);
    }

    void setDBus(DBus_poiDetails_t value){
        DBus_geoCoordinate3D loc;

        m_poiDetails.id = value._1;
        m_poiDetails.name = value._2;
        loc.setDBus(value._3);
        m_poiDetails.location = loc.get();
    }

    DBus_poiDetails_t getDBus(){
        DBus_geoCoordinate3D loc;
        DBus_poiDetails_t return_value;
        return_value._1 = m_poiDetails.id;
        return_value._2 = m_poiDetails.name;
        loc.set(m_poiDetails.location);
        return_value._3 = loc.getDBus();
        return(return_value);
    }

private:
    poiDetails_t m_poiDetails;
};

class DBus_searchResult : DBus_dataFormatConverter //(uuqa(ui(yv)))
{
public:
    struct searchResult_t
    {
        poiId_t id;
        uint distance;
        ushort route_status;
        std::vector<DBus_poiAttribute::poiAttribute_t> attributes;
    };

    typedef ::DBus::Struct< uint32_t, uint32_t, uint16_t, std::vector< ::DBus::Struct< uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > DBus_searchResult_t;

    DBus_searchResult(){
        m_searchResult.id = 0;
        m_searchResult.distance = 0;
        m_searchResult.route_status = 0;
        m_searchResult.attributes.clear();
    }

    ~DBus_searchResult(){
    }

    void set(searchResult_t value){
        size_t index;
        m_searchResult.id = value.id;
        m_searchResult.distance = value.distance;
        m_searchResult.route_status = value.route_status;
        m_searchResult.attributes.clear();
        for (index=0;index<value.attributes.size();index++)
        {
            m_searchResult.attributes.push_back(value.attributes.at(index));
        }
    }

    searchResult_t get(){
        return(m_searchResult);
    }

    void setDBus(DBus_searchResult_t value){
        size_t index;
        DBus_poiAttribute attrib;
        m_searchResult.id = value._1;
        m_searchResult.distance = value._2;
        m_searchResult.route_status = value._3;
        m_searchResult.attributes.clear();
        for (index=0;index<value._4.size();index++)
        {
            attrib.setDBus(value._4.at(index));
            m_searchResult.attributes.push_back(attrib.get());
        }
    }

    DBus_searchResult_t getDBus(){
        DBus_searchResult_t return_value;
        size_t index;
        DBus_poiAttribute attrib;
        return_value._1 = m_searchResult.id;
        return_value._2 = m_searchResult.distance;
        return_value._3 = m_searchResult.route_status;
        return_value._4.clear();
        for (index=0;index<m_searchResult.attributes.size();index++)
        {
            attrib.set(m_searchResult.attributes.at(index));
            return_value._4.push_back(attrib.getDBus());
        }
        return(return_value);
    }

private:
    searchResult_t m_searchResult;
};

class DBus_searchResultDetails : DBus_dataFormatConverter // ((us(ddi))aua(ui(yv)))
{
public:
    struct searchResultDetails_t
    {
        DBus_poiDetails::poiDetails_t details;
        std::vector<categoryId_t> categories;
        std::vector<DBus_poiAttribute::poiAttribute_t> attributes;
    };

    typedef ::DBus::Struct< ::DBus::Struct< uint32_t, std::string, ::DBus::Struct< double, double, int32_t > >, std::vector< uint32_t >, std::vector< ::DBus::Struct< uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > DBus_searchResultDetails_t;


    DBus_searchResultDetails(){
        DBus_poiDetails details;

        m_searchResultDetails.details = details.get();
        m_searchResultDetails.categories.clear();
        m_searchResultDetails.attributes.clear();
    }

    ~DBus_searchResultDetails(){}

    void set(searchResultDetails_t value){
        size_t index;
        m_searchResultDetails.details = value.details;
        m_searchResultDetails.categories.clear();
        for (index=0;index<value.categories.size();index++)
        {
            m_searchResultDetails.categories.push_back(value.categories.at(index));
        }
        m_searchResultDetails.attributes.clear();
        for (index=0;index<value.attributes.size();index++)
        {
            m_searchResultDetails.attributes.push_back(value.attributes.at(index));
        }
    }

    searchResultDetails_t get(){
        return(m_searchResultDetails);
    }

    void setDBus(DBus_searchResultDetails_t value){
        size_t index;
        DBus_poiDetails details;
        DBus_poiAttribute attrib;

        details.setDBus(value._1);
        m_searchResultDetails.details = details.get();
        m_searchResultDetails.categories.clear();
        for (index=0;index<value._2.size();index++)
        {
            m_searchResultDetails.categories.push_back(value._2.at(index));
        }
        m_searchResultDetails.attributes.clear();
        for (index=0;index<value._3.size();index++)
        {
            attrib.setDBus(value._3.at(index));
            m_searchResultDetails.attributes.push_back(attrib.get());
        }
    }

    DBus_searchResultDetails_t getDBus(){
        DBus_searchResultDetails_t return_value;
        size_t index;
        DBus_poiDetails details;
        DBus_poiAttribute attrib;

        details.set(m_searchResultDetails.details);
        return_value._1 = details.getDBus();
        return_value._2.clear();
        for (index=0;index<m_searchResultDetails.categories.size();index++)
        {
            return_value._2.push_back(m_searchResultDetails.categories.at(index));
        }
        return_value._3.clear();
        for (index=0;index<m_searchResultDetails.attributes.size();index++)
        {
            attrib.set(m_searchResultDetails.attributes.at(index));
            return_value._3.push_back(attrib.getDBus());
        }

        return(return_value);
    }

private:
    searchResultDetails_t m_searchResultDetails;
};

class DBus_poiCAMDetails : DBus_dataFormatConverter // (usq(ddi)qa(ui(yv)))
{
public:
    struct poiCAMDetails_t
    {
        poiId_t source_id;
        std::string name;
        categoryId_t category;
        DBus_geoCoordinate3D::geoCoordinate3D_t location;
        ushort distance;
        std::vector<DBus_poiAttribute::poiAttribute_t> attributes;
    };

    typedef ::DBus::Struct< uint32_t, std::string, uint32_t, ::DBus::Struct< double, double, int32_t >, uint16_t, std::vector< ::DBus::Struct< uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > DBus_poiCAMDetails_t;

    DBus_poiCAMDetails(){
        DBus_geoCoordinate3D loc;

        m_poiCAMDetails.source_id = 0;
        m_poiCAMDetails.name = "";
        m_poiCAMDetails.category = 0;
        m_poiCAMDetails.location = loc.get();
        m_poiCAMDetails.distance = 0;
        m_poiCAMDetails.attributes.clear();
    }

    ~DBus_poiCAMDetails(){}

    void set(poiCAMDetails_t value){
        size_t index;

        m_poiCAMDetails.source_id = value.source_id;
        m_poiCAMDetails.name = value.name;
        m_poiCAMDetails.category = value.category;
        m_poiCAMDetails.location = value.location;
        m_poiCAMDetails.distance = value.distance;
        m_poiCAMDetails.attributes.clear();
        for (index=0;index<value.attributes.size();index++)
        {
            m_poiCAMDetails.attributes.push_back(value.attributes.at(index));
        }
    }

    poiCAMDetails_t get(){
        return(m_poiCAMDetails);
    }

    void setDBus(DBus_poiCAMDetails_t value){
        size_t index;
        DBus_geoCoordinate3D loc;
        DBus_poiAttribute attrib;

        m_poiCAMDetails.source_id = value._1;
        m_poiCAMDetails.name = value._2;
        m_poiCAMDetails.category = value._3;
        loc.setDBus(value._4);
        m_poiCAMDetails.location = loc.get();
        m_poiCAMDetails.distance = value._5,
        m_poiCAMDetails.attributes.clear();
        for (index=0;index<value._6.size();index++)
        {
            attrib.setDBus(value._6.at(index));
            m_poiCAMDetails.attributes.push_back(attrib.get());
        }
    }

    DBus_poiCAMDetails_t getDBus(){
        DBus_poiCAMDetails_t return_value;
        size_t index;
        DBus_geoCoordinate3D loc;
        DBus_poiAttribute attrib;

        return_value._1 = m_poiCAMDetails.source_id;
        return_value._2 = m_poiCAMDetails.name;
        return_value._3 = m_poiCAMDetails.category;
        loc.set(m_poiCAMDetails.location);
        return_value._4 = loc.getDBus();
        return_value._5 = m_poiCAMDetails.distance;
        return_value._6.clear();
        for (index=0;index<m_poiCAMDetails.attributes.size();index++)
        {
            attrib.set(m_poiCAMDetails.attributes.at(index));
            return_value._6.push_back(attrib.getDBus());
        }
        return(return_value);
    }

private:
    poiCAMDetails_t m_poiCAMDetails;
};

class DBus_CAMcategoryDetails : DBus_dataFormatConverter // (au(yv)ss(yv))
{
public:
    struct CAMcategoryDetails_t
    {
        std::vector<categoryId_t> parents_id;
        DBus_variantIcon::variantIcon_t icons;
        std::string name;
        std::string short_desc;
        DBus_variantMedia::variantMedia_t media;
    };

    typedef ::DBus::Struct< std::vector< uint32_t >, ::DBus::Struct< uint8_t, ::DBus::Variant >, std::string, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > DBus_CAMcategoryDetails_t;

    DBus_CAMcategoryDetails(){
        DBus_variantIcon icons;
        DBus_variantMedia media;

        m_CAMcategoryDetails.parents_id.clear();
        m_CAMcategoryDetails.icons = icons.get();
        m_CAMcategoryDetails.name = "";
        m_CAMcategoryDetails.short_desc = "";
        m_CAMcategoryDetails.media = media.get();
    }

    ~DBus_CAMcategoryDetails(){}

    void set(CAMcategoryDetails_t value){
        size_t index;

        m_CAMcategoryDetails.parents_id.clear();
        for (index=0;index<value.parents_id.size();index++)
        {
            m_CAMcategoryDetails.parents_id.push_back(value.parents_id.at(index));
        }
        m_CAMcategoryDetails.icons = value.icons;
        m_CAMcategoryDetails.name = value.name;
        m_CAMcategoryDetails.short_desc = value.short_desc;
        m_CAMcategoryDetails.media = value.media;
    }

   CAMcategoryDetails_t get(){
        return(m_CAMcategoryDetails);
    }

    void setDBus(DBus_CAMcategoryDetails_t value){
        size_t index;
        DBus_variantIcon icons;
        DBus_variantMedia media;

        m_CAMcategoryDetails.parents_id.clear();
        for (index=0;index<value._1.size();index++)
        {
            m_CAMcategoryDetails.parents_id.push_back(value._1.at(index));
        }

        icons.setDBus(value._2);
        m_CAMcategoryDetails.icons = icons.get();

        m_CAMcategoryDetails.name = value._3;
        m_CAMcategoryDetails.short_desc = value._4;

        media.setDBus(value._5);
        m_CAMcategoryDetails.media = media.get();
    }

    DBus_CAMcategoryDetails_t getDBus(){
        DBus_CAMcategoryDetails_t return_value;
        size_t index;
        DBus_variantIcon icons;
        DBus_variantMedia media;

        return_value._1.clear();
        for (index=0;index<m_CAMcategoryDetails.parents_id.size();index++)
        {
            return_value._1.push_back(m_CAMcategoryDetails.parents_id.at(index));
        }

        icons.set(m_CAMcategoryDetails.icons);
        return_value._2 = icons.getDBus();
        return_value._3 = m_CAMcategoryDetails.name;
        return_value._4 = m_CAMcategoryDetails.short_desc;

        media.set(m_CAMcategoryDetails.media);
        return_value._5 = media.getDBus();
        return(return_value);
    }

private:
    CAMcategoryDetails_t m_CAMcategoryDetails;
};

class DBus_CAMcategory : DBus_dataFormatConverter // ((au(yv)ss(yv))a(usia(is(yv)))a(us)) -->in this implementation, the variant data is string
{
public:
    struct CAMcategory_t //no class used into this public structure
    {
        DBus_CAMcategoryDetails::CAMcategoryDetails_t details;
        std::vector<DBus_categoryAttribute::categoryAttribute_t> attributes;
        std::vector<DBus_categorySortOption::categorySortOption_t> sortOptions;
    };

    typedef ::DBus::Struct< ::DBus::Struct< std::vector< uint32_t >, ::DBus::Struct< uint8_t, ::DBus::Variant >, std::string, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > >, std::vector< ::DBus::Struct< uint32_t, std::string, int32_t, std::vector< ::DBus::Struct< int32_t, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > >, std::vector< ::DBus::Struct< uint32_t, std::string > > > DBus_CAMcategory_t;

    DBus_CAMcategory(){
        DBus_CAMcategoryDetails details;
        DBus_categoryAttribute attrib;
        DBus_categorySortOption sortOption;

        m_CAMcategory.details = details.get();
        m_CAMcategory.attributes.clear();
        m_CAMcategory.sortOptions.clear();
    }

    ~DBus_CAMcategory(){}

    void set(CAMcategory_t value){
        size_t index;
        m_CAMcategory.details = value.details;
        m_CAMcategory.attributes.clear();
        for (index=0;index<value.attributes.size();index++)
        {
            m_CAMcategory.attributes.push_back(value.attributes.at(index));
        }
        m_CAMcategory.sortOptions.clear();
        for (index=0;index<value.sortOptions.size();index++)
        {
            m_CAMcategory.sortOptions.push_back(value.sortOptions.at(index));
        }
    }

    CAMcategory_t get(){
        return(m_CAMcategory);
    }

    void setDBus(DBus_CAMcategory_t value){
        size_t index;
        DBus_CAMcategoryDetails details;
        DBus_categoryAttribute attrib;
        DBus_categorySortOption sortOption;

        details.setDBus(value._1);
        m_CAMcategory.details = details.get();
        m_CAMcategory.attributes.clear();
        for (index=0;index<value._2.size();index++)
        {
            attrib.setDBus(value._2.at(index));
            m_CAMcategory.attributes.push_back(attrib.get());
        }
        m_CAMcategory.sortOptions.clear();
        for (index=0;index<value._3.size();index++)
        {
            sortOption.setDBus(value._3.at(index));
            m_CAMcategory.sortOptions.push_back(sortOption.get());
        }
    }

    DBus_CAMcategory_t getDBus(){
        DBus_CAMcategory_t return_value;
        size_t index;
        DBus_CAMcategoryDetails details;
        DBus_categoryAttribute attrib;
        DBus_categorySortOption sortOption;

        details.set(m_CAMcategory.details);
        return_value._1 = details.getDBus();
        return_value._2.clear();
        for(index=0;index<m_CAMcategory.attributes.size();index++)
        {
            attrib.set(m_CAMcategory.attributes.at(index));
            return_value._2.push_back(attrib.getDBus());
        }
        return_value._3.clear();
        for(index=0;index<m_CAMcategory.sortOptions.size();index++)
        {
            sortOption.set(m_CAMcategory.sortOptions.at(index));
            return_value._3.push_back(sortOption.getDBus());
        }
        return(return_value);
    }

private:
    CAMcategory_t m_CAMcategory;
};

class DBus_CAMcategoryUpdate : DBus_dataFormatConverter // (ua(usia(is(yv)))a(us))
{
public:
    struct CAMcategoryUpdate_t
    {
        categoryId_t unique_id;
        std::vector<DBus_categoryAttribute::categoryAttribute_t> attributes;
        std::vector<DBus_categorySortOption::categorySortOption_t> sortOptions;
    };

    typedef ::DBus::Struct< uint32_t, std::vector< ::DBus::Struct< uint32_t, std::string, int32_t, std::vector< ::DBus::Struct< int32_t, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > >, std::vector< ::DBus::Struct< uint32_t, std::string > > > DBus_CAMcategoryUpdate_t;

    DBus_CAMcategoryUpdate(){
        m_CAMcategoryUpdate.unique_id = 0;
        m_CAMcategoryUpdate.attributes.clear();
        m_CAMcategoryUpdate.sortOptions.clear();
    }

    ~DBus_CAMcategoryUpdate(){}

    void set(CAMcategoryUpdate_t value){
        size_t index;
        m_CAMcategoryUpdate.unique_id = value.unique_id;
        m_CAMcategoryUpdate.attributes.clear();
        for (index=0;index<value.attributes.size();index++)
        {
            m_CAMcategoryUpdate.attributes.push_back(value.attributes.at(index));
        }
        m_CAMcategoryUpdate.sortOptions.clear();
        for (index=0;index<value.sortOptions.size();index++)
        {
            m_CAMcategoryUpdate.sortOptions.push_back(value.sortOptions.at(index));
        }
    }

    CAMcategoryUpdate_t get(){
        return(m_CAMcategoryUpdate);
    }

    void setDBus(DBus_CAMcategoryUpdate_t value){
        size_t index;
        DBus_categoryAttribute attrib;
        DBus_categorySortOption sortOption;

        m_CAMcategoryUpdate.unique_id = value._1;
        m_CAMcategoryUpdate.attributes.clear();
        for (index=0;index<value._2.size();index++)
        {
            attrib.setDBus(value._2.at(index));
            m_CAMcategoryUpdate.attributes.push_back(attrib.get());
        }
        m_CAMcategoryUpdate.sortOptions.clear();
        for (index=0;index<value._3.size();index++)
        {
            sortOption.setDBus(value._3.at(index));
            m_CAMcategoryUpdate.sortOptions.push_back(sortOption.get());
        }
    }

    DBus_CAMcategoryUpdate_t getDBus(){
        DBus_CAMcategoryUpdate_t return_value;
        size_t index;
        DBus_categoryAttribute attrib;
        DBus_categorySortOption sortOption;

        return_value._1 = m_CAMcategoryUpdate.unique_id;
        return_value._2.clear();
        for(index=0;index<m_CAMcategoryUpdate.attributes.size();index++)
        {
            attrib.set(m_CAMcategoryUpdate.attributes.at(index));
            return_value._2.push_back(attrib.getDBus());
        }
        return_value._3.clear();
        for(index=0;index<m_CAMcategoryUpdate.sortOptions.size();index++)
        {
            sortOption.set(m_CAMcategoryUpdate.sortOptions.at(index));
            return_value._3.push_back(sortOption.getDBus());
        }
        return(return_value);
    }

private:
    CAMcategoryUpdate_t m_CAMcategoryUpdate;
};

class DBus_PoiAddedDetails : DBus_dataFormatConverter // (s(ddi)a(ui(yv)))
{
public:
    struct PoiAddedDetails_t
    {
        std::string name;
        DBus_geoCoordinate3D::geoCoordinate3D_t location;
        std::vector<DBus_poiAttribute::poiAttribute_t> attributes;
    };

    typedef ::DBus::Struct< std::string, ::DBus::Struct< double, double, int32_t >, std::vector< ::DBus::Struct< uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > DBus_PoiAddedDetails_t;


    DBus_PoiAddedDetails(){
        DBus_geoCoordinate3D loc;

        m_PoiAddedDetails.name = "";
        m_PoiAddedDetails.location = loc.get();
        m_PoiAddedDetails.attributes.clear();
    }

    ~DBus_PoiAddedDetails(){}

    void set(PoiAddedDetails_t value){
        size_t index;
        m_PoiAddedDetails.name = value.name;
        m_PoiAddedDetails.location = value.location;

        m_PoiAddedDetails.attributes.clear();
        for (index=0;index<value.attributes.size();index++)
        {
            m_PoiAddedDetails.attributes.push_back(value.attributes.at(index));
        }
    }

    PoiAddedDetails_t get(){
        return(m_PoiAddedDetails);
    }

    void setDBus(DBus_PoiAddedDetails_t value){
        DBus_geoCoordinate3D loc;
        size_t index;
        DBus_poiAttribute attrib;

        m_PoiAddedDetails.name = value._1;
        loc.setDBus(value._2);
        m_PoiAddedDetails.location = loc.get();

        m_PoiAddedDetails.attributes.clear();
        for (index=0;index<value._3.size();index++)
        {
            attrib.setDBus(value._3.at(index));
            m_PoiAddedDetails.attributes.push_back(attrib.get());
        }
    }

    DBus_PoiAddedDetails_t getDBus(){
        DBus_PoiAddedDetails_t return_value;
        size_t index;
        DBus_poiAttribute attrib;
        DBus_geoCoordinate3D loc;

        return_value._1 = m_PoiAddedDetails.name;

        loc.set(m_PoiAddedDetails.location);
        return_value._2 = loc.getDBus();

        return_value._3.clear();
        for (index=0;index<m_PoiAddedDetails.attributes.size();index++)
        {
            attrib.set(m_PoiAddedDetails.attributes.at(index));
            return_value._3.push_back(attrib.getDBus());
        }

        return(return_value);
    }

private:
    PoiAddedDetails_t m_PoiAddedDetails;
};


#endif