summaryrefslogtreecommitdiffstats
path: root/systemservice/interface_unified/library/include/system_service/ss_sm_client_if.h
blob: 70b9425f72d4f1d0fffdb2193b036cd7240e5ace (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
/*
 * @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.
 */

/**
 * @file ss_sm_client_if.h
 * @brief \~english This file supports the AGL framework client interface to System manager.
 */
/** @addtogroup BaseSystem
 *  @{
 */
/** @addtogroup system_service
 *  @ingroup BaseSystem
 *  @{
 */
/** @addtogroup interface_unified
 *  @ingroup system_service
 *  @{
 */


#ifndef __SS_SYSTEM_MANAGER_CLIENT_IF_H__  // NOLINT (build/header_guard)
#define __SS_SYSTEM_MANAGER_CLIENT_IF_H__

#include <native_service/frameworkunified_framework_types.h>
#include <native_service/ns_logger_if.h>
#include <string>
#include "system_service/ss_power_service.h"
#include "system_service/ss_system_manager_if.h"


/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup RegisterSMSessionAckCallback
/// \~english @par Summary
///       API for setting the FrameworkunifiedOnStop response
/// \~english @param [in] CallbackPtr
///       EFrameworkunifiedStatus  - Pointer to a callback function
/// \~english @par
///       - TRUE : Not carried out in the automatic response.
///       - FALSE : Carry out the response in automatic. (Default)
/// \~english @retval VOID None
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       None
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Sync only(None communication)
/// \~english @par Detail
///       In the case of is_start_required = TURE,  Client Services of System Manager, automatically \n
///       System Manager and the session at the same time is building and start-up. \n
///       It is possible to receive a call back at the timing when the session establishment is completed \n
///       by this API. \n
///       is_start_required is, as a Launch Configuration information, have the following meanings.
/// \~english @par
///       is_start_required \n
///       - True:  Create a session with the System Manager.(Service to use the Dispatcher.) \n
///       - False: Not create a session with the System Manager.(Do not use the Dispatcher Service.)
///       OnStart/Stop/DebugDump Callback is not called. HeartBeat function does not apply.
/// \~english @see  None
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus RegisterSMSessionAckCallback(EFrameworkunifiedStatus (*CallbackPtr)(HANDLE));

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SetDataResetModeToSystemManager
/// \~english @par Summary
///      API to record the data reset mode of the next boot in a non-volatile area.
/// \~english @param [in] dataResetMode
///      ESMDataResetModeInfo - Data reset mode information
/// \~english @par
///       - e_SS_SM_DATA_RESET_MODE_NONE : Do not initialize
///       - e_SS_SM_DATA_RESET_MODE_USER : User data initialization
///       - e_SS_SM_DATA_RESET_MODE_FACTORY : Factory initialization
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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 eFrameworkunifiedStatusBadConnection Socket connection error
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - Specified log type is invalid(In the case of value which does not correspond to enum eSMUserLogType).
///       [eFrameworkunifiedStatusInvldParam]
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a send and receive type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - Send and receive for the file descriptor of System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Place to interrupt by the system call (signal) has occurred during the send and receive of the System
///       Manager message for the session. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the send and receive buffer of the System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Send and receive and reception of System Manager message for the session fails to socket connection.
///       [eFrameworkunifiedStatusBadConnection]
///       - Any error has occurred at the time of send and receive of the System Manager message for the session.
///       [eFrameworkunifiedStatusFail]
///       - Send and receive of System Manager message for the session fails to shared memory access.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Fire and Forget x Method
/// \~english @par Detail
///      The data reset mode to save in a non-volatile area, the function return.\n
///      System Manager is to expand the resident service data reset mode of the non-volatile area as\n
///      an argument of FrameworkunifiedOnStart.\n
///      Task Manager is Callback data initialization interface of the same information as an argument.\n
///      All of, the completion of the FrameworkunifiedOnStart processing of all resident services (System Manager) \n
///      and, at the timing when the Callback of data initialization interface of all non-resident \n
///      service has been completed (Task Manager), a data reset mode, initialized to e_SS_SM_DATA_RESET_ NONE. \n
///      In other words, when the reset until initialization occurs, the same data reset mode again to \n
///      the argument, FrameworkunifiedOnStart or, Callback of data initialization interface is performed.
/// \~english @see  SetProgUpdateStateToSystemManager
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SetDataResetModeToSystemManager(ESMDataResetModeInfo dataResetMode);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SetProgUpdateStateToSystemManager
/// \~english @par Summary
///      API to record the program update state in the non-volatile information.
/// \~english @param [in] updateState
///      SMProgUpdateState  - Program update status
/// \~english @par
///       - SS_SM_PROG_UPDATE_STATE_UPDATED : Program update
///       - SS_SM_PROG_UPDATE_STATE_MAP_UPDATED : Map update
///       - SS_SM_PROG_UPDATE_STATE_MAPDIFF_UPDATED : Map difference updating
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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 eFrameworkunifiedStatusBadConnection Socket connection error
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
/// \~english @retval eFrameworkunifiedStatusErrOther Other error(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - Specified program update status information is invalid (in the case of a value that does not correspond to
///       the enum SMProgUpdateState). [eFrameworkunifiedStatusInvldParam]
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a send and receive type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - Send and receive for the file descriptor of System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Place to interrupt by the system call (signal) has occurred during the send and receive of the System
///       Manager message for the session. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the send and receive buffer of the System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Send and receive and reception of System Manager message for the session fails to socket connection.
///       [eFrameworkunifiedStatusBadConnection]
///       - Any error has occurred at the time of send and receive of the System Manager message for the session.
///       [eFrameworkunifiedStatusFail]
///       - Send and receive of System Manager message for the session fails to shared memory access.
///       [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Sync only(None communication)
/// \~english @par Detail
///      The program update state to save in a non-volatile area, the function return.\n
///      updateState is it is possible to specify more than one by setting the OR.\n
///      Based on the setting state, to determine isProgUpdated, isMapUpdated, the value \n
///      of the isMapDiffUpdated provided in GetInterfaceunifiedOnStartExtInfo and GetInterfaceunifiedOnStopExtInfo.\n
///      Task Manager is provided in data initialization interface, the same information to the non-resident service.\n
///      Set state is initialized with the same timing as data reset mode.\n
///      (See SetDataResetModeToSystemManager)
/// \~english @see  SetDataResetModeToSystemManager, GetInterfaceunifiedOnStartExtInfo, GetInterfaceunifiedOnStopExtInfo
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SetProgUpdateStateToSystemManager(SMProgUpdateState progUpdateState);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SendCpuResetRequestToSystemManager
/// \~english @par Summary
///                   API to request LOG saved to the internal non-volatile area
/// \~english @param [in] l_eCpuResetReason
///      ESMCpuResetReason - Reset factor
/// \~english @param [in] f_messageStr
///       std::string  - Abnormal message string
/// \~english @param [in] f_suffixStr
///       std::string  - Suffix string of abnormal LOG file
/// \~english @par
///       enum ESMCpuResetReason Variable
///       - e_SS_SM_CPU_RESET_REASON_NORMAL : Normal Reset
///       - e_SS_SM_CPU_RESET_REASON_DATA_RESET : Data Reset
///       - e_SS_SM_CPU_RESET_REASON_USER_FORCE_RESET : User forced reset
///       - e_SS_SM_CPU_RESET_REASON_GENERIC_ERR : Generic Error reset
///       - e_SS_SM_CPU_RESET_REASON_DSP_ERR : DSP Error
///       - e_SS_SM_CPU_RESET_REASON_IMMRESET_NORMAL : Reset immediately
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a transmission type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - Transmission for the file descriptor of System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Place to interrupt by the system call (signal) has occurred during the transmission of the System Manager
///       message for the session. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmission buffer of the System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any error has occurred at the time of transmission of the System Manager message for the session.
///       [eFrameworkunifiedStatusFail]
///       - Transmission of System Manager message for the session fails to shared memory access. [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Sync only(None communication)
/// \~english @par Detail
///      Collect the LOG information and stores it in the built-in non-volatile area.\n
///      String specified in f_suffixStr is added as a suffix to the end of the abnormal LOG file name.
/// \~english @see
///          None
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SendCpuResetRequestToSystemManager(ESMCpuResetReason l_eCpuResetReason,
                                                     std::string f_messageStr = "", std::string f_suffixStr = "");

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SetNextWakeupTypeToSystemManager
/// \~english @par Summary
///       Set the next wakeup type.
/// \~english @param [in] f_wakeupType
///       ESMNextWakeupType    - Wakeup type
/// \~english @retval eFrameworkunifiedStatusOK            Success
/// \~english @retval eFrameworkunifiedStatusInvldParam    Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer   Invalid pointer
/// \~english @retval eFrameworkunifiedStatusFail          Some sort of error occurred
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Sync only
/// \~english @par Detail
///       - The API sets the next wakeup type (COLD/HOT/Not specified).
///       \n
///       - Include    ss_sm_client_if.h
///       - Library    libSS_SystemIfUnified.so
/// \~english @see
///       None
////////////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SetNextWakeupTypeToSystemManager(ESMNextWakeupType f_wakeupType);


/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup Set_UseStopCompleteNotificationVsInterfaceunifiedOnStopFnc_StateVar
/// \~english @par Summary
///       API for setting the FrameworkunifiedOnStop response
/// \~english @param [in] f_setTrue
///       BOOL  - Response presence or absence of specified
/// \~english @par
///       - TRUE : Not carried out in the automatic response.
///       - FALSE : Carry out the response in automatic. (Default)
/// \~english @retval VOID None
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       None
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Sync only(None communication)
/// \~english @par Detail
///       In case you can not return the response in the synchronized by FrameworkunifiedOnStop, by setting to \n
///       TRUE in this API, it is possible to implement the completion notice to the system_manager \n
///       the service side.
///       At this time, the service is by to Publish the Notification of "service name/StopComp", \n
///       you are possible to notify the STOP completion to system_manager.
/// \~english @see  None
////////////////////////////////////////////////////////////////////////////////////
VOID Set_UseStopCompleteNotificationVsInterfaceunifiedOnStopFnc_StateVar(BOOL f_SetTrue);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SendUserInvokedLoggingRequestToSystemManager
/// \~english @par Summary
///      API to request LOG saved to the internal non-volatile area
/// \~english @param [in] f_userInvokedLogType
///       \ref eSMUserLogType - User invoked log type.
/// \~english @param [in] f_messageStr
///       std::string  - Abnormal message string
/// \~english @param [in] f_suffixStr
///       std::string  - Suffix string of abnormal LOG file
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - Log type is invalid(In the case of value which does not correspond to enum eSMUserLogType).
///       [eFrameworkunifiedStatusInvldParam]
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a transmission type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - Transmission for the file descriptor of System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Place to interrupt by the system call (signal) has occurred during the transmission of the System Manager
///       message for the session. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmission buffer of the System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any error has occurred at the time of transmission of the System Manager message for the session.
///       [eFrameworkunifiedStatusFail]
///       - Transmission of System Manager message for the session fails to shared memory access. [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Sync only(None communication)
/// \~english @par Detail
///      Collect the LOG information and stores it in the built-in non-volatile area.\n
///      String specified in f_suffixStr is added as a suffix to the end of the abnormal LOG file name.
/// \~english @see  SendClearLogsRequestToSystemManager
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendUserInvokedLoggingRequestToSystemManager(eSMUserLogType f_userInvokedLogType,
                                                        std::string f_messageStr = "", std::string f_suffixStr = "");

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SendInterfaceunifiedOnStopResponseToSystemManager
/// \~english @par Summary
///       API to send a FrameworkunifiedOnStop response
/// \~english @param [in] f_eStatus
///       EFrameworkunifiedStatus   - End status
/// \~english @par
///       - eFrameworkunifiedStatusOK : End processing completion
///       - eFrameworkunifiedStatusFail : End processing uncompleted
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a transmission type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - Transmission for the file descriptor of System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Place to interrupt by the system call (signal) has occurred during the transmission of the System Manager
///       message for the session. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmission buffer of the System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any error has occurred at the time of transmission of the System Manager message for the session.
///       [eFrameworkunifiedStatusFail]
///       - Transmission of System Manager message for the session fails to shared memory access. [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Fire and Forget only
/// \~english @par Detail
///      In case you can not return the response in the synchronized by FrameworkunifiedOnStop, by setting to \n
///      TRUE in this API, it is possible to implement the completion notice to the system_manager \n
///      the service side.
///      At this time, the service is by to Publish the Notification of "service name/StopComp", \n
///      you are possible to notify the STOP completion to system_manager.
/// \~english @see  None
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendInterfaceunifiedOnStopResponseToSystemManager(EFrameworkunifiedStatus f_eStatus);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup GetInterfaceunifiedOnStartExtInfo
/// \~english @par Summary
///       API to get the extended information of the start-up parameters.
/// \~english @param [out] f_info
///       T_SS_SM_START_ExtDataStructType - Startup parameters extended information
/// \~english @par
///       T_SS_SM_START_ExtDataStructType Structure
/// \~english @code
///             typedef struct {
///             {
///                   BOOL             isProgUpdated;
///                   EMRelaunchStatus relaunchStatus;
///                   BOOL             isMapUpdated;
///                   BOOL             isMapDiffUpdated;
///                   uint8_t          reserved[];
///             }T_SS_SM_START_ExtDataStructType;
///            @endcode
/// \~english @par
///       isProgUpdated:Presence or absence of a program update
///       - TRUE : Yes program update
///       - FALSE : No program update
/// \~english @par
///       relaunchStatus:Relaunch state of self-service
///       - e_SS_SM_RELAUNCH_STATUS_NONE : Relaunch non-occurrence (first start)
///       - e_SS_SM_RELAUNCH_STATUS_SAFE : Normal Relaunch
///       - e_SS_SM_RELAUNCH_STATUS_ERR  : Abnormal Relaunch
/// \~english @par
///       isMapUpdated:Presence or absence of a map update
///       - TRUE : Yes map update
///       - FALSE : No map update
/// \~english @par
///       isMapDiffUpdated:The presence or absence of the map difference updating
///       - TRUE : Yes map difference update
///       - FALSE : No map difference update
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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 eFrameworkunifiedStatusBadConnection Failure to socket connection
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred(Socket Connection/Memory Allocation/Event Control)
/// \~english @retval eFrameworkunifiedStatusErrOther Other error(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a transmission type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - Transmission for the file descriptor of System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Place to interrupt by the system call (signal) has occurred during the transmission of the System Manager
///       message for the session. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmission buffer of the System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Transmission and reception of System Manager message for the session fails to socket connection.
///       [eFrameworkunifiedStatusBadConnection]
///       - In the case of the message queue open error for reception of System Manager message for the session.
///       [eFrameworkunifiedStatusFail]
///       - System Manager message for the session fails to acquire the message buffer for reception. [eFrameworkunifiedStatusFail]
///       - System Manager message for the session fails in the event control for the reception. [eFrameworkunifiedStatusFail]
///       - Any error has occurred at the time of transmission and receive of the System Manager message for the
///       session. [eFrameworkunifiedStatusFail]
///       - Transmission of System Manager message for the session fails to shared memory access. [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Sync only(None communication)
/// \~english @par Detail
///       Returns the extended information of the parameters of FrameworkunifiedOnStart(). \n
///       It is assumed that that will be called in the FrameworkunifiedOnStart (), return the correct value when it is called prior
///       \n
///       to the issuance FrameworkunifiedOnStart() is not guaranteed.\n
///       System startup to relaunchStatus is e_SS_SM_RELAUNCH_STATUS_NONE, the service is a case that has been Relaunch
///       \n
///       by the exit (SS_SM_EXIT_RELAUNCH) _SS_SM_RELAUNCH_STATUS_SAFE, if the Relaunch due to the abnormality occurs
///       to \n
///       set the e_SS_SM_RELAUNCH_STATUS_ERR.
/// \~english @see  GetInterfaceunifiedOnStopExtInfo, FrameworkunifiedOnStart
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus GetInterfaceunifiedOnStartExtInfo(T_SS_SM_START_ExtDataStructType &f_info);  // NOLINT (runtime/references)

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup GetInterfaceunifiedOnStopExtInfo
/// \~english @par Summary
///       API to get the extended information of the end parameter.
/// \~english @param [out] f_info
///       T_SS_SM_STOP_ExtDataStructType - Exit extended parameter information
/// \~english @par
///       T_SS_SM_STOP_ExtDataStructType Structure
/// \~english @code
///             typedef struct {
///             {
///                   BOOL             isProgUpdated;
///                   uint8_t          reserved[];
///             }T_SS_SM_START_ExtDataStructType;
///            @endcode
/// \~english @par
///       isProgUpdated:Presence or absence of a program update
///       - TRUE : Yes program update
///       - FALSE : No program update
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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 eFrameworkunifiedStatusBadConnection Failure to socket connection
/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred(Socket Connection/Memory Allocation/Event Control)
/// \~english @retval eFrameworkunifiedStatusErrOther Other error(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a send and receive type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - File descriptor not for the transmission and reception of the System Manager of the session message.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Interruption by the system call (signal) occurs during the transmission and reception of the System Manager
///       of the session message. [eFrameworkunifiedStatusErrNoEINTR]
///       - The size of the transmit and receive buffer of the System Manager of the session message is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - It failed to socket connection for transmission and reception of the System Manager of the session message.
///       [eFrameworkunifiedStatusBadConnection]
///       - Open error of the message queue for the reception of the System Manager of the session message.
///       [eFrameworkunifiedStatusFail]
///       - And fail to acquire the message buffer for reception of the System Manager of the session message.
///       [eFrameworkunifiedStatusFail]
///       - It failed in the event control for the reception of the System Manager of the session message.
///       [eFrameworkunifiedStatusFail]
///       - It failed during transmission and reception of the System Manager of the session message. [eFrameworkunifiedStatusFail]
///       - It failed to shared memory access for transmission and reception of the System Manager of the session
///       message. [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Sync only(None communication)
/// \~english @par Detail
///       Returns the extended information of the parameters of FrameworkunifiedOnStop(). \n
///       It is assumed that that will be called in the FrameworkunifiedOnStop (), return of the correct value in the case \n
///       that has been called before FrameworkunifiedOnStop() entry into force is not guaranteed.
/// \~english @see  GetInterfaceunifiedOnStartExtInfo, FrameworkunifiedOnStop
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus GetInterfaceunifiedOnStopExtInfo(T_SS_SM_STOP_ExtDataStructType &f_info);  // NOLINT (runtime/references)

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SendDebugDumpResponseToSystemManager
/// \~english @par Summary
///       Send a debug dump response to system_manager
/// \~english @param [in] f_bFormatStrRequired
///       BOOL - Specify whether to dump the application name or not
/// \~english @param [in] f_cFormat
///       PCSTR - Display format for the dump (the same character strings format as the printf format)
/// \~english @param [in] arg_list
///       ... - Dump data in line with f_cFormat format
/// \~english @par
///       f_bFormatStrRequired
///       - true Dump the application name
///       - false Do not dump the application name
/// \~english @retval None
/// \~english @par Precondition
///       - None
/// \~english @par Change in the internal status
///       - The change in the internal status does not occur by this API.
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Fire and Forget only
/// \~english @par Detail
///       When f_bFormatStrRequired is true, write the application name to the buffer for dump. \n
///       Write the data to the buffer for dump in line with f_cFormat. \n
///       Send OnDebugDumpResponseReceived to the SystemManger in order to request the SystemManger to
///       write the contents in the buffer for dump to the log file for debug. \n
///       The maximum size of the buffer for dump is 4Kbyte and the string size of the application name
///       is deducted when the application name is dumped. \n
///       When dumping a string which exceeds 4Kbyte, drop what exceeds the buffer.
/// \~english @see
////////////////////////////////////////////////////////////////////////////////////////////
void SendDebugDumpResponseToSystemManager(BOOL f_bFormatStrRequired, PCSTR f_cFormat, ...)
#ifdef  __GNUC__
    __attribute__((format(printf, 2, 3)));
#endif

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SendInterfaceunifiedEmmcLogsRequestToSystemManager
/// \~english @par Summary
///       API to request a copy to the specified path of the LOG file of the built-in non-volatile area.
/// \~english @param [in] f_path
///       std::string - LOG destination file PATH
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - LOG destination file PATH is NULL(If f_path.c_str() is NULL). [eFrameworkunifiedStatusInvldBuf]
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a transmission type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - Transmission for the file descriptor of System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Place to interrupt by the system call (signal) has occurred during the transmission of the System Manager
///       message for the session. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmission buffer of the System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any error has occurred at the time of transmission of the System Manager message for the session.
///       [eFrameworkunifiedStatusFail]
///       - Transmission of System Manager message for the session fails to shared memory access. [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Method only
/// \~english @par Detail
///       To copy all of the files that exist in LOG storage area of the built-in non-volatile area in \n
///       the path specified in the f_path. \n
///       If you do not have a copy target, asynchronous response command: Returns the eFrameworkunifiedStatusOK as \n
///       the message data of SS_SM_ERROR_EVENT_INTERFACEUNIFIED_EMMC_LOGS_RSPN.
/// \~english @see  SendClearLogsRequestToSystemManager
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendInterfaceunifiedEmmcLogsRequestToSystemManager(std::string f_path);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SendClearLogsRequestToSystemManager
/// \~english @par Summary
///       API to clear the stored in the built-in non-volatile area log.
/// \~english @param [in] f_info
///       TSystemManagerClearLogsInfo  - A pointer to the LOG clear information
/// \~english @par
///       TSystemManagerClearLogsInfo Structure
/// \~english @code
///             typedef struct T_SystemManagerClearLogsInfo{
///             {
///                  void *rsv;
///             }TSystemManagerClearLogsInfo;
///            @endcode
/// \~english @par
///             rsv : Reserve area
/// \~english @retval eFrameworkunifiedStatusOK Success
/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
/// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
/// \~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(It failed to open/allocation of shared memory)
/// \~english @par Preconditions
///       - Dispatcher for the System Manager is generated, and Availability of the service is TRUE.
/// \~english @par Change of the internal state
///       - The internal state is not changed.
/// \~english @par Causes of failures
///       - Pointer to the LOG clear information (f_info) is NULL [eFrameworkunifiedStatusInvldParam]
///       - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
///       - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
///       - System Manager handle type for the session is not a transmission type. [eFrameworkunifiedStatusInvldHndlType]
///       - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
///       - Transmission for the file descriptor of System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusErrNoEBADF]
///       - Place to interrupt by the system call (signal) has occurred during the transmission of the System Manager
///       message for the session. [eFrameworkunifiedStatusErrNoEINTR]
///       - Size of the transmission buffer of the System Manager message for the session is invalid.
///       [eFrameworkunifiedStatusInvldBufSize]
///       - Any error has occurred at the time of transmission of the System Manager message for the session.
///       [eFrameworkunifiedStatusFail]
///       - Transmission of System Manager message for the session fails to shared memory access. [eFrameworkunifiedStatusErrOther]
/// \~english @par Classification
///       Public
/// \~english @par Type
///       Fire and Forget x Sync
/// \~english @par Detail
///      To delete a LOG stored in the built-in non-volatile area.
/// \~english @see  None
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendClearLogsRequestToSystemManager(TSystemManagerClearLogsInfo *f_info);

/** @}*/  // end of SystemIf
/** @}*/  // end of interface_unified
/** @}*/  // end of SystemService
/** @}*/  // end of BaseSystem

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   AttachCallbackToSystemManager
///
/// \note    This function is called by System Manager session clients to attach
///          a callback function to the client application with System Manager
///          configured as the specified sender of the specified protocol message.
///
/// \param [in] f_hApp
///         HANDLE - Handle to message queue of the System Manager attached client.
/// \param [in] iCmd
///         UI_32 iCmd - Command ID
/// \param [in] fpOnCmd
///          CbFuncPtr fpOnCmd - Function pointer  to be called in the form upon
///          the invokation of the specified command ID.  The callback function
///          must have the following signature : void (*)(HANDLE).
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus AttachCallbackToSystemManager(HANDLE hApp, UI_32 iCmd, CbFuncPtr fpOnCmd);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   Set of complementary detach functions that accept same arguments
///          as the InterfaceunifiedAttach_XYZ_ToDispatcher() functions do.
///
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus DetachCallbacksFromInterfaceunifiedDispatcher(HANDLE hApp,
                                                   PCSTR pServiceName,
                                                   const FrameworkunifiedProtocolCallbackHandler* pMsgHandler,
                                                   UI_32 uiHandlerCount,
                                                   HANDLE hSession = NULL);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
/// \brief
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus DetachParentCallbacksFromInterfaceunifiedDispatcher(HANDLE hChildApp,
                                                         const FrameworkunifiedProtocolCallbackHandler* pMsgHandler,
                                                         UI_32 uiHandlerCount);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   GetSystemManagerSessionHandle
///
/// \note    This function returns the session handle with System Manager
///
/// \return HANDLE - A session handle with System Manager
/////////////////////////////////////////////////////////////////////////////////////
extern HANDLE     GetSystemManagerSessionHandle(void);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendShutdownToSystemManager
///
/// \note    This function is called to send Shutdown command to System Manager
///
/// \param   [in] pData
///          Pwr_ServiceSetInterface *pData  - Pointer to Shutdown Command data
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SendShutdownToSystemManager(Pwr_ServiceSetInterface *pData);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendSystemModeRequestToSystemManager
///
/// \note    This function is called to send system mode request to System Manager
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SendSystemModeRequestToSystemManager(void);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendInitCompReportToSystemManager
///
/// \note    This function is called to send init comp report to System Manager
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SendInitCompReportToSystemManager(void);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendWakeUpToSystemManager
///
/// \note    This function is called to send the Wakeup command to System Manager
///
/// \param  [in] pData
///         wakeInfo *pData  - Pointer to Wakeup Command data
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SendWakeUpToSystemManager(wakeInfo *pData);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendStartupConfirmationToSystemManager
///
/// \note    This function is called to send the startup confirmation information
///          to System Manager
///
/// \param   [in] l_startupConfirmationMsg
///          StartupConfirmationMsgStrut &l_startupConfirmationMsg - startup confirmation
///                                                                   data
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
extern EFrameworkunifiedStatus SendStartupConfirmationToSystemManager(StartupConfirmationMsgStrut
                                                        &l_startupConfirmationMsg);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendSystemErrorToSystemManager
///
/// \note    This function is called by an application via Native Services to send
///          notice of a critical error to System Manager when a non recoverable
///          run-time error is encountered.
///
/// \param   [in]
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus  SendSystemErrorToSystemManager(EFrameworkunifiedSystemError f_systemError);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   Send_CWORD56_HeartBeatRequestToSystemManager
///
/// \note    This function forwards a _CWORD56_ heartbeat request received by power
///          services from the power shadow to System Manager.
///
/// \param   [in]
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus  Send_CWORD56_HeartBeatRequestToSystemManager(EPWR_HB_REQ_MSG_STRUCT f_HbReq);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendBootMicroResetNotificationToSystemManager
///
/// \param   ResetReason    Enumerated boot micro reset reason.
///
///  This function is called by Logging Shadow to inform System Manager of a
///  boot micro reset condition.
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendBootMicroResetNotificationToSystemManager(eSMBootMicroResetReason ResetReason);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendDiagLogEventRequestToSystemManager
///
/// \note    This function is called by logger to initiate log artifact collection
///          and storage on behalf of diagnostic services.
///
/// \param   f_copyDestPathStr
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendDiagLoggingRequestToSystemManager(std::string f_copyDestPathStr);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendCANLoggingRequestToSystemManager
///
/// \note    This function is called by logger to initiate log artifact collection
///          and storage when signaled via CAN.
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendCANLoggingRequestToSystemManager(void);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendDTCLoggingRequestToSystemManager
///
/// \note    This function is called by logger to initiate log artifact collection
///          and storage when signaled via diagnostic command.
///
/// \param   f_dtc   Diagnostic trouble code.
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendDTCLoggingRequestToSystemManager(UI_32 f_dtc);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   RegisterBootMicroLogRequestCb
///
///  This function is called by Logging Shadow to register a callback function for
///  the boot micro log request that may be generated by System Manager when an
///  error event occurs.
///
/// \param   [in] hApp       AGL Framework Application Handle
///
/// \param   [in] fpOnCmd    Call back function with the signature:
///                         EFrameworkunifiedStatus fnct(HANDLE hApp);
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus RegisterBootMicroLogRequestCb(HANDLE hApp, CbFuncPtr fpOnCmd);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendBootMicroLogResponseToSystemManager
///
///  This function is called by Logging Shadow to provide a string representation of
///  the binary boot-micro log data.
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendBootMicroLogResponseToSystemManager(std::string f_logString);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
/// \brief Redirect either formatted, or unformatted response output to System Manager.
///
/// \see SendDebugDumpResponseToSystemManager
////////////////////////////////////////////////////////////////////////////////////////////
#define SSDEBUGDUMP(args...) (SendDebugDumpResponseToSystemManager(TRUE, ## args))

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup SM_Deletable
////////////////////////////////////////////////////////////////////////////////////////////
#define SSDEBUGDUMP_RAW(args...) (SendDebugDumpResponseToSystemManager(FALSE, ## args))

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendLogStartRequestToSystemManager
///
/// \note    This function is call by SS_Logger when the logging process has
///          completed and no additional request for artifacts will be generated.
///
/// \param   none.
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendLogStartRequestToSystemManager(EErrorEventType f_errorEventType);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendLogArtifactRequestToSystemManager
///
/// \note    This function is call by SS_Logger to request SM to acquire and
//           return by reference (filename), the specified logging artifact.
///
/// \param   [in] f_artifactId, enumerated artifact number.
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendLogArtifactRequestToSystemManager(EArtifactId f_artifactId);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendLogCompleteRequestToSystemManager
///
/// \note    This function is call by SS_Logger when the logging process has
///          completed and no additional request for artifacts will be generated.
///
/// \param   none.
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendLogCompleteRequestToSystemManager(EFrameworkunifiedStatus f_eStatus = eFrameworkunifiedStatusOK);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   SendEelExportRequestToSystemManager
///
/// \note    This function forwards the Device Detection EEL_export trigger
///          received by SS Logger to System Manager.
///
/// \param   f_path   Destination path for the trigger artifacts.
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus SendEelExportRequestToSystemManager(std::string f_path);

/////////////////////////////////////////////////////////////////////////////////////
/// \ingroup interface_unified
///
/// \brief   DebugDump request callback function.
///
/// \note    This function is called when System Manager requests the receiving
///          application to generate their debugdump.
///
/// \param   hApp
///
/// \return Status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus OnSystemManagerDebugDump(HANDLE hApp);

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