summaryrefslogtreecommitdiffstats
path: root/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_if.h
blob: 44ef8542556648dbc4eb11c3fd179efb802fb7a8 (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
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
/*
 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

///////////////////////////////////////////////////////////////////////////////
// tag_NSFramework
// Application framework's interface header file.
//
// The interfaces exposed here are
//    - Application framework Dispatcher
//      - attaching/detaching service protocol callbacks
//      - attaching/detaching notification callbacks
//    - Message Center
//      - send messaging to services/clients
//      - read the incoming message information
//    - Service Directory
//      - open and close a service
//      - register/unregister a service
//    - Notification & Persistence Service
//      - register/unregister and publish a notification
//      - subscribe/unsubscribe to a notification
//
/////////////////////////////////////////////////////////////////////////////
//@{
/**
 * @file frameworkunified_framework_if.h
 * @brief \~english Application framework's interface header file.
 *
 */
/** @addtogroup BaseSystem
 *  @{
 */
/** @addtogroup native_service
 *  @ingroup BaseSystem
 *  @{
 */
/** @addtogroup framework_unified
 *  @ingroup Native_service
 *  @{
 */
/** @addtogroup framework
 *  @ingroup native_service
 *  @{
 */
#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__  // NOLINT  (build/header_guard)
#define __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__

#include <native_service/frameworkunified_types.h>
#include <native_service/frameworkunified_framework_types.h>
#include <native_service/frameworkunified_service_protocol.h>
#include <native_service/ns_shared_mem_if.h>
#include <native_service/ns_np_service.h>
///////////////////////////////////
// To avoid integration build break: removing dependency on SM framework.
// #include <native_service/frameworkunified_sm_hsmframework.h>

// QUICK FIX Files added here, which was included by frameworkunified_sm_hsmframework.h
// if we simply comment frameworkunified_sm_hsmframework.h inclusion, then other modules build may
// break, if they are not including below files explicitly and was relying of frameworkunified_framework_if.h.
#include <native_service/ns_timer_if.h>
#include <native_service/ns_message_center_if.h>
#include <native_service/ns_logger_if.h>
#include <map>
#include <string>
#include <vector>
///////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////
//    Dispatcher functions
////////////////////////////////////////////////////////////////////////////////////////////



/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachCallbacksToDispatcher
/// \~english @par Brief
///       API to register multiple Callback-informations to the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pServiceName
///        PCSTR    - Pointer to the service name
/// \~english @param [in] pMsgHandler
///        FrameworkunifiedProtocolCallbackHandler*    - Pointer to the Message Handler structure
/// \~english @param [in] uiHandlerCount
///        UI_32     - Message Handler count(1 to 4294967295)
/// \~english @param [in] hSession
///        HANDLE    - Session handle (Default:NULL)
/// \~english @par
///        FrameworkunifiedProtocolCallbackHandler Structure
/// \~english @code
///            typedef struct _FrameworkunifiedProtocolCallbackHandler
///            {
///                  /* Command ID/request ID/approval ID  of protocol on the service */
///                  UI_32 iCmd;
///                  /* Pointer to Callback function that would be called on receiving iCmd from pServiceName. */
///                  CbFuncPtr callBack;
///            }FrameworkunifiedProtocolCallbackHandler;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
///       - Message Handler number specified in the argument is 0.  [eFrameworkunifiedStatusInvldParam]
///       - NULL Callback function pointer of the Message Handler structure specified by the argument.
///       [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///       Register multiple Callback-informations(iCmd,CbFuncPtr) of the service that has been specified by the argument
///       \n
///       to the Dispatcher.\n
///       Thus, if the iCmd is requested from the service, so the appropriate Callback function is called. \n
///       When multiple registration, if an error occurs in the second and subsequent, becomes effective only \n
///       information that has been registered so far. \n
///       For number of upper limit of the registration possible message handler, depending on \n
///       the securable size as the area of the message handler structure. Therefore, note to ensure \n
///       the size of the area of the message handler structure at the call side of API, and define \n
///       the number of message handler.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
///         the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
///       - It is not possible to register more than one callback with the same command ID (iCmd) for the same service/session ID,
///         and the callback function will win.
///       - Operatio is not guaranteed if the number of elements of the array indicated by the address of the pointer (pMsgHandler)
///         to the message handler structure does not match the number of arrays specified by the number of
///         party-specified message hadlers (uiHandlerCount).
///       - The callback information is registered to the heap.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                 FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
///                 FrameworkunifiedDetachServiceFromDispatcher
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedAttachCallbacksToDispatcher(HANDLE hApp, PCSTR pServiceName,
                                          const FrameworkunifiedProtocolCallbackHandler *pMsgHandler,
                                          UI_32 uiHandlerCount, HANDLE hSession = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachCallbackToDispatcher
/// \~english @par Brief
///       API to register a Callback-information to the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @param [in] pServiceName
///        PCSTR    - Pointer to the service name
/// \~english @param [in] iCmd
///        UI_32    - Command ID/request ID/approval ID  of protocol on the service
/// \~english @param [in] fpOnCmd
///        CbFuncPtr  - Pointer to Callback function that would be called on receiving iCmd from pServiceName.
/// \~english @param [in] hSession
///        HANDLE    - Session handle (Default:NULL)
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
///       - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///       Register a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
///       to the Dispatcher.\n
///       Thus, if the iCmd is requested from the service, so the appropriate Callback function is called.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
///         the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.
///       - The callback information is registered to the heap.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                 FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
///                 FrameworkunifiedDetachServiceFromDispatcher
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedAttachCallbackToDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, CbFuncPtr fpOnCmd,
                                         HANDLE hSession = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachCallbacksToDispatcherWithFd
/// \~english @par Brief
///       API to register multiple Callback and file descriptor set to the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] handlers
///        FrameworkunifiedFdProtocolCallbackHandler*  - Pointer to the Message Handler structure to be registered
/// \~english @param [in] handlerCount
///        UI_32  - Message Handler Count(1 to 4294967295)
/// \~english @par
///        FrameworkunifiedFdProtocolCallbackHandler Structure
/// \~english @code
///            typedef struct _FrameworkunifiedFdProtocolCallbackHandler
///            {
///                  int fd;               /* File descriptor for message waiting control */
///                  CbFuncPtr callBack;   /*  Pointer to Callback function               */
///            }FrameworkunifiedFdProtocolCallbackHandler;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Pointer (handlers) to the Message Handler structure of the registration object specified in the argument is
///       NULL. [eFrameworkunifiedStatusInvldParam]
///       - Message Handler number of registered specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
///       - File descriptor in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler) specified in the argument is
///       incorrect(If fd is less than or equal to 0). [eFrameworkunifiedStatusInvldParam]
///       - Pointer(fpOnCmd) to the Callback function in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler)
///       specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
///       - File descriptor specified in the argument is incorrect(If fd is less than or equal to 0).
///       [eFrameworkunifiedStatusInvldParam]
///       - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
///       - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
///       appropriate. [eFrameworkunifiedStatusFail]
///       - File descriptor in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler) specified in the argument is
///       already registered to the monitoring control(epoll_ctl). [eFrameworkunifiedStatusFail]
///       - It failed to add the file descriptor of the message waiting control to the monitoring of epoll_ctl().
///       [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Register multiple callbacks that link to file descriptor that has been specified by the argument to
///       the Dispatcher.\n
///       For epoll_ctl() of Dispatcher, add multiple file descriptor for the specified message waiting control \n
///       by the argument.\n
///       Thus, for the file descriptor registered in the message waiting control, when receiving a message, \n
///       so the appropriate Callback function is called. \n
///       When multiple registration, if an error occurs in the second and subsequent, becomes effective only \n
///       information that has been registered so far. \n
///       For number of upper limit of the registration possible message handler, depending on \n
///       the securable size as the area of the message handler structure. Therefore, note to ensure \n
///       the size of the area of the message handler structure at the call side of API, and define \n
///       the number of message handler.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - The operation cannot be guaranteed if the number of elements of the array entity indicated by the address of the pointer (handlers)
///         to the message handler structure to be registered does not match the number of arrays specified in the number of message handlers o be registered (handlerCount).\n
///       - The callback information is registered to the heap.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbackToDispatcherWithFd, FrameworkunifiedDetachCallbackFromDispatcherWithFd,
///                  FrameworkunifiedDetachCallbacksFromDispatcherWithFd
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedAttachCallbacksToDispatcherWithFd(HANDLE hApp, const FrameworkunifiedFdProtocolCallbackHandler *handlers,
                                                UI_32 handlerCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachCallbackToDispatcherWithFd
/// \~english @par Brief
///       API to register a callback that link to a single file descriptor to the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] fd
///        int        - File descriptor for message waiting control
/// \~english @param [in] fpOnCmd
///        CbFuncPtr  - Pointer to Callback function
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - File descriptor specified in the argument is incorrect(If fd is less than or equal to 0).
///       [eFrameworkunifiedStatusInvldParam]
///       - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
///       - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
///       appropriate. [eFrameworkunifiedStatusFail]
///       - File descriptor(fd) specified in the argument is already registered to the monitoring control(epoll_ctl).
///       [eFrameworkunifiedStatusFail]
///       - It failed to add the file descriptor(fd) of the message waiting control to the monitoring of epoll_ctl().
///       [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Register a callback that link to a file descriptor that has been specified by the argument to
///       the Dispatcher.\n
///       For epoll_ctl() of Dispatcher, add a file descriptor(fd) for the specified message waiting control \n
///       by the argument.\n
///       Thus, for the file descriptor registered in the message waiting control, when receiving a message, \n
///       so the appropriate Callback function is called.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - The callback information is registered to the heap.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedDetachCallbackFromDispatcherWithFd,
///                  FrameworkunifiedDetachCallbacksFromDispatcherWithFd
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedAttachCallbackToDispatcherWithFd(HANDLE hApp, int fd, CbFuncPtr fpOnCmd);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachParentCallbacksToDispatcher
/// \~english @par Brief
///       API to register multiple callback information for the parent thread to the Dispatcher.
/// \~english @param [in] hChildApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pMsgHandler
///        FrameworkunifiedProtocolCallbackHandler*    - Pointer to the Message Handler structure
/// \~english @param [in] uiHandlerCount
///        UI_32     - Message Handler count(1 to 4294967295)
/// \~english @par
///        FrameworkunifiedProtocolCallbackHandler Structure
/// \~english @code
///            typedef struct _FrameworkunifiedProtocolCallbackHandler
///            {
///                  /* Command ID/request ID/approval ID  of protocol on the service */
///                  UI_32 iCmd;
///                  /* Pointer to Callback function that would be called on receiving iCmd from pServiceName. */
///                  CbFuncPtr callBack;
///            }FrameworkunifiedProtocolCallbackHandler;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Parent service name in the HANDLE(hApp) specified in the argument is NULL . [eFrameworkunifiedStatusInvldParam]
///       - Message Handler number specified in the argument is 0.  [eFrameworkunifiedStatusInvldParam]
///       - NULL Callback function pointer of the Message Handler structure specified by the argument.
///       [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///       Register multiple Callback-informations(iCmd,CbFuncPtr) to the Dispatcher to process \n
///       the message from the parent thread.  \n
///       Thus, if the iCmd is requested from the parent service(application), so the appropriate \n
///       Callback function is called. \n
///       When multiple registration, if an error occurs in the second and subsequent, becomes \n
///       effective only information that has been registered so far.\n
///       For number of upper limit of the registration possible message handler, depending on \n
///       the securable size as the area of the message handler structure. Therefore, note to ensure \n
///       the size of the area of the message handler structure at the call side of API, and define \n
///       the number of message handler.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - Operation is not guaranteed if the number of elements of the array indicated by the address of the pointer (pMsgHandler)
///         to the message handler structure does not match the number of arrays specified by the number of
///         party-specified message hadlers (uiHandlerCount).
///       - The callback information is registered to the heap.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
///                  FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                  FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
///                  FrameworkunifiedDetachServiceFromDispatcher
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedAttachParentCallbacksToDispatcher(HANDLE hChildApp, const FrameworkunifiedProtocolCallbackHandler *pMsgHandler,
                                                UI_32 uiHandlerCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachCallbacksFromDispatcher
/// \~english @par Brief
///       API to cancel multiple Callback-informations from the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pServiceName
///        PCSTR    - Pointer to the service name
/// \~english @param [in] puiCmdArray
///        PUI_32    - Pointer to Command ID/request ID/approval ID  of protocol on the service
/// \~english @param [in] uiCommandCount
///        UI_32    - Cancel handler count
/// \~english @param [in] hSession
///        HANDLE    - Session handle (Default:NULL)
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
///       - Pointer(puiCmdArray) to cancel target ID specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
///       - The number(uiCommandCount) of handlers to cancel specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
///       - Specified service (ServiceName) in the argument is not present. [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Cancel a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
///       from the Dispatcher.\n
///       Thus, if the iCmd is requested from the service, so the appropriate Callback function is not called. \n
///       If you have already specified the iCmd of revocation has been subject, to return the eFrameworkunifiedStatusOK.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - If the iCmad to be canceled is specified, the eFrameworkunifiedStatusOK is returned.
///       - Event if an error occurs during deletion of two or more iCmd, the subsequent iCmd is deleted.
///       - If a iCmd larger than the iCmd array is specified eFrameworkunifiedStatusOK is returned and all iCmd is deleted.\n
///       - If the hade (hSession) for the session specified by the arguments is not appropriate (disabled),
///         the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher,
///                 FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
///                 FrameworkunifiedDetachServiceFromDispatcher
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDetachCallbacksFromDispatcher(HANDLE hApp, PCSTR pServiceName, const PUI_32 puiCmdArray,
                                            UI_32 uiCommandCount, HANDLE hSession = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachCallbackFromDispatcher
/// \~english @par Brief
///       API to cancel a Callback-information from the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pServiceName
///        PCSTR    - Pointer to the service name
/// \~english @param [in] iCmd
///        UI_32    - Command ID/request ID/approval ID  of protocol on the service
/// \~english @param [in] hSession
///        HANDLE    - Session handle (Default:NULL)
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
///       - Specified service (ServiceName) in the argument is not present. [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Cancel a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
///       from the Dispatcher.\n
///       Thus, if the iCmd is requested from the service, so the appropriate Callback function is not called. \n
///       If you have already specified the cancellation has been the subject or unregistered iCmd, to return \n
///       the eFrameworkunifiedStatusOK.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
///         the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                 FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
///                 FrameworkunifiedDetachServiceFromDispatcher
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDetachCallbackFromDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, HANDLE hSession = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachCallbacksFromDispatcherWithFd
/// \~english @par Brief
///       API to cancel multiple Callback and file descriptor set from the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] fdArray
///        int*  - Pointer to cancel the target file descriptor array
/// \~english @param [in] handlerCount
///        UI_32  - Handler count of cancellation
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Pointer(fdArray) is NULL to cancel the target file descriptor array specified in the argument.
///       [eFrameworkunifiedStatusInvldParam]
///       - Handler count(handlerCount) of canceled specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
///       - File descriptor of the file descriptor in the array(fdArray) specified by the argument is incorrect(If fd is
///       less than or equal to 0). [eFrameworkunifiedStatusInvldParam]
///       - File descriptor in the file descriptor array(fdArray) specified in the argument is already deleted from the
///       management table, and can not search. [eFrameworkunifiedStatusFail]
///       - There is no file descriptor management table of the specified HANDLE(hApp) in argument. [eFrameworkunifiedStatusFail]
///       - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
///       appropriate. [eFrameworkunifiedStatusFail]
///       - It failed to delete the file descriptor(fd) of the message waiting control from the monitoring of
///       epoll_ctl(). [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Cancel Callback and file descriptor set that has been specified by the argument from the Dispatcher.\n
///       For epoll_ctl() of Dispatcher, delete multiple file descriptor for the specified message waiting control \n
///       by the argument.\n
///       Thus, for the file descriptor became cancellation target, when receiving the message, the appropriate \n
///       Callback function is not called.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - Operation cannot be guaranteed if the number of elements of the array specified by the address of the pointer
///         to the file descriptor array to be canceled (fdArray) does not match the number of arrays specified by the number of
///         file descriptors to be canceled (uiCommandCount).
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackFromDispatcherWithFd,
///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDetachCallbacksFromDispatcherWithFd(HANDLE hApp, const int *fdArray, UI_32 uiCommandCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachCallbackFromDispatcherWithFd
/// \~english @par Brief
///       API to cancel a Callback and file descriptor from the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] fd
///        int        - Cancel the target file descriptor
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - File descriptor(fd) specified in the argument is incorrect(If fd is less than or equal to 0).
///       [eFrameworkunifiedStatusInvldParam]
///       - File descriptor specified in the argument is already deleted from the management table, and can not search.
///       [eFrameworkunifiedStatusFail]
///       - There is no file descriptor management table of the specified HANDLE(hApp) in argument. [eFrameworkunifiedStatusFail]
///       - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
///       appropriate. [eFrameworkunifiedStatusFail]
///       - It failed to delete the file descriptor(fd) of the message waiting control from the monitoring of
///       epoll_ctl(). [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Cancel a Callback and file descriptor that has been specified by the argument from the Dispatcher.\n
///       For epoll_ctl() of Dispatcher, delete a file descriptor(fd) for the specified message waiting control \n
///       by the argument.\n
///       Thus, for the file descriptor became cancellation target, when receiving the message, the appropriate \n
///       Callback function is not called.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackFromDispatcherWithFd,
///                 FrameworkunifiedDetachCallbacksFromDispatcherWithFd
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDetachCallbackFromDispatcherWithFd(HANDLE hApp, int fd);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachParentCallbacksFromDispatcher
/// \~english @par Brief
///       API to cancel the multiple of Callback information for the parent thread from Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] puiCmdArray
///        PUI_32    -  Pointer to an array of command/request on the service protocol
/// \~english @param [in] uiCommandCount
///        UI_32     - Handler count of cancellation
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Pointer(puiCmdArray) to an array of command/request that you specified in the argument is NULL.
///       [eFrameworkunifiedStatusInvldParam]
///       - Handler count(uiCommandCount) of canceled specified by the argument is 0.  [eFrameworkunifiedStatusInvldParam]
///       [eFrameworkunifiedStatusInvldParam]
///       - Parent service name in the HANDLE(hApp) specified in the argument is NULL . [eFrameworkunifiedStatusInvldParam]
///       - There is no parent service of the target in the HANDLE(hApp) specified in the argument. [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Cancel multiple Callback-informations(iCmd,CbFuncPtr) from the Dispatcher to process \n
///       the message from the parent thread.  \n
///       Thus, if iCmd has been requested from the parent service (application), the corresponding \n
///       Callback function is no longer referred to. \n
///       If you have already specified the iCmd of revocation has been subject, to return the eFrameworkunifiedStatusOK.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - Operation cannot be guaranteed if the number of elements of the array specified by the address of the pointer (puiCmdArray)
///         to the array of commands/requests on the service protocol does not match the number of arrays specified by the number of hadles to cancel (uiCommandCount).
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
///                  FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                  FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
///                  FrameworkunifiedDetachServiceFromDispatcher
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDetachParentCallbacksFromDispatcher(HANDLE hApp, const PUI_32 puiCmdArray, UI_32 uiCommandCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachServiceFromDispatcher
/// \~english @par Brief
///       Disconnect the service from Dispatcher, and API to cancel all the associated callbacks.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pServiceName
///        PCSTR    -  Pointer to the service name
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Pointer (pServiceName) to the service name specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
///       - Information corresponding to the service name(pServiceName) specified in the argument is not registered in
///       Dispatcher. [eFrameworkunifiedStatusFail]
///       - Callback information(Event information) of the service name(pServiceName) specified in the argument is not
///       registered. [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Cancel the entry of service information from Dispatcher, and cancel all callback \n
///       information(event information) related to the service.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - Service registration available/API processing when an event is registered:delete service, delete event, return eFrameworkunifiedStatusOK
///       - Service registration available/API processing when an event is registered:delete service, return eFrameworkunifiedStatusOK
///       - Service registration available/API processing when an event is registered:delete event, return eFrameworkunifiedStatusOK
///       - Service registration available/API processing when an event is registered:nothing, return eFrameworkunifiedStatusFail
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedAttachCallbacksToDispatcher,  FrameworkunifiedAttachCallbackToDispatcher,
///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedAttachParentCallbacksToDispatcher
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDetachServiceFromDispatcher(HANDLE hApp, PCSTR pServiceName);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSubscribeNotificationsWithCallback
/// \~english @par Brief
///       API to send a message to the notification service in order to register multiple Notification of list format.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pNtfyHandler
///        FrameworkunifiedNotificationCallbackHandler   - Pointer to a structure of the Notification Handler
/// \~english @param [in] uiHandlerCount
///        UI_32    - Notification Handler number
/// \~english @par
///        FrameworkunifiedNotificationCallbackHandler Structure
/// \~english @code
///                 #define MAX_STRING_SIZE_NOTIFICATION  64
///                 typedef struct _FrameworkunifiedNotificationCallbackHandler
///                 {
///                       CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name          */
///                       CbFuncPtr callBack;                               /* Callback function pointer  */
///                 }FrameworkunifiedNotificationCallbackHandler;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified in the argument.
///       [eFrameworkunifiedStatusInvldParam]
///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Notification Handler number specified in the argument (uiHandlerCount) has exceeded the maximum number of
///       Notification. [eFrameworkunifiedStatusFail]
///       - The acquisition of the buffer for storing a plurality of information of Notification Handler specified by
///       the argument has failed. [eFrameworkunifiedStatusInvldParam]
///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
///       [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///       The Callback information of multiple Notification upon receipt that is specified in the form of a list, \n
///       set to the notification service (NS_NPPService). \n
///       In addition, collectively set the Callback information at the time of multiple Notification received that \n
///       have been specified in the list format to Dispatcher.\n
///       When the notification service receives the public message of the Notification, it sends a NPS_NOTIFY_EV_REQ \n
///       message to the client that has registered the Notification. The client having received the NPS_NOTIFY_EV_REQ
///       \n
///       message, based on the Callback information registered in the Dispatcher, call a Callback corresponding to the
///       \n
///       Notification.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - Operation is not guaranteed if the number of elemets of the array entity indicated by the address of the pointer (pNtfyHandler)
///         to the Notification Handler structure does not match the number of arrays specified by the Notification Handler number (uiHandlerCount).
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationsWithCallback
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationsWithCallback(HANDLE hApp,  const FrameworkunifiedNotificationCallbackHandler *pNtfyHandler,
                                                 UI_32 uiHandlerCount);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSubscribeNotificationWithCallback
/// \~english @par Brief
///       API to set the Callback information at the time of Notification received Dispatcher.
/// \~english @param [in] hApp
///         HANDLE - Application handle
/// \~english @param [in] pNotification
///         PCSTR - Notification String.
/// \param [in] fpOnCmd
///         CbFuncPtr - Callback function that will be called on receiving pNotification.
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusDuplicate Duplication error of entry
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - CbFuncPtr specified in the argument (fpOnCmd) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Can not add HANDLE specified in the argument (hApp) and CbFuncPtr specified in the argument (fpOnCmd) to
///       notification list [eFrameworkunifiedStatusDuplicate]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Notification name specified by the argument has already been registered in the Dispatcher.
///       [eFrameworkunifiedStatusDuplicate]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///      The Callback information at the time of Notification received that has been specified by the argument, \n
///      set in the notification service (NS_NPPService).\n
///      Also, it sets the Callback information at the time of Notification received that has been specified by \n
///      the argument to the Dispatcher.\n
///       When the notification service receives the public message of the Notification, it sends a NPS_NOTIFY_EV_REQ \n
///       message to the client that has registered the Notification. The client having received the NPS_NOTIFY_EV_REQ
///       \n
///       message, based on the Callback information registered in the Dispatcher, call a Callback corresponding to the
///       \n
///       Notification.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedUnsubscribeNotificationWithCallback,
///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationWithCallback(HANDLE hApp, PCSTR pNotification, CbFuncPtr fpOnCmd);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedUnsubscribeNotificationsWithCallback
/// \~english @par Brief
///       API to bulk delete the Callback information at the time of multiple Notification received from the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pNtfyHandler
///        FrameworkunifiedNotificationCallbackHandler   - Pointer to a structure of the Notification Handler
/// \~english @param [in] uiHandlerCount
///        UI_32    - Notification Handler number
/// \~english @par
///        FrameworkunifiedNotificationCallbackHandler Structure
/// \~english @code
///                 #define MAX_STRING_SIZE_NOTIFICATION  64
///                 typedef struct _FrameworkunifiedNotificationCallbackHandler
///                 {
///                       CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name          */
///                       CbFuncPtr callBack;                               /* Callback function pointer  */
///                 }FrameworkunifiedNotificationCallbackHandler;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified in the argument.
///       [eFrameworkunifiedStatusInvldParam]
///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Notification Handler number specified in the argument (uiHandlerCount) has exceeded the maximum number of
///       Notification. [eFrameworkunifiedStatusFail]
///       - In Notification name in the structure of the Notification Handler specified in the argument, there is not
///       applicable in those registered as Callback information. [eFrameworkunifiedStatusFail]
///       - The acquisition of the buffer for storing a plurality of information of Notification Handler specified by
///       the argument has failed. [eFrameworkunifiedStatusInvldParam]
///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
///       [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///       The Callback information of multiple Notification upon receipt that is specified in the form of a list, \n
///       collectively removed from the notification service (NS_NPPService). \n
///       In addition, the bulk delete the Callback information at the time of multiple Notification received that \n
///       are specified in the form of a list from the Dispatcher.\n
///       By bulk delete the Callback information, if the notification services receives the public message
///       Notification, \n
///       because the Notification information applicable also been deleted, Callback does not occur.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPRegisterNotifications,
/// FrameworkunifiedNPUnRegisterNotifications,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedSubscribeNotificationsWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationWithCallback
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationsWithCallback(HANDLE hApp, const FrameworkunifiedNotificationCallbackHandler *pNtfyHandler,
                                                   UI_32 uiHandlerCount);


////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedUnsubscribeNotificationWithCallback
/// \~english @par Brief
///       API to detach a notification callback from the dispatcher.
/// \~english @param [in] hApp
///         HANDLE - Application handle
/// \~english @param [in] pNotification
///         PCSTR - Notification String.
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
///       - Length of pointer (pNotification) is 0 to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Missing HANDLE specified in the argument (hApp) in notification list [eFrameworkunifiedStatusFail]
///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
///       [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///      The Callback information at the time of Notification received that has been specified by the argument, \n
///      to remove from the notification service (NS_NPPService).\n
///      Also, delete the Callback information of Notification upon receipt, which is specified by the argument \n
///      from the Dispatcher.
///       By bulk delete the Callback information, if the notification services receives the public message
///       Notification, \n
///       because the Notification information applicable also been deleted, Callback does not occur.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPRegisterNotifications,
/// FrameworkunifiedNPUnRegisterNotifications,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedSubscribeNotificationsWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationsWithCallback
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationWithCallback(HANDLE hApp, PCSTR pNotification);



////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetAppName
/// \~english @par Brief
///        Get the application thread name that is registered with the dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @retval PCSTR Pointer to application thread name
/// \~english @retval NULL  NULL pointer (Failed to get application name)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [NULL]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
/// \~english @par Detail
///        Get the application thread name that was registered at initialization of dispatcher.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedDispatcherWithArguments, FrameworkunifiedDispatcher, FrameworkunifiedCreateDispatcherWithoutLoop
////////////////////////////////////////////////////////////////////////////////////////////
PCSTR FrameworkunifiedGetAppName(HANDLE hApp);



////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSetThreadSpecificData
/// \~english @par Brief
///        Set pointer to the application-specific data to the application HANDLE.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] data
///        PVOID   - Pointer to the application-specific data
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        This API sets application-specific data to internal pointer inside application framwork HANDLE.\n
///        You can share data in callback function or thread.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedGetThreadSpecificData
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSetThreadSpecificData(HANDLE hApp, PVOID data);



////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetThreadSpecificData
/// \~english @par Brief
///        Get pointer to the application-specific data from the application HANDLE.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @retval PVOID pointer to application-specific data.
/// \~english @retval NULL NULL pointer(failed to get data)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [NULL]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
/// \~english @par Detail
///        This API gets application-specific data that set with FrameworkunifiedSetThreadSpecificData from internal pointer inside
///        application framwork HANDLE.\n
///        You can share data in callback function or thread.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedSetThreadSpecificData
////////////////////////////////////////////////////////////////////////////////////////////
PVOID FrameworkunifiedGetThreadSpecificData(HANDLE hApp);



////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedOpenService
/// \~english @par Brief
///        API to acquire a service HANDLE.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pServiceName
///        PCSTR   - Pointer to service name
/// \~english @retval HANDLE Handle to the service
/// \~english @retval NULL NULL pointer (Failed to get service handle)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
///       - Only when will open the session by FrameworkunifiedOpenSession, you can use the handle obtained by this API.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [NULL]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
///       - Service name specified in the argument (pServiceName) is NULL. [NULL]
///       - Service name specified in the argument (pServiceName) is not appropriate (NULL, over 20byte). [NULL]
///       - Normalized service name for message queue is not appropriate (over 15byte). [NULL]
///       - Can not be acquired memory for message queue infomation(malloc). [NULL]
///       - Can not be acquired memory for message queue name(malloc). [NULL]
///       - Failed to open message queue(mq_open). [NULL]
/// \~english @par Detail
///        Create a communication resource for communicating with the specified service , return the HANDLE.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedCloseService, FrameworkunifiedOpenSession
////////////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedOpenService(HANDLE hApp, PCSTR pServiceName);



////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedCloseService
/// \~english @par Brief
///        API to close service HANDLE.
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @param [in] hService
///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldHandle]
///       - Message queue type of HANDLE specified in the argument (hService) is mismatch.(eQTypeSender or
///       eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
///       - Failed to close message queue specified in the argument (hService). [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///       This API closes service HANDLE specified by argument.\n
///       And close message queue of the service.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenService
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedCloseService(HANDLE hApp, HANDLE hService);

//////////////////////////////////////////////////
// message center functions
//////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedMcOpenSender
/// \~english @par Brief
///        Generate a handle to the message queue for sending.
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @param [in] pName
///        PCSTR   - Message queue name of destination service
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [NULL]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
///       - Message queue name specified in the argument (pName) is NULL. [NULL]
///       - Message queue name specified in the argument (pName) is not appropriate (NULL, over 20byte). [NULL]
///       - Normalized message queue name is not appropriate (over 15byte). [NULL]
///       - Can not be acquired memory for message queue infomation(malloc). [NULL]
///       - Can not be acquired memory for message queue name(malloc). [NULL]
///       - Failed to open message queue(mq_open). [NULL]
/// \~english @par Detail
///       This API generates and returns a handle to the message queue for sending of service.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedMcClose
////////////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedMcOpenSender(HANDLE hApp, PCSTR pName);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedMcClose
/// \~english @par Brief
///        API for closing a message queue handle
/// \~english @param [in] hService
///        HANDLE   - Handle for services (handle obtained by FrameworkunifiedMcOpenSender)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle in the handle (hService) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hService) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - If the message queue types of the handles (hService) specified in the arguments do not match, [eFrameworkunifiedStatusInvldHandle]
///       - Closing the message queue for the handle (hService) specified in the arguments fails, [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        Closes the message queue for the specified service.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Sync
/// \~english @see FrameworkunifiedMcOpenSender
///
/// To close message queue handle to a service
///
/// \param [in] hService
///         HANDLE - Handle to a service
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedMcClose(HANDLE hService);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSendMsg
/// \~english @par Brief
///        Asynchronous API that sends messages to the service
/// \~english @param [in] hService
///        HANDLE   - Handle for services (handle acquired by FrameworkunifiedMcOpenSender, etc.)
/// \~english @param [in] uiCmd
///        UI_32   - Command ID, Request ID, and Authorization ID on the service's protocol
/// \~english @param [in] uiLength
///        UI_32   - Data size to be sent (0 to 4294967255)
/// \~english @param [in] pData
///        PCVOID   - Pointer to the data to send
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Handles for services must be acquired (FrameworkunifiedMcOpenSender, etc.).
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusNullPointer]
///       - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - When the message queue name of the handle (hService) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue of the handle (hService) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle in the handle (hService) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hService) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the send data (pData) specified in the parameter is NULL and the data length (uiLength) is not 0, [eFrameworkunifiedStatusInvldBuf]
///       - When the name of the message queue handle in the handle (hService) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldQName]
///       - If the name of the message queue handle (hService) specified in the argument exceeds 20 bytes, [eFrameworkunifiedStatusInvldQName]
///       - When the message queue type of the handle (hService) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
///       - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
///       - When the size (uiLength) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///       Messages are sent to the service using the message queue associated with the service handle.\n
///       A destination is a service specified as arguments such as FrameworkunifiedMcOpenSender when a service handle was created.\n
///       This API operates asynchronously.
/// \~english @par
///       - The consistency between the size of the data to be sent and the size of the area indicated by the pointer to the data to be sent is ensure by the caller.
///       - The maximum data size (uiLength) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
///         The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
///         Message header section\n
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Method
/// \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedOpenService
///
/// Send message to the service.
///
/// \param [in] hService
///         HANDLE - Handle to the service.
/// \param [in] uiCmd
///         UI_32 - Protocol message id.
/// \param [in] uiLength
///         UI_32 - Length of the data to be send.
/// \param [in] pData
///         PVOID - Pointer to the data.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSendMsg(HANDLE hService, UI_32 uiCmd, UI_32 uiLength, PCVOID pData);


////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedSendPriorityMsg
/// Send message to a service. It places your message at the top of the services message queue.
/// \b Applications should not use this unless absolutely required - use cases must be reviewed by
/// \b Framework Team.
///
/// \param [in] hService
///         HANDLE - Handle to the service.
/// \param [in] uiCmd
///         UI_32 - Protocol message id.
/// \param [in] uiLength
///         UI_32 - Length of the data to be send.
/// \param [in] pData
///         PVOID - Pointer to the data.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSendPriorityMsg(HANDLE hService, UI_32 uiCmd, UI_32 uiLength, PCVOID pData);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSendSelf
/// \~english @par Brief
///        Asynchronous APIs that send messages to the application's own Dispatcher
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] iCmd
///        UI_32   - Command ID, Request ID, and Authorization ID on the service's protocol
/// \~english @param [in] length
///        UI_32   - Data size to be sent (0 to 4294967255)
/// \~english @param [in] data
///        PCVOID   - Pointer to the data to send
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusNullPointer]
///       - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle for the own Dispatcher in the handle (hService) specified by the arguments is NULL [eFrameworkunifiedStatusInvldHandle]
///       - Invalid message queue handle for its own Dispatcher in the handle (hService) specified by the arguments [eFrameworkunifiedStatusInvldHandle]
///       - When the send data (data) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldBuf]
///       - When the service name of the handle (hService) specified in the arguments is not appropriate (when the service name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue handle for the own Dispatcher in the handle (hService) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - Failed to access shared memory for sending messages for its own Dispatcher [eFrameworkunifiedStatusErrOther]
///       - When the message queue type for the own Dispatcher of the handle (hService) specified in the parameter is not the send type [eFrameworkunifiedStatusInvldHndlType]
///       - If the message queue for your Dispatcher is full [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptor for sending messages for own Dispatcher [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending messages for the Dispatcher itself [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for your Dispatcher [eFrameworkunifiedStatusFail]
///       - When the size (length) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///       Send messages to the application's own Dispatcher.\n
///       This API operates asynchronously.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - The maximum data size (length) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
///         The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
///         Message header section\n
///       - Operation cannot be guaranteed when the size of the allocated area indicated by the address of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Method
/// \~english @see FrameworkunifiedSendMsg
///
/// Send message to the hApp.
///
/// \param [in] hApp
///         HANDLE - Handle to the dispatcher to receive message
/// \param [in] iCmd
///         UI_32 - Protocol message id.
/// \param [in] length
///         UI_32 - Length of the data to be send.
/// \param [in] data
///         PVOID - Pointer to the data.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSendSelf(HANDLE hApp, UI_32 iCmd, UI_32 length, PCVOID data);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedInvokeSync
/// \~english @par Brief
///        API for synchronous communication of the message.
/// \~english @param [in] hService
///        HANDLE   - Handle for the message queue
/// \~english @param [in] iCmd
///        UI_32   -  Command ID
/// \~english @param [in] msgLenght
///        UI_32   -  Data length of the send message
/// \~english @param [in] msgData
///        PCVOID   - Pointer to send the message
/// \~english @param [in] responseLength
///        UI_32   -  Size of the received message storage buffer
/// \~english @param [out] responseData
///        PVOID   -  Pointer to the received message storage buffer
/// \~english @param [out] receivedLength
///        UI_32 * -  Data length of the received message
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
/// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
///       - Handles for message queue must be acquired (FrameworkunifiedMcOpenSender, etc.).
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE(hService) specified in the argument is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
///       - Send message queue HANDLE in HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Send message queue HANDLE in HANDLE(hService) specified in the argument is not appropriate (which is
///       invalid). [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE for the response received is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE for the response received is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldHandle]
///       - The size of the received message storage buffer specified by the argument is not 0, and the pointer is NULL
///       to the received message storage buffer. [eFrameworkunifiedStatusInvldHandle]
///       - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
///       - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
///       - Message queue name of HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldQName]
///       - Message queue name of HANDLE(hService) specified in the argument exceeds 20byte. [eFrameworkunifiedStatusInvldQName]
///       - Message queue HANDLE name in the HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE name in the HANDLE(hService) specified in the argument exceeds 20byte.
///       [eFrameworkunifiedStatusInvldHandle]
///       - Message queue type of HANDLE(hService) specified in the argument is not a transmission type.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - To the session message queue is full. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmit and receive file descriptor of the session message. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) occurs during the transmission and reception of the session
///       message. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmit buffer of the message for the session to the service is illegal.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the sending and receiving of a session message. [eFrameworkunifiedStatusFail]
///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
///       - It failed to Socket connection of the response message for the reception. [eFrameworkunifiedStatusFail]
///       - The wait control of the response message received failed. [eFrameworkunifiedStatusFail]
///       - Interruption by the system call (signal) to wait in the response message received has occurred.
///       [eFrameworkunifiedStatusFail]
///       - In response message at the time of failure to receive, it failed to re-connection of the Socket.
///       [eFrameworkunifiedStatusBadConnection]
/// \~english @par Detail
///       Under the following procedure, perform synchronous communication of the message.
///        - During the first call, it generates a message queue name for the response message received by the
///        McCreateInvokerName(),
///          and to open the message queue for the response message received by the McOpenSyncReceiver ().
///        - By the McInvokeSync(), perform synchronous communication of the message.
/// \~english @par
///       If the received response message is greater than the storage buffer, to store up to store buffer length.\n
///       The user is able to detect an abnormality by comparing store buffer length and a received message length.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedSendMsg
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedInvokeSync(HANDLE hService, UI_32 iCmd, UI_32 msgLenght, PCVOID msgData, UI_32 responseLength,
                         PVOID responseData, UI_32 *receivedLength);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSetSyncResponseData
/// \~english @par Brief
///        API to set the response data of the synchronization communication.
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @param [in] data
///        PVOID   - Pointer to the response data
/// \~english @param [in] size
///        UI_32   - The response data size
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - Pointer to the response data(data) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
///       - If the size (size) of the response data specified in the arguments cannot be allocated, [eFrameworkunifiedStatusFail]
///       - When the response data size (size) specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///       Store the response data specified in the storage area of the response data \n
///       in the handle specified by the argument.
/// \~english @par
///        Response data set by this PROCESS is automatically sent by the Dispatcher after the callback function completes execution, so the API does not need to send the response data.
/// \~english @par
///       - The response data is registered to the heap.
///       - If the pointer (data) to the response data is normal (not NULL) and 0 is specified for the size (size) of the response data, the response data is set to empty.
///       - The maximum size (size) of the response data described above is a theoretical value. The maximum size that can be used is environment-dependent.\n
///         The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
///         Message header section and response message header section\n
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedInvokeSync
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSetSyncResponseData(HANDLE hApp, PVOID data, UI_32 size);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetMsgLength
/// \~english @par Brief
///        API to retrieve the data length of the received message.
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @retval UI_32 The data length of the received message
/// \~english @retval 0     Error or No data
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE(hApp) specified in the argument is NULL. [0]
///       - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [0]
/// \~english @par Detail
///       To return the data length of the received messages in the handle(hApp) \n
///       that you specified in the argument  as a return value.  \n
///       It is possible to get by to use when the message was received. \n
///       If the return value is 0, there is a need for caution because of either \n
///       error or no data.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        Sync
/// \~english @see None
////////////////////////////////////////////////////////////////////////////////////////////
UI_32 FrameworkunifiedGetMsgLength(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetMsgProtocol
/// \~english @par Brief
///        API to get the Command ID/Request ID/Approval ID on the protocol.
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @retval UI_32 Command ID/Request ID/Approval ID
/// \~english @retval 0     Error
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE(hApp) specified in the argument is NULL. [0]
///       - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [0]
/// \~english @par Detail
///       To return the Command ID/Request ID/Approval ID that are within  \n
///       the handle(hApp) specified in the argument as a return value.
/// \~english @par
///        The application shall execute this API using an application handle passed as an argument to the callback function.
///        (Messages are received within the framework, stored in the application handles (hApp),
///        and then executed by the application callback functions.)
/// \~english @par Classification
///        Public
/// \~english @par Type
///        Sync
/// \~english @see None
////////////////////////////////////////////////////////////////////////////////////////////
UI_32 FrameworkunifiedGetMsgProtocol(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetMsgDataOfSize
/// \~english @par Brief
///        API to get the data of the received message
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [out] pData
///        PVOID   - Pointer to the buffer where the received message data will be copied
/// \~english @param [in] uiSize
///        UI_32   - Size of the buffer to which received message data is copied
/// \~english @param [in] eRetrieveMethod
///        ESMRetrieveTypes  - Shared memory-acquisition-type (optional; eSMRRelease if not specified)
/// \~english @par
///       enum ESMRetrieveTypes variables
///       - eSMRRelease = 0 : The shared memory data is deleted after acquisition.
///       - eSMRRetain = 1 : Shared memory data is maintained.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - When the data size is larger than the buffer size (uiSize) specified by the parameter, [eFrameworkunifiedStatusInvldBufSize]
///       - If the buffer (pData) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldBuf]
///       - Incoming messages are incorrect [eFrameworkunifiedStatusInvldHndlType]
///       - If the shared memory ID specified in the received message is invalid [FrameworkunifiedStatusErrOther]
///       - If accessing shared memory (shm_open/fstat/mmap) fails [eFrameworkunifiedStatusErrOther]
///       - If the size of the data in shared memory is larger than the buffer size (uiSize) specified by the arguments [FrameworkunifiedStatusErrOther]
/// \~english @par Detail
///        Receive message data is acquired from the receive buffer in the application handle (hApp) or the shared memory (message is stored in the shared memory when the size is 4096 bytes or more), and is stored in the area passed in the parameter pData.\n
///        When data exists in the shared memory, the data is held or deleted in the shared memory by specifying the eRetrieveMethod of arguments of this API
/// \~english @par
///        Please note the following points when using this API for application.\n
///        - Execute this API using an application handle passed as an argument of a callback function.
///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
///        - Before executing this API, the size of the received message must be checked by the FrameworkunifiedGetMsgLength to determine whether data is to be retained in the shared memory.
///        - If it is kept in shared memory, the application must execute the FrameworkunifiedClearMsgData and delete it.
///        - If an invalid value other than the ESMRetrieveTypes defined value is specified for the shared memory allocation type (eRetrieveMethod), the shared memory allocation type behaves as if eSMRRetain were specified.
/// \~english @par Classification
///          Public
/// \~english @par Type
///        Sync
/// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedClearMsgData
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [out] pData
///         PVOID - Buffer to which the received message data will be copied.
/// \param [out] uiSize
///         UI_32 - Size of the buffer to which the received message data will be copied.
/// \param [in] eRetrieveMethod
///         ESMRetrieveTypes -
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \~english @par Type
///        Sync
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedGetMsgDataOfSize(HANDLE hApp, PVOID pData, UI_32 uiSize, ESMRetrieveTypes eRetrieveMethod = eSMRRelease);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetDataPointer
/// \~english @par Brief
///        API to get start address of data from received message
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [out] datap
///        void**   - Pointer to the data of the received message
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the receive buffer address of the handle (hApp) specified in the parameter is NULL [eFrameworkunifiedStatusInvldBufSize]
///       - When the pointer (datap) to the data of the received message specified by the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///        This function gets the received message data from the receive buffer in the application handle (hApp)
///        and returns the start address of the received message in the argument datap.\n
/// \~english @par
///        Please note the following points when using this API for application.\n
///        - This API can be executed for messages that do not use shared memory (messages with a message size less than 4096 bytes).
///          Check the size of received messages in the FrameworkunifiedGetMsgLength prior to executing this API.
///        - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
///        - Execute this API using an application handle passed as an argument of a callback function.
///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
/// \~english @par Classification
///          Public
/// \~english @par Type
///        Sync
/// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [out] datap
///         void ** - Pointer to which the receive message data.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
/// \~english @par Type
///        Sync
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedGetDataPointer(HANDLE hApp, void **datap);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetMsgSrc
/// \~english @par Brief
///        API to get the application name of the sender of the received message
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @retval PCSTR Name of the application from which the message was sent
/// \~english @retval NULL NULL pointer (Acquisition failure)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [NULL]
///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
/// \~english @par Detail
///        This API returns the application name of the sender of the received message.\n
///        The application name acquired by this API is used for establishing sessions, creating message queues for responses,
///        and registering/releasing callbacks to the Dispatcher.
/// \~english @par
///        Please note the following points when using this API for application.\n
///        - Execute this API using an application handle passed as an argument of a callback function.
///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
///        - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
/// \~english @par Classification
///          Public
/// \~english @par Type
///        Sync
/// \~english @see FrameworkunifiedOpenService, FrameworkunifiedCreateSession, FrameworkunifiedMcOpenSender, \n
///            FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, \n
///            FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher, FrameworkunifiedDetachServiceFromDispatcher
///
/// Source of the message.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
///
/// \return pSourceName
///         PCSTR - Source name of the message.
/// \~english @par Type
///        Sync
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
////////////////////////////////////////////////////////////////////////////////////////////
PCSTR FrameworkunifiedGetMsgSrc(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetLastNotification
/// \~english @par Brief
///        Get the most recent Notification names
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @retval PCSTR Pointers to Notification
/// \~english @retval NULL NULL pointer (Acquisition failure)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [NULL]
///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
/// \~english @par Detail
///        This API acquires and returns the most recent Notification name from the received data.
/// \~english @par
///        Please note the following points when using this API for application.\n
///        - Execute this API using an application handle passed as an argument of a callback function.
///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
///        - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
/// \~english @par Classification
///          Public
/// \~english @par Type
///        Sync
/// \~english @see FrameworkunifiedNPPublishNotification
///
/// Returns the last notification string that was received.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
///
/// \return pSourceName
///         PCSTR - the last notification name that has been received.
/// \~english @par Type
///        Sync
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
////////////////////////////////////////////////////////////////////////////////////////////
PCSTR FrameworkunifiedGetLastNotification(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedClearMsgData
/// \~english @par Brief
///        API to delete shared memory used for sending and receiving messages
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @retval eFrameworkunifiedStatusOK Successful or Use Shared Memory Messages
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldID Invalid ID
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - Framework generating failure [eFrameworkunifiedStatusInvldParam]
///       - If the shared memory ID specified in the message is invalid [eFrameworkunifiedStatusInvldParam]
///       - If an attempt is made to remove a non-existent shared memory, [eFrameworkunifiedStatusInvldID]
///       - If accessing shared memory (shm_unlink) fails, [eFrameworkunifiedStatusFail]
///       - When the receive buffer address of the handle (hApp) specified in the parameter is NULL [eFrameworkunifiedStatusInvldBuf]
/// \~english @par Detail
///        This API deletes the shared memory used for sending and receiving messages.\n
///        When an application gets received messages by specifying eSMRRetain as FrameworkunifiedGetMsgDataOfSize, it deletes the shared memories by using this API...\n
/// \~english @par
///        Please note the following points when using this API for application.\n
///        - The shared memory information to be deleted by this API shall be executed by the application on the message receiving side because it is obtained from the received message.\n
///        - Execute this API using an application handle passed as an argument of a callback function.
///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
/// \~english @par Classification
///          Public
/// \~english @par Type
///        Sync
/// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgDataOfSize
///
/// Explicit call to clear the data from shared memory.
/// To be used incase of forwarding messages ???
///
/// \param [in] hApp
///         HANDLE - Application framework handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
/// \~english @par Type
///        Sync
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedClearMsgData(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedForwardMessage
/// Forward a message to a service or a client.
///
/// \param [in] hApp
///         HANDLE - Handle to the service
/// \param [in] hChildQ
///         HANDLE - Handle to the child thread
/// \param [in] iCmd
///         UI_32 - .
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedGetSystemInfo
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedForwardMessage(HANDLE hApp, HANDLE hChildQ, UI_32 iCmd);







////////////////////////////////////////////////////////////////////////////////////////////
//        Notification & Persistence Service
////////////////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPRegisterNotification
/// \~english @par Brief
///       To the notification service to register the Notification, API to send a message.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pNotification
///        PCSTR    - A pointer to the Notification name
/// \~english @param [in] max_length
///        UI_32    - The maximum length of the Notification message (64byte below)
/// \~english @param [in] persType
/// \~english @par
///        EFrameworkunifiedNotificationType     - Type of Notification
///       enum EFrameworkunifiedNotificationType Variable
///       - eFrameworkunifiedNotificationVar  : Non Persistent. Not stored locally by NPS.
///       - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
///       - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
///       - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
///       - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
///       - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - It is not appropriate length of the specified Notification name in argument(0, or more than a 64byte).
///       [eFrameworkunifiedStatusInvldParam]
///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
///       [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///       To the notification service (NS_NPPService) to register the Notification, \n
///       send a message for the Notification registration.
/// \~english @par Classification
///          Public
/// \~english @par Type
///         Pub-Sub
/// \~english @see  FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPRegisterNotification(HANDLE hApp, PCSTR pNotification,  const UI_32 max_length,
                                     const EFrameworkunifiedNotificationType persType);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPSetPersistNotfnDefaultValue
/// API to send message to Notification Service to set the default value for the notification.
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] pNotification
///         PCSTR - Name of Notification
/// \param [in] data
///         PVOID - Set the default value for the notification.
/// \param [in] uiLength
///         const UI_32 - length of the data
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPSetPersistNotfnDefaultValue(HANDLE hApp, PCSTR pNotification, PVOID data, const UI_32 uiLength);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPSetPersistentNotfnType
/// \~english @par Brief
///       API to send message to Notification Service to set persistent notification category.
/// \~english @param [in] hApp
///       HANDLE - Handle to the Framework
/// \~english @param [in] pNotification
///       PCSTR - Name of Notification
/// \~english @param [in] ePersistCategory
///         EFrameworkunifiedPersistCategory - Persistent Category
/// \~english @return status
///       EFrameworkunifiedStatus - success or error
/// \~english @code
///                 typedef enum _EFrameworkunifiedNotificationType
///                 {
///                       eFrameworkunifiedNotificationVar = 0,        /* Not persistent (not retained by NPS) */
///                       eFrameworkunifiedStateVar,                   /* Not persistent (held by NPS) */
///                       eFrameworkunifiedPersistedStateVar,          /* persistent. Only kept in NPS */
///                       eFrameworkunifiedPersistedStateUserVar,      /* Invalid handle type. Only kept in NPS */
///                       eFrameworkunifiedImmediatePersistedStateVar, /* Invalid handle. See \ref
///                                                       FrameworkunifiedNPRegisterImmediatePersistNotification */
///                       eFrameworkunifiedUnknown                     /* No Notification typing. Not recommended */
///                 } EFrameworkunifiedNotificationType;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Pub-Sub
/// \~english @see  none
///
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPSetPersistentNotfnType(HANDLE hApp, PCSTR pNotification, EFrameworkunifiedPersistCategory ePersistCategory);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPRegisterImmediatePersNotification
/// \~english @par Brief
///       API to send message to Notification Service to register a immediate notification
/// \~english @param [in] hApp
///         HANDLE - Handle to the Framework
/// \~english @param [in] pNotification
///         PCSTR - Name of Notification
/// \~english @param [in] max_length
///         const UI_32 - Max size of the notification message (should be <= 1Kb)
/// \~english @param [in] delay
///         const UI_32 - Min time interval between every persist (in sec)
/// \~english @return status
///         EFrameworkunifiedStatus - success or error
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the pNotification to the Notification specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the length of the Notification specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
///       - If the length of the Notification specified in the arguments is 64 (MAX_STRING_SIZE_NOTIFICATION) or greater [eFrameworkunifiedStatusInvldParam]
///       - Failed to get buffers to store Notification [eFrameworkunifiedStatusInvldParam]
///       - When memory could not be allocated due to the allocation of message-sending buffers (malloc),... [eFrameworkunifiedStatusFail]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       This API registers a Notification to the notification service (NS_NPPService).\n
///       By sending a Notification registration message to the notification service, the specified Notification is registered in the received notification service.
/// \~english @par Classification
///         Public
/// \~english @par Type
///         Pub-Sub
/// \~english @see  FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationWithCallback,FrameworkunifiedSubscribeNotificationsWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationsWithCallback
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPRegisterImmediatePersistNotification(HANDLE hApp, PCSTR pNotification,  const UI_32 max_length,
                                                     const UI_32 delay);


////////////////////////////////////////////////////////////////////////////////////////////
///  FrameworkunifiedNPPersistentSync
///  Processing which synchronizes by NPPService (syncfs)
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPPersistentSync(HANDLE hApp);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPRegisterNotifications
/// \~english @par Brief
///       API to send a message to the notification service in order to register multiple Notification of list format.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pList
///        FrameworkunifiedNotificationsList   - Pointer to the Notification list to be registered
/// \~english @param [in] uiListLength
///        UI_32    - List length
/// \~english @par
///        FrameworkunifiedNotificationsList Structure
/// \~english @code
///                 #define MAX_STRING_SIZE_NOTIFICATION  64
///                 typedef struct _FrameworkunifiedNotificationsList
///                 {
///                       CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name                      */
///                       UI_32 uiLengthData;                               /* Notification Name length(64byte below) */
///                       EFrameworkunifiedNotificationType  persType;                   /* Notification Type                      */
///                 }
///            @endcode
/// \~english @par
///       enum EFrameworkunifiedNotificationType Variable
///       - eFrameworkunifiedNotificationVar  : Non Persistent. Not stored locally by NPS.
///       - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
///       - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
///       - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
///       - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
///       - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - A pointer to the Notification list to register specified in the argument (pList) is NULL.
///       [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - And fail to acquire the buffer for storing a plurality Notification. [eFrameworkunifiedStatusInvldParam]
///       - List specified in the argument length (uiListLength) has exceeded the maximum number of Notification.
///       [eFrameworkunifiedStatusFail]
///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
///       [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///       This API is to register multiple Notification of list format to the notification service (NS_NPPService).\n
///       By transmitting multiple Notification registration message to the notification service, Notification \n
///       specified in the received notification service is registered. \n
///       It sends a message for multiple Notification registered with the notification service (NS_NPPService) \n
///       in order to register multiple Notification of list format.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPRegisterNotifications(HANDLE hApp, const  FrameworkunifiedNotificationsList *pList, UI_32 uiListLength);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPUnRegisterNotification
/// \~english @par Brief
///       API to send message to Notification Service to remove a notification.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pNotification
///        PCSTR    - A pointer to the Notification name
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - It fails to get the buffer that stores the Notification. [eFrameworkunifiedStatusInvldParam]
///       - It is not appropriate length of the specified Notification name in argument(0, or more than a 64byte).
///       [eFrameworkunifiedStatusInvldParam]
///       - Can not be acquired memory in the acquisition of buffer for internal processing (malloc). [eFrameworkunifiedStatusFail]
///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
///       [eFrameworkunifiedStatusFail]
///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///       This API is, to remove the Notification from the notification service (NS_NPPService). \n
///       By deleting, Notification specified from the notification service will no longer be delivered.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotifications,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPUnRegisterNotification(HANDLE hApp, PCSTR pNotification);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPUnRegisterNotifications
/// \~english @par Brief
///       API to send message to Notification Service to delete a notification.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pList
///        FrameworkunifiedNotificationsList   - Pointer to the Notification list that you want to delete
/// \~english @param [in] uiListLength
///        UI_32    - List length
/// \~english @par
///        FrameworkunifiedNotificationsList Structure
/// \~english @code
///                 #define MAX_STRING_SIZE_NOTIFICATION  64
///                 typedef struct _FrameworkunifiedNotificationsList
///                 {
///                       CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name                      */
///                       UI_32 uiLengthData;                               /* Notification Name length(64byte below) */
///                       EFrameworkunifiedNotificationType  persType;                   /* Notification Type                      */
///                 }
///            @endcode
/// \~english @par
///       enum EFrameworkunifiedNotificationType Variable
///       - eFrameworkunifiedNotificationVar  : Non Persistent. Not stored locally by NPS.
///       - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
///       - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
///       - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
///       - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
///       - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - It fails to get the buffer that stores multiple Notification. [eFrameworkunifiedStatusInvldParam]
///       - List specified in the argument length (uiListLength) has exceeded the maximum number of Notification.
///       [eFrameworkunifiedStatusFail]
///       - Can not be acquired memory in the acquisition of buffer for internal processing (malloc). [eFrameworkunifiedStatusFail]
///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
///       [eFrameworkunifiedStatusFail]
///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///       This API is, delete multiple Notification of list format from the notification service (NS_NPPService). \n
///       By deleting, Notification specified from the notification service will no longer be delivered.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification,
///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPUnRegisterNotifications(HANDLE hApp, const  FrameworkunifiedNotificationsList *pList,
                                        UI_32 uiListLength);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPPublishNotification
/// \~english @par Brief
///       API to send message to Notification Service to notify subscribers
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application
/// \~english @param [in] pNotification
///        PCSTR    - A pointer to the Notification name
/// \~english @param [in] pData
///        VOID *   - Data buffer pointer
/// \~english @param [in] iLength
///        UI_32    - Size of data buffer
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some kind of error has occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - NS_NPPService of the process has been started.
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Conditions of processing failure
///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldParam]
///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
///       [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldParam]
///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
///       20byte) [eFrameworkunifiedStatusInvldHandle]
///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission of the session message for the NPP Service.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Detail
///       Send a message to the notification service(NS_NPPService), and notifies the Subscriber.\n
///       - Publisher is required registration of Notification in advance FrameworkunifiedNPRegisterNotification.
///       - Publisher is possible cancellation of the Notification in FrameworkunifiedNPUnRegisterNotification.
///       - Subscriber need a reception procedure of Notification in advance FrameworkunifiedSubscribeNotification.
///       - Subscriber is capable of receiving cancellation of the Notification in FrameworkunifiedUnsubscribeNotification.
/// \~english @par Classification
///          Public
/// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification
///                 FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotifications
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPPublishNotification(HANDLE hApp, PCSTR pNotification,
                                    PCVOID pData, UI_32 iLength);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPReadPersistedData
/// \~english @par Brief
///       API to requested the persistent data corresponding to the notification if available
/// \~english @param [in] hApp
///         HANDLE - Handle to the Framework
/// \~english @param [in] pNotification
///         PCSTR - Name of Notification
/// \~english @return status
///         EFrameworkunifiedStatus - success or error
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the pNotification to the Notification specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the length of the Notification specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
///       - Failed to get buffers to store Notification [eFrameworkunifiedStatusInvldParam]
///       - When memory could not be allocated due to the allocation of message-sending buffers (malloc),... [eFrameworkunifiedStatusFail]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for the NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Classification
///         Public
/// \~english @par Type
///         Pub-Sub
/// \~english @see  none
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPReadPersistedData(HANDLE hApp, PCSTR pNotification);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup  FrameworkunifiedNPRegisterPersistentFile
/// \~english @par Brief
///        APIs that send messages to notification services and register Persistent file tags
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pTag
///        PCSTR    - Tag name
/// \~english @param [in] bIsUserFile
///        BOOL     - User specified (TRUE: user-specific/FALSE: all users) (Default:FALSE)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Sends messages to the notification service (NS_NPPService) and registers Persistent file tags.\n
///       Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Fire and Forget
/// \~english @see  FrameworkunifiedNPLoadPersistentFile, FrameworkunifiedNPReleasePersistentFile
///
/// API to send message to Notification Service to add a file path as to be persisted
///
/// \param [in] pTag
///         PCSTR - A unique identifier for the file path specified,
///                 this is used in retrieve/Load the file later
///
/// \param [in] bIsUserFile
///      BOOL - set TRUE if want to register a file for user.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedNPLoadPersistentFile, FrameworkunifiedNPReleasePersistentFile
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPRegisterPersistentFile(HANDLE hApp, PCSTR pTag, BOOL bIsUserFile = FALSE);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPSetFilePersistentType
/// API to send message to Notification Service to set persistent file category.
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] pTag
///         PCSTR - File tag
/// \param [in] ePersistCategory
///         EFrameworkunifiedPersistCategory - Persistent category
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPSetFilePersistentType(HANDLE hApp, PCSTR pTag, EFrameworkunifiedPersistCategory ePersistCategory);


////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup  FrameworkunifiedNPLoadPersistentFile
/// \~english @par Brief
///        APIs that send messages to notification services and request Load of Persistent file tags
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pDstFilePath
///        PCSTR    - Address of arbitrary data
/// \~english @param [in] pTag
///        PCSTR    - Tag name
/// \~english @param [in] hUser
///        BOOL     - Parameter error(Default:NULL)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the Load destination file path (pDstFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the Load destination filepath (pDstFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
///       The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
///       Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
///
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Method(Async)
/// \~english @see  FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPReleasePersistentFile
///
/// API to send message to Notification Service to copy file from persistent memory to
/// specified path. The caller recieves an acknowledgement once NPS completes file copy
///
/// \param [in] pDstFilePath
///         PCSTR - Complete file path to which the file should be copied from persistent area
/// \param [in] pTag
///         PCSTR - Tag associated with the file that needs to be copied to pDstFilePath
/// \param [in] hUser
///         HANDLE - Handle for the user
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPReleasePersistentFile
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPLoadPersistentFile(HANDLE hApp, PCSTR pDstFilePath, PCSTR pTag, HANDLE hUser = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPReleasePersistentFile
/// \~english @par Brief
///       API to send message to Notification Service to notify that the file can be persisted.
/// \~english @param [in] hApp
///       HANDLE - Handle to the Framework
/// \~english @param [in] bIsPersist
///       BOOL - If the specified file needs to be persisted or not on release
/// \~english @param [in] pTag
///       PCSTR - Tag associated with the file released
/// \~english @param [in] pFullFilePath
///       PCSTR - Full path name of the file to be persisted
/// \~english @param [in] hUser
///       HANDLE - Handle for the user
/// \~english @return status
///       EFrameworkunifiedStatus - success or error
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the Release destination file path (pFullFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the Release destination filepath (pFullFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
///       The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
///       Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Pub-Sub
/// \~english @see  FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
///
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFile(HANDLE hApp, BOOL bIsPersist, PCSTR pTag, PCSTR pFullFilePath,
                                      HANDLE hUser = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedNPReleasePersistentFile
/// \~english @par Brief
///       API to send message to Notification Service to notify that the file can be persisted.
/// \~english @param [in] hApp
///       HANDLE - Handle to the Framework
/// \~english @param [in] eReleaseType
///         EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease     :not on release
///                           eFrameworkunifiedPersistOnShutdown:persist on shutdown
///                           eFrameworkunifiedPersistInstantly :persist instantly
/// \~english @param [in] pTag
///       PCSTR - Tag associated with the file released
/// \~english @param [in] pFullFilePath
///       PCSTR - Full path name of the file to be persisted
/// \~english @param [in] hUser
///       HANDLE - Handle for the user
/// \~english @return status
///       EFrameworkunifiedStatus - success or error
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the Load destination file path (pDstFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the Load destination filepath (pDstFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
///       The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
///       Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Pub-Sub
/// \~english @see  FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
///
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFile(HANDLE hApp, EFrameworkunifiedReleaseType eReleaseType, PCSTR pTag, PCSTR pFullFilePath,
                                      HANDLE hUser = NULL);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup  FrameworkunifiedNPRegisterPersistentFolder
/// API to send message to Notification Service to add a folder path to be persisted
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] pTag
///         PCSTR - A unique identifier for the folder path specified,
///                 this is used in retrieve/Load the folder later
///
/// \param [in] bIsUserFolder
///      BOOL - set TRUE if want to register a folder for user.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedNPLoadPersistentFolder, FrameworkunifiedNPReleasePersistentFolder
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPRegisterPersistentFolder(HANDLE hApp, PCSTR pTag, BOOL bIsUserFolder = FALSE);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPSetFolderPersistentType
/// API to send message to Notification Service to set persistent folder category.
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] pTag
///         PCSTR - A unique identifier for the folder path specified,
///                 this is used in retrieve/Load the folder later
/// \param [in] ePersistCategory
///         EFrameworkunifiedPersistCategory - Persistent category
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPSetFolderPersistentType(HANDLE hApp, PCSTR pTag, EFrameworkunifiedPersistCategory ePersistCategory);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup  FrameworkunifiedNPLoadPersistentFolder
/// API to send message to Notification Service to copy folder from persistent memory to
/// specified path. The caller recieves an acknowledgement once NPS completes folder copy
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] pDstFolderPath
///         PCSTR - Complete folder path to which the folder should be copied from persistent area
/// \param [in] pTag
///         PCSTR - Tag associated with the folder that needs to be copied to pDstFolderPath
/// \param [in] hUser
///         HANDLE - Handle for the user
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPReleasePersistentFolder
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPLoadPersistentFolder(HANDLE hApp, PCSTR pDstFolderPath, PCSTR pTag, HANDLE hUser = NULL);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPReleasePersistentFolder
/// API to send message to Notification Service to notify that the folder can be persisted.
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] bIsPersist
///         BOOL - If the specified folder needs to be persisted or not on release
/// \param [in] pTag
///         PCSTR - Tag associated with the folder released
/// \param [in] pFullFolderPath
///         PCSTR - Full path name of the folder to be persisted
/// \param [in] hUser
///         HANDLE - Handle for the user
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPLoadPersistentFolder
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFolder(HANDLE hApp, BOOL bIsPersist, PCSTR pTag, PCSTR pFullFolderPath,
                                        HANDLE hUser = NULL);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPReleasePersistentFolder
/// API to send message to Notification Service to notify that the folder can be persisted.
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] eFrameworkunifiedReleaseType
///         EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease     :not on release
///                           eFrameworkunifiedPersistOnShutdown:persist on shutdown
///                           eFrameworkunifiedPersistInstantly :persist instantly
/// \param [in] pTag
///         PCSTR - Tag associated with the folder released
/// \param [in] pFullFolderPath
///         PCSTR - Full path name of the folder to be persisted
/// \param [in] hUser
///         HANDLE - Handle for the user
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPLoadPersistentFolder
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFolder(HANDLE hApp, EFrameworkunifiedReleaseType eFrameworkunifiedReleaseType, PCSTR pTag,
                                        PCSTR pFullFolderPath, HANDLE hUser = NULL);


////////////////////////////////////////////////////////////////////////////////////////////
//        Session APIs
////////////////////////////////////////////////////////////////////////////////////////////



/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedOpenSession
/// \~english @par Brief
///       API sends a message to the service requesting a session.
/// \~english @param [in] hService
///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
///       [eFrameworkunifiedStatusInvldQName]
///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) during the transmission of the session message to the service
///       occurs. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmit buffer of the message for the session to the service is illegal.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///       To send a message of the session request to the service.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedOpenSessionWithData, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
///                FrameworkunifiedGetSessionId
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedOpenSession(HANDLE hService);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedOpenSessionWithData
/// \~english @par Brief
///       API to send to service the message of the session request together with the data.
/// \~english @param [in] hService
///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
/// \~english @param [in] pData
///        PVOID    - Pointer to the session data for transmission
/// \~english @param [in] length
///        UI_32    - Size of the session data for transmission
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - A pointer to the session data for transmission to the specified non-zero size at NULL in argument.
///       [eFrameworkunifiedStatusInvldBuf]
///       - The pointer is NULL to the session data for transmission specified in the argument. [eFrameworkunifiedStatusErrOther]
///       - Size of the session data for transmission specified in the argument is 0. [eFrameworkunifiedStatusErrOther]
///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
///       [eFrameworkunifiedStatusInvldQName]
///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) during the transmission of the session message to the service
///       occurs. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmit buffer of the message for the session to the service is illegal.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///       To send to the service a message of session request together with the data.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
///                FrameworkunifiedGetSessionId
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedOpenSessionWithData(HANDLE hService, PVOID pData, UI_32 length);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedOpenSessionSync
/// \~english @par Brief
///       Synchronous API of sending a message of the session request to the service.
/// \~english @param [in] hService
///        HANDLE   - Handle to the service(FrameworkunifiedOpenService/FrameworkunifiedGetOpenSessionHandle/FrameworkunifiedGetOpenSessionSyncHandle HANDLE
///        acquired in)
/// \~english @param [out] ack
///        OpenSessionAck   - Pointer to the response data of the session initiation
/// \~english @par
///        OpenSessionAck Structure
/// \~english @code
///                 #define MAX_QUEUE_NAME_SIZE 20
///                 typedef struct _OpenSessionAck
///                 {
///                       EFrameworkunifiedStatus eStatus;                      /* Status                */
///                       UI_32 sessionId;                         /* Session ID            */
///                       CHAR  cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte)  */
///                       UI_32 sessionType;                       /* Session Type          */
///                 }OpenSessionAck;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldHandle]
///       - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
///       - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
///       [eFrameworkunifiedStatusInvldQName]
///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmit and receive file descriptor of the session message to the service.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) occurs during the transmission and reception of the session message
///       to the service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmit buffer of the message for the session to the service is illegal.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
///       - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
///       - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
///       - Interruption by the system call (signal) to wait in the response message received from the service has
///       occurred. [eFrameworkunifiedStatusFail]
///       - In response message at the time of failure to receive from the service, it failed to re-connection of the
///       Socket. [eFrameworkunifiedStatusBadConnection]
/// \~english @par Detail
///       Send in the synchronous type the message of the session request to the service.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenSessionWithDataSync, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedCloseSessionSync,
/// FrameworkunifiedGenerateNewSessionId,
///                 FrameworkunifiedGetSessionId
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedOpenSessionSync(HANDLE hService, OpenSessionAck *ack);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedOpenSessionWithDataSync
/// \~english @par Brief
///       Synchronous API that transmits to the service a message session request with the data.
/// \~english @param [in] hService
///        HANDLE   - Handle to the service(FrameworkunifiedOpenService/FrameworkunifiedGetOpenSessionHandle/FrameworkunifiedGetOpenSessionSyncHandle HANDLE
///        acquired in)
/// \~english @param [in] pData
///        PVOID    - Pointer to session data for transmission
/// \~english @param [in] length
///        UI_32    - Size of the session data for transmission
/// \~english @param [out] ack
///        OpenSessionAck   - Pointer to the response data of the session initiation
/// \~english @par
///        OpenSessionAck Structure
/// \~english @code
///                 #define MAX_QUEUE_NAME_SIZE 20
///                 typedef struct _OpenSessionAck
///                 {
///                       EFrameworkunifiedStatus eStatus;                      /* Status                */
///                       UI_32 sessionId;                         /* Session ID            */
///                       CHAR  cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte)  */
///                       UI_32 sessionType;                       /* Session Type          */
///                 }OpenSessionAck;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid Buffer
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - A pointer to the session data for transmission to the specified non-zero size at NULL in argument.
///       [eFrameworkunifiedStatusInvldBuf]
///       - The pointer is NULL to the session data for transmission specified in the argument. [eFrameworkunifiedStatusErrOther]
///       - Size of the session data for transmission specified in the argument is 0. [eFrameworkunifiedStatusErrOther]
///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldHandle]
///       - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
///       - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
///       [eFrameworkunifiedStatusInvldQName]
///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmit and receive file descriptor of the session message to the service.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) occurs during the transmission and reception of the session message
///       to the service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmit buffer of the message for the session to the service is illegal.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
///       - In the shared memory access for transmission and reception of the service for the message for the session
///       failed. [eFrameworkunifiedStatusErrOther]
///       - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
///       - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
///       - Interruption by the system call (signal) to wait in the response message received from the service has
///       occurred. [eFrameworkunifiedStatusFail]
///       - In response message at the time of failure to receive from the service, it failed to re-connection of the
///       Socket. [eFrameworkunifiedStatusBadConnection]
/// \~english @par Detail
///       Send in the synchronous type to service the message of the session request along with the data.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedCloseSessionSync, FrameworkunifiedGenerateNewSessionId,
///                 FrameworkunifiedGetSessionId
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedOpenSessionWithDataSync(HANDLE hService, PVOID pData, UI_32 length, OpenSessionAck *ack);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetOpenSessionHandle
/// \~english @par Brief
///       Asynchronous API to get the session handler.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application (FrameworkunifiedCreateDispatcherWithoutLoop() HANDLE acquired in)
/// \~english @retval HANDLE HANDLE for the session
/// \~english @retval NULL   Failure to HANDLE acquisition for the session
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       Under the following conditions, HANDLE is returned as NULL.
///       - HANDLE specified in the argument (hApp) is NULL.
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid).
///       - Data size received by the HANDLE specified in the argument (hApp) is not the data size of
///       ProtocolOpenSessionAck message.
///       - Can not get the data and the data length received by the HANDLE specified in the argument (hApp).
///       - Size of the session name of the data received by the specified HANDLE (hApp) in the argument is more than
///       20byte.
///       - Not be able to acquire the memory of the buffer for the internal processing.
///       - Session name is NULL of data received by the HANDLE specified in the argument (hApp).
///       - It failed to generate the message queue name.
///       - It failed to open the message queue.
/// \~english @par Detail
///       This API will be used in an asynchronous type specification. \n
///       Acquires received data ProtocolOpenSessionAck from HANDLE specified in the argument (hApp), \n
///       obtains the session HANDLE from the session name.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
///                FrameworkunifiedGetSessionId
////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedGetOpenSessionHandle(HANDLE hApp);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetOpenSessionSyncHandle
/// \~english @par Brief
///       API to get the session ID without using the received data of ProtocolOpenSessionAck.
/// \~english @param [in] hApp
///        HANDLE   - HANDLE for Application (FrameworkunifiedCreateDispatcherWithoutLoop() HANDLE acquired in)
/// \~english @param [in] tAck
///        OpenSessionAck   - Pointer to the OpenSessionAck structure
/// \~english @par
///        OpenSessionAck Structure
/// \~english @code
///                 #define MAX_QUEUE_NAME_SIZE 20
///                 typedef struct _OpenSessionAck
///                 {
///                       EFrameworkunifiedStatus eStatus;                      /* Status               */
///                       UI_32 sessionId;                         /* Session ID           */
///                       CHAR  cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte) */
///                       UI_32 sessionType;                       /* Session Type         */
///                 }OpenSessionAck;
///            @endcode
/// \~english @retval HANDLE HANDLE for the session
/// \~english @retval NULL   Failure to HANDLE acquisition for the session
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       Under the following conditions, HANDLE is returned as NULL.
///       - HANDLE specified in the argument (hApp) is NULL.
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid).
///       - Data size received by the HANDLE specified in the argument (hApp) is not the data size of
///       ProtocolOpenSessionAck message.
///       - Size of the session name of the data received by the specified HANDLE (hApp) in the argument is more than
///       20byte.
///       - Not be able to acquire the memory of the buffer for the internal processing.
///       - Session name is NULL of data received by the HANDLE specified in the argument (hApp).
///       - It failed to generate the message queue name.
///       - It failed to open the message queue.
/// \~english @par Detail
///       This API is to be used at the time of the synchronous type specification. \n
///       Use the session name of OpenSessionAck structure specified by the argument, to get the session HANDLE.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync, FrameworkunifiedCloseSessionSync, FrameworkunifiedGenerateNewSessionId,
///                FrameworkunifiedGetSessionId
////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedGetOpenSessionSyncHandle(HANDLE hApp, OpenSessionAck *tAck);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGenerateSessionHandle
/// API will be called by server on receiving the Open session request to Create session
///
///
/// \param [in] hApp
///         HANDLE - Handle to the framework application
/// \param [in] pServiceName
///         PCSTR - Service Name
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
///
/// \see FrameworkunifiedOpenSession, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId
///    FrameworkunifiedGetSessionId
///
///
////////////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedGenerateSessionHandle(HANDLE hApp, PCSTR pServiceName);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedCloseSession
/// \~english @par Brief
///       API to close the session.
/// \~english @param [in] hService
///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
/// \~english @param [in] hSession
///        HANDLE   - Handle to the session(FrameworkunifiedOpenSession HANDLE acquired in)
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hSession) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
///       [eFrameworkunifiedStatusInvldQName]
///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) during the transmission of the session message to the service
///       occurs. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmit buffer of the message for the session to the service is illegal.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
///       - Message queue type of HANDLE specified in the argument (hSession) is mismatch.(eQTypeSender or
///       eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
///       - Failed to close message queue HANDLE specified in the argument (hSession). [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///       Send a message of the session close request to the service.\n
///       And close message queue of the session.
///       This is asynchronous API.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedGetOpenSessionHandle
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedCloseSession(HANDLE hService, HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedCloseSessionSync
/// \~english @par Brief
///       API to close the session (synchronous).
/// \~english @param [in] hService
///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
/// \~english @param [in] hSession
///        HANDLE   - Handle to the session(FrameworkunifiedOpenSessionSync HANDLE acquired in)
/// \~english @param [out] ack
///        CloseSessionAck   - Pointer to the response data of the session close
/// \~english @par
///        CloseSessionAck Structure
/// \~english @code
///                 typedef struct _CloseSessionAck
///                 {
///                       UI_32 sessionId;                         /* Session ID            */
///                       EFrameworkunifiedStatus eStatus;                      /* Status                */
///                 }CloseSessionAck;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
/// \~english @retval eFrameworkunifiedStatusOK [eStatus in CloseSessionAck]Success in serivice side.
/// \~english @retval eFrameworkunifiedStatusFail [eStatus in CloseSessionAck]Some sort of error occurred in service side.
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure (API)
///       - CloseSessionAck specified in the argument (ack) is NULL. [eFrameworkunifiedStatusInvldParam]
///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hSession) is NULL. [eFrameworkunifiedStatusNullPointer]
///       - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
///       - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
///       [eFrameworkunifiedStatusInvldHandle]
///       - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
///       - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
///       [eFrameworkunifiedStatusInvldQName]
///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
///       [eFrameworkunifiedStatusInvldHndlType]
///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
///       - It is invalid transmit and receive file descriptor of the session message to the service.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) occurs during the transmission and reception of the session message
///       to the service. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmit buffer of the message for the session to the service is illegal.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
///       - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
///       - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
///       - Interruption by the system call (signal) to wait in the response message received from the service has
///       occurred. [eFrameworkunifiedStatusFail]
///       - In response message at the time of failure to receive from the service, it failed to re-connection of the
///       Socket. [eFrameworkunifiedStatusBadConnection]
///       - Failed to close message queue HANDLE specified in the argument (hSession). [eFrameworkunifiedStatusInvldHandle]
///       - Message queue type of HANDLE specified in the argument (hSession) is mismatch.(eQTypeSender or
///       eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
/// \~english @par Conditions of processing failure (eStatus in CloseSessionAck)
///       - Any errors occur during in service side. [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Send a message synchronously of the session close request to the service.\n
///       And close message queue of the session.\n
///       The eStatus value in CloseSessionAck is dependent on service. So we indecates major return value.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedCloseSessionSync(HANDLE hService, HANDLE hSession, CloseSessionAck *ack);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGenerateNewSessionId
/// Used on the Server side to get the next session id
///
///
/// \return sessionID
///         UI_32 - session ID value
///
///
/// \see FrameworkunifiedOpenSession, FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedCloseSession,
///    FrameworkunifiedGetSessionId
///
///
////////////////////////////////////////////////////////////////////////////////////////////
UI_32 FrameworkunifiedGenerateNewSessionId();

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetSessionId
/// \~english @par Brief
///        Returns the session id corresponding to the given session handle.
/// \~english @param [in] hSession
///        HANDLE   - Handle to the session(FrameworkunifiedMcOpenSender HANDLE acquired in)
/// \~english @retval UI_32 session ID value
/// \~english @retval MAX_SESSION_ID_VAL Failed to get session ID value
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hSession) is NULL. [MAX_SESSION_ID_VAL]
///       - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [MAX_SESSION_ID_VAL]
/// \~english @par Detail
///        Returns the session id corresponding to the given session handle.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithData, FrameworkunifiedOpenSessionWithDataSync, \n
///                 FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedGetCurrentSessionHandle, \n
///                 FrameworkunifiedMcOpenSender, FrameworkunifiedCreateSession
////////////////////////////////////////////////////////////////////////////////////////////
UI_32 FrameworkunifiedGetSessionId(HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetMsgSessionId
/// \~english @par Brief
///        Get session ID from received message.
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @retval UI_32 session ID value
/// \~english @retval MAX_SESSION_ID_VAL Failed to get session ID value
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
///       done.
/// \~english @par Change of internal state
///       - Change of internal state according to the API does not occur.
/// \~english @par Conditions of processing failure
///       - HANDLE specified in the argument (hApp) is NULL. [MAX_SESSION_ID_VAL]
///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [MAX_SESSION_ID_VAL]
/// \~english @par Detail
///        Get session ID from received message.\n
///        Mostly, this API is used to get session ID from message received by callback function that is registered to
///        Dispatcher.
/// \~english @par Classification
///          Public
/// \~english @see FrameworkunifiedGetSessionHandle
////////////////////////////////////////////////////////////////////////////////////////////
UI_32 FrameworkunifiedGetMsgSessionId(HANDLE hApp);







////////////////////////////////////////////////////////////////////////////////////////////
//        Defer Message APIs
////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGetDeferQueueCnt
/// Get the number of messages in the defer queue
///
///
/// \param [in] hApp
///         HANDLE - Handle to the App / Thread
///
/// \return count
///         UI_32 - number of messages on Defered Queue
///
///
/// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
///
///
////////////////////////////////////////////////////////////////////////////////////////////
UI_32 FrameworkunifiedGetDeferQueueCnt(HANDLE hApp);


////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedIsDeferQueueEmpty
/// \~english @par Brief
///        Empty determination of DeferQueue
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @retval BOOL DeferQueue status (TRUE: empty or FALSE: not empty)
/// \~english @retval TRUE Judgment failure
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [TRUE]
///       - If the hApp specified in the arguments is not appropriate (not valid) [TRUE]
/// \~english @par Detail
///        Returns whether the DeferQueue in the application-handle given by the arguments is empty
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Not applicable
/// \~english @see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
/// FrameworkunifiedIsDeferQueueEmpty
/// Get the number of messages in the defer queue
///
///
/// \param [in] hApp
///         HANDLE - Handle to the App / Thread
///
/// \return count
///         BOOL - Indicates if the defer queue is empty, TRUE (empty), FALSE (not empty)
///
///
/// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage, FrameworkunifiedGetDeferQueueCnt
///
///
////////////////////////////////////////////////////////////////////////////////////////////
BOOL FrameworkunifiedIsDeferQueueEmpty(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDeferMessage
/// \~english @par Brief
///        Push messages to the DeferQueue
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///        Push received messages in the application handles specified by the arguments to the DeferQueue.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Set Get
/// \~english @see FrameworkunifiedRetrieveDeferMessage
/// FrameworkunifiedDeferMessage
/// Defers the current message; Pushes the message on to a defer msg queue
///
///
/// \param [in] hApp
///         HANDLE - Handle to the App / Thread
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
///
/// \see FrameworkunifiedClearDeferMessages, FrameworkunifiedRetrieveDeferMessage
///
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDeferMessage(HANDLE hApp);


////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedClearDeferMessages
/// Clear all the defer messages
///
///
/// \param [in] hApp
///         HANDLE - Handle to the App / Thread
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
///
/// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
///
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedClearDeferMessages(HANDLE hApp);


////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedRetrieveDeferMessage
/// \~english @par Brief
///        Write Messages Registered in DeferQueue to FD
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///        Write the messages registered in the DeferQueue in the application handler specified by arguments to the FD.\n
///        This allows the main loop to receive the message.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Set Get
/// \~english @see FrameworkunifiedDeferMessage
/// FrameworkunifiedRetrieveDeferMessage
/// Enables Checking for deferred message and retrieves messages when
/// callback returns to the dispatcher.
///
/// \param [in] hApp
///         HANDLE - Handle to the App / Thread
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
///
/// \see FrameworkunifiedDeferMessage, FrameworkunifiedClearDeferMessages
///
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedRetrieveDeferMessage(HANDLE hApp);

// TODO(framework_unified) : clean up the old FrameworkunifiedRegisterPersistentStorage api's
// 20110429_brp
// defined for backward compatibility; will be removed once the persistence feature is finalized
EFrameworkunifiedStatus FrameworkunifiedRegisterPersistentStorage(HANDLE hApp, PCSTR pFullFilePath);
EFrameworkunifiedStatus FrameworkunifiedReleaseFileToPersistentStorage(HANDLE hApp, PCSTR pFullFilePath, BOOL persist);



////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedRegisterEvent
/// \~english @par Brief
///        Registering Applications for Delivery of Service-Specific Events
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
/// \~english @param [in] uiEventId
///        UI_32   - Event ID (Identification ID on the service's protocol)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Services and sessions are established (FrameworkunifiedOpenSession)
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Issues a request for registering the application that executes this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the arguments.\n
///        The application specifies the type of events to receive in the uiEventId of arguments.\n
///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
/// \~english @par
///        Please note the following points when using this API for application.
///       - This API is deprecated and should now use FrameworkunifiedSubscribeToSessionEventWithCallback.
///       - When this API is used, the application shall use a FrameworkunifiedAttachCallbackToDispatcher or the like to register callback functions in its own Dispatcher for handling events.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
///                 FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
///                 FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
///
/// API to register for event of a service.
/// This API is depricated, use FrameworkunifiedSubscribeToSessionEventWithCallback.
///
/// \param [in] hSession
///         HANDLE - Handle to the application session
/// \param [in] uiEventId
///     UI_32 - Event registering for.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents,
/// FrameworkunifiedPublishEvent
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedRegisterEvent(HANDLE hSession, UI_32 uiEventId);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedRegisterEvents
/// \~english @par Brief
///        Registering Applications for Delivery of Service-Specific Events
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
/// \~english @param [in] puiEventsArray
///        PVOID   - The event ID to deliver (the identification ID on the service's protocol)
/// \~english @param [in] uiListSize
///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Services and sessions are established (FrameworkunifiedOpenSession)
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the array (puiEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
///       - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///        Issues a request for registering the application that executes this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the arguments.\n
///        The application specifies more than one type of events to receive in the puiEventsArray of arguments.\n
///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
/// \~english @par
///        Please note the following points when using this API for application.
///       - This API is deprecated and should now use FrameworkunifiedSubscribeToSessionEventsWithCallbacks.
///       - When this API is used, the application shall use a FrameworkunifiedAttachCallbackToDispatcher or the like to register callback functions in its own Dispatcher for handling events.
///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
///                 FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
///                 FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
///
/// API to register for events of a service.
/// This API is depricated, use FrameworkunifiedSubscribeToSessionEventsWithCallbacks.
///
/// \param [in] hSession
///         HANDLE - Handle to the application session
/// \param [in] puiEventsArray
///     PVOID - Array of events registering for.
/// \param [in] uiListSize
///     UI_32 - count of elements in array.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedRegisterEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents,
/// FrameworkunifiedPublishEvent
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedRegisterEvents(HANDLE hSession, PVOID puiEventsArray, UI_32 uiListSize);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedUnRegisterEvent
/// \~english @par Brief
///        Unregistering Service-Specific Events from Delivery
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
/// \~english @param [in] uiEventId
///        UI_32   - Event ID (Identification ID on the service's protocol)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Services and sessions are established (FrameworkunifiedOpenSession)
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Issues a request to unregister the application that executed this API from the delivery target of the service-specific event associated with the handle (hSession) specified in the arguments.\n
///        The application specifies events that are no longer needed for delivery in the uiEventId of arguments.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)
/// \~english @par
///        Please note the following points when using this API for application.
///       - This API is deprecated and should now use FrameworkunifiedUnSubscribeSessionEventWithCallback.
///       - When this API is used, the application shall unregister callbacks for events registered in its own Dispatcher by means of FrameworkunifiedDetachCallbackFromDispatcher, etc.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvents,
///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
///                 FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
///
/// API to unregister from event of a service.
/// This API is depricated, use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
///
/// \param [in] hSession
///         HANDLE - Handle to the application session
/// \param [in] uiEventId
///     UI_32 - Event registering for.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedUnRegisterEvents, FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedPublishEvent
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnRegisterEvent(HANDLE hSession, UI_32 uiEventId);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedUnRegisterEvents
/// \~english @par Brief
///        Unregistering Service-Specific Events from Delivery
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
/// \~english @param [in] puiEventsArray
///        PVOID   - The event ID to deliver (the identification ID on the service's protocol)
/// \~english @param [in] uiListSize
///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Services and sessions are established (FrameworkunifiedOpenSession)
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the array (puiEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
///       - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///        Issues a request to unregister the application that executed this API from the delivery target of the service-specific event associated with the handle (hSession) specified in the arguments.\n
///        The application specifies the unneeded events in the puiEventsArray of arguments.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)
/// \~english @par
///        Please note the following points when using this API for application.
///       - This API is deprecated and should now use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
///       - After executing this API, the callback of the event registered in the Dispatcher of the application itself must be unregistered by FrameworkunifiedDetachCallbackFromDispatcher, etc.
///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent,
///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
///                 FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
///
/// API to unregister from events of a service.
/// This API is depricated, use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
///
/// \param [in] hSession
///         HANDLE - Handle to the application session
/// \param [in] puiEventsArray
///     PVOID - Array of events registering for.
/// \param [in] uiListSize
///     UI_32 - count of elements in array.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedUnRegisterEvent, FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedPublishEvent
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnRegisterEvents(HANDLE hSession, PVOID puiEventsArray, UI_32 uiListSize);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDefineStateEvents
/// \~english @par Brief
///        Subscribing to Application-Specific Events in the Dispatcher
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] puiEvents
///        PVOID   - Pointer to an array (UI_32 arrays) of event IDs (identification IDs on the service protocol)
/// \~english @param [in] uiListSize
///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        Register unique events in your Dispatcher that applications can deliver to other applications.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
///        For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPublicEvent.\n
///        Events are distributed to applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
/// \~english @par
///        Please note the following points when using this API for application.
///       - This API is deprecated, use FrameworkunifiedDefinePublicStateEvents or FrameworkunifiedDefinePrivateStateEvents now.
///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
///                 FrameworkunifiedPublishEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishPublicEvent, FrameworkunifiedPublishPrivateEvent
///                 FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
///
/// API to define the state events of the service.
/// This API is depricated, use FrameworkunifiedDefinePublicStateEvents or FrameworkunifiedDefinePrivateStateEvents.
///
/// \param [in] hApp
///         HANDLE - Handle to the application framework
/// \param [in] puiEvents
///     PVOID - Array of state events or single state event.
/// \param [in] uiListSize
///     UI_32 - size of events list.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDefineStateEvents(HANDLE hApp, PVOID puiEvents, UI_32 uiListSize);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedPublishEvent
/// \~english @par Brief
///        Deliver application-specific events
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] uiEventId
///        UI_32   - The event ID to deliver (the identification ID on the service's protocol)
/// \~english @param [in] pClientName
///        PCSTR   - Destination application name (distributed to all registered applications when NULL is specified),
/// \~english @param [in] pData
///        PCVOID   - Pointer to trasmission data
/// \~english @param [in] iLength
///        UI_32   - Transmission data length
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - The events to be delivered must be specified in a FrameworkunifiedDefinePublicStateEvents, etc.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
///       - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
///       - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
///       - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
///       - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
///       - When the send data length (iLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL, [eFrameworkunifiedStatusErrOther]
///       - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
///       - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
///       - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
///       - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
///       - When the message queue is full [eFrameworkunifiedStatusErrOther]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
///       - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///        Delivers application-specific events to subscribed applications.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
///        The delivery destination of events is the application specified by the argument pClientName or (when the argument pClientName is NULL)
///        all the applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks etc.\n
///        The data (pData) to be distributed is the same for all distribution destinations.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - Operation cannot be guaranteed if the size of the area indicated by the pointer (pData) address to the send data does not match the size specified by the send data length (iLength) address.
/// \~english @par
///        This API is deprecated, use FrameworkunifiedPublishPublicEvent or FrameworkunifiedPublishPrivateEvent now.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents,
///                 FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishPublicEvent,
///                 FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
///                 FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
///                 FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
///
/// This API is used to publish the event to one of the client subscribed to this event.
/// This API can be used to publish the event to all the clients subscribed to this event by
/// passing pClientName as NULL.
/// This API is depricated, use FrameworkunifiedPublishPrivateEvent or FrameworkunifiedPublishPublicEvent.
///
/// \param [in] hApp
///         HANDLE - Handle to the application framework
/// \param [in] uiEventId
///         UI_32 - Event id of Message
/// \param [in] pClientName
///         PCSTR - Name of the client
/// \param [in] pData
///         PCVOID - Data buffer
/// \param [in] iLength
///         UI_32 - Size of data buffer
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedPublishEvent(HANDLE hApp, UI_32 uiEventId, PCSTR pClientName, PCVOID pData, UI_32 iLength);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedBroadcastEvent
/// \~english @par Brief
///        Broadcast application-specific events
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] uiEventId
///        UI_32   - The event ID to deliver (the identification ID on the service's protocol)
/// \~english @param [in] pData
///        PCVOID   - Pointer to trasmission data
/// \~english @param [in] iLength
///        UI_32   - Transmission data length
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - The events to be delivered must be specified in a FrameworkunifiedDefinePublicStateEvents, etc.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
///       - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
///       - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
///       - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
///       - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
///       - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
///       - When the send data length (iLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL, [eFrameworkunifiedStatusErrOther]
///       - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
///       - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
///       - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
///       - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
///       - When the message queue is full [eFrameworkunifiedStatusErrOther]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
///       - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///        Broadcast application-specific events to all registered applications.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
///        Events are delivered to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
///        The data (pData) to be distributed is the same for all distribution destinations.
/// \~english @par
///        This API is deprecated and should now use FrameworkunifiedPublishPublicEvent.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents,
///                 FrameworkunifiedPublishEvent, FrameworkunifiedPublishPublicEvent,
///                 FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
///                 FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
///                 FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
///
/// This API is used to publish the event to all the clients subscribed to this event.
/// This API is depricated, use FrameworkunifiedPublishPublicEvent.
///
/// \param [in] hApp
///         HANDLE - Handle to the application framework
/// \param [in] uiEventId
///         UI_32 - Event id of Message
/// \param [in] pData
///         PCVOID - Data buffer
/// \param [in] iLength
///         UI_32 - Size of data buffer
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedRegisterEvent, FrameworkunifiedPublishEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedBroadcastEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 iLength);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDefinePublicStateEvents
/// \~english @par Brief
///        Subscribing to Application-Specific Events in the Dispatcher
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] puiEvents
///        PUI_32   - The event ID to deliver (the identification ID on the service's protocol)
/// \~english @param [in] uiListSize
///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        Register unique events in your Dispatcher that applications can deliver to other applications.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
///        For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPublicEvent.\n
///        Events are distributed to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
/// \~english @par
///        The difference from FrameworkunifiedDefinePrivateStateEvents is that when the Dispatcher distributes events registered by this API, the same data is distributed to all registered applications.
/// \~english @par
///        Please note the following points when using this API for application.
///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
///       - FrameworkunifiedDefinePrivateStateEvents should be used to deliver individual data by registered application sessions.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedPublishPublicEvent, FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedPublishPrivateEvent,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
///
/// This API is used to define the public state events of the service.
/// Public Event means the data associated with the event will be same for all the clients
/// subscribed to it.
///
/// \param [in] hApp
///         HANDLE - Handle to the application framework
/// \param [in] puiEvents
///     PUI_32 - Array of state events or single state event.
/// \param [in] uiListSize
///     UI_32 - size of events list.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedDefinePrivateStateEvents
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDefinePublicStateEvents(HANDLE hApp, PUI_32 puiEvents, UI_32 uiListSize);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDefinePrivateStateEvents
/// \~english @par Brief
///        Subscribing to Application-Specific Events in the Dispatcher
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] puiEvents
///        PUI_32   - The event ID to deliver (the identification ID on the service's protocol)
/// \~english @param [in] uiListSize
///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        Register unique events in your Dispatcher that applications can deliver to other applications.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
///        For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPrivateEvent.\n
///        Events are distributed to applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
/// \~english @par
///        The difference from FrameworkunifiedDefinePublicStateEvents is that when the Dispatcher distributes events registered by this API, it distributes individual data by sessions of the registered application.
/// \~english @par
///        Please note the following points when using this API for application.
///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
///       - Use FrameworkunifiedDefinePublicStateEvents to deliver broadcasts to all registered applications.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedPublishPrivateEvent, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedPublishPublicEvent,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
///
/// This API is used to define the private state events of the service.
/// Private event means the data associated with the event will be specific for
/// every session of all the clients on which it has subscribed.
///
/// \param [in] hApp
///         HANDLE - Handle to the application framework
/// \param [in] puiEvents
///     PUI_32 - Array of state events or single state event.
/// \param [in] uiListSize
///     UI_32 - size of events list.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedDefinePublicStateEvents
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDefinePrivateStateEvents(HANDLE hApp, PUI_32 puiEvents, UI_32 uiListSize);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSubscribeToSessionEventWithCallback
/// \~english @par Brief
///        Register delivery of service-specific events and set callback for receiving events
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] uiEventId
///        UI_32   - Event ID (Identification ID on the service protocol) (PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD)
/// \~english @param [in] fpOnCmd
///        CbFuncPtr   - Pointer to callback function when event is received
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Services and sessions are established (FrameworkunifiedOpenSession)
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - If the callback function pointer (fpOnCmd) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Sets the callback function for the event ID (iCmd) specified in the application Dispatcher.\n
///        Then, it issues a request for registering the application that executed this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the argument.\n
///        The application specifies the type of event to be received from the service by the event ID (uiEventId) of the arguments.\n
///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedSubscribeToSessionEventsWithCallbacks, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
///
/// This API is used for subscribing to single event of a service.
/// This API also attaches the session event with callback.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] uiEventId
///     UI_32 - Event id
/// \param [in] fpOnCmd
///     CbFuncPtr - pointer to callback function
/// \param [in] hSession
///     HANDLE - Session handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedSubscribeToSessionEventsWithCallbacks
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventWithCallback(HANDLE hApp, UI_32 uiEventId, CbFuncPtr fpOnCmd, HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSubscribeToSessionEventsWithCallbacks
/// \~english @par Brief
///        Registering multiple service-specific events for delivery and configuring callback settings when an event is received
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pEventHandler
///        const FrameworkunifiedProtocolCallbackHandler* - Pointer to array of event handler structure
/// \~english @param [in] uiHandlerCount
///        UI_32   - Number of event handlers to register (0 to 214748362)
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
/// \~english @par
///        FrameworkunifiedProtocolCallbackHandler Structure
/// \~english @code
///            typedef struct _FrameworkunifiedProtocolCallbackHandler
///            {
///                  UI_32 iCmd;            /* Event ID (Identification ID on the service's protocol) */
///                  CbFuncPtr callBack;    /* Reference to an XML stream       */
///            }FrameworkunifiedProtocolCallbackHandler;
///            @endcode
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Services and sessions are established (FrameworkunifiedOpenSession)
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the event handler structure array (pEventHandler) specified by arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///        Sets the callback functions for the IDs specified by the pEventHandler arguments in the Dispatcher of the application.\n
///        Then, it issues a request for registering the application that executed this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the argument.\n
///        The application specifies the type of event to be received from the service by the event ID.\n
///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - If the callback function pointer in the event handler structure (pEventHandler) specified in the arguments is NULL, the callback function up to NULL is registered.\n
///         Later, FrameworkunifiedSendMsg() is executed inside this API, and the result becomes the return code of this API.\n
///         Do not set NULL in the callback function pointer because operation cannot be guaranteed.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
///
/// This API is used for subscribing to multiple events of a service.
/// This API also attaches the session event with callbacks.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] pEventHandler
///     FrameworkunifiedProtocolCallbackHandler - Array of event handler structures
/// \param [in] uiHandlerCount
///     UI_32 - number of event handlers
/// \param [in] hSession
///     HANDLE - Session handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedSubscribeToSessionEventWithCallback
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventsWithCallbacks(HANDLE hApp, const FrameworkunifiedProtocolCallbackHandler *pEventHandler,
                                                    UI_32 uiHandlerCount, HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedUnSubscribeSessionEventWithCallback
/// \~english @par Brief
///        Undeliver service-specific events and delete callbacks when events are received
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] uiEventId
///        UI_32   - Event ID (Identification ID on the service protocol) (PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD)
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Services and sessions are established (FrameworkunifiedOpenSession)
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
///       - If the service specified by the parameter hSession is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Issues a request to unregister the application that executed this API from the delivery target of device-specific events
///        of services associated with the handle (hSession) specified in the arguments.\n
///        Then, the callback functions for the specified event ID (iCmd) are deleted from the application Dispatcher.\n
///        The application specifies the type of event to be undelivered from the service by the event ID (uiEventId) of the arguments.\n
///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message.
///        The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedUnSubscribeSessionEventsWithCallbacks, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks
///
/// API to unsubscribe from event of a service. Also detaches callback.
///
/// \param [in] hApp
///         HANDLE - Application Handle
/// \param [in] uiEventId
///     UI_32 - Event id
/// \param [in] hSession
///         HANDLE - Session Handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventWithCallback(HANDLE hApp, UI_32 uiEventId, HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
/// \~english @par Brief
///        Undeliver multiple service-specific events and delete callbacks when an event is received
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pEventsArray
///        PUI_32   - Pointer to an array of Event IDs (Identification IDs in the service's protocol)
/// \~english @param [in] uiListSize
///        UI_32   - Number of elements in the event ID (identification ID in the service protocol) array (1 to 1073741813)
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Services and sessions are established (FrameworkunifiedOpenSession)
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the array (pEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
///       - When the number of elements (uiListSize) of the event ID array specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
///       - If the service specified by the parameter hSession is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Issues a request to unregister the application that executed this API from the delivery target of the plurality of unique events of the service associated with the handle (hSession) specified by the argument.\n
///        Then, the callback functions for the IDs specified in the pEventsArray arguments are deleted from the application Dispatcher.\n
///        The application specifies the type of event to be undelivered from the service by the event ID (pEventsArray) of the arguments.\n
///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks
///
/// API to unsubscribe from multiple events of a service. Also detaches callbacks.
///
/// \param [in] hApp
///         HANDLE - Application Handle
/// \param [in] pEventsArray
///     PUI_32 - Array of events id's.
/// \param [in] uiListSize
///     UI_32 - count of elements in array.
/// \param [in] hSession
///         HANDLE - Session Handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedUnSubscribeSessionEventWithCallback
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventsWithCallbacks(HANDLE hApp, PUI_32 pEventsArray, UI_32 uiListSize,
                                                    HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedPublishPublicEvent
/// \~english @par Brief
///        Broadcast application-specific events
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] uiEventId
///        UI_32   - The event ID to deliver (the identification ID on the service's protocol)
/// \~english @param [in] pData
///        PCVOID   - Pointer to trasmission data
/// \~english @param [in] uiLength
///        UI_32   - Transmission data length
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - The events to be delivered must be specified in the FrameworkunifiedDefinePublicStateEvents.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
///       - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
///       - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
///       - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
///       - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
///       - When the send data length (uiLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL [eFrameworkunifiedStatusErrOther]
///       - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
///       - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
///       - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
///       - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
///       - When the message queue is full [eFrameworkunifiedStatusErrOther]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
///       - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///        Broadcast application-specific events to subscribed applications.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
///        Events are delivered to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.\n
///        The data (pData) to be distributed is the same for all distribution destinations.
/// \~english @par
///        FrameworkunifiedPublishPrivateEvent should be used to deliver individual data by registered application sessions.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedPublishPrivateEvent,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
///
/// This API is used to publish the event to all the client over all the session it is subscribed to.
///
/// \param [in] hApp
///         HANDLE - Handle to the application framework
/// \param [in] uiEventId
///         UI_32 - Event id of Message
/// \param [in] pData
///         PCVOID - Data buffer
/// \param [in] uiLength
///         UI_32 - Size of data buffer
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedPublishPrivateEvent
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedPublishPublicEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 uiLength);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedPublishPrivateEvent
/// \~english @par Brief
///        Delivers application-specific events to a specified session
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] uiEventId
///        UI_32   - The event ID to deliver (the identification ID on the service's protocol)
/// \~english @param [in] pData
///        PCVOID   - Pointer to trasmission data
/// \~english @param [in] uiLength
///        UI_32   - Transmission data length
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusServNotFound Perform the event processing
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - The events to be delivered must be specified in the FrameworkunifiedDefinePrivateStateEvents.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the application handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the application handle (hApp) specified in the arguments is not appropriate (disabled) [eFrameworkunifiedStatusInvldParam]
///       - If the session handle (hSession) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the sessionhandle (hSession) specified in the arguments is not appropriate (is not valid) [eFrameworkunifiedStatusInvldParam]
///       - The event ID (uiEventId) specified in the parameter is not registered as an event to be delivered to the Dispatcher. [eFrameworkunifiedStatusServNotFound]
///       - When the session handle (hSession) specified in the arguments is not registered as the delivery destination in the Dispatcher [eFrameworkunifiedStatusServNotFound]
///       - When the message queue handle in the session handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the application name in the session handle (hSession) specified by the arguments is not set [eFrameworkunifiedStatusInvldHandle]
///       - The message queue handle in the session handle (hSession) specified by the arguments is invalid. [eFrameworkunifiedStatusInvldHandle]
///       - When the send data length (uiLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL [eFrameworkunifiedStatusInvldBuf]
///       - When the name of the application in the session handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue in the session handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue in the session handle (hSession) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the session handle (hSession) specified in the parameter is not the send type [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
/// \~english @par Detail
///        Delivers application-specific events to specified sessions in registered applications.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
///        Events are delivered to the sessions specified in the hSession of arguments among the applications registered in the FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
/// \~english @par
///        Please note the following points when using this API for application.
///        - When broadcasting to all registered applications, use FrameworkunifiedPublishPublicEvent.
///        - This API shall be executed from within a callback function, and a session-use handle acquired using FrameworkunifiedGetCurrentSessionHandle shall be passed to the parameter hSession.
///        - Operation cannot be guaranteed if the size of the area indicated by the pointer (pData) address to the send data does not match
///          the size specified by the send data length (iLength) address.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Pub-Sub
/// \~english @see FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedPublishPublicEvent,
///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
///
/// This API is used to publish the event over session to the client subscribed to it using session handle.
///
/// \param [in] hApp
///         HANDLE - Handle to the application framework
/// \param [in] uiEventId
///         UI_32 - Event id of Message
/// \param [in] pData
///         PCVOID - Data buffer
/// \param [in] uiLength
///         UI_32 - Size of data buffer
/// \param [in] hSession
///         HANDLE - Session Handle
///
/// \return EFrameworkunifiedStatus
///         eFrameworkunifiedStatusOK - If publish event success
///     eFrameworkunifiedStatusInvldParam - Invalid parameter passed
///     eFrameworkunifiedStatusServNotFound - If event uiEventId not subscribed on hSession by a client
///     Any other values returned by FrameworkunifiedSendMsg
///
/// \see FrameworkunifiedPublishPublicEvent
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedPublishPrivateEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 uiLength, HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGetServiceAvailabilityTable
/// returns the list that stores the available services
///
/// \param [in] hApp
///         HANDLE - Handle to the application session

/// \return ServiceAvailabilityList
///         ServiceAvailabilityTable - ServiceAvailabilityList
///
/// \see FrameworkunifiedRegisterEvent
///
////////////////////////////////////////////////////////////////////////////////////////////
std::map<std::string, EFrameworkunifiedServiceAvailableStatus> FrameworkunifiedGetServiceAvailabilityTable(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedIsStateMachineApp
/// \~english @par Brief
///        Returns the presence or absence of a State Machine Application
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @retval BOOL State Machine Application existence (TRUE: existent/FALSE: nonexistent)
/// \~english @retval FALSE Judgment failure
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [FALSE]
///       - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
/// \~english @par Detail
///       Determines whether there is a State Machine Application from the application handle specified by the arguments, and returns the handle.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Not applicable
/// \~english @see FrameworkunifiedSetStateMachine, FrameworkunifiedHSMDispatcherWithArguments
///
/// FrameworkunifiedIsStateMachineApp
///   Returns TRUE if it's a state machine application else FALSE.
///
/// \param [in] hApp
///         HANDLE - Handle to the application session
///
/// \return TRUE - if a state machine application.
///     FALSE - if not a state machine application
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
BOOL FrameworkunifiedIsStateMachineApp(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGetXMLConfigHandle
///   Returns the handle to config file handle
///
/// \param [in] hApp
///         HANDLE - Handle to the application session
///
/// \return handle
///         HANDLE - Config file handle
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedGetXMLConfigHandle(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGetNumberOfSession
/// API to get the number of sessions created in the system.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] strServiceName
///         PCSTR - Service name.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
UI_32 FrameworkunifiedGetNumberOfSession(HANDLE hApp, PCSTR strServiceName);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSetSessionHandle
/// \~english @par Brief
///        Registering Session Handles with an Application Dispatcher
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] strServiceName
///        PCSTR   - Service name established for the session
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions (Acquired by FrameworkunifiedGetOpenSessionHandle, etc.)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
///       - If the service-name (strServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
///       - If the length of the service-name (strServiceName) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        After the application establishes a session with the service using a FrameworkunifiedOpenSession or the like,
///        the session handle is registered in the application Dispatcher in association with the service name and session ID.
///        Session handles shall be acquired by using a FrameworkunifiedGetOpenSessionHandle or the like when a response is received from the service.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Sync
/// \~english @see FrameworkunifiedGetSessionHandle, FrameworkunifiedRemoveSessionHandle,
///                 FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync,
///                 FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedGetOpenSessionSyncHandle,
///
///   Sets the session handle in the Application Framework. It stores the mapping between
///   source, session id and session handle in the application framework.
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] strServiceName
///         PCSTR -Name of the associated service name
/// \param [in] hSession
///         HANDLE - Session handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedCreateSession, FrameworkunifiedGetSessionHandle, FrameworkunifiedRemoveSessionHandle.
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSetSessionHandle(HANDLE hApp, PCSTR strServiceName, HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetSessionHandle
/// \~english @par Brief
///        Get the session handle for the given service name and session ID
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] strServiceName
///        PCSTR   - service name
/// \~english @param [in] uiSessionId
///        UI_32   - session ID
/// \~english @retval HANDLE Handles for sessions
/// \~english @retval NULL NULL pointer(Acquisition failure)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [NULL]
///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
///       - If the service-name (strServiceName) specified in the parameter is NULL, [NULL]
///       - If the session with the service name (strServiceName) specified in the parameter is not registered in the Dispatcher, [NULL]
///       - If the session with the session ID name (uiSessionId) specified in the parameter is not registered in the Dispatcher, [NULL]
/// \~english @par Detail
///        Gets and returns the session handle associated with the specified service and session id from the application Dispatcher.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Sync
/// \~english @see FrameworkunifiedSetSessionHandle, FrameworkunifiedRemoveSessionHandle
///
///   Returns the requested session handle associated with service name and session id.
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] strServiceName
///         PCSTR -Name of the associated service name
/// \param [in] uiSessionId
///         HANDLE - Session Id
///
/// \return handle
///         HANDLE - Session handle
///
/// \see FrameworkunifiedSetSessionHandle
////////////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedGetSessionHandle(HANDLE hApp, PCSTR strServiceName, UI_32 uiSessionId);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetCurrentSessionHandle
/// \~english @par Brief
///        Get the session handle for the most recent incoming message
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @retval HANDLE Handles for sessions
/// \~english @retval NULL NULL pointer (Acquisition failure)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [NULL]
///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
///       - When the source service name obtained from received messages is NULL [NULL]
///       - If the Dispatcher does not have a session associated with the source service-name retrieved from the received message [NULL]
///       - When the session ID acquired from the received message is not registered in the Dispatcher, [NULL]
/// \~english @par Detail
///        Gets and returns the session-handle associated with the most recently received message from the application's Dispatcher.
/// \~english @par
///        The application shall execute this API using an application handle passed as an argument to the callback function.\n
///        (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Sync
/// \~english @see FrameworkunifiedGetSessionHandle, FrameworkunifiedSetSessionHandle
///
///   Returns the session handle for the current session. Useful, if used in the callback
///   function of protocol. Current session means on which the protocol message received.
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \return handle
///         HANDLE - Session handle
///
/// \see FrameworkunifiedSetSessionHandle, FrameworkunifiedGetSessionHandle.
////////////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedGetCurrentSessionHandle(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedRemoveSessionHandle
/// \~english @par Brief
///        Deletes the session handle for the given service name and session ID
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] strServiceName
///        PCSTR   - Service name
/// \~english @param [in] uiSessionId
///        UI_32   - session ID
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
///       - If the service-name (strServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
///       - If the length of the service-name (strServiceName) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        This service call deletes the session handle associated with the specified service name and session ID among the session handles registered in the application's Dispatcher by FrameworkunifiedSetSessionHandle.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - When a session ID that has been deleted (or unregistered) is specified, this API returns an eFrameworkunifiedStatusOK.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Sync
/// \~english @see FrameworkunifiedSetSessionHandle
///
///   Removes the session handle from the Application Framework associated with service name
///   and session id. It actually removes the mapping between source, session id and session
///   handle in the application framework which was set using FrameworkunifiedSetSessionHandle.
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] strServiceName
///         PCSTR -Name of the associated service name
/// \param [in] uiSessionId
///         HANDLE - Session Id
///
/// \return handle
///         HANDLE - Session handle
///
/// \see FrameworkunifiedSetSessionHandle
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedRemoveSessionHandle(HANDLE hApp, PCSTR strServiceName, UI_32 uiSessionId);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSetMandatoryServiceInfo
/// \~english @par Brief
///        Registers the specified Notification and event ID in the Notification list of the Dispatcher.
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pNotification
///        PCSTR   - Notification name
/// \~english @param [in] uiEventId
///        UI_32   - Event ID (Identification ID on the service's protocol)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the Notification name (pNotification) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the length of the Notification name (pNotification) specified in the arguments is 64 bytes or greater, [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Registers the specified Notification and event ID in the Notification list of the Dispatcher.\n
///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
///        By registering a Notification with this API, a Notification registration/unregistration request
///        to the notification service (NS_NPPService) is automatically issued by the Dispatcher when the Dispatcher starts/ends.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - If the Notification name is specified as an empty character, eFrameworkunifiedStatusOK is returned. Cannot guarantee operation.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Broadcast
/// \~english @see 
///
///   Sets the given service as Mandatory service in application handle
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pNotification
///         PCSTR -Name of the Notification
/// \param [in] uiEventId
///         UI_32 - event id
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSetMandatoryServiceInfo(HANDLE hApp, PCSTR pNotification, UI_32 uiEventId);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetSessionName
/// \~english @par Brief
///        Gets the name of the message queue from the session handle
/// \~english @param [in] hSession
///        HANDLE   - Handles for sessions
/// \~english @retval PCSTR Pointer to the message queue name
/// \~english @retval NULL NULL pointer (Acquisition failure)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hSession specified in the parameter is NULL, [NULL]
///       - If the hSession specified in the arguments is not appropriate (not valid) [NULL]
/// \~english @par Detail
///        Gets the name of the message queue from the session handle (hSession) passed in the parameter.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Sync
/// \~english @see 
///
///   Returns the session name corresponding to the given session handle.
///
///
/// \param [in] hSession
///         HANDLE - Session handle
///
/// \return session_name
///         PCSTR - Session name
///
/// \see
////////////////////////////////////////////////////////////////////////////////////////////
PCSTR FrameworkunifiedGetSessionName(HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedIsServiceAvailable
/// \~english @par Brief
///        Determine the availability of services
/// \~english @param [in] hApp
///        HANDLE   - Handle for Application
/// \~english @retval BOOL Use (TRUE: Available, FALSE: Not Available)
/// \~english @retval FALSE Acquisition failure
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [FALSE]
///       - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
///       - If the received message is not a service-availability notice... [FALSE]
///       - Incoming messages are invalid [FALSE]
/// \~english @par Detail
///        Based on the received Notification, the service is judged to be usable or unusable, and true/false is returned.
/// \~english @par
///        The application shall execute this API using the handle of the application passed as the argument of the service availability notification callback function.\n
///        (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Broadcast
/// \~english @see FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification,
///                 FrameworkunifiedSubscribeNotificationWithCallback, FrameworkunifiedSubscribeNotificationsWithCallback
///
///   This API should only be called in the callback/reaction associated with the Service
///   availability notification. It returns TRUE if service is available and FALSE if service
///   is not available.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
///
/// \return service_availability
///         BOOL - returns TRUE if service is available otherwise returns FALSE
///
/// \see
////////////////////////////////////////////////////////////////////////////////////////////
BOOL FrameworkunifiedIsServiceAvailable(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedPublishServiceAvailability
/// \~english @par Brief
///        Publish application availability status
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] bIsAvailable
///        BOOL   - Availability status of the application (TRUE: Available, FALSE: Not Available)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Notification must be registered by FrameworkunifiedRegisterServiceAvailabilityNotification.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - If the service-availability Notification is not set for the handle (hApp) specified in the parameter, [eFrameworkunifiedStatusFail]
///       - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the application name in the handler (hApp) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusErrFail]
/// \~english @par Detail
///        Notifies (issues a Notification) the availability status of an application to another application.\n
///        Applications must use this API to notify other applications when the availability of services provided by the application changes.\n
///        (However, the state machine managed application generated by FrameworkunifiedHSMDispatcherWithArguments, etc. is excluded because the state machine automatically issues a Notification.)
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Broadcast
/// \~english @see FrameworkunifiedRegisterServiceAvailabilityNotification, FrameworkunifiedGetSelfAvailability
///
///   This API publishes service availability status of the service. This API needs to be
///   used when service is up and ready to process clients requests.
///     FrameworkunifiedRegisterServiceAvailabilityNotification must be called before calling this API.
///   In Frameworkunified HSM Framework based application service availability is published by the Framework
///   So this API can be used only in Non-FRAMEWORKUNIFIED HSM based application.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] bIsAvailable
///     BOOL - TRUE if Service Available and FALSE if service is unavailable
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///   FrameworkunifiedRegisterServiceAvailabilityNotification
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedPublishServiceAvailability(HANDLE hApp, BOOL bIsAvailable);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetSelfAvailability
/// \~english @par Brief
///        Gets the availability status of the application itself
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @retval BOOL Use (TRUE: Available, FALSE: Not Available)
/// \~english @retval FALSE Acquisition failure
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [FALSE]
///       - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
/// \~english @par Detail
///        Gets the availability status of the applications managed in the Dispatcher.\n
///        Availability states are the values specified by the application when the FrameworkunifiedPublishServiceAvailability is executed.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Not applicable
/// \~english @see FrameworkunifiedPublishServiceAvailability
///
///   This API get service availability status of the service. This API needs to be
///   used when service is up and ready to process clients requests.
///     FrameworkunifiedRegisterServiceAvailabilityNotification must be called before calling this API.
///   In Frameworkunified HSM Framework based application service availability is published by the Framework
///   So this API can be used only in Non-FRAMEWORKUNIFIED HSM based application.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///   FrameworkunifiedRegisterServiceAvailabilityNotification, FrameworkunifiedPublishServiceAvailability
////////////////////////////////////////////////////////////////////////////////////////////
BOOL FrameworkunifiedGetSelfAvailability(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedRegisterServiceAvailabilityNotification
/// \~english @par Brief
///        Registering Application Availability Notification with NPP-Service
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pNotification
///        PCSTR   - Pointers to Notification names
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the Notification name (pNotification) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the length of the Notification name (pNotification) specified in the arguments is 64 bytes or greater, [eFrameworkunifiedStatusFail]
///       - When the length of the Notification name (pNotification) specified in the arguments is 0, [eFrameworkunifiedStatusInvldParam]
///       - Get buffer for sending messages (malloc) failed [eFrameworkunifiedStatusFail]
///       - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusErrFail]
/// \~english @par Detail
///        Requests that NPPservice register a Notification to notify the application availability status.\n
///        A Notification registered by this API can publish the availability status to other applications by executing FrameworkunifiedPublishServiceAvailability from the application.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - Operation is not guaranteed when the same application executes this API more than once with different Notification names.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Broadcast
/// \~english @see FrameworkunifiedUnRegisterServiceAvailabilityNotification, FrameworkunifiedPublishServiceAvailability
///
///   This API registers the given service availability notification. Need to be used by
///   service.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pNotification
///         PCSTR -Name of the Notification
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///   FrameworkunifiedPublishServiceAvailability
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedRegisterServiceAvailabilityNotification(HANDLE hApp, PCSTR pNotification);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedUnRegisterServiceAvailabilityNotification
/// \~english @par Brief
///        Revoke application availability Notification from NPPservice
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Notification must be registered by FrameworkunifiedRegisterServiceAvailabilityNotification.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - If the service-availability Notification is not set for the handle (hApp) specified in the parameter, [eFrameworkunifiedStatusInvldParam]
///       - Get buffer for sending messages (malloc) failed [eFrameworkunifiedStatusFail]
///       - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Requests that NPPservice abandon the Notification to notify the availability status of the application that executed this API.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Broadcast
/// \~english @see FrameworkunifiedRegisterServiceAvailabilityNotification
///
///   This API unregisters the service availability notification
///
/// \param [in] hApp
///         HANDLE - Application framework handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///   FrameworkunifiedPublishServiceAvailability, FrameworkunifiedRegisterServiceAvailabilityNotification
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnRegisterServiceAvailabilityNotification(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedCreateSession
/// \~english @par Brief
///        Create handles for sessions and register them with the application's Dispatcher
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pSessionName
///        PCSTR   - Session name (application name or thread name)
/// \~english @retval HANDLE Handles for sessions
/// \~english @retval NULL NULL pointer (Acquisition failure)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [NULL]
///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
///       - The session name (pSessionName) specified in the arguments is invalid.
///         (For NULL, if the length is 0 or 20 bytes or more) [NULL]
///       - When acquisition (malloc) of the message queue management information area fails, [NULL]
///       - When the normalized message queue name from the session name (pSessionName) is inappropriate (exceeds 16 bytes) [NULL]
///       - When acquisition (malloc) of the storage area for the message queue name fails, [NULL]
///       - The open of the message queue (mq_open) failed [NULL]
/// \~english @par Detail
///        Creates handles (send message queues) for sessions with the specified application and registers them in the application's Dispatcher.\n
///        The pSessionName is set to the application name or thread name of the client that establishes the session.\n
///        This API is used to establish a session with a client application when an application on the service providing side receives a session start request from the client application.
///        The application shall execute this API from the corresponding callback function.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Sync
/// \~english @see FrameworkunifiedDestroySession
///
///   This API generates the session handle and sets it in the Application Framework. This API
///     should be used by the server in the callback function attached to the open session request.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pSessionName
///         PCSTR - SessionName can be application name or thread name
///
/// \return session_handle
///         HANDLE - Session Handle
///
////////////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedCreateSession(HANDLE hApp, PCSTR pSessionName);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDestroySession
/// \~english @par Brief
///        Destroys the session handle and removes the session handle from the application Dispatcher
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] hSession
///        HANDLE   - Handle for sessions (handle obtained with FrameworkunifiedCreateSession)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
///       - When the length of the message queue name of the handle (hSession) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Destroys the specified session handle and removes the specified session handle from the application Dispatcher.\n
///        This API is used when the service-providing application receives a session termination request from the client application and discards the session with the client application.
///        The application shall execute this API from the corresponding callback function.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Sync
/// \~english @see FrameworkunifiedCreateSession
///
///   This API destroys the session handle and removes it from the Application Framework.
///     This API should be called by the server in the callback attached to the close session
///   request
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] hSession
///         HANDLE - Session handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDestroySession(HANDLE hApp, HANDLE hSession);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSendResponse
/// \~english @par Brief
///        Sending a Response to the Source of an Incoming Message
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] iCmd
///        UI_32   -  Identification ID on the service's protocol
/// \~english @param [in] length
///        UI_32   -  Data size to be sent (0 to 4294967255)
/// \~english @param [in] data
///        PCVOID   - Pointer to the data to send
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
///       - Sessions are registered in the Dispatcher by FrameworkunifiedCreateSession, etc.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
///       - When the source service name obtained from received messages is NULL [eFrameworkunifiedStatusFail]
///       - If the Dispatcher does not have a session associated with the source service-name retrieved from the received message [eFrameworkunifiedStatusFail]
///       - When the session ID acquired from the received message is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
///       - If the sessionhandle for incoming messages is NULL [eFrameworkunifiedStatusNullPointer]
///       - If the handles for sessions corresponding to incoming messages are inappropriate (disabled) [eFrameworkunifiedStatusNullPointer]
///       - When the message queue handle corresponding to the received message in the session handle is NULL [eFrameworkunifiedStatusInvldHandle]
///       - When the application name length in the session handle corresponding to received messages is 0, [eFrameworkunifiedStatusInvldHandle]
///       - Incorrect (invalid) message queue handle in session handle for incoming message [eFrameworkunifiedStatusInvldHandle]
///       - When the data (data) of the send message specified by the parameter is NULL and the data length (length) is not 0, [eFrameworkunifiedStatusInvldBuf]
///       - When the length of the application name in the session handle corresponding to the received message exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
///       - When the message queue name of the session handle corresponding to the received message is NULL [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue name of the session handle corresponding to the received message exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the session handle corresponding to the received message is not the transmission type [eFrameworkunifiedStatusInvldHndlType]
///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
///       - When the size (length) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///        Gets the session ID and session name from received messages, and the corresponding session handles from Dispatcher.\n
///        Send a response to the sender of the received message using the acquired session handle.
/// \~english @par
///        Please note the following points when using this API for application.\n
///       - The maximum data size (length) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
///         The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
///         Message header section\n
///       - Operation cannot be guaranteed when the size of the allocated area indicated by the address of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Method
/// \~english @see FrameworkunifiedCreateSession, FrameworkunifiedSetSessionHandle
///
///   This API retrieves the session handle from the application framework and sends the response
///   to the client on the same session. The session id and message source name available in the
///   hApp at that instance is used to get the session handle. This API will work if server has
///   created session using FrameworkunifiedCreateSession or has used FrameworkunifiedSetSessionHandle after creating the
///   session.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] iCmd
///         UI_32 - Protocol command
/// \param [in] length
///         UI_32 - size of message data
/// \param [in] data
///         PCVOID - message data
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedCreateSession, FrameworkunifiedSetSessionHandle, FrameworkunifiedSendRequest.
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSendResponse(HANDLE hApp, UI_32 iCmd, UI_32 length, PCVOID data);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedSendRequest
///   This API retrieves the session handle from the application framework and sends the request
///   to the server with specific service name and session id. This API will work, if application
///     has previously stored associated session handle using FrameworkunifiedSetSessionHandle.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] pServerName
///         PCSTR - Name of the server
/// \param [in] uiSessionId
///         UI_32 - session id
/// \param [in] iCmd
///         UI_32 - Protocol command
/// \param [in] length
///         UI_32 - size of message data
/// \param [in] data
///         PCVOID - message data
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see  FrameworkunifiedSetSessionHandle, FrameworkunifiedSendResponse
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSendRequest(HANDLE hApp, PCSTR pServerName, UI_32 uiSessionId, UI_32 iCmd,
                          UI_32 length, PCVOID data);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPSetPersonality
/// API to send message to Notification Service to set Personality
///
/// \param [in] hApp
///         HANDLE - Application Handle
/// \param [in] pUserName
///         PCSTR - Name of the new Personality
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPSetPersonality(HANDLE hApp, PCSTR pUserName);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPChangePersonality
/// API to send message to Notification Service to set new Personality
///
/// \param [in] hApp
///         HANDLE - Application Handle
/// \param [in] pUserName
///         PCSTR - Name of the new Personality
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPChangePersonality(HANDLE hApp, PCSTR pUserName);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup  FrameworkunifiedSendStopToNSNPP
/// \~english @par Brief
///        API that sends a message to the notification service and requests a shutdown
/// \~english @param [in] hApp
///        HANDLE           - Handle for the application
/// \~english @param [in] eShutdownType
///        EFrameworkunifiedShutdownType - Shutdown type
/// \~english @param [in] uiStopMsgData
///        UI_32            - Flag subject to resetting (Default:0)
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Sends a message to the notification service (NS_NPPService) and requests shutdown.\n
///       The reset target flag (uiStopMsgData) is valid only when the shutdown type (eShutdownType) is eFrameworkunifiedDataResetShutdown.\n
///       The reset target flag (uiStopMsgData) indicates the target of data reset at shutdown.\n
///       The target can be OR-set by using EFrameworkunifiedPersistCategory defined values.\n
///       The specified target is reset from the non-volatile memory.
///         Eg: uiStopMsgData = (eFrameworkunifiedUserData | eFrameworkunifiedFactoryCustomerData) = 0x0101\n
///           eFrameworkunifiedUserData bit            : 1 : user data resets\n
///           eFrameworkunifiedFactoryData bit         : 0 : factory data not reset-target\n
///           eFrameworkunifiedFactoryCustomerData bit : 1 : factory customer data resets\n
///           eFrameworkunifiedDealerData bit          : 0 : persist dealer data not reset-target\n
/// \~english @par Classification
///          Public
/// \~english @par Type
///         Sync
/// \~english @see  
///
/// FrameworkunifiedSendStopToNSNPP
/// To be used by System Manager Service only. This API would push NPP Service to persist
/// the data/files. Ideally this should be sent during system shutdown by System Manager Service
///
/// \param [in] hApp
///         HANDLE - Application Handle
///
/// \param [in] eShutdownType
///         EFrameworkunifiedShutdownType - shutdown type
///
/// \param [in] uiStopMsgData
///         UI_32 - Flag representing which data to persist and which data to delete from
///         persistent memory during shutdown.
///         This needs to be specified only when shutdown type is eFrameworkunifiedDataResetShutdown.
///         If not specified with DataReset type, then NPP will do normal shutdown.
///         For other shutdown type this parameter has no effect.
///         uiStopMsgData = 0 means Normal shutdown persisting all data
///         else value from enum EFrameworkunifiedPersistCategory, multiple value from enum can be ORed.
///         Bit value 1 represent resetting of data while value 0 bit represent data persisting
///         Eg: uiStopMsgData = (eFrameworkunifiedUserData|eFrameworkunifiedFactoryCustomerData) = 0x0101 indicates
///           eFrameworkunifiedUserData bit value 1 means delete user data
///           eFrameworkunifiedFactoryData  bit value 0 means persist factory data
///           eFrameworkunifiedFactoryCustomerData bit value 1 means delete factory customer data
///           eFrameworkunifiedDealerData bit value 0 means persist dealer data
///
/// \return status
///         EFrameworkunifiedStatus - success if request sent to NPPService or error
/// \~english @par Type
///         Pub-Sub
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSendStopToNSNPP(HANDLE hApp, EFrameworkunifiedShutdownType eShutdownType, UI_32 uiStopMsgData = 0x0);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup  FrameworkunifiedNPGetReadyStatusOfNPP
/// \~english @par Brief
///        APIs that send messages to notification services and obtain Ready status
/// \~english @param [in] hApp
///        HANDLE           - Handle for the application
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - The process of NS_NPPService is started.
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       Sends messages to the notification service (NS_NPPService) and acquires the Ready status.\n
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Method
/// \~english @see  
///
/// FrameworkunifiedNPGetReadyStatusOfNPP
/// To be used by System Manager Service only. SystemManager will use this API to get the
/// ready status of NPPService.
///
/// \param [in] hApp
///         HANDLE - Application Handle
///
/// \return status
///         EFrameworkunifiedStatus - success if request sent to NPPService or error
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPGetReadyStatusOfNPP(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification
/// \~english @par Brief
///        Get the available service names
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [out] pServiceName
///        PSTR   - Invalid buffer size
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
///       - When the service-name storage area (pServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
///       - If the received message is not a service-availability notice... [eFrameworkunifiedStatusFail]
///       - Incoming messages are invalid [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        When an application receives a service availability notification, it gets the name of the available service.
/// \~english @par
///        Please note the following points when using this API for application.
///        - The application shall execute this API using an application handle passed as an argument to the callback function.\n
///         (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
///        - The size of the buffer passed in the argument pServiceName must be at least MAX_NAME_SIZE_APP(20).
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Not applicable
/// \~english @see FrameworkunifiedIsServiceAvailable, FrameworkunifiedSubscribeNotificationWithCallback,
///                 FrameworkunifiedSubscribeNotificationsWithCallback
///
/// To be used when client receives service availability notification to get the available
/// service name.
///
/// \param [in] hApp
///         HANDLE - Application Handle
/// \param [out] pServiceName
///         PSTR - Name of the available service.
///          Size of the buffer should be equal to or greater than MAX_NAME_SIZE_APP
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification(HANDLE hApp, PSTR pServiceName);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGetCurrentUser
/// Get the current user for the application
///
/// \param [in] hApp
///         HANDLE - Application handle
///
/// \return userhandle
///      HANDLE - Returns current user handle
///
///
////////////////////////////////////////////////////////////////////////////////////////////
HANDLE FrameworkunifiedGetCurrentUser(HANDLE hApp);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedSetUser
/// Set the current user for the application in application framework
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] hUser
///         HANDLE - User handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSetUser(HANDLE hApp, HANDLE hUser);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSetAppData
/// \~english @par Brief
///        Hold the specified arbitrary data
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pKey
///        PCSTR    - Key strings
/// \~english @param [in] pData
///        PVOID    - Service name that can be used
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusFail Retention failure
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
///       - If the addresses of the key strings are NULL [eFrameworkunifiedStatusInvldParam]
///       - Failed to retain arbitrary data. [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///       This function stores an arbitrary data address in the heap using the specified key string as a key.
///       Since the object to be held is an address, the caller must specify an accessible global address, etc.
///       The caller should pay attention to the addresses of arbitrary data, since they retain the addresses of arbitrary data even if they are NULL.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Set Get
/// \~english @see FrameworkunifiedGetAppData, FrameworkunifiedRemoveAppData
///
/// FrameworkunifiedSetAppData
/// This API stores the data pointer against a key in application framework. This can be used
/// as a global data and can be accessed in the FRAMEWORKUNIFIED functions. Please note that application
/// developer should avoid using global data.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] pKey
///         PSTR - Data key
/// \param [in] pData
///         PVOID - data
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedGetAppData, FrameworkunifiedRemoveAppData
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSetAppData(HANDLE hApp, PCSTR pKey, PVOID pData);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetAppData
/// \~english @par Brief
///        Returns the address of any data associated with the key string
/// \~english @param [in] hApp
///        HANDLE   - Handle for the application
/// \~english @param [in] pKey
///        PCSTR    - Key strings
/// \~english @retval PVOID Address of arbitrary data
/// \~english @retval NULL NULL pointers (unsuccessful retrieval, anomaly parameters)
/// \~english @par Prerequisite
///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
/// \~english @par Change of internal state
///       - The internal state is not changed.
/// \~english @par Conditions of processing failure
///       - If the hApp specified in the parameter is NULL, [NULL]
///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
///       - If the addresses of the Key strings are NULL [NULL]
/// \~english @par Detail
///       Returns the corresponding data address using the specified key string as the key.
/// \~english @par Classification
///          Public
/// \~english @par Type
///          Set Get
/// \~english @see FrameworkunifiedSetAppData, FrameworkunifiedRemoveAppData
///
/// FrameworkunifiedGetAppData
/// This API retrieves the data stored against a key in application framework.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] pKey
///         PSTR - Data key
/// \return [in] pData
///         PVOID - data
///
/// \see FrameworkunifiedSetAppData, FrameworkunifiedRemoveAppData
////////////////////////////////////////////////////////////////////////////////////////////
PVOID FrameworkunifiedGetAppData(HANDLE hApp, PCSTR pKey);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedRemoveAppData
/// This API removes the data stored against a key in application framework.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] pKey
///         PSTR - Data key
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedSetAppData, FrameworkunifiedGetAppData
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedRemoveAppData(HANDLE hApp, PCSTR pKey);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGetSystemInfo
/// Gets some internal notification information
///
/// \param [in] hApp
///         HANDLE - Handle to a Application Framework
/// \param [in, out] pSystemInfo
///         PVOID - Buffer pointer to which system info is copied.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedGetSystemInfo(HANDLE hApp, PVOID pSystemInfo);

////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedSetDeferredSyncResponse
/// Set sync response deferred flag
///
/// \param [in] hApp
///         HANDLE - Handle to the dispatcher to receive message
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSetDeferredSyncResponse(HANDLE hApp);

#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__ */  // NOLINT  (build/header_guard)
/**@}*/  // end of framework
/**@}*/  // end of framework_unified
/**@}*/  // end of native_service
/**@}*/  // end of BaseSystem
//@}