Engage Engine API  1.251.9091
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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);
295
297 void (* _Nullable PFN_ENGAGE_ENGINE_GROUP_BY_GROUP_PCM_POWER_LEVEL_REPORT)(const char * _Nullable eventExtraJson);
298
300 void (* _Nullable PFN_ENGAGE_ENGINE_AUDIO_DEVICE_EVENT)(const char * _Nullable eventExtraJson);
304#pragma pack(pop)
305
306#if defined(WIN32)
307ENGAGE_API void engageWin32LibraryInit();
308ENGAGE_API void engageWin32LibraryDeinit();
309#endif
310
311// Library functions
312#if !defined(ENGAGEJNI)
313
327ENGAGE_API int engageSetLogLevel(int level);
328
329
343ENGAGE_API int engageSetLogTagExtension(const char * _Nullable tagExtension);
344
345
357ENGAGE_API int engageSetLoggingOutputOverride(const _Nullable PFN_ENGAGE_LOG_HOOK pfnHook);
358
359
373ENGAGE_API int engageEnableSyslog(int enable);
374
375
390ENGAGE_API int engageRegisterEventCallbacks(const EngageEvents_t * _Nonnull pEvents);
391
392
412ENGAGE_API int engageInitialize(const char * _Nullable enginePolicyConfiguration,
413 const char * _Nullable userIdentity,
414 const char * _Nullable tempStoragePath);
415
416
436ENGAGE_API int engageShutdown();
437
438
453ENGAGE_API int engageStart(void);
454
455
468ENGAGE_API int engageStop(void);
469
470
490ENGAGE_API int engageCreateGroup(const char * _Nonnull jsonConfiguration);
491
492
506ENGAGE_API int engageDeleteGroup(const char * _Nonnull id);
507
508
532ENGAGE_API int engageJoinGroup(const char * _Nonnull id);
533
534
549ENGAGE_API int engageLeaveGroup(const char * _Nonnull id);
550
551
599ENGAGE_API int engageBeginGroupTx(const char * _Nonnull id, int txPriority, uint32_t txFlags);
600
601
622ENGAGE_API int engageBeginGroupTxAdvanced(const char * _Nonnull id, const char * _Nonnull jsonParams); /* TODO: define JSON */
623
624
634ENGAGE_API int engageEndGroupTx(const char * _Nonnull id);
635
636
666ENGAGE_API int engageSetGroupRxTag(const char * _Nonnull id, uint16_t tag);
667
668
683ENGAGE_API int engageMuteGroupRx(const char * _Nonnull id);
684
685
698ENGAGE_API int engageUnmuteGroupRx(const char * _Nonnull id);
699
700
713ENGAGE_API int engageMuteGroupTx(const char * _Nonnull id);
714
715
728ENGAGE_API int engageUnmuteGroupTx(const char * _Nonnull id);
729
760ENGAGE_API int engageSetGroupRxVolume(const char * _Nonnull id, int left, int right);
761
762
774ENGAGE_API int engageSetGroupRules(const char * _Nonnull id, const char * _Nonnull jsonParams);
775
776
797ENGAGE_API int engageUpdatePresenceDescriptor(const char * _Nonnull id, const char * _Nonnull descriptorJson, int forceBeacon);
798
799
843ENGAGE_API int engageEncrypt(const uint8_t * _Nonnull src, size_t size, uint8_t * _Nonnull dst, const char * _Nonnull passwordHexByteString);
844
845
860ENGAGE_API int engageDecrypt(const uint8_t * _Nonnull src, size_t size, uint8_t * _Nonnull dst, const char * _Nonnull passwordHexByteString);
861
862
879ENGAGE_API const char * _Nonnull engageGetVersion();
880
881
897ENGAGE_API const char * _Nonnull engageGetActiveLicenseDescriptor();
898
899
920ENGAGE_API const char * _Nonnull engageGetLicenseDescriptor(const char * _Nonnull entitlement, const char * _Nonnull key, const char * _Nullable activationCode, const char * _Nullable manufacturerId);
921
922
940ENGAGE_API int engageUpdateLicense(const char * _Nonnull entitlement, const char * _Nonnull key, const char * _Nullable activationCode, const char * _Nullable manufacturerId);
941
942
980ENGAGE_API int engageSendGroupRtp(const char * _Nonnull id, const uint8_t * _Nonnull payload, size_t size, const char * _Nonnull jsonParams);
981
982
1005ENGAGE_API int engageRegisterGroupRtpHandler(const char * _Nonnull id, uint16_t payloadId);
1006
1007
1023ENGAGE_API int engageUnregisterGroupRtpHandler(const char * _Nonnull id, uint16_t payloadId);
1024
1025
1067ENGAGE_API int engageSendGroupBlob(const char * _Nonnull id, const uint8_t * _Nonnull blob, size_t size, const char * _Nonnull jsonParams);
1068
1069
1102ENGAGE_API int engageSendGroupRaw(const char * _Nonnull id, const uint8_t * _Nonnull raw, size_t size, const char * _Nonnull jsonParams);
1103
1104
1122ENGAGE_API int engagePlatformServiceDiscovered(const char * _Nonnull id, const char * _Nonnull jsonParams);
1123
1124
1142ENGAGE_API int engagePlatformServiceRediscovered(const char * _Nonnull id, const char * _Nonnull jsonParams);
1143
1144
1158ENGAGE_API int engagePlatformServiceUndiscovered(const char * _Nonnull id);
1159
1160
1169ENGAGE_API int engageQueryGroupTimeline(const char * _Nonnull id, const char * _Nonnull jsonParams);
1170
1171
1179ENGAGE_API int engageQueryGroupHealth(const char * _Nonnull id);
1180
1181
1189ENGAGE_API int engageQueryGroupStats(const char * _Nonnull id);
1190
1191
1201ENGAGE_API int engageLogMsg(int level, const char * _Nonnull tag, const char * _Nonnull msg);
1202
1203
1211ENGAGE_API const char * _Nonnull engageGetNetworkInterfaceDevices();
1212
1213
1221ENGAGE_API const char * _Nonnull engageGetAudioDevices();
1222
1223
1238ENGAGE_API const char * _Nonnull engageGenerateMission(const char * _Nonnull keyPhrase, int audioGroupCount, const char * _Nullable rallypointHost, const char * _Nullable missionName);
1239
1240
1258ENGAGE_API const char * _Nonnull engageGenerateMissionUsingCertStore(const char * _Nonnull keyPhrase,
1259 int audioGroupCount,
1260 const char * _Nullable rallypointHost,
1261 const char * _Nullable missionName,
1262 const char * _Nonnull certStoreFn,
1263 const char * _Nullable certStorePasswordHexByteString,
1264 const char * _Nullable certStoreElement);
1265
1266
1278ENGAGE_API int engageSetMissionId(const char * _Nullable missionId);
1279
1280
1292ENGAGE_API int engageCreateCertStore(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1293
1294
1307ENGAGE_API int engageOpenCertStore(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1308
1309
1317ENGAGE_API const char * _Nonnull engageGetCertStoreDescriptor(void);
1318
1319
1327ENGAGE_API int engageCloseCertStore(void);
1328
1329
1344ENGAGE_API int engageSetCertStoreCertificatePem(const char * _Nonnull id, const char * _Nonnull certificatePem, const char * _Nullable privateKeyPem, const char * _Nullable tags);
1345
1346
1362ENGAGE_API int engageSetCertStoreCertificateP12(const char * _Nonnull id, uint8_t * _Nonnull data, size_t size, const char * _Nullable password, const char * _Nullable tags);
1363
1364
1375ENGAGE_API int engageDeleteCertStoreCertificate(const char * _Nonnull id);
1376
1377
1385ENGAGE_API const char * _Nonnull engageGetCertStoreCertificatePem(const char * _Nonnull id);
1386
1387
1396ENGAGE_API const char * _Nonnull engageGetCertificateDescriptorFromPem(const char * _Nonnull pem);
1397
1398
1407ENGAGE_API const char * _Nonnull engageGetArrayOfCertificateDescriptorsFromPem(const char * _Nonnull pem);
1408
1409
1424ENGAGE_API int engageImportCertStoreElementFromCertStore(const char * _Nonnull id, const char * _Nonnull srcId, const char * _Nonnull srcFileName, const char * _Nonnull srcPasswordHexByteString, const char * _Nullable tags);
1425
1426
1438ENGAGE_API const char * _Nonnull engageQueryCertStoreContents(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1439
1440
1452ENGAGE_API int engageSetCertStoreCertificateTags(const char * _Nonnull id, const char * _Nullable tags);
1453
1454
1468ENGAGE_API int engageCreateBridge(const char * _Nonnull jsonConfiguration);
1469
1470
1482ENGAGE_API int engageDeleteBridge(const char * _Nonnull id);
1483
1484
1492ENGAGE_API const char * _Nonnull engageGetHardwareReport();
1493
1494
1505ENGAGE_API int engageAddGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams, const uint8_t * _Nullable blobData, size_t blobSize);
1506
1507
1518ENGAGE_API int engageUpdateGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams, const uint8_t * _Nullable blobData, size_t blobSize);
1519
1520
1529ENGAGE_API int engageDeleteGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams);
1530
1531
1539ENGAGE_API const char * _Nonnull engageGetDeviceId();
1540
1541
1555ENGAGE_API int engageEnableWatchdog(int enable);
1556
1557
1567ENGAGE_API int engagePlatformNotifyChanges(const char * _Nonnull jsonChangesArray);
1568
1569
1579ENGAGE_API int engageEnableNotifications(int enable);
1580
1581
1588ENGAGE_API int engageRefreshAudioDevices(void);
1589
1590
1598ENGAGE_API int engageReconfigureGroup(const char * _Nonnull id, const char * _Nonnull jsonConfiguration);
1599
1600
1607ENGAGE_API int engageBeginFileRecording(const char * _Nonnull jsonParams);
1608
1609
1616ENGAGE_API int engageEndFileRecording(const char * _Nonnull id);
1617
1625ENGAGE_API const char * _Nonnull engageGetActiveFeatureset();
1626
1633ENGAGE_API int engageSetFipsCrypto(const char * _Nonnull jsonParams);
1634
1642ENGAGE_API int engageIsCryptoFipsValidated(void);
1643
1658ENGAGE_API int engageSetCertStore(const uint8_t * _Nonnull buffer, size_t size, const char * _Nullable passwordHexByteString);
1659
1670ENGAGE_API int engageVerifyRiff(const char * _Nonnull fn);
1671
1686ENGAGE_API const char * _Nonnull engageGetRiffDescriptor(const char * _Nonnull fn);
1687
1688
1696ENGAGE_API const char * _Nonnull engageGenerateSignature(const uint8_t * _Nonnull block, size_t size, const char * _Nonnull securityCertificateJson);
1697
1698
1706ENGAGE_API int engageVerifySignature(const uint8_t * _Nonnull block, size_t size, const char * _Nonnull secureSignatureJson);
1707
1708// TODO: Engage compression/decompression functions not available at this time
1709#if 0
1731ENGAGE_API int engageCompress(const uint8_t * _Nonnull src, size_t srcSize, uint8_t * _Nonnull dst, size_t maxDstSize);
1732
1747ENGAGE_API int engageDecompress(const uint8_t * _Nonnull src, size_t srcSize, uint8_t * _Nonnull dst, size_t maxDstSize);
1748#endif
1749
1750
1751#if defined(ENGAGE_ALLOW_NATIVE)
1759ENGAGE_API ILogger * _Nullable engageGetLoggerNative();
1760
1774ENGAGE_API int engageRegisterForHighResolutionTimerNative(uint32_t durationMs, PFN_ENGAGE_HIGH_RES_TIMER_TICK _Nullable pfnDirectCallback);
1775
1776
1787ENGAGE_API int engageUnregisterFromHighResolutionTimerNative(void);
1788#endif
1789
1796ENGAGE_API int engageBeginGroupPcmPowerTracking(const char * _Nonnull id);
1797
1804ENGAGE_API int engageEndGroupPcmPowerTracking(const char * _Nonnull id);
1805
1806#endif
1807
1808#ifdef __cplusplus
1809}
1810#endif
1811#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 engageEndGroupPcmPowerTracking(const char *_Nonnull id)
[ASYNC] End tracking of input and output PCM power for the group
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 int engageBeginGroupPcmPowerTracking(const char *_Nonnull id)
[ASYNC] Begins tracking of input and output PCM power for the group
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.