summaryrefslogtreecommitdiffstats
path: root/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_dispatch.h
blob: 70afea16d02edfd06478a48d4e61399d18d4f455 (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
/*
 * @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.
 */

///////////////////////////////////////////////////////////////////////////////
/// \ingroup  tag_StateMachine
/// \brief
///
///
///
///////////////////////////////////////////////////////////////////////////////
//@{
/**
 * @file frameworkunified_sm_framework_dispatch.h
 * @brief \~english This file contains basic api to operate state machine
 *
 */
/** @addtogroup BaseSystem
 *  @{
 */
/** @addtogroup native_service
 *  @ingroup BaseSystem
 *  @{
 */
/** @addtogroup framework_unified
 *  @ingroup native_service
 *  @{
 */
/** @addtogroup framework
 *  @ingroup framework_unified
 *  @{
 */
/** @addtogroup statemachine
 *  @ingroup framework
 *  @{
 */
#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_DISPATCH_H__  // NOLINT  (build/header_guard)
#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_DISPATCH_H__

#include <native_service/frameworkunified_types.h>
#include <native_service/frameworkunified_framework_types.h>
#include <native_service/frameworkunified_sm_framework_types.h>
#include <native_service/frameworkunified_sm_hsmframework.h>

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedSetStateMachine
/// \~english @par Brief
///        Get pointer to the statemachine object.
/// \~english @param [in] hApp
///        HANDLE   - Handle to the framework application
/// \~english @retval CFrameworkunifiedHSMParentFramework* pointer to the statemachine object
/// \~english @retval NULL Failed to get pointer to the statemachine object
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments 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 not appropriate (which is invalid) . [NULL]
///       - Pointer to statemachine object is NULL. [NULL]
/// \~english @par Detail
///        Get pointer to the statemachine object associated with application framework handle.\n
///        Do not release the statemachine object in application, because it is a part of the Dispathcer.
/// \~english @par Classification
///          public
/// \~english @par type
///          sync only
/// \~english @see FrameworkunifiedHSMDispatcherWithArguments,FrameworkunifiedGetStateMachine
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedSetStateMachine
///   sets the statemachine object
///
/// \param [in] hApp
///         HANDLE - Handle to the application session
///
/// \param [in] f_pFrameworkunifiedHSM
///         CFrameworkunifiedHSM - Pointer to statemachine object
///
/// \return pointer to the StateMachine object
///         CFrameworkunifiedHSMParentFramework* - pointer to the StateMachine object
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSetStateMachine(HANDLE hApp,
                              CFrameworkunifiedHSM *f_pFrameworkunifiedHSM);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventToDispatcher
/// \~english @par Brief
///        Register an event in dispatcher
/// \~english @param [in] hApp
///        HANDLE hApp - Application framework handle
/// \~english @param [in] pServiceName
///        PCSTR pServiceName - Service Name
/// \~english @param [in] iCmd
///        UI_32 iCmd - service protocol command/request/acknowledgment ID
/// \~english @param [in] iEvent
///        UI_32 iEvent - event to be posted to active state on receiving iCmd from pServiceName.
/// \~english @param [in] hSession
///        HANDLE hSession - Session Handle.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer to service name specified in the argument (pServiceName) is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        Register an event information (iCmd,iEvent) for service specified in the argument in dispatcher.\n
///        After that, when receiving an iCmd from service, post the event to active state.
/// \~english @par
///        Please note the following points when using this API for application.
///        - Operation is not guaranteed if a different handle is set for an application handle.
///        - Operation is not guaranteed if an invalid handle is set for a session handle.
///        - This API registers one event for one command and one callback for one event.\n
///          When registration is performed for the same command, the previously registered event is activated.
///       - The callback information is registered to the heap.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see FrameworkunifiedAttachHSMEventsToDispatcher
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedAttachHSMEventToDispatcher
/// Registers a single event with the dispatcher for a given service.
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pServiceName
///         PCSTR - Service Name
/// \param [in] iCmd
///         UI_32 - service protocol command/request/acknowledgment ID
/// \param [in] iEvent
///         UI_32 - event to be posted to active state on receiving iCmd from pServiceName.
/// \param [in] hSession
///         HANDLE - Session Handle.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedAttachHSMEventToDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, UI_32 iEvent,
                                         HANDLE hSession = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        Register events in dispatcher.
/// \~english @param [in] hApp
///        HANDLE hApp - Application framework handle
/// \~english @param [in] pServiceName
///        PCSTR pServiceName - Service Name
/// \~english @param [in] pEventIds
///        const FrameworkunifiedProtocolEvent *pEventIds - structure mapping event ids with the messages
/// \~english @param [in] uiEventCount
///        UI_32 uiEventCount - no of events
/// \~english @param [in] hSession
///        HANDLE hSession - Session Handle.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer to service name specified in the argument (pServiceName) is NULL [eFrameworkunifiedStatusInvldHandle]
///       - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        Register events information (iCmd,iEvent) for service specified in the argument in dispatcher.\n
///        After that, when receiving an iCmd from service, post the event to active state.\n
///        If register failed, only the events that register before it are valid.\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 event, depending on \n
///        the securable size as the area of the FrameworkunifiedProtocolEvent structure. Therefore, note to ensure \n
///        the size of the area of the FrameworkunifiedProtocolEvent structure at the call side of API, and define \n
///        the number of event.
/// \~english @par
///        Please note the following points when using this API for application.
///        - Operation is not guaranteed if a different handle is set to Handle for the application.
///        - Operation is not guaranteed if an invalid handle is set for a session handle.
///        - If an error occurs when multiple events are registered, it is impossible to determine which event was valid.
///          Therefore, either register multiple event information again or delete multiple event information at the same time when registration fails.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see FrameworkunifiedAttachHSMEventToDispatcher
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedAttachHSMEventsToDispatcher
/// Registers a multiple event with the dispatcher for a given service.
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pServiceName
///         PCSTR - Service Name
/// \param [in] pEventIds
///         const FrameworkunifiedProtocolEvent* - structure mapping event ids with the messages
/// \param [in] uiEventCount
///         UI_32 - no of events
/// \param [in] hSession
///         HANDLE - Session Handle.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedAttachHSMEventsToDispatcher(HANDLE hApp, PCSTR pServiceName,
                                          const FrameworkunifiedProtocolEvent *pEventIds,
                                          UI_32 uiEventCount,
                                          HANDLE hSession = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        register a notification in service
/// \~english @param [in] hApp
///        HANDLE hApp - Handle to the Framework
/// \~english @param [in] pNotification
///        PCSTR pNotification - Name of Notification
/// \~english @param [in] max_length
///        const UI_32 max_length - Max size of the notification message
/// \~english @param [in] persType
///        const EFrameworkunifiedNotificationType persType  - Type of persistent
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer(pNotification) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        send message to Notification Service to register a notification
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPHSMRegisterNotificatsionEvent
/// API to send message to Notification Service to register a notification
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] pNotification
///         PCSTR - Name of Notification
/// \param [in] max_length
///         const UI_32 - Max size of the notification message
/// \param [in] persType
///         const EFrameworkunifiedNotificationType - Type of persistent
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPHSMRegisterNotificatsionEvent(HANDLE hApp, PCSTR pNotification, const UI_32 max_length,
                                              const EFrameworkunifiedNotificationType persType);


/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        register many notifications in service
/// \~english @param [in] hApp
///        HANDLE hApp - Handle to the Framework
/// \~english @param [in] pList
///        const  FrameworkunifiedNotificationsList *pList - List of the notifications that need to be registered
/// \~english @param [in] uiListLength
///        UI_32 uiListLength - Length of the list
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer(pList) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        send message to Notification Service to register many notifications
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPHSMRegisterNotificationsEvents
/// API to send message to Notification Service to register a notification
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] pList
///         FrameworkunifiedNotificationsList - List of the notifications that need to be registered
/// \param [in] uiListLength
///         const UI_32 - Length of the list
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPHSMRegisterNotificationsEvents(HANDLE hApp, const  FrameworkunifiedNotificationsList *pList,
                                               UI_32 uiListLength);


/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        remove a notification in service
/// \~english @param [in] hApp
///        HANDLE hApp - Handle to the Framework
/// \~english @param [in] pNotification
///        cPCSTR pNotification - Name of Notification
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer(pNotification) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        send message to Notification Service to remove a notification
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedNPHSMUnRegisterNotificationEvent
/// API to send message to Notification Service to remove a notification
///
/// \param [in] hApp
///         HANDLE - Handle to the Framework
/// \param [in] pNotification
///         PCSTR - Name of Notification
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedNPHSMUnRegisterNotificationEvent(HANDLE hApp, PCSTR pNotification);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        attach an event to the dispatcher on receiving a specific notification.
/// \~english @param [in] hApp
///        HANDLE hApp - Handle to the Framework
/// \~english @param [in] pNotification
///        cPCSTR pNotification - Name of Notification
/// \~english @param [in] iEventId
///        UI_32 iEventId  - event ID
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer(pNotification) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        attach an event to the dispatcher on receiving a specific notification.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedAttachNotificationEventToDispatcher
/// API to attach a event to the dispatcher on receiving a specific notification.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pNotification
///         PCSTR - Notification String.
/// \param [in] iEventId
///         UI_32 - event to be posted to active state on receiving iCmd from pServiceName.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationWithHSMEvent(HANDLE hApp, PCSTR pNotification,
                                                UI_32 iEventId);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        attach many events to eath dispatcher on receiving a specific notification.
/// \~english @param [in] hApp
///        HANDLE hApp - Handle to the Framework
/// \~english @param [in] pNtfyEvent
///        const FrameworkunifiedNotificationEvent *pNtfyEvent - Notification event structure.
/// \~english @param [in] uiEventCount
///        UI_32 uiEventCount  - Number of Notification event
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        attach many events to eath dispatcher on receiving a specific notification.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedAttachNotificationEventsToDispatcher
/// API to attach a event to the dispatcher on receiving a specific notification.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pNtfyEvent
///         const FrameworkunifiedNotificationEvent* - Notification event structure.
/// \param [in] uiEventCount
///         UI_32 - Number of Notification event
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationsWithHSMEvent(HANDLE hApp,  const FrameworkunifiedNotificationEvent *pNtfyEvent,
                                                 UI_32 uiEventCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        detach events from the dispatcher.
/// \~english @param [in] hApp
///        HANDLE hApp - Handle to the Framework
/// \~english @param [in] pNtfyHandler
///        const FrameworkunifiedNotificationEvent *pNtfyHandler - Notification handler structure.
/// \~english @param [in] uiHandlerCount
///        UI_32 uiHandlerCount - Notification handler structure.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        detach events from the dispatcher.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedUnsubscribeNotificationsWithHSMEvent
/// API to detach a notification event from the dispatcher.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pNtfyHandler
///         const FrameworkunifiedNotificationEvent* - Notification handler structure.
/// \param [in] uiHandlerCount
///         UI_32 - Number of notification handlers
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationsWithHSMEvent(HANDLE hApp, const FrameworkunifiedNotificationEvent *pNtfyHandler,
                                                   UI_32 uiHandlerCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        detach a notification event from the dispatcher.
/// \~english @param [in] hApp
///        HANDLE hApp - Handle to the Framework
/// \~english @param [in] pNotification
///        PCSTR pNotification  - Notification String.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer(pNotification) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        detach a notification event from the dispatcher.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedDetachNotificationEventsFromDispatcher
/// API to detach a notification event from the dispatcher.
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pNotification
///         PCSTR - Notification String.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationWithHSMEvent(HANDLE hApp, PCSTR pNotification);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        Registers a multiple HSM event with the dispatcher for a given service.
/// \~english @param [in] hApp
///        HANDLE hApp - Child Thread handle
/// \~english @param [in] pEventIds
///        const FrameworkunifiedProtocolEvent *pEventIds  - structure mapping event ids with the messages
/// \~english @param [in] uiEventCount
///        UI_32 uiEventCount  - no of events
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        Registers a multiple HSM event with the dispatcher for a given service.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedAttachParentHSMEventsToDispatcher
/// Registers a multiple HSM event with the dispatcher for a given service.
///
///
/// \param [in] hChildApp
///         HANDLE - Application framework handle
/// \param [in] pEventIds
///         const FrameworkunifiedProtocolEvent* - structure mapping event ids with the messages
/// \param [in] uiEventCount
///         UI_32 - no of events
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedAttachParentHSMEventsToDispatcher(HANDLE hChildApp, const FrameworkunifiedProtocolEvent *pEventIds,
                                                UI_32 uiEventCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
/// \~english @par Brief
///        detach notification HSM events from the dispatcher.
/// \~english @param [in] hApp
///        HANDLE hApp - Child Thread handle
/// \~english @param [in] puiEventArray
///        const PUI_32 puiEventArray  - Array of events
/// \~english @param [in] uiEventCount
///        UI_32 uiEventCount  - Number of events
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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
///        detach notification HSM events from the dispatcher.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedDetachParentHSMEventsFromDispatcher
/// API to detach a notification HSM event from the dispatcher.
///
///
/// \param [in] hChildApp
///         HANDLE - Child Thread handle
/// \param [in] puiEventArray
///         const PUI_32 puiEventArray - Array of events
/// \param [in] uiEventCount
///         UI_32 - Number of events
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedDetachParentHSMEventsFromDispatcher(HANDLE hChildApp, const PUI_32 puiEventArray, UI_32 uiEventCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachHSMEventsFromDispatcher
/// \~english @par Brief
///        detach multiple events from the dispatcher
/// \~english @param [in] hApp
///        HANDLE hApp - Application framework handle
/// \~english @param [in] pServiceName
///        PCSTR pServiceName  - Service Name
/// \~english @param [in] puiCmdArray
///        const PUI_32 puiCmdArray  - Array of commands
/// \~english @param [in] uiCmdCount
///        UI_32 uiCmdCount  - Number of Commands
/// \~english @param [in] hSession
///        HANDLE hSession  - Session Handle.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @retval eFrameworkunifiedStatusFail process failed
/// \~english @retval eFrameworkunifiedStatusInvldParam invalid parameter
/// \~english @par Prerequisite
///        - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer to service name specified in the argument (pServiceName) is NULL [eFrameworkunifiedStatusInvldHandle]
///       - Pointer(pServiceName) to service name doesn't exist [eFrameworkunifiedStatusFail]
///       - Pointer to event array specified in the argument which will be deleted is NULL [eFrameworkunifiedStatusInvldParam]
/// \~english @par Detail
///        Detach multiple events(puiCmdArray) information for service specified in the argument from dispatcher.\n
///        After that, when receiving command from service, post the event to unactive state.\n
///        If the information has been deleted, return eFrameworkunifiedStatusOK.\n
///        If the specific event has not been registered, return eFrameworkunifiedStatusOK.\n
///        If number of puiCmdArray to be deleted is 0, return eFrameworkunifiedStatusOK.\n
///        When deleting multiple events, if an error occurs, stop deleting. \n
/// \~english @par
///        Please note the following points when using this API for application.
///        - Operation is not guaranteed if a different handle is set for an application handle.
///        - Operation is not guaranteed if an invalid handle is set for a session handle.
///        - Operatuib is not guaranteed if a puiCmdArray that differs from the events to be deleted is set.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see  FrameworkunifiedDetachHSMEventFromDispatcher
///
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedDetachHSMEventsFromDispatcher
/// API to detach a notification HSM event from the dispatcher.
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pServiceName
///         PCSTR - Service Name
/// \param [in] puiCmdArray
///         const PUI_32 - Array of commands
/// \param [in] uiCmdCount
///         UI_32 - Number of Commands
/// \param [in] hSession
///         HANDLE - Session Handle.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
EFrameworkunifiedStatus FrameworkunifiedDetachHSMEventsFromDispatcher(HANDLE hApp, PCSTR pServiceName, const PUI_32 puiCmdArray,
                                            UI_32 uiCmdCount, HANDLE hSession = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
/// \~english @par Brief
///        detach an event from the dispatcher
/// \~english @param [in] hApp
///        HANDLE hApp - Application framework handle
/// \~english @param [in] pServiceName
///        PCSTR pServiceName  - Service Name
/// \~english @param [in] iCmd
///        UI_32 iCmd  - service protocol command/request/acknowledgment ID
/// \~english @param [in] hSession
///        HANDLE hSession  - Session Handle.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @retval eFrameworkunifiedStatusFail process failed
/// \~english @par Prerequisite
///        - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer to service name specified in the argument (pServiceName) is NULL [eFrameworkunifiedStatusInvldHandle]
///       - Pointer(pServiceName) to service name doesn't exist [eFrameworkunifiedStatusFail]
/// \~english @par Detail
///        Detach an event information for service specified in the argument from dispatcher.\n
///        After that, when receiving command from service, post the event to unactive state.\n
///        If the information has been deleted or the specific iCmd has not been registered, return eFrameworkunifiedStatusOK.\n
/// \~english @par
///        Please note the following points when using this API for application.
///        - Operation is not guaranteed if a different handle is set for an application handle.
///        - Operation is not guaranteed if an invalid handle is set for a session handle.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see  FrameworkunifiedDetachHSMEventsFromDispatcher
///
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedDetachHSMEventFromDispatcher
/// API to detach a notification HSM event from the dispatcher.
///
///
/// \param [in] hApp
///         HANDLE - Application framework handle
/// \param [in] pServiceName
///         PCSTR - Service Name
/// \param [in] iCmd
///         UI_32 - service protocol command/request/acknowledgment ID
/// \param [in] hSession
///         HANDLE - Session Handle.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see
///
EFrameworkunifiedStatus FrameworkunifiedDetachHSMEventFromDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, HANDLE hSession = NULL);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedGetStateMachine
/// \~english @par Brief
///        Get pointer to the statemachine object.
/// \~english @param [in] hApp
///        HANDLE   - Handle to the framework application
/// \~english @retval CFrameworkunifiedHSMParentFramework* pointer to the statemachine object
/// \~english @retval NULL Failed to get pointer to the statemachine object
/// \~english @par Prerequisite
///       - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments 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 not appropriate (which is invalid) . [NULL]
///       - HANDLE specified in the argument (hApp) is not generated by FrameworkunifiedHSMDispatcherWithArguments. [NULL]
/// \~english @par Detail
///        Get pointer to the statemachine object associated with application framework handle.\n
///        Do not release the statemachine object in application, because it is a part of the Dispathcer.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see FrameworkunifiedHSMDispatcherWithArguments,FrameworkunifiedSetStateMachine
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedGetStateMachine
///   returns the pointer to the statemachine object
///
/// \param [in] hApp
///         HANDLE - Handle to the application session
///
/// \return pointer to the StateMachine object
///         CFrameworkunifiedHSMParentFramework* - pointer to the StateMachine object
///
/// \see
///
CFrameworkunifiedHSMFramework *FrameworkunifiedGetStateMachine(HANDLE hApp);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
/// \~english @par Brief
///        subscribing to single event of a service. attaches the session event with HSM events.
/// \~english @param [in] hApp
///        HANDLE hApp - Application handle
/// \~english @param [in] uiEventId
///        UI_32 uiEventId  - Session Event id
/// \~english @param [in] uiHSMEventId
///        UI_32 uiHSMEventId- Statemachine Event id
/// \~english @param [in] hSession
///        HANDLE hSession  - Session Handle.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @retval eFrameworkunifiedStatusFail process failed
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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 is used for subscribing to single event of a service.
///        This API also attaches the session event with HSM events.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedSubscribeToSessionEventWithHSMEvent
/// This API is used for subscribing to single event of a service.
/// This API also attaches the session event with HSM events.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] uiEventId
///     UI_32 - Session Event id
/// \param [in] uiHSMEventId
///     UI_32 - Statemachine Event id
/// \param [in] hSession
///     HANDLE - Session handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedSubscribeToSessionEventsWithHSMEvents
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventWithHSMEvent(HANDLE hApp, UI_32 uiEventId, UI_32 uiHSMEventId, HANDLE hSession);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
/// \~english @par Brief
///        subscribing to multiple events of a service. attaches the session events with HSM events.
/// \~english @param [in] hApp
///        HANDLE hApp - Application handle
/// \~english @param [in] pEventIds
///        const FrameworkunifiedProtocolEvent *pEventIds  - structure mapping session event id's with the hsm event id's
/// \~english @param [in] uiEventCount
///        UI_32 uiEventCount  - count of events
/// \~english @param [in] hSession
///        HANDLE hSession  - Session Handle.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @retval eFrameworkunifiedStatusFail process failed
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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]
///       - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
/// \~english @par Detail
///        This API is used for subscribing to multiple events of a service.
///        his API also attaches the session events with hsm events.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedSubscribeToSessionEventsWithHSMEvents
/// This API is used for subscribing to multiple events of a service.
/// This API also attaches the session events with hsm events.
///
/// \param [in] hApp
///         HANDLE - Application handle
/// \param [in] pEventIds
///         FrameworkunifiedProtocolEvent - structure mapping session event id's with the hsm event id's
/// \param [in] uiEventCount
///     UI_32 - count of events
/// \param [in] hSession
///     HANDLE - Session handle
///
/// \return status
///         EFrameworkunifiedStatus - success or error
///
/// \see FrameworkunifiedSubscribeToSessionEventWithHSMEvent
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventsWithHSMEvents(HANDLE hApp, const FrameworkunifiedProtocolEvent *pEventIds, UI_32 uiEventCount,
                                                    HANDLE hSession);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
/// \~english @par Brief
///        unsubscribe from event of a service. detaches HSM event from session event.
/// \~english @param [in] hApp
///        HANDLE hApp - Application handle
/// \~english @param [in] uiEventId
///        UI_32 uiEventId  - Event id
/// \~english @param [in] hSession
///        HANDLE hSession  - Session Handle.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @retval eFrameworkunifiedStatusFail process failed
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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
///        API to unsubscribe from event of a service. Also detaches HSM event from session event.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedUnSubscribeSessionEventWithHSMEvent
/// API to unsubscribe from event of a service. Also detaches HSM event from session event.
///
/// \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 FrameworkunifiedUnSubscribeSessionEventsWithHSMEvents
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventWithHSMEvent(HANDLE hApp, UI_32 uiEventId, HANDLE hSession);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
/// \~english @par Brief
///        unsubscribe from multiple events of a service. detaches HSM events from session events.
/// \~english @param [in] hApp
///        HANDLE hApp - Application handle
/// \~english @param [in] pEventsArray
///        PUI_32 pEventsArray  - Array of events id's.
/// \~english @param [in] uiListSize
///        UI_32 uiListSize  - count of elements in array.
/// \~english @param [in] hSession
///        HANDLE hSession  - Session Handle.
/// \~english @retval eFrameworkunifiedStatusOK success
/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
/// \~english @retval eFrameworkunifiedStatusFail process failed
/// \~english @par Prerequisite
///        - None
/// \~english @par Change of internal state
///        - None
/// \~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
///        API to unsubscribe from multiple events of a service. Also detaches HSM events from session events.
/// \~english @par Classification
///        Public
/// \~english @par Type
///        sync only
/// \~english @see
///
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/// FrameworkunifiedUnSubscribeSessionEventsWithHSMEvents
/// API to unsubscribe from multiple events of a service. Also detaches HSM events from session events.
///
/// \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 FrameworkunifiedUnSubscribeSessionEventWithHSMEvent
///
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventsWithHSMEvents(HANDLE hApp, PUI_32 pEventsArray, UI_32 uiListSize,
                                                    HANDLE hSession);

#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_DISPATCH_H__ */  // NOLINT  (build/header_guard)
/** @}*/
/** @}*/
/** @}*/
/** @}*/
/** @}*/
//@}