Engage Engine API  1.249.9089
Loading...
Searching...
No Matches
EngageInterface.h
Go to the documentation of this file.
1
7//
8// Copyright (c) 2019 Rally Tactical Systems, Inc.
9// All rights reserved.
10//
11
12#ifndef EngageInterface_h
13#define EngageInterface_h
14
15#include <stdint.h>
16
17#if defined(__EMSCRIPTEN__)
18 #include <emscripten.h>
19#endif
20
21#include "EngageConstants.h"
22
23#ifdef __cplusplus
24extern "C"
25{
26#endif
27
28#if defined(ENGAGE_ALLOW_NATIVE)
29#include "ILogger.h"
30#endif
31
32#if !defined(ENGAGE_API)
33 #if defined(WIN32)
34 #ifdef ENGAGE_EXPORTS
35 // Windows needs dllexport to produce an import lib without a .DEF file
36 #define ENGAGE_API __declspec(dllexport) extern
37 #else
38 #define ENGAGE_API extern
39 #endif
40 #else
41 #if defined(__EMSCRIPTEN__)
42 #define ENGAGE_API EMSCRIPTEN_KEEPALIVE __attribute__ ((visibility ("default")))
43 #else
44 #define ENGAGE_API __attribute__ ((visibility ("default")))
45 #endif
46 #endif
47#endif
48
49#if !defined(__clang__)
50 #define _Nullable
51 #define _Nonnull
52#endif
53
55typedef void (*PFN_ENGAGE_LOG_HOOK)(int level, const char * _Nonnull tag, const char * _Nonnull message);
56
58typedef void (*PFN_ENGAGE_HIGH_RES_TIMER_TICK)(uint32_t tickType, uint64_t ticksSoFar);
59
60// Structures (all packed on 1-byte boundaries)
61#pragma pack(push, 1)
62
69typedef struct _EngageEvents_t
70{
72 void (* _Nullable PFN_ENGAGE_ENGINE_STARTED)(const char * _Nullable eventExtraJson);
73
75 void (* _Nullable PFN_ENGAGE_ENGINE_STOPPED)(const char * _Nullable eventExtraJson);
76
77
79 void (* _Nullable PFN_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
80
82 void (* _Nullable PFN_ENGAGE_RP_CONNECTING)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
83
85 void (* _Nullable PFN_ENGAGE_RP_CONNECTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
86
88 void (* _Nullable PFN_ENGAGE_RP_DISCONNECTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
89
91 void (* _Nullable PFN_ENGAGE_RP_ROUNDTRIP_REPORT)(const char * _Nonnull pId, uint32_t rtMs, uint32_t rtQualityRating, const char * _Nullable eventExtraJson);
92
93
95 void (* _Nullable PFN_ENGAGE_GROUP_CREATED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
96
98 void (* _Nullable PFN_ENGAGE_GROUP_CREATE_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
99
101 void (* _Nullable PFN_ENGAGE_GROUP_DELETED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
102
103
105 void (* _Nullable PFN_ENGAGE_GROUP_CONNECTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
106
108 void (* _Nullable PFN_ENGAGE_GROUP_CONNECT_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
109
111 void (* _Nullable PFN_ENGAGE_GROUP_DISCONNECTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
112
113
115 void (* _Nullable PFN_ENGAGE_GROUP_JOINED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
116
118 void (* _Nullable PFN_ENGAGE_GROUP_JOIN_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
119
121 void (* _Nullable PFN_ENGAGE_GROUP_LEFT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
122
123
125 void (* _Nullable PFN_ENGAGE_GROUP_MEMBER_COUNT_CHANGED)(const char * _Nonnull pId, size_t newCount, const char * _Nullable eventExtraJson);
126
127
129 void (* _Nullable PFN_ENGAGE_GROUP_NODE_DISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
130
132 void (* _Nullable PFN_ENGAGE_GROUP_NODE_REDISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
133
135 void (* _Nullable PFN_ENGAGE_GROUP_NODE_UNDISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
136
137
139 void (* _Nullable PFN_ENGAGE_GROUP_RX_STARTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
140
142 void (* _Nullable PFN_ENGAGE_GROUP_RX_ENDED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
143
145 void (* _Nullable PFN_ENGAGE_GROUP_RX_SPEAKERS_CHANGED)(const char * _Nonnull pId, const char * _Nonnull groupTalkerJson, const char * _Nullable eventExtraJson);
146
148 void (* _Nullable PFN_ENGAGE_GROUP_RX_MUTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
149
151 void (* _Nullable PFN_ENGAGE_GROUP_RX_UNMUTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
152
153
155 void (* _Nullable PFN_ENGAGE_GROUP_TX_STARTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
156
158 void (* _Nullable PFN_ENGAGE_GROUP_TX_ENDED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
159
161 void (* _Nullable PFN_ENGAGE_GROUP_TX_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
162
164 void (* _Nullable PFN_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
165
167 void (* _Nullable PFN_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
168
170 void (* _Nullable PFN_ENGAGE_GROUP_TX_MUTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
171
173 void (* _Nullable PFN_ENGAGE_GROUP_TX_UNMUTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
174
176 void (* _Nullable PFN_ENGAGE_GROUP_ASSET_DISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
177
179 void (* _Nullable PFN_ENGAGE_GROUP_ASSET_REDISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
180
182 void (* _Nullable PFN_ENGAGE_GROUP_ASSET_UNDISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
183
184
186 void (* _Nullable PFN_ENGAGE_LICENSE_CHANGED)(const char * _Nullable eventExtraJson);
187
189 void (* _Nullable PFN_ENGAGE_LICENSE_EXPIRED)(const char * _Nullable eventExtraJson);
190
192 void (* _Nullable PFN_ENGAGE_LICENSE_EXPIRING)(const char * _Nonnull pSecsLeft, const char * _Nullable eventExtraJson);
193
194
196 void (* _Nullable PFN_ENGAGE_GROUP_BLOB_SENT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
197
199 void (* _Nullable PFN_ENGAGE_GROUP_BLOB_SEND_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
200
202 void (* _Nullable PFN_ENGAGE_GROUP_BLOB_RECEIVED)(const char * _Nonnull pId, const char * _Nonnull blobInfoJson, const uint8_t * _Nonnull blob, size_t blobSize, const char * _Nullable eventExtraJson);
203
204
206 void (* _Nullable PFN_ENGAGE_GROUP_RTP_SENT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
207
209 void (* _Nullable PFN_ENGAGE_GROUP_RTP_SEND_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
210
212 void (* _Nullable PFN_ENGAGE_GROUP_RTP_RECEIVED)(const char * _Nonnull pId, const char * _Nonnull rtpHeaderJson, const uint8_t * _Nonnull payload, size_t payloadSize, const char * _Nullable eventExtraJson);
213
214
216 void (* _Nullable PFN_ENGAGE_GROUP_RAW_SENT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
217
219 void (* _Nullable PFN_ENGAGE_GROUP_RAW_SEND_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
220
222 void (* _Nullable PFN_ENGAGE_GROUP_RAW_RECEIVED)(const char * _Nonnull pId, const uint8_t * _Nonnull raw, size_t rawSize, const char * _Nullable eventExtraJson);
223
224
226 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_EVENT_STARTED)(const char * _Nonnull pId, const char * _Nonnull eventJson, const char * _Nullable eventExtraJson);
227
229 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED)(const char * _Nonnull pId, const char * _Nonnull eventJson, const char * _Nullable eventExtraJson);
230
232 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_EVENT_ENDED)(const char * _Nonnull pId, const char * _Nonnull eventJson, const char * _Nullable eventExtraJson);
233
235 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_REPORT)(const char * _Nonnull pId, const char * _Nonnull timelineJson, const char * _Nullable eventExtraJson);
236
238 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_REPORT_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
239
241 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_GROOMED)(const char * _Nonnull pId, const char * _Nonnull eventListJson, const char * _Nullable eventExtraJson);
242
244 void (* _Nullable PFN_ENGAGE_GROUP_HEALTH_REPORT)(const char * _Nonnull pId, const char * _Nonnull healthReportJson, const char * _Nullable eventExtraJson);
245
247 void (* _Nullable PFN_ENGAGE_GROUP_HEALTH_REPORT_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
248
250 void (* _Nullable PFN_ENGAGE_BRIDGE_CREATED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
251
253 void (* _Nullable PFN_ENGAGE_BRIDGE_CREATE_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
254
256 void (* _Nullable PFN_ENGAGE_BRIDGE_DELETED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
257
259 void (* _Nullable PFN_ENGAGE_GROUP_STATS_REPORT)(const char * _Nonnull pId, const char * _Nonnull statsReportJson, const char * _Nullable eventExtraJson);
260
262 void (* _Nullable PFN_ENGAGE_GROUP_STATS_REPORT_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
263
265 void (* _Nullable PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED)(const char * _Nonnull pId, int16_t leftLevelPerc, int16_t rightLevelPerc, const char * _Nullable eventExtraJson);
266
268 void (* _Nullable PFN_ENGAGE_GROUP_RX_DTMF)(const char * _Nonnull pId, const char * _Nonnull dtmfJson, const char * _Nullable eventExtraJson);
269
276 void (* _Nullable PFN_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED)(const char * _Nullable eventExtraJson);
277
279 void (* _Nullable PFN_ENGAGE_GROUP_RECONFIGURED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
280
282 void (* _Nullable PFN_ENGAGE_GROUP_RECONFIGURATION_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
283
285 void (* _Nullable PFN_ENGAGE_AUDIO_RECORDING_STARTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
286
288 void (* _Nullable PFN_ENGAGE_AUDIO_RECORDING_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
289
291 void (* _Nullable PFN_ENGAGE_AUDIO_RECORDING_ENDED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
292
294 // void (* _Nullable PFN_ENGAGE_ON_HIGH_RESOLUTION_TIMER_TICK)(uint32_t tickType, uint32_t ticksSoFarLow, uint32_t ticksSoFarHigh, const char * _Nullable eventExtraJson);
298#pragma pack(pop)
299
300#if defined(WIN32)
301ENGAGE_API void engageWin32LibraryInit();
302ENGAGE_API void engageWin32LibraryDeinit();
303#endif
304
305// Library functions
306#if !defined(ENGAGEJNI)
307
321ENGAGE_API int engageSetLogLevel(int level);
322
323
337ENGAGE_API int engageSetLogTagExtension(const char * _Nullable tagExtension);
338
339
351ENGAGE_API int engageSetLoggingOutputOverride(const _Nullable PFN_ENGAGE_LOG_HOOK pfnHook);
352
353
367ENGAGE_API int engageEnableSyslog(int enable);
368
369
384ENGAGE_API int engageRegisterEventCallbacks(const EngageEvents_t * _Nonnull pEvents);
385
386
406ENGAGE_API int engageInitialize(const char * _Nullable enginePolicyConfiguration,
407 const char * _Nullable userIdentity,
408 const char * _Nullable tempStoragePath);
409
410
430ENGAGE_API int engageShutdown();
431
432
447ENGAGE_API int engageStart(void);
448
449
462ENGAGE_API int engageStop(void);
463
464
484ENGAGE_API int engageCreateGroup(const char * _Nonnull jsonConfiguration);
485
486
500ENGAGE_API int engageDeleteGroup(const char * _Nonnull id);
501
502
526ENGAGE_API int engageJoinGroup(const char * _Nonnull id);
527
528
543ENGAGE_API int engageLeaveGroup(const char * _Nonnull id);
544
545
593ENGAGE_API int engageBeginGroupTx(const char * _Nonnull id, int txPriority, uint32_t txFlags);
594
595
616ENGAGE_API int engageBeginGroupTxAdvanced(const char * _Nonnull id, const char * _Nonnull jsonParams); /* TODO: define JSON */
617
618
628ENGAGE_API int engageEndGroupTx(const char * _Nonnull id);
629
630
660ENGAGE_API int engageSetGroupRxTag(const char * _Nonnull id, uint16_t tag);
661
662
677ENGAGE_API int engageMuteGroupRx(const char * _Nonnull id);
678
679
692ENGAGE_API int engageUnmuteGroupRx(const char * _Nonnull id);
693
694
707ENGAGE_API int engageMuteGroupTx(const char * _Nonnull id);
708
709
722ENGAGE_API int engageUnmuteGroupTx(const char * _Nonnull id);
723
754ENGAGE_API int engageSetGroupRxVolume(const char * _Nonnull id, int left, int right);
755
756
768ENGAGE_API int engageSetGroupRules(const char * _Nonnull id, const char * _Nonnull jsonParams);
769
770
791ENGAGE_API int engageUpdatePresenceDescriptor(const char * _Nonnull id, const char * _Nonnull descriptorJson, int forceBeacon);
792
793
837ENGAGE_API int engageEncrypt(const uint8_t * _Nonnull src, size_t size, uint8_t * _Nonnull dst, const char * _Nonnull passwordHexByteString);
838
839
854ENGAGE_API int engageDecrypt(const uint8_t * _Nonnull src, size_t size, uint8_t * _Nonnull dst, const char * _Nonnull passwordHexByteString);
855
856
873ENGAGE_API const char * _Nonnull engageGetVersion();
874
875
891ENGAGE_API const char * _Nonnull engageGetActiveLicenseDescriptor();
892
893
914ENGAGE_API const char * _Nonnull engageGetLicenseDescriptor(const char * _Nonnull entitlement, const char * _Nonnull key, const char * _Nullable activationCode, const char * _Nullable manufacturerId);
915
916
934ENGAGE_API int engageUpdateLicense(const char * _Nonnull entitlement, const char * _Nonnull key, const char * _Nullable activationCode, const char * _Nullable manufacturerId);
935
936
974ENGAGE_API int engageSendGroupRtp(const char * _Nonnull id, const uint8_t * _Nonnull payload, size_t size, const char * _Nonnull jsonParams);
975
976
999ENGAGE_API int engageRegisterGroupRtpHandler(const char * _Nonnull id, uint16_t payloadId);
1000
1001
1017ENGAGE_API int engageUnregisterGroupRtpHandler(const char * _Nonnull id, uint16_t payloadId);
1018
1019
1061ENGAGE_API int engageSendGroupBlob(const char * _Nonnull id, const uint8_t * _Nonnull blob, size_t size, const char * _Nonnull jsonParams);
1062
1063
1096ENGAGE_API int engageSendGroupRaw(const char * _Nonnull id, const uint8_t * _Nonnull raw, size_t size, const char * _Nonnull jsonParams);
1097
1098
1116ENGAGE_API int engagePlatformServiceDiscovered(const char * _Nonnull id, const char * _Nonnull jsonParams);
1117
1118
1136ENGAGE_API int engagePlatformServiceRediscovered(const char * _Nonnull id, const char * _Nonnull jsonParams);
1137
1138
1152ENGAGE_API int engagePlatformServiceUndiscovered(const char * _Nonnull id);
1153
1154
1163ENGAGE_API int engageQueryGroupTimeline(const char * _Nonnull id, const char * _Nonnull jsonParams);
1164
1165
1173ENGAGE_API int engageQueryGroupHealth(const char * _Nonnull id);
1174
1175
1183ENGAGE_API int engageQueryGroupStats(const char * _Nonnull id);
1184
1185
1195ENGAGE_API int engageLogMsg(int level, const char * _Nonnull tag, const char * _Nonnull msg);
1196
1197
1205ENGAGE_API const char * _Nonnull engageGetNetworkInterfaceDevices();
1206
1207
1215ENGAGE_API const char * _Nonnull engageGetAudioDevices();
1216
1217
1232ENGAGE_API const char * _Nonnull engageGenerateMission(const char * _Nonnull keyPhrase, int audioGroupCount, const char * _Nullable rallypointHost, const char * _Nullable missionName);
1233
1234
1252ENGAGE_API const char * _Nonnull engageGenerateMissionUsingCertStore(const char * _Nonnull keyPhrase,
1253 int audioGroupCount,
1254 const char * _Nullable rallypointHost,
1255 const char * _Nullable missionName,
1256 const char * _Nonnull certStoreFn,
1257 const char * _Nullable certStorePasswordHexByteString,
1258 const char * _Nullable certStoreElement);
1259
1260
1272ENGAGE_API int engageSetMissionId(const char * _Nullable missionId);
1273
1274
1286ENGAGE_API int engageCreateCertStore(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1287
1288
1301ENGAGE_API int engageOpenCertStore(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1302
1303
1311ENGAGE_API const char * _Nonnull engageGetCertStoreDescriptor(void);
1312
1313
1321ENGAGE_API int engageCloseCertStore(void);
1322
1323
1338ENGAGE_API int engageSetCertStoreCertificatePem(const char * _Nonnull id, const char * _Nonnull certificatePem, const char * _Nullable privateKeyPem, const char * _Nullable tags);
1339
1340
1356ENGAGE_API int engageSetCertStoreCertificateP12(const char * _Nonnull id, uint8_t * _Nonnull data, size_t size, const char * _Nullable password, const char * _Nullable tags);
1357
1358
1369ENGAGE_API int engageDeleteCertStoreCertificate(const char * _Nonnull id);
1370
1371
1379ENGAGE_API const char * _Nonnull engageGetCertStoreCertificatePem(const char * _Nonnull id);
1380
1381
1390ENGAGE_API const char * _Nonnull engageGetCertificateDescriptorFromPem(const char * _Nonnull pem);
1391
1392
1401ENGAGE_API const char * _Nonnull engageGetArrayOfCertificateDescriptorsFromPem(const char * _Nonnull pem);
1402
1403
1418ENGAGE_API int engageImportCertStoreElementFromCertStore(const char * _Nonnull id, const char * _Nonnull srcId, const char * _Nonnull srcFileName, const char * _Nonnull srcPasswordHexByteString, const char * _Nullable tags);
1419
1420
1432ENGAGE_API const char * _Nonnull engageQueryCertStoreContents(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1433
1434
1446ENGAGE_API int engageSetCertStoreCertificateTags(const char * _Nonnull id, const char * _Nullable tags);
1447
1448
1462ENGAGE_API int engageCreateBridge(const char * _Nonnull jsonConfiguration);
1463
1464
1476ENGAGE_API int engageDeleteBridge(const char * _Nonnull id);
1477
1478
1486ENGAGE_API const char * _Nonnull engageGetHardwareReport();
1487
1488
1499ENGAGE_API int engageAddGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams, const uint8_t * _Nullable blobData, size_t blobSize);
1500
1501
1512ENGAGE_API int engageUpdateGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams, const uint8_t * _Nullable blobData, size_t blobSize);
1513
1514
1523ENGAGE_API int engageDeleteGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams);
1524
1525
1533ENGAGE_API const char * _Nonnull engageGetDeviceId();
1534
1535
1549ENGAGE_API int engageEnableWatchdog(int enable);
1550
1551
1561ENGAGE_API int engagePlatformNotifyChanges(const char * _Nonnull jsonChangesArray);
1562
1563
1573ENGAGE_API int engageEnableNotifications(int enable);
1574
1575
1582ENGAGE_API int engageRefreshAudioDevices(void);
1583
1584
1592ENGAGE_API int engageReconfigureGroup(const char * _Nonnull id, const char * _Nonnull jsonConfiguration);
1593
1594
1601ENGAGE_API int engageBeginFileRecording(const char * _Nonnull jsonParams);
1602
1603
1610ENGAGE_API int engageEndFileRecording(const char * _Nonnull id);
1611
1619ENGAGE_API const char * _Nonnull engageGetActiveFeatureset();
1620
1627ENGAGE_API int engageSetFipsCrypto(const char * _Nonnull jsonParams);
1628
1636ENGAGE_API int engageIsCryptoFipsValidated(void);
1637
1652ENGAGE_API int engageSetCertStore(const uint8_t * _Nonnull buffer, size_t size, const char * _Nullable passwordHexByteString);
1653
1664ENGAGE_API int engageVerifyRiff(const char * _Nonnull fn);
1665
1680ENGAGE_API const char * _Nonnull engageGetRiffDescriptor(const char * _Nonnull fn);
1681
1682
1690ENGAGE_API const char * _Nonnull engageGenerateSignature(const uint8_t * _Nonnull block, size_t size, const char * _Nonnull securityCertificateJson);
1691
1692
1700ENGAGE_API int engageVerifySignature(const uint8_t * _Nonnull block, size_t size, const char * _Nonnull secureSignatureJson);
1701
1702// TODO: Engage compression/decompression functions not available at this time
1703#if 0
1725ENGAGE_API int engageCompress(const uint8_t * _Nonnull src, size_t srcSize, uint8_t * _Nonnull dst, size_t maxDstSize);
1726
1741ENGAGE_API int engageDecompress(const uint8_t * _Nonnull src, size_t srcSize, uint8_t * _Nonnull dst, size_t maxDstSize);
1742#endif
1743
1744
1745#if defined(ENGAGE_ALLOW_NATIVE)
1753ENGAGE_API ILogger * _Nullable engageGetLoggerNative();
1754
1768ENGAGE_API int engageRegisterForHighResolutionTimerNative(uint32_t durationMs, PFN_ENGAGE_HIGH_RES_TIMER_TICK _Nullable pfnDirectCallback);
1769
1770
1781ENGAGE_API int engageUnregisterFromHighResolutionTimerNative(void);
1782#endif
1783
1784#endif
1785
1786#ifdef __cplusplus
1787}
1788#endif
1789#endif // EngageInterface_h
ENGAGE_API int engageRegisterGroupRtpHandler(const char *_Nonnull id, uint16_t payloadId)
[ASYNC] Registers the application as the handler for an RTP payload
ENGAGE_API int engageMuteGroupRx(const char *_Nonnull id)
[ASYNC] Mutes play-out of received audio
ENGAGE_API int engageShutdown()
[SYNC] Shuts down the Engine
ENGAGE_API const char *_Nonnull engageGetLicenseDescriptor(const char *_Nonnull entitlement, const char *_Nonnull key, const char *_Nullable activationCode, const char *_Nullable manufacturerId)
[SYNC] Returns a license descriptor for the parameters passed in
ENGAGE_API int engageQueryGroupStats(const char *_Nonnull id)
[ASYNC] Requests that the Engine deliver a statistics report for the group
ENGAGE_API int engageSetCertStore(const uint8_t *_Nonnull buffer, size_t size, const char *_Nullable passwordHexByteString)
[SYNC] Set the certstore content via buffer
ENGAGE_API int engageDeleteGroup(const char *_Nonnull id)
[ASYNC] Deletes a previously-created group object
void(* PFN_ENGAGE_LOG_HOOK)(int level, const char *_Nonnull tag, const char *_Nonnull message)
Prototype for logging callbacks.
ENGAGE_API int engageIsCryptoFipsValidated(void)
[SYNC] Returns 1 if crypto is FIPS140-2 validated, otherwise 0
ENGAGE_API int engageUpdateGroupTimelineEvent(const char *_Nonnull id, const char *_Nonnull jsonParams, const uint8_t *_Nullable blobData, size_t blobSize)
[ASYNC] Requests that the Engine update a timeline event
ENGAGE_API const char *_Nonnull engageGetCertStoreDescriptor(void)
[SYNC] Returns a JSON descriptor of the currently opened certificate store.
ENGAGE_API int engageReconfigureGroup(const char *_Nonnull id, const char *_Nonnull jsonConfiguration)
[ASYNC] Requests that the Engine reconfigure a group
ENGAGE_API int engageCreateCertStore(const char *_Nonnull fileName, const char *_Nullable passwordHexByteString)
[SYNC] Creates a certificate store
ENGAGE_API int engageCreateBridge(const char *_Nonnull jsonConfiguration)
[ASYNC] Creates a bridge object
ENGAGE_API int engageSetFipsCrypto(const char *_Nonnull jsonParams)
[SYNC] Enable FIPS crypto
ENGAGE_API int engageVerifyRiff(const char *_Nonnull fn)
[SYNC] Verifies a recorded RIFF file.
ENGAGE_API int engageRegisterEventCallbacks(const EngageEvents_t *_Nonnull pEvents)
[SYNC] Registers application event handlers with the Engine
ENGAGE_API int engageVerifySignature(const uint8_t *_Nonnull block, size_t size, const char *_Nonnull secureSignatureJson)
[SYNC] Verifies a signature for a block using a certificate
ENGAGE_API int engageEnableNotifications(int enable)
[SYNC] Notifies Engage of app's willingness to receive notifications
ENGAGE_API int engageQueryGroupTimeline(const char *_Nonnull id, const char *_Nonnull jsonParams)
[ASYNC] Requests that the Engine deliver a timeline report for the group
ENGAGE_API int engageSetGroupRxVolume(const char *_Nonnull id, int left, int right)
[ASYNC] Sets the audio play-out volume of the group
ENGAGE_API int engageEndGroupTx(const char *_Nonnull id)
[ASYNC] Ends transmission on an audio group
ENGAGE_API int engagePlatformNotifyChanges(const char *_Nonnull jsonChangesArray)
[SYNC] Notifies Engage of changes reported by the application or platform
ENGAGE_API int engageRefreshAudioDevices(void)
[ASYNC] Requests that the Engine update its audio device registry
ENGAGE_API int engageBeginFileRecording(const char *_Nonnull jsonParams)
[ASYNC] Requests that the Engine begin recording audio to a file
ENGAGE_API int engageSendGroupRaw(const char *_Nonnull id, const uint8_t *_Nonnull raw, size_t size, const char *_Nonnull jsonParams)
[ASYNC] Send an application-structured byte array to a group with minimal Engine involvement
ENGAGE_API int engageStop(void)
[ASYNC] Stops the Engine's internal processing
ENGAGE_API const char *_Nonnull engageGetCertStoreCertificatePem(const char *_Nonnull id)
[SYNC] Returns a certificate in PEM format. The private key (if any) is NOT returned.
ENGAGE_API int engageEnableSyslog(int enable)
[SYNC] Enables or disables logging to syslog.
ENGAGE_API int engageCloseCertStore(void)
[SYNC] Closes the current certificate store (if any)
ENGAGE_API const char *_Nonnull engageGetActiveFeatureset()
[SYNC] Returns JSON object containing the currently active featureset
ENGAGE_API int engageUnregisterGroupRtpHandler(const char *_Nonnull id, uint16_t payloadId)
[ASYNC] Unregisters the application as the handler for an RTP payload
ENGAGE_API int engagePlatformServiceDiscovered(const char *_Nonnull id, const char *_Nonnull jsonParams)
[ASYNC] Informs the Engine that the application has discovered a service
ENGAGE_API const char *_Nonnull engageGetDeviceId()
[SYNC] Returns the device identifier
ENGAGE_API int engageLogMsg(int level, const char *_Nonnull tag, const char *_Nonnull msg)
[SYNC] Log a message via the Engine's logger
ENGAGE_API int engageJoinGroup(const char *_Nonnull id)
[ASYNC] Joins a group
ENGAGE_API int engageSetGroupRules(const char *_Nonnull id, const char *_Nonnull jsonParams)
[ASYNC] Sets the audio play-out volume of the group
ENGAGE_API int engageEndFileRecording(const char *_Nonnull id)
[ASYNC] Requests that the Engine end recording audio to a file
ENGAGE_API const char *_Nonnull engageGetHardwareReport()
[SYNC] Returns a hardware report
ENGAGE_API const char *_Nonnull engageGetArrayOfCertificateDescriptorsFromPem(const char *_Nonnull pem)
[SYNC] Returns a JSON array, with each element being an object describing the certificate PEM.
ENGAGE_API int engagePlatformServiceRediscovered(const char *_Nonnull id, const char *_Nonnull jsonParams)
[ASYNC] Informs the Engine that the application has rediscovered a service
void(* PFN_ENGAGE_HIGH_RES_TIMER_TICK)(uint32_t tickType, uint64_t ticksSoFar)
Prototype for the high-resolution timer callback.
ENGAGE_API int engageQueryGroupHealth(const char *_Nonnull id)
[ASYNC] Requests that the Engine deliver a health report for the group
ENGAGE_API int engageImportCertStoreElementFromCertStore(const char *_Nonnull id, const char *_Nonnull srcId, const char *_Nonnull srcFileName, const char *_Nonnull srcPasswordHexByteString, const char *_Nullable tags)
[SYNC] Adds/updates an element (certificate and optionally private key) from another certificate stor...
ENGAGE_API int engageSetCertStoreCertificateP12(const char *_Nonnull id, uint8_t *_Nonnull data, size_t size, const char *_Nullable password, const char *_Nullable tags)
[SYNC] Adds/updates a certificate and (optionally) private key using P12 content
ENGAGE_API int engageMuteGroupTx(const char *_Nonnull id)
[ASYNC] Mutes microphone audio capture
ENGAGE_API int engageSetGroupRxTag(const char *_Nonnull id, uint16_t tag)
[ASYNC] Sets/clear a audio stream subchannel tag
ENGAGE_API int engageEnableWatchdog(int enable)
[SYNC] Enables or disables the Engine watchdog.
ENGAGE_API int engageOpenCertStore(const char *_Nonnull fileName, const char *_Nullable passwordHexByteString)
[SYNC] Opens a certificate store
ENGAGE_API const char *_Nonnull engageGenerateMission(const char *_Nonnull keyPhrase, int audioGroupCount, const char *_Nullable rallypointHost, const char *_Nullable missionName)
[SYNC] Generates a mission based on a key phrase
ENGAGE_API const char *_Nonnull engageGetRiffDescriptor(const char *_Nonnull fn)
[SYNC] Returns a descriptor for a RIFF file
ENGAGE_API int engageBeginGroupTxAdvanced(const char *_Nonnull id, const char *_Nonnull jsonParams)
[ASYNC] Begin audio transmission on a group with additional parameters
ENGAGE_API int engageDecrypt(const uint8_t *_Nonnull src, size_t size, uint8_t *_Nonnull dst, const char *_Nonnull passwordHexByteString)
[SYNC] Decrypt data using the Engine's cryptography module
ENGAGE_API int engageBeginGroupTx(const char *_Nonnull id, int txPriority, uint32_t txFlags)
[ASYNC] Begin audio transmission on a group
ENGAGE_API int engageInitialize(const char *_Nullable enginePolicyConfiguration, const char *_Nullable userIdentity, const char *_Nullable tempStoragePath)
[SYNC] Initializes the Engine.
ENGAGE_API const char *_Nonnull engageGetNetworkInterfaceDevices()
[SYNC] Returns an array of network interface devices in JSON format
ENGAGE_API const char *_Nonnull engageGenerateSignature(const uint8_t *_Nonnull block, size_t size, const char *_Nonnull securityCertificateJson)
[SYNC] Generates a signature for a block using a certificate & its private key
ENGAGE_API int engageSetLoggingOutputOverride(const _Nullable PFN_ENGAGE_LOG_HOOK pfnHook)
[SYNC] Sets/clears the output override callback for log messages.
ENGAGE_API const char *_Nonnull engageGetActiveLicenseDescriptor()
[SYNC] Returns the currently-active license descriptor
ENGAGE_API int engageCreateGroup(const char *_Nonnull jsonConfiguration)
[ASYNC] Creates a group object
ENGAGE_API int engageUpdatePresenceDescriptor(const char *_Nonnull id, const char *_Nonnull descriptorJson, int forceBeacon)
[ASYNC] Updates the application-defined elements of a presence descriptor
ENGAGE_API int engageSendGroupRtp(const char *_Nonnull id, const uint8_t *_Nonnull payload, size_t size, const char *_Nonnull jsonParams)
[ASYNC] Send an application-structured byte array to a group as a specialized RTP payload
ENGAGE_API int engageEncrypt(const uint8_t *_Nonnull src, size_t size, uint8_t *_Nonnull dst, const char *_Nonnull passwordHexByteString)
[SYNC] Encrypt data using the Engine's cryptography module
ENGAGE_API int engageUnmuteGroupTx(const char *_Nonnull id)
[ASYNC] Unmutes microphone audio capture
ENGAGE_API int engageSendGroupBlob(const char *_Nonnull id, const uint8_t *_Nonnull blob, size_t size, const char *_Nonnull jsonParams)
[ASYNC] Send an application-structured byte array to a group as an Engine-managed blob
ENGAGE_API const char *_Nonnull engageGetVersion()
[SYNC] Returns the version of the Engine
ENGAGE_API const char *_Nonnull engageGetCertificateDescriptorFromPem(const char *_Nonnull pem)
[SYNC] Returns a JSON object describing the certificate PEM.
ENGAGE_API int engageSetCertStoreCertificateTags(const char *_Nonnull id, const char *_Nullable tags)
[SYNC] Updates a certificate's tags
ENGAGE_API int engageDeleteGroupTimelineEvent(const char *_Nonnull id, const char *_Nonnull jsonParams)
[ASYNC] Requests that the Engine delete timeline event
ENGAGE_API int engageLeaveGroup(const char *_Nonnull id)
[ASYNC] Leaves a group
ENGAGE_API int engageSetLogLevel(int level)
[SYNC] Sets the Engine's logging level.
ENGAGE_API int engageSetCertStoreCertificatePem(const char *_Nonnull id, const char *_Nonnull certificatePem, const char *_Nullable privateKeyPem, const char *_Nullable tags)
[SYNC] Adds/updates a certificate and (optionally) private key using PEM strings
ENGAGE_API int engageSetLogTagExtension(const char *_Nullable tagExtension)
[SYNC] Sets the Engine's log tag extension.
ENGAGE_API const char *_Nonnull engageGenerateMissionUsingCertStore(const char *_Nonnull keyPhrase, int audioGroupCount, const char *_Nullable rallypointHost, const char *_Nullable missionName, const char *_Nonnull certStoreFn, const char *_Nullable certStorePasswordHexByteString, const char *_Nullable certStoreElement)
[SYNC] Generates a mission based on a key phrase and using a specified certificate store
ENGAGE_API int engageAddGroupTimelineEvent(const char *_Nonnull id, const char *_Nonnull jsonParams, const uint8_t *_Nullable blobData, size_t blobSize)
[ASYNC] Requests that the Engine add a timeline event
ENGAGE_API int engageUpdateLicense(const char *_Nonnull entitlement, const char *_Nonnull key, const char *_Nullable activationCode, const char *_Nullable manufacturerId)
[ASYNC] Update the active license with new parameters
ENGAGE_API int engageDeleteBridge(const char *_Nonnull id)
[ASYNC] Deletes a bridge object
ENGAGE_API const char *_Nonnull engageQueryCertStoreContents(const char *_Nonnull fileName, const char *_Nullable passwordHexByteString)
[SYNC] Returns an extended descriptor of named certificate store
ENGAGE_API int engagePlatformServiceUndiscovered(const char *_Nonnull id)
[ASYNC] Informs that Engine that a previously-discovered service has disappeared
ENGAGE_API const char *_Nonnull engageGetAudioDevices()
[SYNC] Returns an array of audio device descriptor interface devices in JSON format
ENGAGE_API int engageSetMissionId(const char *_Nullable missionId)
[SYNC] Sets the (optional) mission ID for the Engine
ENGAGE_API int engageStart(void)
[ASYNC] Starts the Engine
ENGAGE_API int engageDeleteCertStoreCertificate(const char *_Nonnull id)
[SYNC] Deletes a certificate and its private key (if any)
ENGAGE_API int engageUnmuteGroupRx(const char *_Nonnull id)
[ASYNC] Unmutes play-out of received audio
struct _EngageEvents_t EngageEvents_t
Event Handlers Struct.
Event Handlers Struct.
void(* _Nullable)(const char *_Nullable eventExtraJson)
The Engine has started.