summaryrefslogtreecommitdiff
path: root/SDL_Core/src/components/JSONHandler/include/JSONHandler/SDLRPCObjects/V1/Marshaller.h
blob: 085a41c4bd962c91d0c46608f0fddb20e6e8bfbb (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
//
// Copyright (c) 2013, Ford Motor Company
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following
// disclaimer in the documentation and/or other materials provided with the
// distribution.
//
// Neither the name of the Ford Motor Company nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//

#ifndef NSSMARTDEVICELINKKRPC_MARSHALLER_INCLUDE
#define NSSMARTDEVICELINKKRPC_MARSHALLER_INCLUDE

#include <string>
#include <json/json.h>

#include "../src/SDLRPCObjectsImpl/V1/RegisterAppInterface_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/RegisterAppInterface_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/UnregisterAppInterface_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/UnregisterAppInterface_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/SetGlobalProperties_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/SetGlobalProperties_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/ResetGlobalProperties_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/ResetGlobalProperties_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/AddCommand_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/AddCommand_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/DeleteCommand_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/DeleteCommand_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/AddSubMenu_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/AddSubMenu_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/DeleteSubMenu_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/DeleteSubMenu_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/CreateInteractionChoiceSet_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/CreateInteractionChoiceSet_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/PerformInteraction_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/PerformInteraction_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/DeleteInteractionChoiceSet_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/DeleteInteractionChoiceSet_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/Alert_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/Alert_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/Show_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/Show_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/Speak_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/Speak_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/SetMediaClockTimer_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/SetMediaClockTimer_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/EncodedSyncPData_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/EncodedSyncPData_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/SubscribeButton_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/SubscribeButton_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/UnsubscribeButton_requestMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/UnsubscribeButton_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/GenericResponse_responseMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/OnHMIStatusMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/OnAppInterfaceUnregisteredMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/OnButtonEventMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/OnButtonPressMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/OnCommandMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/OnEncodedSyncPDataMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/OnTBTClientStateMarshaller.h"
#include "../src/SDLRPCObjectsImpl/V1/OnDriverDistractionMarshaller.h"


/*
  interface	Ford Sync RAPI
  version	1.2
  date		2011-05-17
  generated at	Thu Jan 24 06:36:21 2013
  source stamp	Thu Jan 24 06:35:34 2013
  author	RC
*/

namespace NsSmartDeviceLinkRPC
{
  class Marshaller
  {
  public:

    enum Methods
    {
      METHOD_INVALID=-1,
      METHOD_REGISTERAPPINTERFACE_REQUEST=0,
      METHOD_REGISTERAPPINTERFACE_RESPONSE=1,
      METHOD_UNREGISTERAPPINTERFACE_REQUEST=2,
      METHOD_UNREGISTERAPPINTERFACE_RESPONSE=3,
      METHOD_SETGLOBALPROPERTIES_REQUEST=4,
      METHOD_SETGLOBALPROPERTIES_RESPONSE=5,
      METHOD_RESETGLOBALPROPERTIES_REQUEST=6,
      METHOD_RESETGLOBALPROPERTIES_RESPONSE=7,
      METHOD_ADDCOMMAND_REQUEST=8,
      METHOD_ADDCOMMAND_RESPONSE=9,
      METHOD_DELETECOMMAND_REQUEST=10,
      METHOD_DELETECOMMAND_RESPONSE=11,
      METHOD_ADDSUBMENU_REQUEST=12,
      METHOD_ADDSUBMENU_RESPONSE=13,
      METHOD_DELETESUBMENU_REQUEST=14,
      METHOD_DELETESUBMENU_RESPONSE=15,
      METHOD_CREATEINTERACTIONCHOICESET_REQUEST=16,
      METHOD_CREATEINTERACTIONCHOICESET_RESPONSE=17,
      METHOD_PERFORMINTERACTION_REQUEST=18,
      METHOD_PERFORMINTERACTION_RESPONSE=19,
      METHOD_DELETEINTERACTIONCHOICESET_REQUEST=20,
      METHOD_DELETEINTERACTIONCHOICESET_RESPONSE=21,
      METHOD_ALERT_REQUEST=22,
      METHOD_ALERT_RESPONSE=23,
      METHOD_SHOW_REQUEST=24,
      METHOD_SHOW_RESPONSE=25,
      METHOD_SPEAK_REQUEST=26,
      METHOD_SPEAK_RESPONSE=27,
      METHOD_SETMEDIACLOCKTIMER_REQUEST=28,
      METHOD_SETMEDIACLOCKTIMER_RESPONSE=29,
      METHOD_ENCODEDSYNCPDATA_REQUEST=30,
      METHOD_ENCODEDSYNCPDATA_RESPONSE=31,
      METHOD_SUBSCRIBEBUTTON_REQUEST=32,
      METHOD_SUBSCRIBEBUTTON_RESPONSE=33,
      METHOD_UNSUBSCRIBEBUTTON_REQUEST=34,
      METHOD_UNSUBSCRIBEBUTTON_RESPONSE=35,
      METHOD_GENERICRESPONSE_RESPONSE=36,
      METHOD_ONHMISTATUS=37,
      METHOD_ONAPPINTERFACEUNREGISTERED=38,
      METHOD_ONBUTTONEVENT=39,
      METHOD_ONBUTTONPRESS=40,
      METHOD_ONCOMMAND=41,
      METHOD_ONENCODEDSYNCPDATA=42,
      METHOD_ONTBTCLIENTSTATE=43,
      METHOD_ONDRIVERDISTRACTION=44
    };

    Marshaller()					{}
    ~Marshaller()					{}
    
  
    static SDLRPCMessage* fromString(const std::string&);
    static std::string toString(const SDLRPCMessage* msg);

     static SDLRPCMessage* fromJSON(const Json::Value&);
    static Json::Value toJSON(const SDLRPCMessage* msg);
  
  protected:
   

// RegisterAppInterface_request
    static bool fromString(const std::string& str, RegisterAppInterface_request& res)
    {
      return mRegisterAppInterface_request.fromString(str, res);
    }

    static std::string toString(const RegisterAppInterface_request& res)
    {
      return mRegisterAppInterface_request.toString(res);
    }

// RegisterAppInterface_response
    static bool fromString(const std::string& str, RegisterAppInterface_response& res)
    {
      return mRegisterAppInterface_response.fromString(str, res);
    }

    static std::string toString(const RegisterAppInterface_response& res)
    {
      return mRegisterAppInterface_response.toString(res);
    }

// UnregisterAppInterface_request
    static bool fromString(const std::string& str, UnregisterAppInterface_request& res)
    {
      return mUnregisterAppInterface_request.fromString(str, res);
    }

    static std::string toString(const UnregisterAppInterface_request& res)
    {
      return mUnregisterAppInterface_request.toString(res);
    }

// UnregisterAppInterface_response
    static bool fromString(const std::string& str, UnregisterAppInterface_response& res)
    {
      return mUnregisterAppInterface_response.fromString(str, res);
    }

    static std::string toString(const UnregisterAppInterface_response& res)
    {
      return mUnregisterAppInterface_response.toString(res);
    }

// SetGlobalProperties_request
    static bool fromString(const std::string& str, SetGlobalProperties_request& res)
    {
      return mSetGlobalProperties_request.fromString(str, res);
    }

    static std::string toString(const SetGlobalProperties_request& res)
    {
      return mSetGlobalProperties_request.toString(res);
    }

// SetGlobalProperties_response
    static bool fromString(const std::string& str, SetGlobalProperties_response& res)
    {
      return mSetGlobalProperties_response.fromString(str, res);
    }

    static std::string toString(const SetGlobalProperties_response& res)
    {
      return mSetGlobalProperties_response.toString(res);
    }

// ResetGlobalProperties_request
    static bool fromString(const std::string& str, ResetGlobalProperties_request& res)
    {
      return mResetGlobalProperties_request.fromString(str, res);
    }

    static std::string toString(const ResetGlobalProperties_request& res)
    {
      return mResetGlobalProperties_request.toString(res);
    }

// ResetGlobalProperties_response
    static bool fromString(const std::string& str, ResetGlobalProperties_response& res)
    {
      return mResetGlobalProperties_response.fromString(str, res);
    }

    static std::string toString(const ResetGlobalProperties_response& res)
    {
      return mResetGlobalProperties_response.toString(res);
    }

// AddCommand_request
    static bool fromString(const std::string& str, AddCommand_request& res)
    {
      return mAddCommand_request.fromString(str, res);
    }

    static std::string toString(const AddCommand_request& res)
    {
      return mAddCommand_request.toString(res);
    }

// AddCommand_response
    static bool fromString(const std::string& str, AddCommand_response& res)
    {
      return mAddCommand_response.fromString(str, res);
    }

    static std::string toString(const AddCommand_response& res)
    {
      return mAddCommand_response.toString(res);
    }

// DeleteCommand_request
    static bool fromString(const std::string& str, DeleteCommand_request& res)
    {
      return mDeleteCommand_request.fromString(str, res);
    }

    static std::string toString(const DeleteCommand_request& res)
    {
      return mDeleteCommand_request.toString(res);
    }

// DeleteCommand_response
    static bool fromString(const std::string& str, DeleteCommand_response& res)
    {
      return mDeleteCommand_response.fromString(str, res);
    }

    static std::string toString(const DeleteCommand_response& res)
    {
      return mDeleteCommand_response.toString(res);
    }

// AddSubMenu_request
    static bool fromString(const std::string& str, AddSubMenu_request& res)
    {
      return mAddSubMenu_request.fromString(str, res);
    }

    static std::string toString(const AddSubMenu_request& res)
    {
      return mAddSubMenu_request.toString(res);
    }

// AddSubMenu_response
    static bool fromString(const std::string& str, AddSubMenu_response& res)
    {
      return mAddSubMenu_response.fromString(str, res);
    }

    static std::string toString(const AddSubMenu_response& res)
    {
      return mAddSubMenu_response.toString(res);
    }

// DeleteSubMenu_request
    static bool fromString(const std::string& str, DeleteSubMenu_request& res)
    {
      return mDeleteSubMenu_request.fromString(str, res);
    }

    static std::string toString(const DeleteSubMenu_request& res)
    {
      return mDeleteSubMenu_request.toString(res);
    }

// DeleteSubMenu_response
    static bool fromString(const std::string& str, DeleteSubMenu_response& res)
    {
      return mDeleteSubMenu_response.fromString(str, res);
    }

    static std::string toString(const DeleteSubMenu_response& res)
    {
      return mDeleteSubMenu_response.toString(res);
    }

// CreateInteractionChoiceSet_request
    static bool fromString(const std::string& str, CreateInteractionChoiceSet_request& res)
    {
      return mCreateInteractionChoiceSet_request.fromString(str, res);
    }

    static std::string toString(const CreateInteractionChoiceSet_request& res)
    {
      return mCreateInteractionChoiceSet_request.toString(res);
    }

// CreateInteractionChoiceSet_response
    static bool fromString(const std::string& str, CreateInteractionChoiceSet_response& res)
    {
      return mCreateInteractionChoiceSet_response.fromString(str, res);
    }

    static std::string toString(const CreateInteractionChoiceSet_response& res)
    {
      return mCreateInteractionChoiceSet_response.toString(res);
    }

// PerformInteraction_request
    static bool fromString(const std::string& str, PerformInteraction_request& res)
    {
      return mPerformInteraction_request.fromString(str, res);
    }

    static std::string toString(const PerformInteraction_request& res)
    {
      return mPerformInteraction_request.toString(res);
    }

// PerformInteraction_response
    static bool fromString(const std::string& str, PerformInteraction_response& res)
    {
      return mPerformInteraction_response.fromString(str, res);
    }

    static std::string toString(const PerformInteraction_response& res)
    {
      return mPerformInteraction_response.toString(res);
    }

// DeleteInteractionChoiceSet_request
    static bool fromString(const std::string& str, DeleteInteractionChoiceSet_request& res)
    {
      return mDeleteInteractionChoiceSet_request.fromString(str, res);
    }

    static std::string toString(const DeleteInteractionChoiceSet_request& res)
    {
      return mDeleteInteractionChoiceSet_request.toString(res);
    }

// DeleteInteractionChoiceSet_response
    static bool fromString(const std::string& str, DeleteInteractionChoiceSet_response& res)
    {
      return mDeleteInteractionChoiceSet_response.fromString(str, res);
    }

    static std::string toString(const DeleteInteractionChoiceSet_response& res)
    {
      return mDeleteInteractionChoiceSet_response.toString(res);
    }

// Alert_request
    static bool fromString(const std::string& str, Alert_request& res)
    {
      return mAlert_request.fromString(str, res);
    }

    static std::string toString(const Alert_request& res)
    {
      return mAlert_request.toString(res);
    }

// Alert_response
    static bool fromString(const std::string& str, Alert_response& res)
    {
      return mAlert_response.fromString(str, res);
    }

    static std::string toString(const Alert_response& res)
    {
      return mAlert_response.toString(res);
    }

// Show_request
    static bool fromString(const std::string& str, Show_request& res)
    {
      return mShow_request.fromString(str, res);
    }

    static std::string toString(const Show_request& res)
    {
      return mShow_request.toString(res);
    }

// Show_response
    static bool fromString(const std::string& str, Show_response& res)
    {
      return mShow_response.fromString(str, res);
    }

    static std::string toString(const Show_response& res)
    {
      return mShow_response.toString(res);
    }

// Speak_request
    static bool fromString(const std::string& str, Speak_request& res)
    {
      return mSpeak_request.fromString(str, res);
    }

    static std::string toString(const Speak_request& res)
    {
      return mSpeak_request.toString(res);
    }

// Speak_response
    static bool fromString(const std::string& str, Speak_response& res)
    {
      return mSpeak_response.fromString(str, res);
    }

    static std::string toString(const Speak_response& res)
    {
      return mSpeak_response.toString(res);
    }

// SetMediaClockTimer_request
    static bool fromString(const std::string& str, SetMediaClockTimer_request& res)
    {
      return mSetMediaClockTimer_request.fromString(str, res);
    }

    static std::string toString(const SetMediaClockTimer_request& res)
    {
      return mSetMediaClockTimer_request.toString(res);
    }

// SetMediaClockTimer_response
    static bool fromString(const std::string& str, SetMediaClockTimer_response& res)
    {
      return mSetMediaClockTimer_response.fromString(str, res);
    }

    static std::string toString(const SetMediaClockTimer_response& res)
    {
      return mSetMediaClockTimer_response.toString(res);
    }

// EncodedSyncPData_request
    static bool fromString(const std::string& str, EncodedSyncPData_request& res)
    {
      return mEncodedSyncPData_request.fromString(str, res);
    }

    static std::string toString(const EncodedSyncPData_request& res)
    {
      return mEncodedSyncPData_request.toString(res);
    }

// EncodedSyncPData_response
    static bool fromString(const std::string& str, EncodedSyncPData_response& res)
    {
      return mEncodedSyncPData_response.fromString(str, res);
    }

    static std::string toString(const EncodedSyncPData_response& res)
    {
      return mEncodedSyncPData_response.toString(res);
    }

// SubscribeButton_request
    static bool fromString(const std::string& str, SubscribeButton_request& res)
    {
      return mSubscribeButton_request.fromString(str, res);
    }

    static std::string toString(const SubscribeButton_request& res)
    {
      return mSubscribeButton_request.toString(res);
    }

// SubscribeButton_response
    static bool fromString(const std::string& str, SubscribeButton_response& res)
    {
      return mSubscribeButton_response.fromString(str, res);
    }

    static std::string toString(const SubscribeButton_response& res)
    {
      return mSubscribeButton_response.toString(res);
    }

// UnsubscribeButton_request
    static bool fromString(const std::string& str, UnsubscribeButton_request& res)
    {
      return mUnsubscribeButton_request.fromString(str, res);
    }

    static std::string toString(const UnsubscribeButton_request& res)
    {
      return mUnsubscribeButton_request.toString(res);
    }

// UnsubscribeButton_response
    static bool fromString(const std::string& str, UnsubscribeButton_response& res)
    {
      return mUnsubscribeButton_response.fromString(str, res);
    }

    static std::string toString(const UnsubscribeButton_response& res)
    {
      return mUnsubscribeButton_response.toString(res);
    }

// GenericResponse_response
    static bool fromString(const std::string& str, GenericResponse_response& res)
    {
      return mGenericResponse_response.fromString(str, res);
    }

    static std::string toString(const GenericResponse_response& res)
    {
      return mGenericResponse_response.toString(res);
    }

// OnHMIStatus
    static bool fromString(const std::string& str, OnHMIStatus& res)
    {
      return mOnHMIStatus.fromString(str, res);
    }

    static std::string toString(const OnHMIStatus& res)
    {
      return mOnHMIStatus.toString(res);
    }

// OnAppInterfaceUnregistered
    static bool fromString(const std::string& str, OnAppInterfaceUnregistered& res)
    {
      return mOnAppInterfaceUnregistered.fromString(str, res);
    }

    static std::string toString(const OnAppInterfaceUnregistered& res)
    {
      return mOnAppInterfaceUnregistered.toString(res);
    }

// OnButtonEvent
    static bool fromString(const std::string& str, OnButtonEvent& res)
    {
      return mOnButtonEvent.fromString(str, res);
    }

    static std::string toString(const OnButtonEvent& res)
    {
      return mOnButtonEvent.toString(res);
    }

// OnButtonPress
    static bool fromString(const std::string& str, OnButtonPress& res)
    {
      return mOnButtonPress.fromString(str, res);
    }

    static std::string toString(const OnButtonPress& res)
    {
      return mOnButtonPress.toString(res);
    }

// OnCommand
    static bool fromString(const std::string& str, OnCommand& res)
    {
      return mOnCommand.fromString(str, res);
    }

    static std::string toString(const OnCommand& res)
    {
      return mOnCommand.toString(res);
    }

// OnEncodedSyncPData
    static bool fromString(const std::string& str, OnEncodedSyncPData& res)
    {
      return mOnEncodedSyncPData.fromString(str, res);
    }

    static std::string toString(const OnEncodedSyncPData& res)
    {
      return mOnEncodedSyncPData.toString(res);
    }

// OnTBTClientState
    static bool fromString(const std::string& str, OnTBTClientState& res)
    {
      return mOnTBTClientState.fromString(str, res);
    }

    static std::string toString(const OnTBTClientState& res)
    {
      return mOnTBTClientState.toString(res);
    }

// OnDriverDistraction
    static bool fromString(const std::string& str, OnDriverDistraction& res)
    {
      return mOnDriverDistraction.fromString(str, res);
    }

    static std::string toString(const OnDriverDistraction& res)
    {
      return mOnDriverDistraction.toString(res);
    }

    struct localHash
    {
      const char *name;
      unsigned int idx;
      void* marshaller;					// Bingo!!!  old good plain C with direct casting!!!
    };
  
  private:

    static RegisterAppInterface_requestMarshaller mRegisterAppInterface_request;
    static RegisterAppInterface_responseMarshaller mRegisterAppInterface_response;
    static UnregisterAppInterface_requestMarshaller mUnregisterAppInterface_request;
    static UnregisterAppInterface_responseMarshaller mUnregisterAppInterface_response;
    static SetGlobalProperties_requestMarshaller mSetGlobalProperties_request;
    static SetGlobalProperties_responseMarshaller mSetGlobalProperties_response;
    static ResetGlobalProperties_requestMarshaller mResetGlobalProperties_request;
    static ResetGlobalProperties_responseMarshaller mResetGlobalProperties_response;
    static AddCommand_requestMarshaller mAddCommand_request;
    static AddCommand_responseMarshaller mAddCommand_response;
    static DeleteCommand_requestMarshaller mDeleteCommand_request;
    static DeleteCommand_responseMarshaller mDeleteCommand_response;
    static AddSubMenu_requestMarshaller mAddSubMenu_request;
    static AddSubMenu_responseMarshaller mAddSubMenu_response;
    static DeleteSubMenu_requestMarshaller mDeleteSubMenu_request;
    static DeleteSubMenu_responseMarshaller mDeleteSubMenu_response;
    static CreateInteractionChoiceSet_requestMarshaller mCreateInteractionChoiceSet_request;
    static CreateInteractionChoiceSet_responseMarshaller mCreateInteractionChoiceSet_response;
    static PerformInteraction_requestMarshaller mPerformInteraction_request;
    static PerformInteraction_responseMarshaller mPerformInteraction_response;
    static DeleteInteractionChoiceSet_requestMarshaller mDeleteInteractionChoiceSet_request;
    static DeleteInteractionChoiceSet_responseMarshaller mDeleteInteractionChoiceSet_response;
    static Alert_requestMarshaller mAlert_request;
    static Alert_responseMarshaller mAlert_response;
    static Show_requestMarshaller mShow_request;
    static Show_responseMarshaller mShow_response;
    static Speak_requestMarshaller mSpeak_request;
    static Speak_responseMarshaller mSpeak_response;
    static SetMediaClockTimer_requestMarshaller mSetMediaClockTimer_request;
    static SetMediaClockTimer_responseMarshaller mSetMediaClockTimer_response;
    static EncodedSyncPData_requestMarshaller mEncodedSyncPData_request;
    static EncodedSyncPData_responseMarshaller mEncodedSyncPData_response;
    static SubscribeButton_requestMarshaller mSubscribeButton_request;
    static SubscribeButton_responseMarshaller mSubscribeButton_response;
    static UnsubscribeButton_requestMarshaller mUnsubscribeButton_request;
    static UnsubscribeButton_responseMarshaller mUnsubscribeButton_response;
    static GenericResponse_responseMarshaller mGenericResponse_response;
    static OnHMIStatusMarshaller mOnHMIStatus;
    static OnAppInterfaceUnregisteredMarshaller mOnAppInterfaceUnregistered;
    static OnButtonEventMarshaller mOnButtonEvent;
    static OnButtonPressMarshaller mOnButtonPress;
    static OnCommandMarshaller mOnCommand;
    static OnEncodedSyncPDataMarshaller mOnEncodedSyncPData;
    static OnTBTClientStateMarshaller mOnTBTClientState;
    static OnDriverDistractionMarshaller mOnDriverDistraction;

    static const char* getName(Methods e)
    {
       return (e>=0 && e<45) ? mHashTable[e].name : NULL;
    }
     
    static const Methods getIndex(const char* s);
  
    static const localHash mHashTable[45];
    
    friend class Marshaller_intHash;
  };

}

#endif