Engage Engine API  1.263.9116
Real-time tactical communications engine API
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
24#if defined(ENGAGE_ALLOW_NATIVE)
25#include "ILogger.h"
26#endif
27extern "C"
28{
29#endif
30
31#if !defined(ENGAGE_API)
32 #if defined(WIN32)
33 #ifdef ENGAGE_EXPORTS
34 // Windows needs dllexport to produce an import lib without a .DEF file
35 #define ENGAGE_API __declspec(dllexport) extern
36 #else
37 #define ENGAGE_API extern
38 #endif
39 #else
40 #if defined(__EMSCRIPTEN__)
41 #define ENGAGE_API EMSCRIPTEN_KEEPALIVE __attribute__ ((visibility ("default")))
42 #else
43 #define ENGAGE_API __attribute__ ((visibility ("default")))
44 #endif
45 #endif
46#endif
47
48#if !defined(__clang__)
49 #define _Nullable
50 #define _Nonnull
51#endif
52
54typedef void (*PFN_ENGAGE_LOG_HOOK)(int level, const char * _Nonnull tag, const char * _Nonnull message);
55
57typedef void (*PFN_ENGAGE_HIGH_RES_TIMER_TICK)(uint32_t tickType, uint64_t ticksSoFar);
58
59// Structures (all packed on 1-byte boundaries)
60#pragma pack(push, 1)
61
68typedef struct _EngageEvents_t
69{
71 void (* _Nullable PFN_ENGAGE_ENGINE_STARTED)(const char * _Nullable eventExtraJson);
72
74 void (* _Nullable PFN_ENGAGE_ENGINE_STOPPED)(const char * _Nullable eventExtraJson);
75
76
78 void (* _Nullable PFN_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
79
81 void (* _Nullable PFN_ENGAGE_RP_CONNECTING)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
82
84 void (* _Nullable PFN_ENGAGE_RP_CONNECTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
85
87 void (* _Nullable PFN_ENGAGE_RP_DISCONNECTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
88
90 void (* _Nullable PFN_ENGAGE_RP_ROUNDTRIP_REPORT)(const char * _Nonnull pId, uint32_t rtMs, uint32_t rtQualityRating, const char * _Nullable eventExtraJson);
91
92
94 void (* _Nullable PFN_ENGAGE_GROUP_CREATED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
95
97 void (* _Nullable PFN_ENGAGE_GROUP_CREATE_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
98
100 void (* _Nullable PFN_ENGAGE_GROUP_DELETED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
101
102
104 void (* _Nullable PFN_ENGAGE_GROUP_CONNECTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
105
107 void (* _Nullable PFN_ENGAGE_GROUP_CONNECT_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
108
110 void (* _Nullable PFN_ENGAGE_GROUP_DISCONNECTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
111
112
114 void (* _Nullable PFN_ENGAGE_GROUP_JOINED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
115
117 void (* _Nullable PFN_ENGAGE_GROUP_JOIN_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
118
120 void (* _Nullable PFN_ENGAGE_GROUP_LEFT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
121
122
124 void (* _Nullable PFN_ENGAGE_GROUP_MEMBER_COUNT_CHANGED)(const char * _Nonnull pId, size_t newCount, const char * _Nullable eventExtraJson);
125
126
128 void (* _Nullable PFN_ENGAGE_GROUP_NODE_DISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
129
131 void (* _Nullable PFN_ENGAGE_GROUP_NODE_REDISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
132
134 void (* _Nullable PFN_ENGAGE_GROUP_NODE_UNDISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
135
136
138 void (* _Nullable PFN_ENGAGE_GROUP_RX_STARTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
139
141 void (* _Nullable PFN_ENGAGE_GROUP_RX_ENDED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
142
144 void (* _Nullable PFN_ENGAGE_GROUP_RX_SPEAKERS_CHANGED)(const char * _Nonnull pId, const char * _Nonnull groupTalkerJson, const char * _Nullable eventExtraJson);
145
147 void (* _Nullable PFN_ENGAGE_GROUP_RX_MUTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
148
150 void (* _Nullable PFN_ENGAGE_GROUP_RX_UNMUTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
151
152
154 void (* _Nullable PFN_ENGAGE_GROUP_TX_STARTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
155
157 void (* _Nullable PFN_ENGAGE_GROUP_TX_ENDED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
158
160 void (* _Nullable PFN_ENGAGE_GROUP_TX_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
161
163 void (* _Nullable PFN_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
164
166 void (* _Nullable PFN_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
167
169 void (* _Nullable PFN_ENGAGE_GROUP_TX_MUTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
170
172 void (* _Nullable PFN_ENGAGE_GROUP_TX_UNMUTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
173
175 void (* _Nullable PFN_ENGAGE_GROUP_ASSET_DISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
176
178 void (* _Nullable PFN_ENGAGE_GROUP_ASSET_REDISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
179
181 void (* _Nullable PFN_ENGAGE_GROUP_ASSET_UNDISCOVERED)(const char * _Nonnull pId, const char * _Nonnull nodeJson, const char * _Nullable eventExtraJson);
182
183
185 void (* _Nullable PFN_ENGAGE_LICENSE_CHANGED)(const char * _Nullable eventExtraJson);
186
188 void (* _Nullable PFN_ENGAGE_LICENSE_EXPIRED)(const char * _Nullable eventExtraJson);
189
191 void (* _Nullable PFN_ENGAGE_LICENSE_EXPIRING)(const char * _Nonnull pSecsLeft, const char * _Nullable eventExtraJson);
192
193
195 void (* _Nullable PFN_ENGAGE_GROUP_BLOB_SENT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
196
198 void (* _Nullable PFN_ENGAGE_GROUP_BLOB_SEND_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
199
201 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);
202
203
205 void (* _Nullable PFN_ENGAGE_GROUP_RTP_SENT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
206
208 void (* _Nullable PFN_ENGAGE_GROUP_RTP_SEND_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
209
211 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);
212
213
215 void (* _Nullable PFN_ENGAGE_GROUP_RAW_SENT)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
216
218 void (* _Nullable PFN_ENGAGE_GROUP_RAW_SEND_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
219
221 void (* _Nullable PFN_ENGAGE_GROUP_RAW_RECEIVED)(const char * _Nonnull pId, const uint8_t * _Nonnull raw, size_t rawSize, const char * _Nullable eventExtraJson);
222
223
225 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_EVENT_STARTED)(const char * _Nonnull pId, const char * _Nonnull eventJson, const char * _Nullable eventExtraJson);
226
228 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED)(const char * _Nonnull pId, const char * _Nonnull eventJson, const char * _Nullable eventExtraJson);
229
231 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_EVENT_ENDED)(const char * _Nonnull pId, const char * _Nonnull eventJson, const char * _Nullable eventExtraJson);
232
234 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_REPORT)(const char * _Nonnull pId, const char * _Nonnull timelineJson, const char * _Nullable eventExtraJson);
235
237 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_REPORT_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
238
240 void (* _Nullable PFN_ENGAGE_GROUP_TIMELINE_GROOMED)(const char * _Nonnull pId, const char * _Nonnull eventListJson, const char * _Nullable eventExtraJson);
241
243 void (* _Nullable PFN_ENGAGE_GROUP_HEALTH_REPORT)(const char * _Nonnull pId, const char * _Nonnull healthReportJson, const char * _Nullable eventExtraJson);
244
246 void (* _Nullable PFN_ENGAGE_GROUP_HEALTH_REPORT_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
247
249 void (* _Nullable PFN_ENGAGE_BRIDGE_CREATED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
250
252 void (* _Nullable PFN_ENGAGE_BRIDGE_CREATE_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
253
255 void (* _Nullable PFN_ENGAGE_BRIDGE_DELETED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
256
258 void (* _Nullable PFN_ENGAGE_GROUP_STATS_REPORT)(const char * _Nonnull pId, const char * _Nonnull statsReportJson, const char * _Nullable eventExtraJson);
259
261 void (* _Nullable PFN_ENGAGE_GROUP_STATS_REPORT_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
262
264 void (* _Nullable PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED)(const char * _Nonnull pId, int16_t leftLevelPerc, int16_t rightLevelPerc, const char * _Nullable eventExtraJson);
265
267 void (* _Nullable PFN_ENGAGE_GROUP_RX_DTMF)(const char * _Nonnull pId, const char * _Nonnull dtmfJson, const char * _Nullable eventExtraJson);
268
275 void (* _Nullable PFN_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED)(const char * _Nullable eventExtraJson);
276
278 void (* _Nullable PFN_ENGAGE_GROUP_RECONFIGURED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
279
281 void (* _Nullable PFN_ENGAGE_GROUP_RECONFIGURATION_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
282
284 void (* _Nullable PFN_ENGAGE_AUDIO_RECORDING_STARTED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
285
287 void (* _Nullable PFN_ENGAGE_AUDIO_RECORDING_FAILED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
288
290 void (* _Nullable PFN_ENGAGE_AUDIO_RECORDING_ENDED)(const char * _Nonnull pId, const char * _Nullable eventExtraJson);
291
293 // void (* _Nullable PFN_ENGAGE_ON_HIGH_RESOLUTION_TIMER_TICK)(uint32_t tickType, uint32_t ticksSoFarLow, uint32_t ticksSoFarHigh, const char * _Nullable eventExtraJson);
294
296 void (* _Nullable PFN_ENGAGE_ENGINE_GROUP_BY_GROUP_PCM_POWER_LEVEL_REPORT)(const char * _Nullable eventExtraJson);
297
299 void (* _Nullable PFN_ENGAGE_ENGINE_AUDIO_DEVICE_EVENT)(const char * _Nullable eventExtraJson);
303#pragma pack(pop)
304
305#if defined(WIN32)
306ENGAGE_API void engageWin32LibraryInit();
307ENGAGE_API void engageWin32LibraryDeinit();
308#endif
309
310// Library functions
311#if !defined(ENGAGEJNI)
312
326ENGAGE_API int engageSetLogLevel(int level);
327
328
342ENGAGE_API int engageSetLogTagExtension(const char * _Nullable tagExtension);
343
344
356ENGAGE_API int engageSetLoggingOutputOverride(const _Nullable PFN_ENGAGE_LOG_HOOK pfnHook);
357
358
372ENGAGE_API int engageEnableSyslog(int enable);
373
374
389ENGAGE_API int engageRegisterEventCallbacks(const EngageEvents_t * _Nonnull pEvents);
390
391
411ENGAGE_API int engageInitialize(const char * _Nullable enginePolicyConfiguration,
412 const char * _Nullable userIdentity,
413 const char * _Nullable tempStoragePath);
414
415
435ENGAGE_API int engageShutdown();
436
437
452ENGAGE_API int engageStart(void);
453
454
467ENGAGE_API int engageStop(void);
468
469
489ENGAGE_API int engageCreateGroup(const char * _Nonnull jsonConfiguration);
490
491
505ENGAGE_API int engageDeleteGroup(const char * _Nonnull id);
506
507
531ENGAGE_API int engageJoinGroup(const char * _Nonnull id);
532
533
548ENGAGE_API int engageLeaveGroup(const char * _Nonnull id);
549
550
598ENGAGE_API int engageBeginGroupTx(const char * _Nonnull id, int txPriority, uint32_t txFlags);
599
600
621ENGAGE_API int engageBeginGroupTxAdvanced(const char * _Nonnull id, const char * _Nonnull jsonParams); /* TODO: define JSON */
622
623
633ENGAGE_API int engageEndGroupTx(const char * _Nonnull id);
634
635
665ENGAGE_API int engageSetGroupRxTag(const char * _Nonnull id, uint16_t tag);
666
667
682ENGAGE_API int engageMuteGroupRx(const char * _Nonnull id);
683
684
697ENGAGE_API int engageUnmuteGroupRx(const char * _Nonnull id);
698
699
712ENGAGE_API int engageMuteGroupTx(const char * _Nonnull id);
713
714
727ENGAGE_API int engageUnmuteGroupTx(const char * _Nonnull id);
728
759ENGAGE_API int engageSetGroupRxVolume(const char * _Nonnull id, int left, int right);
760
761
773ENGAGE_API int engageSetGroupRules(const char * _Nonnull id, const char * _Nonnull jsonParams);
774
775
796ENGAGE_API int engageUpdatePresenceDescriptor(const char * _Nonnull id, const char * _Nonnull descriptorJson, int forceBeacon);
797
798
842ENGAGE_API int engageEncrypt(const uint8_t * _Nonnull src, size_t size, uint8_t * _Nonnull dst, const char * _Nonnull passwordHexByteString);
843
844
859ENGAGE_API int engageDecrypt(const uint8_t * _Nonnull src, size_t size, uint8_t * _Nonnull dst, const char * _Nonnull passwordHexByteString);
860
861
878ENGAGE_API const char * _Nonnull engageGetVersion();
879
903ENGAGE_API int engageValidateConfiguration(const char * _Nonnull schemaId,
904 const char * _Nonnull jsonText,
905 char * _Nullable errorJsonOut,
906 size_t errorJsonOutSize);
907
908
924ENGAGE_API const char * _Nonnull engageGetActiveLicenseDescriptor();
925
926
947ENGAGE_API const char * _Nonnull engageGetLicenseDescriptor(const char * _Nonnull entitlement, const char * _Nonnull key, const char * _Nullable activationCode, const char * _Nullable manufacturerId);
948
949
967ENGAGE_API int engageUpdateLicense(const char * _Nonnull entitlement, const char * _Nonnull key, const char * _Nullable activationCode, const char * _Nullable manufacturerId);
968
969
1007ENGAGE_API int engageSendGroupRtp(const char * _Nonnull id, const uint8_t * _Nonnull payload, size_t size, const char * _Nonnull jsonParams);
1008
1009
1032ENGAGE_API int engageRegisterGroupRtpHandler(const char * _Nonnull id, uint16_t payloadId);
1033
1034
1050ENGAGE_API int engageUnregisterGroupRtpHandler(const char * _Nonnull id, uint16_t payloadId);
1051
1052
1094ENGAGE_API int engageSendGroupBlob(const char * _Nonnull id, const uint8_t * _Nonnull blob, size_t size, const char * _Nonnull jsonParams);
1095
1096
1129ENGAGE_API int engageSendGroupRaw(const char * _Nonnull id, const uint8_t * _Nonnull raw, size_t size, const char * _Nonnull jsonParams);
1130
1131
1149ENGAGE_API int engagePlatformServiceDiscovered(const char * _Nonnull id, const char * _Nonnull jsonParams);
1150
1151
1169ENGAGE_API int engagePlatformServiceRediscovered(const char * _Nonnull id, const char * _Nonnull jsonParams);
1170
1171
1185ENGAGE_API int engagePlatformServiceUndiscovered(const char * _Nonnull id);
1186
1187
1196ENGAGE_API int engageQueryGroupTimeline(const char * _Nonnull id, const char * _Nonnull jsonParams);
1197
1198
1206ENGAGE_API int engageQueryGroupHealth(const char * _Nonnull id);
1207
1208
1216ENGAGE_API int engageQueryGroupStats(const char * _Nonnull id);
1217
1218
1228ENGAGE_API int engageLogMsg(int level, const char * _Nonnull tag, const char * _Nonnull msg);
1229
1230
1238ENGAGE_API const char * _Nonnull engageGetNetworkInterfaceDevices();
1239
1240
1248ENGAGE_API const char * _Nonnull engageGetAudioDevices();
1249
1250
1265ENGAGE_API const char * _Nonnull engageGenerateMission(const char * _Nonnull keyPhrase, int audioGroupCount, const char * _Nullable rallypointHost, const char * _Nullable missionName);
1266
1267
1285ENGAGE_API const char * _Nonnull engageGenerateMissionUsingCertStore(const char * _Nonnull keyPhrase,
1286 int audioGroupCount,
1287 const char * _Nullable rallypointHost,
1288 const char * _Nullable missionName,
1289 const char * _Nonnull certStoreFn,
1290 const char * _Nullable certStorePasswordHexByteString,
1291 const char * _Nullable certStoreElement);
1292
1293
1305ENGAGE_API int engageSetMissionId(const char * _Nullable missionId);
1306
1307
1319ENGAGE_API int engageCreateCertStore(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1320
1321
1334ENGAGE_API int engageOpenCertStore(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1335
1336
1344ENGAGE_API const char * _Nonnull engageGetCertStoreDescriptor(void);
1345
1346
1354ENGAGE_API int engageCloseCertStore(void);
1355
1356
1371ENGAGE_API int engageSetCertStoreCertificatePem(const char * _Nonnull id, const char * _Nonnull certificatePem, const char * _Nullable privateKeyPem, const char * _Nullable tags);
1372
1373
1389ENGAGE_API int engageSetCertStoreCertificateP12(const char * _Nonnull id, uint8_t * _Nonnull data, size_t size, const char * _Nullable password, const char * _Nullable tags);
1390
1391
1402ENGAGE_API int engageDeleteCertStoreCertificate(const char * _Nonnull id);
1403
1404
1412ENGAGE_API const char * _Nonnull engageGetCertStoreCertificatePem(const char * _Nonnull id);
1413
1414
1423ENGAGE_API const char * _Nonnull engageGetCertificateDescriptorFromPem(const char * _Nonnull pem);
1424
1425
1434ENGAGE_API const char * _Nonnull engageGetArrayOfCertificateDescriptorsFromPem(const char * _Nonnull pem);
1435
1436
1451ENGAGE_API int engageImportCertStoreElementFromCertStore(const char * _Nonnull id, const char * _Nonnull srcId, const char * _Nonnull srcFileName, const char * _Nonnull srcPasswordHexByteString, const char * _Nullable tags);
1452
1453
1465ENGAGE_API const char * _Nonnull engageQueryCertStoreContents(const char * _Nonnull fileName, const char * _Nullable passwordHexByteString);
1466
1467
1479ENGAGE_API int engageSetCertStoreCertificateTags(const char * _Nonnull id, const char * _Nullable tags);
1480
1481
1495ENGAGE_API int engageCreateBridge(const char * _Nonnull jsonConfiguration);
1496
1497
1509ENGAGE_API int engageDeleteBridge(const char * _Nonnull id);
1510
1511
1519ENGAGE_API const char * _Nonnull engageGetHardwareReport();
1520
1521
1532ENGAGE_API int engageAddGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams, const uint8_t * _Nullable blobData, size_t blobSize);
1533
1534
1545ENGAGE_API int engageUpdateGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams, const uint8_t * _Nullable blobData, size_t blobSize);
1546
1547
1556ENGAGE_API int engageDeleteGroupTimelineEvent(const char * _Nonnull id, const char * _Nonnull jsonParams);
1557
1558
1566ENGAGE_API const char * _Nonnull engageGetDeviceId();
1567
1568
1582ENGAGE_API int engageEnableWatchdog(int enable);
1583
1584
1594ENGAGE_API int engagePlatformNotifyChanges(const char * _Nonnull jsonChangesArray);
1595
1596
1606ENGAGE_API int engageEnableNotifications(int enable);
1607
1608
1615ENGAGE_API int engageRefreshAudioDevices(void);
1616
1617
1625ENGAGE_API int engageReconfigureGroup(const char * _Nonnull id, const char * _Nonnull jsonConfiguration);
1626
1627
1634ENGAGE_API int engageBeginFileRecording(const char * _Nonnull jsonParams);
1635
1636
1643ENGAGE_API int engageEndFileRecording(const char * _Nonnull id);
1644
1652ENGAGE_API const char * _Nonnull engageGetActiveFeatureset();
1653
1660ENGAGE_API int engageSetFipsCrypto(const char * _Nonnull jsonParams);
1661
1669ENGAGE_API int engageIsCryptoFipsValidated(void);
1670
1685ENGAGE_API int engageSetCertStore(const uint8_t * _Nonnull buffer, size_t size, const char * _Nullable passwordHexByteString);
1686
1697ENGAGE_API int engageVerifyRiff(const char * _Nonnull fn);
1698
1713ENGAGE_API const char * _Nonnull engageGetRiffDescriptor(const char * _Nonnull fn);
1714
1715
1723ENGAGE_API const char * _Nonnull engageGenerateSignature(const uint8_t * _Nonnull block, size_t size, const char * _Nonnull securityCertificateJson);
1724
1725
1733ENGAGE_API int engageVerifySignature(const uint8_t * _Nonnull block, size_t size, const char * _Nonnull secureSignatureJson);
1734
1735
1736#if defined(ENGAGE_ALLOW_NATIVE)
1744ENGAGE_API ILogger * _Nullable engageGetLoggerNative();
1745
1759ENGAGE_API int engageRegisterForHighResolutionTimerNative(uint32_t durationMs, PFN_ENGAGE_HIGH_RES_TIMER_TICK _Nullable pfnDirectCallback);
1760
1761
1772ENGAGE_API int engageUnregisterFromHighResolutionTimerNative(void);
1773#endif
1774
1781ENGAGE_API int engageBeginGroupPcmPowerTracking(const char * _Nonnull id);
1782
1789ENGAGE_API int engageEndGroupPcmPowerTracking(const char * _Nonnull id);
1790
1791#endif
1792
1793#ifdef __cplusplus
1794}
1795#endif
1796#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 using the FIPS 140-3 validated OpenSSL 3.1.2 FIPS Provider (CMVP #4985)...
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 int engageValidateConfiguration(const char *_Nonnull schemaId, const char *_Nonnull jsonText, char *_Nullable errorJsonOut, size_t errorJsonOutSize)
[SYNC] Validate a configuration JSON document against a formal schema
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.