summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLNotificationDispatcher.m
blob: a1722812064ece4327200b50a0b4cdf156f61606 (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
//
//  SDLnotificationDispatcher.m
//  SmartDeviceLink-iOS
//
//  Created by Joel Fischer on 7/7/16.
//  Copyright © 2016 smartdevicelink. All rights reserved.
//

#import "SDLNotificationDispatcher.h"

#import "SDLError.h"
#import "SDLNotificationConstants.h"
#import "SDLRPCNotification.h"
#import "SDLRPCNotificationNotification.h"
#import "SDLRPCRequestNotification.h"
#import "SDLRPCResponseNotification.h"

NS_ASSUME_NONNULL_BEGIN

@implementation SDLNotificationDispatcher

- (instancetype)init {
    self = [super init];
    if (!self) { return nil; }

    return self;
}

- (void)postNotificationName:(NSString *)name infoObject:(nullable id)infoObject {
    NSDictionary<NSString *, id> *userInfo = nil;
    if (infoObject != nil) {
        userInfo = @{SDLNotificationUserInfoObject: infoObject};
    }

    [[NSNotificationCenter defaultCenter] postNotificationName:name object:self userInfo:userInfo];
}

- (void)postRPCRequestNotification:(NSString *)name request:(__kindof SDLRPCRequest *)request {
    SDLRPCRequestNotification *notification = [[SDLRPCRequestNotification alloc] initWithName:name object:self rpcRequest:request];

    [[NSNotificationCenter defaultCenter] postNotification:notification];
}

- (void)postRPCResponseNotification:(NSString *)name response:(__kindof SDLRPCResponse *)response {
    SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:name object:self rpcResponse:response];

    [[NSNotificationCenter defaultCenter] postNotification:notification];
}

- (void)postRPCNotificationNotification:(NSString *)name notification:(__kindof SDLRPCNotification *)rpcNotification {
    SDLRPCNotificationNotification *notification = [[SDLRPCNotificationNotification alloc] initWithName:name object:self rpcNotification:rpcNotification];

    [[NSNotificationCenter defaultCenter] postNotification:notification];
}

#pragma mark - SDLProxyListener Delegate Methods

- (void)onProxyOpened {
    [self postNotificationName:SDLTransportDidConnect infoObject:nil];
}

- (void)onProxyClosed {
    [self postNotificationName:SDLTransportDidDisconnect infoObject:nil];
}

- (void)onTransportError:(NSError *)error {
    [self postNotificationName:SDLTransportConnectError infoObject:error];
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"

- (void)onOnHMIStatus:(SDLOnHMIStatus *)notification {
    [self postRPCNotificationNotification:SDLDidChangeHMIStatusNotification notification:notification];
}

- (void)onOnDriverDistraction:(SDLOnDriverDistraction *)notification {
    [self postRPCNotificationNotification:SDLDidChangeDriverDistractionStateNotification notification:notification];
}

#pragma mark Optional Methods

- (void)onError:(NSException *)e {
    NSError *error = [NSError sdl_lifecycle_unknownRemoteErrorWithDescription:e.name andReason:e.reason];
    [self postNotificationName:SDLDidReceiveError infoObject:error];
}

# pragma mark - Responses

- (void)onReceivedLockScreenIcon:(UIImage *)icon {
    [self postNotificationName:SDLDidReceiveLockScreenIcon infoObject:icon];
}

- (void)onAddCommandResponse:(SDLAddCommandResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveAddCommandResponse response:response];
}

- (void)onAddSubMenuResponse:(SDLAddSubMenuResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveAddSubMenuResponse response:response];
}

- (void)onAlertManeuverResponse:(SDLAlertManeuverResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveAlertManeuverResponse response:response];
}

- (void)onAlertResponse:(SDLAlertResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveAlertResponse response:response];
}

- (void)onButtonPressResponse:(SDLButtonPressResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveButtonPressResponse response:response];
}

- (void)onCancelInteractionResponse:(SDLCancelInteractionResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveCancelInteractionResponse response:response];
}

- (void)onChangeRegistrationResponse:(SDLChangeRegistrationResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveChangeRegistrationResponse response:response];
}

- (void)onCloseApplicationResponse:(SDLCloseApplicationResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveCloseApplicationResponse response:response];
}

- (void)onCreateInteractionChoiceSetResponse:(SDLCreateInteractionChoiceSetResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveCreateInteractionChoiceSetResponse response:response];
}

- (void)onCreateWindowResponse:(SDLCreateWindowResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveCreateWindowResponse response:response];
}

- (void)onDeleteCommandResponse:(SDLDeleteCommandResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveDeleteCommandResponse response:response];
}

- (void)onDeleteFileResponse:(SDLDeleteFileResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveDeleteFileResponse response:response];
}

- (void)onDeleteInteractionChoiceSetResponse:(SDLDeleteInteractionChoiceSetResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveDeleteInteractionChoiceSetResponse response:response];
}

- (void)onDeleteSubMenuResponse:(SDLDeleteSubMenuResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveDeleteSubmenuResponse response:response];
}

- (void)onDeleteWindowResponse:(SDLDeleteWindowResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveDeleteWindowResponse response:response];
}

- (void)onDiagnosticMessageResponse:(SDLDiagnosticMessageResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveDiagnosticMessageResponse response:response];
}

- (void)onDialNumberResponse:(SDLDialNumberResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveDialNumberResponse response:response];
}

- (void)onEncodedSyncPDataResponse:(SDLEncodedSyncPDataResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveEncodedSyncPDataResponse response:response];
}

- (void)onEndAudioPassThruResponse:(SDLEndAudioPassThruResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveEndAudioPassThruResponse response:response];
}

- (void)onGenericResponse:(SDLGenericResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGenericResponse response:response];
}

- (void)onGetCloudAppPropertiesResponse:(SDLGetCloudAppPropertiesResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetCloudAppPropertiesResponse response:response];
}

- (void)onGetAppServiceDataResponse:(SDLGetAppServiceDataResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetAppServiceDataResponse response:response];
}

- (void)onGetDTCsResponse:(SDLGetDTCsResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetDTCsResponse response:response];
}

- (void)onGetFileResponse:(SDLGetFileResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetFileResponse response:response];
}

- (void)onGetInteriorVehicleDataResponse:(SDLGetInteriorVehicleDataResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetInteriorVehicleDataResponse response:response];
}

- (void)onGetInteriorVehicleDataConsentResponse:(SDLGetInteriorVehicleDataConsentResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetInteriorVehicleDataConsentResponse response:response];
}

- (void)onGetSystemCapabilityResponse:(SDLGetSystemCapabilityResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetSystemCapabilitiesResponse response:response];
}

- (void)onGetVehicleDataResponse:(SDLGetVehicleDataResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetVehicleDataResponse response:response];
}

- (void)onGetWayPointsResponse:(SDLGetWayPointsResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveGetWaypointsResponse response:response];
}

- (void)onListFilesResponse:(SDLListFilesResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveListFilesResponse response:response];
}

- (void)onPerformAppServiceInteractionResponse:(SDLPerformAppServiceInteractionResponse *)response {
    [self postRPCResponseNotification:SDLDidReceivePerformAppServiceInteractionResponse response:response];
}

- (void)onPerformAudioPassThruResponse:(SDLPerformAudioPassThruResponse *)response {
    [self postRPCResponseNotification:SDLDidReceivePerformAudioPassThruResponse response:response];
}

- (void)onPerformInteractionResponse:(SDLPerformInteractionResponse *)response {
    [self postRPCResponseNotification:SDLDidReceivePerformInteractionResponse response:response];
}

- (void)onPublishAppServiceResponse:(SDLPublishAppServiceResponse *)response {
    [self postRPCResponseNotification:SDLDidReceivePublishAppServiceResponse response:response];
}

- (void)onPutFileResponse:(SDLPutFileResponse *)response {
    [self postRPCResponseNotification:SDLDidReceivePutFileResponse response:response];
}

- (void)onReadDIDResponse:(SDLReadDIDResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveReadDIDResponse response:response];
}

- (void)onRegisterAppInterfaceResponse:(SDLRegisterAppInterfaceResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveRegisterAppInterfaceResponse response:response];
}

- (void)onReleaseInteriorVehicleDataModuleResponse:(SDLReleaseInteriorVehicleDataModuleResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveReleaseInteriorVehicleDataModuleResponse response:response];
}

- (void)onResetGlobalPropertiesResponse:(SDLResetGlobalPropertiesResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveResetGlobalPropertiesResponse response:response];
}

- (void)onScrollableMessageResponse:(SDLScrollableMessageResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveScrollableMessageResponse response:response];
}

- (void)onSendHapticDataResponse:(SDLSendHapticDataResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSendHapticDataResponse response:response];
}

- (void)onSendLocationResponse:(SDLSendLocationResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSendLocationResponse response:response];
}

- (void)onSetAppIconResponse:(SDLSetAppIconResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSetAppIconResponse response:response];
}

- (void)onSetCloudAppPropertiesResponse:(SDLSetCloudAppPropertiesResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSetCloudAppPropertiesResponse response:response];
}

- (void)onSetDisplayLayoutResponse:(SDLSetDisplayLayoutResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSetDisplayLayoutResponse response:response];
}

- (void)onSetGlobalPropertiesResponse:(SDLSetGlobalPropertiesResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSetGlobalPropertiesResponse response:response];
}

- (void)onSetInteriorVehicleDataResponse:(SDLSetInteriorVehicleDataResponse *)response{
    [self postRPCResponseNotification:SDLDidReceiveSetInteriorVehicleDataResponse response:response];
}

- (void)onSetMediaClockTimerResponse:(SDLSetMediaClockTimerResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSetMediaClockTimerResponse response:response];
}

- (void)onShowConstantTBTResponse:(SDLShowConstantTBTResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveShowConstantTBTResponse response:response];
}

- (void)onShowResponse:(SDLShowResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveShowResponse response:response];
}

- (void)onShowAppMenuResponse:(SDLShowAppMenuResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveShowAppMenuResponse response:response];
}

- (void)onSliderResponse:(SDLSliderResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSliderResponse response:response];
}

- (void)onSpeakResponse:(SDLSpeakResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSpeakResponse response:response];
}

- (void)onSubscribeButtonResponse:(SDLSubscribeButtonResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSubscribeButtonResponse response:response];
}

- (void)onSubscribeVehicleDataResponse:(SDLSubscribeVehicleDataResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSubscribeVehicleDataResponse response:response];
}

- (void)onSubscribeWayPointsResponse:(SDLSubscribeWayPointsResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSubscribeWaypointsResponse response:response];
}

- (void)onSyncPDataResponse:(SDLSyncPDataResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveSyncPDataResponse response:response];
}

- (void)onUpdateTurnListResponse:(SDLUpdateTurnListResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveUpdateTurnListResponse response:response];
}

- (void)onUnpublishAppServiceResponse:(SDLUnpublishAppServiceResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveUnpublishAppServiceResponse response:response];
}

- (void)onUnregisterAppInterfaceResponse:(SDLUnregisterAppInterfaceResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveUnregisterAppInterfaceResponse response:response];
}

- (void)onUnsubscribeButtonResponse:(SDLUnsubscribeButtonResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveUnsubscribeButtonResponse response:response];
}

- (void)onUnsubscribeVehicleDataResponse:(SDLUnsubscribeVehicleDataResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveUnsubscribeVehicleDataResponse response:response];
}

- (void)onUnsubscribeWayPointsResponse:(SDLUnsubscribeWayPointsResponse *)response {
    [self postRPCResponseNotification:SDLDidReceiveUnsubscribeWaypointsResponse response:response];
}

# pragma mark - Requests

- (void)onAddCommand:(SDLAddCommand *)request {
    [self postRPCRequestNotification:SDLDidReceiveAddCommandRequest request:request];
}

- (void)onAddSubMenu:(SDLAddSubMenu *)request {
    [self postRPCRequestNotification:SDLDidReceiveAddSubMenuRequest request:request];
}

- (void)onAlert:(SDLAlert *)request {
    [self postRPCRequestNotification:SDLDidReceiveAlertRequest request:request];
}

- (void)onAlertManeuver:(SDLAlertManeuver *)request {
    [self postRPCRequestNotification:SDLDidReceiveAlertManeuverRequest request:request];
}

- (void)onButtonPress:(SDLButtonPress *)request {
    [self postRPCRequestNotification:SDLDidReceiveButtonPressRequest request:request];
}

- (void)onCancelInteraction:(SDLCancelInteraction *)request {
    [self postRPCRequestNotification:SDLDidReceiveCancelInteractionRequest request:request];
}

- (void)onChangeRegistration:(SDLChangeRegistration *)request {
    [self postRPCRequestNotification:SDLDidReceiveChangeRegistrationRequest request:request];
}

- (void)onCloseApplication:(SDLCloseApplication *)request {
    [self postRPCRequestNotification:SDLDidReceiveCloseApplicationRequest request:request];
}

- (void)onCreateInteractionChoiceSet:(SDLCreateInteractionChoiceSet *)request {
    [self postRPCRequestNotification:SDLDidReceiveCreateInteractionChoiceSetRequest request:request];
}

- (void)onCreateWindow:(SDLCreateWindow *)request {
    [self postRPCRequestNotification:SDLDidReceiveCreateWindowRequest request:request];
}

- (void)onDeleteCommand:(SDLDeleteCommand *)request {
    [self postRPCRequestNotification:SDLDidReceiveDeleteCommandRequest request:request];
}

- (void)onDeleteFile:(SDLDeleteFile *)request {
    [self postRPCRequestNotification:SDLDidReceiveDeleteFileRequest request:request];
}

- (void)onDeleteInteractionChoiceSet:(SDLDeleteInteractionChoiceSet *)request {
    [self postRPCRequestNotification:SDLDidReceiveDeleteInteractionChoiceSetRequest request:request];
}

- (void)onDeleteSubMenu:(SDLDeleteSubMenu *)request {
    [self postRPCRequestNotification:SDLDidReceiveDeleteSubMenuRequest request:request];
}

- (void)onDeleteWindow:(SDLDeleteWindow *)request {
    [self postRPCRequestNotification:SDLDidReceiveDeleteWindowRequest request:request];
}

- (void)onDiagnosticMessage:(SDLDiagnosticMessage *)request {
    [self postRPCRequestNotification:SDLDidReceiveDiagnosticMessageRequest request:request];
}

- (void)onDialNumber:(SDLDialNumber *)request {
    [self postRPCRequestNotification:SDLDidReceiveDialNumberRequest request:request];
}

- (void)onEncodedSyncPData:(SDLEncodedSyncPData *)request {
    [self postRPCRequestNotification:SDLDidReceiveEncodedSyncPDataRequest request:request];
}

- (void)onEndAudioPassThru:(SDLEndAudioPassThru *)request {
    [self postRPCRequestNotification:SDLDidReceiveEndAudioPassThruRequest request:request];
}

- (void)onGetAppServiceData:(SDLGetAppServiceData *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetAppServiceDataRequest request:request];
}

- (void)onGetCloudAppProperties:(SDLGetCloudAppProperties *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetCloudAppPropertiesRequest request:request];
}

- (void)onGetDTCs:(SDLGetDTCs *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetDTCsRequest request:request];
}

- (void)onGetFile:(SDLGetFile *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetFileRequest request:request];
}

- (void)onGetInteriorVehicleData:(SDLGetInteriorVehicleData *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetInteriorVehicleDataRequest request:request];
}

- (void)onGetInteriorVehicleDataConsent:(SDLGetInteriorVehicleDataConsent *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetInteriorVehicleDataConsentRequest request:request];
}

- (void)onGetSystemCapability:(SDLGetSystemCapability *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetSystemCapabilityRequest request:request];
}

- (void)onGetVehicleData:(SDLGetVehicleData *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetVehicleDataRequest request:request];
}

- (void)onGetWayPoints:(SDLGetWayPoints *)request {
    [self postRPCRequestNotification:SDLDidReceiveGetWayPointsRequest request:request];
}

- (void)onListFiles:(SDLListFiles *)request {
    [self postRPCRequestNotification:SDLDidReceiveListFilesRequest request:request];
}

- (void)onPerformAppServiceInteraction:(SDLPerformAppServiceInteraction *)request {
    [self postRPCRequestNotification:SDLDidReceivePerformAppServiceInteractionRequest request:request];
}

- (void)onPerformAudioPassThru:(SDLPerformAudioPassThru *)request {
    [self postRPCRequestNotification:SDLDidReceivePerformAudioPassThruRequest request:request];
}

- (void)onPerformInteraction:(SDLPerformInteraction *)request {
    [self postRPCRequestNotification:SDLDidReceivePerformInteractionRequest request:request];
}

- (void)onPublishAppService:(SDLPublishAppService *)request {
    [self postRPCRequestNotification:SDLDidReceivePublishAppServiceRequest request:request];
}

- (void)onPutFile:(SDLPutFile *)request {
    [self postRPCRequestNotification:SDLDidReceivePutFileRequest request:request];
}

- (void)onReadDID:(SDLReadDID *)request {
    [self postRPCRequestNotification:SDLDidReceiveReadDIDRequest request:request];
}

- (void)onRegisterAppInterface:(SDLRegisterAppInterface *)request {
    [self postRPCRequestNotification:SDLDidReceiveRegisterAppInterfaceRequest request:request];
}

- (void)onReleaseInteriorVehicleDataModule:(SDLReleaseInteriorVehicleDataModule *)request {
    [self postRPCRequestNotification:SDLDidReceiveReleaseInteriorVehicleDataModuleRequest request:request];
}

- (void)onResetGlobalProperties:(SDLResetGlobalProperties *)request {
    [self postRPCRequestNotification:SDLDidReceiveResetGlobalPropertiesRequest request:request];
}

- (void)onScrollableMessage:(SDLScrollableMessage *)request {
    [self postRPCRequestNotification:SDLDidReceiveScrollableMessageRequest request:request];
}

- (void)onSendHapticData:(SDLSendHapticData *)request {
    [self postRPCRequestNotification:SDLDidReceiveSendHapticDataRequest request:request];
}

- (void)onSendLocation:(SDLSendLocation *)request {
    [self postRPCRequestNotification:SDLDidReceiveSendLocationRequest request:request];
}

- (void)onSetAppIcon:(SDLSetAppIcon *)request {
    [self postRPCRequestNotification:SDLDidReceiveSetAppIconRequest request:request];
}

- (void)onSetCloudAppProperties:(SDLSetCloudAppProperties *)request {
    [self postRPCRequestNotification:SDLDidReceiveSetCloudAppPropertiesRequest request:request];
}

- (void)onSetDisplayLayout:(SDLSetDisplayLayout *)request {
    [self postRPCRequestNotification:SDLDidReceiveSetDisplayLayoutRequest request:request];
}

- (void)onSetGlobalProperties:(SDLSetGlobalProperties *)request {
    [self postRPCRequestNotification:SDLDidReceiveSetGlobalPropertiesRequest request:request];
}

- (void)onSetInteriorVehicleData:(SDLSetInteriorVehicleData *)request {
    [self postRPCRequestNotification:SDLDidReceiveSetInteriorVehicleDataRequest request:request];
}

- (void)onSetMediaClockTimer:(SDLSetMediaClockTimer *)request {
    [self postRPCRequestNotification:SDLDidReceiveSetMediaClockTimerRequest request:request];
}

- (void)onShow:(SDLShow *)request {
    [self postRPCRequestNotification:SDLDidReceiveShowRequest request:request];
}

- (void)onShowAppMenu:(SDLShowAppMenu *)request {
    [self postRPCRequestNotification:SDLDidReceiveShowAppMenuRequest request:request];
}

- (void)onShowConstantTBT:(SDLShowConstantTBT *)request {
    [self postRPCRequestNotification:SDLDidReceiveShowConstantTBTRequest request:request];
}

- (void)onSlider:(SDLSlider *)request {
    [self postRPCRequestNotification:SDLDidReceiveSliderRequest request:request];
}

- (void)onSpeak:(SDLSpeak *)request {
    [self postRPCRequestNotification:SDLDidReceiveSpeakRequest request:request];
}

- (void)onSubscribeButton:(SDLSubscribeButton *)request {
    [self postRPCRequestNotification:SDLDidReceiveSubscribeButtonRequest request:request];
}

- (void)onSubscribeVehicleData:(SDLSubscribeVehicleData *)request {
    [self postRPCRequestNotification:SDLDidReceiveSubscribeVehicleDataRequest request:request];
}

- (void)onSubscribeWayPoints:(SDLSubscribeWayPoints *)request {
    [self postRPCRequestNotification:SDLDidReceiveSubscribeWayPointsRequest request:request];
}

- (void)onSyncPData:(SDLSyncPData *)request {
    [self postRPCRequestNotification:SDLDidReceiveSyncPDataRequest request:request];
}

-(void)onSystemRequest:(SDLSystemRequest *)request {
    [self postRPCRequestNotification:SDLDidReceiveSystemRequestRequest request:request];
}

- (void)onUnpublishAppService:(SDLUnpublishAppService *)request {
    [self postRPCRequestNotification:SDLDidReceiveUnpublishAppServiceRequest request:request];
}

- (void)onUnregisterAppInterface:(SDLUnregisterAppInterface *)request {
    [self postRPCRequestNotification:SDLDidReceiveUnregisterAppInterfaceRequest request:request];
}

- (void)onUnsubscribeButton:(SDLUnsubscribeButton *)request {
    [self postRPCRequestNotification:SDLDidReceiveUnsubscribeButtonRequest request:request];
}

- (void)onUnsubscribeVehicleData:(SDLUnsubscribeVehicleData *)request {
    [self postRPCRequestNotification:SDLDidReceiveUnsubscribeVehicleDataRequest request:request];
}

- (void)onUnsubscribeWayPoints:(SDLUnsubscribeWayPoints *)request {
    [self postRPCRequestNotification:SDLDidReceiveUnsubscribeWayPointsRequest request:request];
}

- (void)onUpdateTurnList:(SDLUpdateTurnList *)request {
    [self postRPCRequestNotification:SDLDidReceiveUpdateTurnListRequest request:request];
}

# pragma mark - Notifications

- (void)onOnAppInterfaceUnregistered:(SDLOnAppInterfaceUnregistered *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveAppUnregisteredNotification notification:notification];
}

- (void)onOnAppServiceData:(SDLOnAppServiceData *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveAppServiceDataNotification notification:notification];
}

- (void)onOnAudioPassThru:(SDLOnAudioPassThru *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveAudioPassThruNotification notification:notification];
}

- (void)onOnButtonEvent:(SDLOnButtonEvent *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveButtonEventNotification notification:notification];
}

- (void)onOnButtonPress:(SDLOnButtonPress *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveButtonPressNotification notification:notification];
}

- (void)onOnCommand:(SDLOnCommand *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveCommandNotification notification:notification];
}

- (void)onOnEncodedSyncPData:(SDLOnEncodedSyncPData *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveEncodedDataNotification notification:notification];
}

- (void)onOnHashChange:(SDLOnHashChange *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveNewHashNotification notification:notification];
}

- (void)onOnInteriorVehicleData:(SDLOnInteriorVehicleData *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveInteriorVehicleDataNotification notification:notification];
}

- (void)onOnKeyboardInput:(SDLOnKeyboardInput *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveKeyboardInputNotification notification:notification];
}

- (void)onOnLanguageChange:(SDLOnLanguageChange *)notification {
    [self postRPCNotificationNotification:SDLDidChangeLanguageNotification notification:notification];
}

- (void)onOnLockScreenNotification:(SDLOnLockScreenStatus *)notification {
    [self postRPCNotificationNotification:SDLDidChangeLockScreenStatusNotification notification:notification];
}

- (void)onOnPermissionsChange:(SDLOnPermissionsChange *)notification {
    [self postRPCNotificationNotification:SDLDidChangePermissionsNotification notification:notification];
}

- (void)onOnRCStatus:(SDLOnRCStatus *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveRemoteControlStatusNotification notification:notification];
}

- (void)onOnSyncPData:(SDLOnSyncPData *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveSystemRequestNotification notification:notification];
}

- (void)onOnSystemCapabilityUpdated:(SDLOnSystemCapabilityUpdated *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveSystemCapabilityUpdatedNotification notification:notification];
}

- (void)onOnSystemRequest:(SDLOnSystemRequest *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveSystemRequestNotification notification:notification];
}

- (void)onOnTBTClientState:(SDLOnTBTClientState *)notification {
    [self postRPCNotificationNotification:SDLDidChangeTurnByTurnStateNotification notification:notification];
}

- (void)onOnTouchEvent:(SDLOnTouchEvent *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveTouchEventNotification notification:notification];
}

- (void)onOnVehicleData:(SDLOnVehicleData *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveVehicleDataNotification notification:notification];
}

- (void)onOnWayPointChange:(SDLOnWayPointChange *)notification {
    [self postRPCNotificationNotification:SDLDidReceiveWaypointNotification notification:notification];
}

#pragma clang diagnostic pop

@end

NS_ASSUME_NONNULL_END