Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_sms_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_SMS_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_SMS_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_sms_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_SMS_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_sms_CreateRxMsgList 0
28 #define _MSGID_taf_sms_DeleteList 1
29 #define _MSGID_taf_sms_AddRxMsgHandler 2
30 #define _MSGID_taf_sms_RemoveRxMsgHandler 3
31 #define _MSGID_taf_sms_AddFullStorageEventHandler 4
32 #define _MSGID_taf_sms_RemoveFullStorageEventHandler 5
33 #define _MSGID_taf_sms_GetFirst 6
34 #define _MSGID_taf_sms_GetNext 7
35 #define _MSGID_taf_sms_GetSendStatus 8
36 #define _MSGID_taf_sms_GetReadStatus 9
37 #define _MSGID_taf_sms_GetLockStatus 10
38 #define _MSGID_taf_sms_Create 11
39 #define _MSGID_taf_sms_SetDestination 12
40 #define _MSGID_taf_sms_SetText 13
41 #define _MSGID_taf_sms_SetBinary 14
42 #define _MSGID_taf_sms_SetUCS2 15
43 #define _MSGID_taf_sms_SetPDU 16
44 #define _MSGID_taf_sms_SetCallback 17
45 #define _MSGID_taf_sms_SetPhoneId 18
46 #define _MSGID_taf_sms_Delete 19
47 #define _MSGID_taf_sms_GetPhoneId 20
48 #define _MSGID_taf_sms_GetSenderTel 21
49 #define _MSGID_taf_sms_GetText 22
50 #define _MSGID_taf_sms_GetBinary 23
51 #define _MSGID_taf_sms_GetUCS2 24
52 #define _MSGID_taf_sms_GetPDU 25
53 #define _MSGID_taf_sms_GetPDULen 26
54 #define _MSGID_taf_sms_GetType 27
55 #define _MSGID_taf_sms_GetFormat 28
56 #define _MSGID_taf_sms_GetUserdataLen 29
57 #define _MSGID_taf_sms_Send 30
58 #define _MSGID_taf_sms_DeleteFromStorage 31
59 #define _MSGID_taf_sms_DeleteAllFromStorage 32
60 #define _MSGID_taf_sms_MarkRead 33
61 #define _MSGID_taf_sms_MarkUnread 34
62 #define _MSGID_taf_sms_LockFromStorage 35
63 #define _MSGID_taf_sms_UnlockFromStorage 36
64 #define _MSGID_taf_sms_EncryptFromStorage 37
65 #define _MSGID_taf_sms_GetSmsCenterAddress 38
66 #define _MSGID_taf_sms_SetSmsCenterAddress 39
67 #define _MSGID_taf_sms_SetPreferredStorage 40
68 #define _MSGID_taf_sms_GetPreferredStorage 41
69 #define _MSGID_taf_sms_SendPduMsg 42
70 #define _MSGID_taf_sms_SendPduMsgEx 43
71 #define _MSGID_taf_sms_ActivateCellBroadcast 44
72 #define _MSGID_taf_sms_DeactivateCellBroadcast 45
73 #define _MSGID_taf_sms_AddCellBroadcastIds 46
74 #define _MSGID_taf_sms_RemoveCellBroadcastIds 47
75 
76 
77 // Define type-safe pack/unpack functions for all enums, including included types
78 
79 static inline bool taf_sms_PackStorage
80 (
81  uint8_t **bufferPtr,
82  taf_sms_Storage_t value
83 )
84 {
85  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
86 }
87 
88 static inline bool taf_sms_UnpackStorage
89 (
90  uint8_t **bufferPtr,
91  taf_sms_Storage_t* valuePtr
92 )
93 {
94  bool result;
95  uint32_t value = 0;
96  result = le_pack_UnpackUint32(bufferPtr, &value);
97  if (result)
98  {
99  *valuePtr = (taf_sms_Storage_t)value;
100  }
101  return result;
102 }
103 
104 static inline bool taf_sms_PackStorageFullType
105 (
106  uint8_t **bufferPtr,
108 )
109 {
110  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
111 }
112 
113 static inline bool taf_sms_UnpackStorageFullType
114 (
115  uint8_t **bufferPtr,
116  taf_sms_StorageFullType_t* valuePtr
117 )
118 {
119  bool result;
120  uint32_t value = 0;
121  result = le_pack_UnpackUint32(bufferPtr, &value);
122  if (result)
123  {
124  *valuePtr = (taf_sms_StorageFullType_t)value;
125  }
126  return result;
127 }
128 
129 static inline bool taf_sms_PackType
130 (
131  uint8_t **bufferPtr,
132  taf_sms_Type_t value
133 )
134 {
135  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
136 }
137 
138 static inline bool taf_sms_UnpackType
139 (
140  uint8_t **bufferPtr,
141  taf_sms_Type_t* valuePtr
142 )
143 {
144  bool result;
145  uint32_t value = 0;
146  result = le_pack_UnpackUint32(bufferPtr, &value);
147  if (result)
148  {
149  *valuePtr = (taf_sms_Type_t)value;
150  }
151  return result;
152 }
153 
154 static inline bool taf_sms_PackReadStatus
155 (
156  uint8_t **bufferPtr,
158 )
159 {
160  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
161 }
162 
163 static inline bool taf_sms_UnpackReadStatus
164 (
165  uint8_t **bufferPtr,
166  taf_sms_ReadStatus_t* valuePtr
167 )
168 {
169  bool result;
170  uint32_t value = 0;
171  result = le_pack_UnpackUint32(bufferPtr, &value);
172  if (result)
173  {
174  *valuePtr = (taf_sms_ReadStatus_t)value;
175  }
176  return result;
177 }
178 
179 static inline bool taf_sms_PackSendStatus
180 (
181  uint8_t **bufferPtr,
183 )
184 {
185  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
186 }
187 
188 static inline bool taf_sms_UnpackSendStatus
189 (
190  uint8_t **bufferPtr,
191  taf_sms_SendStatus_t* valuePtr
192 )
193 {
194  bool result;
195  uint32_t value = 0;
196  result = le_pack_UnpackUint32(bufferPtr, &value);
197  if (result)
198  {
199  *valuePtr = (taf_sms_SendStatus_t)value;
200  }
201  return result;
202 }
203 
204 static inline bool taf_sms_PackLockStatus
205 (
206  uint8_t **bufferPtr,
208 )
209 {
210  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
211 }
212 
213 static inline bool taf_sms_UnpackLockStatus
214 (
215  uint8_t **bufferPtr,
216  taf_sms_LockStatus_t* valuePtr
217 )
218 {
219  bool result;
220  uint32_t value = 0;
221  result = le_pack_UnpackUint32(bufferPtr, &value);
222  if (result)
223  {
224  *valuePtr = (taf_sms_LockStatus_t)value;
225  }
226  return result;
227 }
228 
229 static inline bool taf_sms_PackFormat
230 (
231  uint8_t **bufferPtr,
232  taf_sms_Format_t value
233 )
234 {
235  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
236 }
237 
238 static inline bool taf_sms_UnpackFormat
239 (
240  uint8_t **bufferPtr,
241  taf_sms_Format_t* valuePtr
242 )
243 {
244  bool result;
245  uint32_t value = 0;
246  result = le_pack_UnpackUint32(bufferPtr, &value);
247  if (result)
248  {
249  *valuePtr = (taf_sms_Format_t)value;
250  }
251  return result;
252 }
253 
254 // Define pack/unpack functions for all structures, including included types
255 
256 
257 #endif // TAF_SMS_MESSAGES_H_INCLUDE_GUARD
taf_sms_ReadStatus_t
Definition: taf_sms_common.h:179
taf_sms_LockStatus_t
Definition: taf_sms_common.h:219
static bool taf_sms_PackReadStatus(uint8_t **bufferPtr, taf_sms_ReadStatus_t value)
Definition: taf_sms_messages.h:155
static bool taf_sms_UnpackLockStatus(uint8_t **bufferPtr, taf_sms_LockStatus_t *valuePtr)
Definition: taf_sms_messages.h:214
static bool taf_sms_PackSendStatus(uint8_t **bufferPtr, taf_sms_SendStatus_t value)
Definition: taf_sms_messages.h:180
static bool taf_sms_UnpackStorageFullType(uint8_t **bufferPtr, taf_sms_StorageFullType_t *valuePtr)
Definition: taf_sms_messages.h:114
static bool taf_sms_PackStorageFullType(uint8_t **bufferPtr, taf_sms_StorageFullType_t value)
Definition: taf_sms_messages.h:105
static bool taf_sms_PackLockStatus(uint8_t **bufferPtr, taf_sms_LockStatus_t value)
Definition: taf_sms_messages.h:205
static bool taf_sms_UnpackStorage(uint8_t **bufferPtr, taf_sms_Storage_t *valuePtr)
Definition: taf_sms_messages.h:89
taf_sms_SendStatus_t
Definition: taf_sms_common.h:196
static bool taf_sms_UnpackReadStatus(uint8_t **bufferPtr, taf_sms_ReadStatus_t *valuePtr)
Definition: taf_sms_messages.h:164
taf_sms_StorageFullType_t
Definition: taf_sms_common.h:135
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
struct __attribute__((packed))
Definition: taf_sms_messages.h:20
static bool taf_sms_PackStorage(uint8_t **bufferPtr, taf_sms_Storage_t value)
Definition: taf_sms_messages.h:80
static bool taf_sms_PackType(uint8_t **bufferPtr, taf_sms_Type_t value)
Definition: taf_sms_messages.h:130
taf_sms_Type_t
Definition: taf_sms_common.h:162
taf_sms_Storage_t
Definition: taf_sms_common.h:101
static bool taf_sms_UnpackType(uint8_t **bufferPtr, taf_sms_Type_t *valuePtr)
Definition: taf_sms_messages.h:139
_Message_t
Definition: taf_sms_messages.h:25
static bool taf_sms_PackFormat(uint8_t **bufferPtr, taf_sms_Format_t value)
Definition: taf_sms_messages.h:230
static bool taf_sms_UnpackFormat(uint8_t **bufferPtr, taf_sms_Format_t *valuePtr)
Definition: taf_sms_messages.h:239
static bool taf_sms_UnpackSendStatus(uint8_t **bufferPtr, taf_sms_SendStatus_t *valuePtr)
Definition: taf_sms_messages.h:189
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205
#define _MAX_MSG_SIZE
Definition: taf_sms_messages.h:17
taf_sms_Format_t
Definition: taf_sms_common.h:236