Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_voicecall_messages.h
Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 
11 #ifndef TAF_VOICECALL_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_VOICECALL_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_voicecall_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_VOICECALL_MSG_SIZE
18 
19 // Define the message type for communicating between client and server
20 typedef struct __attribute__((packed))
21 {
22  uint32_t id;
23  uint8_t buffer[_MAX_MSG_SIZE];
24 }
26 
27 #define _MSGID_taf_voicecall_AddStateHandler 0
28 #define _MSGID_taf_voicecall_RemoveStateHandler 1
29 #define _MSGID_taf_voicecall_Start 2
30 #define _MSGID_taf_voicecall_End 3
31 #define _MSGID_taf_voicecall_Delete 4
32 #define _MSGID_taf_voicecall_Answer 5
33 #define _MSGID_taf_voicecall_GetEndCause 6
34 #define _MSGID_taf_voicecall_Hold 7
35 #define _MSGID_taf_voicecall_Resume 8
36 #define _MSGID_taf_voicecall_Swap 9
37 
38 
39 // Define type-safe pack/unpack functions for all enums, including included types
40 
41 static inline bool taf_voicecall_PackEvent
42 (
43  uint8_t **bufferPtr,
45 )
46 {
47  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
48 }
49 
50 static inline bool taf_voicecall_UnpackEvent
51 (
52  uint8_t **bufferPtr,
53  taf_voicecall_Event_t* valuePtr
54 )
55 {
56  bool result;
57  uint32_t value = 0;
58  result = le_pack_UnpackUint32(bufferPtr, &value);
59  if (result)
60  {
61  *valuePtr = (taf_voicecall_Event_t)value;
62  }
63  return result;
64 }
65 
66 static inline bool taf_voicecall_PackCallEndCause
67 (
68  uint8_t **bufferPtr,
70 )
71 {
72  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
73 }
74 
75 static inline bool taf_voicecall_UnpackCallEndCause
76 (
77  uint8_t **bufferPtr,
79 )
80 {
81  bool result;
82  uint32_t value = 0;
83  result = le_pack_UnpackUint32(bufferPtr, &value);
84  if (result)
85  {
86  *valuePtr = (taf_voicecall_CallEndCause_t)value;
87  }
88  return result;
89 }
90 
91 // Define pack/unpack functions for all structures, including included types
92 
93 
94 #endif // TAF_VOICECALL_MESSAGES_H_INCLUDE_GUARD
taf_voicecall_Event_t
Definition: taf_voicecall_common.h:93
static bool taf_voicecall_PackEvent(uint8_t **bufferPtr, taf_voicecall_Event_t value)
Definition: taf_voicecall_messages.h:42
static bool taf_voicecall_UnpackCallEndCause(uint8_t **bufferPtr, taf_voicecall_CallEndCause_t *valuePtr)
Definition: taf_voicecall_messages.h:76
#define _MAX_MSG_SIZE
Definition: taf_voicecall_messages.h:17
static bool taf_voicecall_PackCallEndCause(uint8_t **bufferPtr, taf_voicecall_CallEndCause_t value)
Definition: taf_voicecall_messages.h:67
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
struct __attribute__((packed))
Definition: taf_voicecall_messages.h:20
static bool taf_voicecall_UnpackEvent(uint8_t **bufferPtr, taf_voicecall_Event_t *valuePtr)
Definition: taf_voicecall_messages.h:51
_Message_t
Definition: taf_voicecall_messages.h:25
taf_voicecall_CallEndCause_t
Definition: taf_voicecall_common.h:132
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205