18 #region Interfaces and such
23 public bool isEncrypted;
24 public bool allowsFullDuplex;
29 void onEngineStarted(
string eventExtraJson);
30 void onEngineStopped(
string eventExtraJson);
31 void onEngineAudioDevicesRefreshed(
string eventExtraJson);
36 void onLicenseChanged(
string eventExtraJson);
37 void onLicenseExpired(
string eventExtraJson);
38 void onLicenseExpiring(
double secondsLeft,
string eventExtraJson);
43 void onEngageLogMessage(
int level,
string tag,
string message);
48 void onRallypointPausingConnectionAttempt(
string id,
string eventExtraJson);
49 void onRallypointConnecting(
string id,
string eventExtraJson);
50 void onRallypointConnected(
string id,
string eventExtraJson);
51 void onRallypointDisconnected(
string id,
string eventExtraJson);
52 void onRallypointRoundtripReport(
string id,
int rtMs,
int rtRating,
string eventExtraJson);
57 void onGroupCreated(
string id,
string eventExtraJson);
58 void onGroupCreateFailed(
string id,
string eventExtraJson);
59 void onGroupDeleted(
string id,
string eventExtraJson);
60 void onGroupConnected(
string id,
string eventExtraJson);
61 void onGroupConnectFailed(
string id,
string eventExtraJson);
62 void onGroupDisconnected(
string id,
string eventExtraJson);
63 void onGroupJoined(
string id,
string eventExtraJson);
64 void onGroupJoinFailed(
string id,
string eventExtraJson);
65 void onGroupLeft(
string id,
string eventExtraJson);
66 void onGroupMemberCountChanged(
string id,
int newCount,
string eventExtraJson);
67 void onGroupRxStarted(
string id,
string eventExtraJson);
68 void onGroupRxEnded(
string id,
string eventExtraJson);
69 void onGroupRxMuted(
string id,
string eventExtraJson);
70 void onGroupRxUnmuted(
string id,
string eventExtraJson);
71 void onGroupTxMuted(
string id,
string eventExtraJson);
72 void onGroupTxUnmuted(
string id,
string eventExtraJson);
73 void onGroupRxSpeakersChanged(
string id,
string groupTalkerJson,
string eventExtraJson);
74 void onGroupTxStarted(
string id,
string eventExtraJson);
75 void onGroupTxEnded(
string id,
string eventExtraJson);
76 void onGroupTxFailed(
string id,
string eventExtraJson);
77 void onGroupTxUsurpedByPriority(
string id,
string eventExtraJson);
78 void onGroupMaxTxTimeExceeded(
string id,
string eventExtraJson);
79 void onGroupNodeDiscovered(
string id,
string nodeJson,
string eventExtraJson);
80 void onGroupNodeRediscovered(
string id,
string nodeJson,
string eventExtraJson);
81 void onGroupNodeUndiscovered(
string id,
string nodeJson,
string eventExtraJson);
82 void onGroupAssetDiscovered(
string id,
string nodeJson,
string eventExtraJson);
83 void onGroupAssetRediscovered(
string id,
string nodeJson,
string eventExtraJson);
84 void onGroupAssetUndiscovered(
string id,
string nodeJson,
string eventExtraJson);
85 void onGroupBlobSent(
string id,
string eventExtraJson);
86 void onGroupBlobSendFailed(
string id,
string eventExtraJson);
87 void onGroupBlobReceived(
string id,
string blobInfoJson,
byte[] blob,
int blobSize,
string eventExtraJson);
88 void onGroupRtpSent(
string id,
string eventExtraJson);
89 void onGroupRtpSendFailed(
string id,
string eventExtraJson);
90 void onGroupRtpReceived(
string id,
string rtpInfoJson,
byte[] payload,
int payloadSize,
string eventExtraJson);
91 void onGroupRawSent(
string id,
string eventExtraJson);
92 void onGroupRawSendFailed(
string id,
string eventExtraJson);
93 void onGroupRawReceived(
string id,
byte[] raw,
int rawSize,
string eventExtraJson);
95 void onGroupTimelineEventStarted(
string id,
string eventJson,
string eventExtraJson);
96 void onGroupTimelineEventUpdated(
string id,
string eventJson,
string eventExtraJson);
97 void onGroupTimelineEventEnded(
string id,
string eventJson,
string eventExtraJson);
98 void onGroupTimelineReport(
string id,
string reportJson,
string eventExtraJson);
99 void onGroupTimelineReportFailed(
string id,
string eventExtraJson);
100 void onGroupTimelineGroomed(
string id,
string eventListJson,
string eventExtraJson);
102 void onGroupHealthReport(
string id,
string healthReportJson,
string eventExtraJson);
103 void onGroupHealthReportFailed(
string id,
string eventExtraJson);
105 void onGroupStatsReport(
string id,
string statsReportJson,
string eventExtraJson);
106 void onGroupStatsReportFailed(
string id,
string eventExtraJson);
108 void onGroupRxVolumeChanged(
string id,
int leftLevelPerc,
int rightLevelPerc,
string eventExtraJson);
109 void onGroupRxDtmf(
string id,
string dtmfJson,
string eventExtraJson);
111 void onGroupReconfigured(
string id,
string eventExtraJson);
112 void onGroupReconfigurationFailed(
string id,
string eventExtraJson);
114 void onGroupAudioRecordingStarted(
string id,
string eventExtraJson);
115 void onGroupAudioRecordingFailed(
string id,
string eventExtraJson);
116 void onGroupAudioRecordingEnded(
string id,
string eventExtraJson);
121 void onHumanBiometricsReceived(
string groupId,
string nodeId,
string hbmJson,
string eventExtraJson);
126 void onBridgeCreated(
string id,
string eventExtraJson);
127 void onBridgeCreateFailed(
string id,
string eventExtraJson);
128 void onBridgeDeleted(
string id,
string eventExtraJson);
133 void onAudioRecordingStarted(
string id,
string eventExtraJson);
134 void onAudioRecordingFailed(
string id,
string eventExtraJson);
135 void onAudioRecordingEnded(
string id,
string eventExtraJson);
141 private const string ENGAGE_DLL =
"engage-shared.dll";
144 public const int ENGAGE_MAX_GROUP_ID_SZ = 64;
145 public const int ENGAGE_MAX_GROUP_NAME_SZ = 128;
148 public const int ENGAGE_RESULT_OK = 0;
149 public const int ENGAGE_RESULT_INVALID_PARAMETERS = -1;
150 public const int ENGAGE_RESULT_NOT_INITIALIZED = -2;
151 public const int ENGAGE_RESULT_ALREADY_INITIALIZED = -3;
152 public const int ENGAGE_RESULT_GENERAL_FAILURE = -4;
153 public const int ENGAGE_RESULT_NOT_STARTED = -5;
154 public const int ENGAGE_RESULT_ALREADY_STARTED = -6;
155 public const int ENGAGE_RESULT_INSUFFICIENT_DESTINATION_SPACE = -7;
156 public const int ENGAGE_RESULT_CRYPTO_MODULE_INITIALIZATION_FAILURE = -8;
157 public const int ENGAGE_RESULT_HIGH_RES_TIMER_ALREADY_EXISTS = -9;
160 public enum JitterBufferLatency :
int
167 public enum ConnectionType :
int
175 public enum TxStatus :
int
180 ERR_NOT_AN_AUDIO_GROUP = -1,
182 ERR_NOT_CONNECTED = -3,
183 ERR_ALREADY_TRANSMITTING = -4,
184 ERR_INVALID_PARAMS = -5,
185 ERR_PRIORITY_TOO_LOW = -6,
186 ERR_RX_ACTIVE_ON_NON_FDX = -7,
187 ERR_CANNOT_SUBSCRIBE_TO_MIC = -8,
189 ERR_TX_ENDED_WITH_FAILURE = -10,
190 ERR_OTHERS_ACTIVE = -11
194 public enum LicensingStatusCode :
int
197 ERR_NULL_ENTITLEMENT_KEY = -1,
198 ERR_NULL_LICENSE_KEY = -2,
199 ERR_INVALID_LICENSE_KEY_LEN = -3,
200 ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4,
201 ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5,
202 ERR_INVALID_EXPIRATION_DATE = -6,
203 ERR_GENERAL_FAILURE = -7,
204 ERR_NOT_INITIALIZED = -8,
205 ERR_REQUIRES_ACTIVATION = -9,
206 ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10
210 public enum LoggingLevel :
int
220 public const byte ENGAGE_BLOB_PT_UNDEFINED = 0;
221 public const byte ENGAGE_BLOB_PT_APP_TEXT_UTF8 = 1;
222 public const byte ENGAGE_BLOB_PT_JSON_TEXT_UTF8 = 2;
223 public const byte ENGAGE_BLOB_PT_APP_BINARY = 3;
224 public const byte ENGAGE_BLOB_PT_ENGAGE_BINARY_HUMAN_BIOMETRICS = 4;
227 public const byte ENGAGE_HBM_HEART_RATE = 1;
228 public const byte ENGAGE_HBM_SKIN_TEMP = 2;
229 public const byte ENGAGE_HBM_CORE_TEMP = 3;
230 public const byte ENGAGE_HBM_HYDRATION = 4;
231 public const byte ENGAGE_HBM_BLOOD_OXYGENATION = 5;
232 public const byte ENGAGE_HBM_FATIGUE_LEVEL = 6;
233 public const byte ENGAGE_HBM_TASK_EFFECTIVENESS = 7;
236 public const String GROUP_SOURCE_ENGAGE_INTERNAL =
"com.rallytac.engage.internal";
237 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_CORE =
"com.rallytac.magellan.core";
238 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH =
"com.rallytac.engage.magellan.cistech";
239 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE =
"com.rallytac.engage.magellan.trellisware";
240 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS =
"com.rallytac.engage.magellan.silvus";
241 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT =
"com.rallytac.engage.magellan.persistent";
242 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO =
"com.rallytac.engage.magellan.domo";
243 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD =
"com.rallytac.engage.magellan.kenwood";
244 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT =
"com.rallytac.engage.magellan.tait";
245 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY=
"com.rallytac.engage.magellan.vocality";
248 public const String GROUP_DISCONNECTED_REASON_NO_REAON =
"NoReason";
249 public const String GROUP_DISCONNECTED_REASON_NO_LINK =
"NoLink";
250 public const String GROUP_DISCONNECTED_REASON_UNREGISTERED =
"Unregistered";
251 public const String GROUP_DISCONNECTED_REASON_NOT_ALLOWED =
"NotAllowed";
252 public const String GROUP_DISCONNECTED_REASON_GENERAL_DENIAL =
"GeneralDenial";
255 public const int ENGAGE_PDGI_FLAG_JOINED = 0x0001;
256 public const int ENGAGE_PDGI_FLAG_CONNECTED = 0x0002;
257 public const int ENGAGE_PDGI_FLAG_RX_MUTED = 0x0004;
258 public const int ENGAGE_PDGI_FLAG_TX_MUTED = 0x0008;
261 public enum NetworkTxPriority :
int
273 public static String objectName =
"fipsCrypto";
274 public static String enabled =
"enabled";
275 public static String path =
"path";
280 public static String objectName =
"tls";
281 public static String verifyPeers =
"verifyPeers";
282 public static String allowSelfSignedCertificates =
"allowSelfSignedCertificates";
283 public static String caCertificates =
"caCertificates";
284 public static String subjectRestrictions =
"subjectRestrictions";
285 public static String issuerRestrictions =
"issuerRestrictions";
290 public static String objectName =
"watchdog";
291 public static String enabled =
"enabled";
292 public static String intervalMs =
"intervalMs";
293 public static String hangDetectionMs =
"hangDetectionMs";
294 public static String abortOnHang =
"abortOnHang";
295 public static String slowExecutionThresholdMs =
"slowExecutionThresholdMs";
300 public static String objectName =
"groupCreationDetail";
301 public static String
id =
"id";
302 public static String status =
"status";
307 public static String objectName =
"groupTxDetail";
308 public static String
id =
"id";
309 public static String status =
"status";
310 public static String localPriority =
"localPriority";
311 public static String remotePriority =
"remotePriority";
312 public static String nonFdxMsHangRemaining =
"nonFdxMsHangRemaining";
317 public static String objectName =
"rallypointConnectionDetail";
318 public static String internalId =
"internalId";
319 public static String host =
"host";
320 public static String port =
"port";
321 public static String msToNextConnectionAttempt =
"msToNextConnectionAttempt";
326 public static String objectName =
"groupConnectionDetail";
327 public static String
id =
"id";
328 public static String connectionType =
"connectionType";
329 public static String peer =
"peer";
330 public static String asFailover =
"asFailover";
331 public static String reason =
"reason";
336 public static String objectName =
"certStoreCertificateElement";
337 public static String arrayName =
"certificates";
338 public static String
id =
"id";
339 public static String hasPrivateKey =
"hasPrivateKey";
340 public static String tags =
"tags";
345 public static String objectName =
"certStoreDescriptor";
346 public static String
id =
"id";
347 public static String fileName =
"fileName";
348 public static String version =
"version";
349 public static String flags =
"flags";
350 public static String certificates =
"certificates";
355 public static String objectName =
"list";
360 public static String objectName =
"audioDevice";
361 public static String deviceId =
"deviceId";
362 public static String samplingRate =
"samplingRate";
363 public static String msPerBuffer =
"msPerBuffer";
364 public static String bufferCount =
"bufferCount";
365 public static String channels =
"channels";
366 public static String direction =
"direction";
367 public static String boostPercentage =
"boostPercentage";
368 public static String isAdad =
"isAdad";
369 public static String name =
"name";
370 public static String manufacturer =
"manufacturer";
371 public static String model =
"model";
372 public static String hardwareId =
"hardwareId";
373 public static String serialNumber =
"serialNumber";
374 public static String isDefault =
"isDefault";
375 public static String extra =
"extra";
376 public static String type =
"type";
377 public static String isPresent =
"isPresent";
382 public static String objectName =
"list";
387 public static String objectName =
"networkInterfaceDevice";
388 public static String name =
"name";
389 public static String friendlyName =
"friendlyName";
390 public static String description =
"description";
391 public static String family =
"family";
392 public static String address =
"address";
393 public static String available =
"available";
394 public static String isLoopback =
"isLoopback";
395 public static String supportsMulticast =
"supportsMulticast";
396 public static String hardwareAddress =
"hardwareAddress";
401 public static String objectName =
"advancedTxParams";
402 public static String flags =
"flags";
403 public static String priority =
"priority";
404 public static String subchannelTag =
"subchannelTag";
405 public static String includeNodeId =
"includeNodeId";
406 public static String alias =
"alias";
407 public static String muted =
"muted";
408 public static String txId =
"txId";
409 public static String aliasSpecializer =
"aliasSpecializer";
410 public static String receiverRxMuteForAliasSpecializer =
"receiverRxMuteForAliasSpecializer";
414 public static String objectName =
"audioUri";
415 public static String uri =
"uri";
416 public static String repeatCount =
"repeatCount";
422 public static String objectName =
"license";
423 public static String entitlement =
"entitlement";
424 public static String key =
"key";
425 public static String activationCode =
"activationCode";
426 public static String deviceId =
"deviceId";
427 public static String type =
"type";
428 public static String expires =
"expires";
429 public static String expiresFormatted =
"expiresFormatted";
430 public static String manufacturerId =
"manufacturerId";
435 public static String objectName =
"talkerInformation";
436 public static String alias =
"alias";
437 public static String nodeId =
"nodeId";
438 public static String rxFlags =
"rxFlags";
439 public static String txPriority =
"txPriority";
440 public static String txId =
"txId";
441 public static String aliasSpecializer =
"aliasSpecializer";
442 public static String rxMuted =
"rxMuted";
447 public static String objectName =
"GroupTalkers";
448 public static String list =
"list";
455 public static String objectName =
"database";
456 public static String enabled =
"enabled";
457 public static String type =
"type";
458 public static String fixedFileName =
"fixedFileName";
463 public static String objectName =
"internals";
464 public static String housekeeperIntervalMs =
"housekeeperIntervalMs";
465 public static String logTaskQueueStatsIntervalMs =
"logTaskQueueStatsIntervalMs";
466 public static String maxTxSecs =
"maxTxSecs";
467 public static String maxRxSecs =
"maxRxSecs";
468 public static String enableLazySpeakerClosure =
"enableLazySpeakerClosure";
469 public static String rtpExpirationCheckIntervalMs =
"rtpExpirationCheckIntervalMs";
470 public static String delayedMicrophoneClosureSecs =
"delayedMicrophoneClosureSecs";
475 public static String objectName =
"timelines";
476 public static String enabled =
"enabled";
477 public static String maxEventAgeSecs =
"maxEventAgeSecs";
478 public static String storageRoot =
"storageRoot";
479 public static String maxStorageMb =
"maxStorageMb";
480 public static String maxMemMb =
"maxMemMb";
481 public static String maxAudioEventMemMb =
"maxAudioEventMemMb";
482 public static String maxDiskMb =
"maxDiskMb";
483 public static String maxEvents =
"maxEvents";
484 public static String groomingIntervalSecs =
"groomingIntervalSecs";
485 public static String autosaveIntervalSecs =
"autosaveIntervalSecs";
486 public static String disableSigningAndVerification =
"disableSigningAndVerification";
487 public static String ephemeral =
"ephemeral";
492 public static String objectName =
"security";
497 public static String objectName =
"certificate";
498 public static String certificate =
"certificate";
499 public static String key =
"key";
504 public static String objectName =
"licensing";
505 public static String entitlement =
"entitlement";
506 public static String key =
"key";
507 public static String activationCode =
"activationCode";
508 public static String manufacturerId =
"manufacturerId";
513 public static String objectName =
"networking";
514 public static String defaultNic =
"defaultNic";
515 public static String maxOutputQueuePackets =
"maxOutputQueuePackets";
516 public static String rtpJitterMinMs =
"rtpJitterMinMs";
517 public static String rtpJitterMaxFactor =
"rtpJitterMaxFactor";
518 public static String rtpJitterMaxMs =
"rtpJitterMaxMs";
519 public static String rtpLatePacketSequenceRange =
"rtpLatePacketSequenceRange";
520 public static String rtpJitterTrimPercentage =
"rtpJitterTrimPercentage";
521 public static String rtpJitterUnderrunReductionThresholdMs =
"rtpJitterUnderrunReductionThresholdMs";
522 public static String rtpJitterUnderrunReductionAger =
"rtpJitterUnderrunReductionAger";
523 public static String rtpJitterForceTrimAtMs =
"rtpJitterForceTrimAtMs";
524 public static String rtpLatePacketTimestampRangeMs =
"rtpLatePacketTimestampRangeMs";
525 public static String rtpInboundProcessorInactivityMs =
"rtpInboundProcessorInactivityMs";
526 public static String multicastRejoinSecs =
"multicastRejoinSecs";
527 public static String rpLeafConnectTimeoutSecs =
"rpLeafConnectTimeoutSecs";
528 public static String maxReconnectPauseMs =
"maxReconnectPauseMs";
529 public static String reconnectFailurePauseIncrementMs =
"reconnectFailurePauseIncrementMs";
530 public static String sendFailurePauseMs =
"sendFailurePauseMs";
531 public static String rallypointRtTestIntervalMs =
"rallypointRtTestIntervalMs";
532 public static String logRtpJitterBufferStats =
"logRtpJitterBufferStats";
533 public static String preventMulticastFailover =
"preventMulticastFailover";
534 public static String rtcpPresenceTimeoutMs =
"rtcpPresenceTimeoutMs";
535 public static String rtpJtterLatencyMode =
"rtpJtterLatencyMode";
536 public static String rtpJitterMaxExceededClipPerc =
"rtpJitterMaxExceededClipPerc";
537 public static String rtpJitterMaxExceededClipHangMs =
"rtpJitterMaxExceededClipHangMs";
538 public static String rtpZombieLifetimeMs =
"rtpZombieLifetimeMs";
539 public static String rtpMaxTrimMs =
"rtpMaxTrimMs";
544 public static String objectName =
"audio";
545 public static String enabled =
"enabled";
546 public static String internalRate =
"internalRate";
547 public static String internalChannels =
"internalChannels";
548 public static String allowOutputOnTransmit =
"allowOutputOnTransmit";
549 public static String muteTxOnTx =
"muteTxOnTx";
550 public static String denoiseInput =
"denoiseInput";
551 public static String denoiseOutput =
"denoiseOutput";
552 public static String saveInputPcm =
"saveInputPcm";
553 public static String saveOutputPcm =
"saveOutputPcm";
557 public static String objectName =
"aec";
558 public static String enabled =
"enabled";
559 public static String mode =
"mode";
560 public static String speakerTailMs =
"speakerTailMs";
561 public static String cng =
"cng";
566 public static String objectName =
"vad";
567 public static String enabled =
"enabled";
568 public static String mode =
"mode";
573 public static String objectName =
"android";
574 public static String api =
"api";
579 public static String objectName =
"inputAgc";
580 public static String enabled =
"enabled";
581 public static String minLevel =
"minLevel";
582 public static String maxLevel =
"maxLevel";
583 public static String compressionGainDb =
"compressionGainDb";
584 public static String enableLimiter =
"enableLimiter";
585 public static String targetLevelDb =
"targetLevelDb";
590 public static String objectName =
"outputAgc";
591 public static String enabled =
"enabled";
592 public static String minLevel =
"minLevel";
593 public static String maxLevel =
"maxLevel";
594 public static String compressionGainDb =
"compressionGainDb";
595 public static String enableLimiter =
"enableLimiter";
596 public static String targetLevelDb =
"targetLevelDb";
602 public static String objectName =
"discovery";
606 public static String objectName =
"magellan";
607 public static String enabled =
"enabled";
612 public static String objectName =
"ssdp";
613 public static String enabled =
"enabled";
614 public static String ageTimeoutMs =
"ageTimeoutMs";
615 public static String address =
"address";
620 public static String objectName =
"cistech";
621 public static String enabled =
"enabled";
622 public static String ageTimeoutMs =
"ageTimeoutMs";
623 public static String address =
"address";
628 public static String objectName =
"trellisware";
629 public static String enabled =
"enabled";
633 public static String dataDirectory =
"dataDirectory";
638 public static String
id =
"id";
639 public static String name =
"name";
640 public static String description =
"description";
641 public static String modPin =
"modPin";
642 public static String certStoreId =
"certStoreId";
643 public static String multicastFailoverPolicy =
"multicastFailoverPolicy";
648 public static String objectName =
"rallypoint";
649 public static String arrayName =
"rallypoints";
653 public static String objectName =
"host";
654 public static String address =
"address";
655 public static String port =
"port";
658 public static String certificate =
"certificate";
659 public static String certificateKey =
"certificateKey";
660 public static String verifyPeer =
"verifyPeer";
661 public static String allowSelfSignedCertificate =
"allowSelfSignedCertificate";
662 public static String transactionTimeoutMs =
"transactionTimeoutMs";
663 public static String connectionTimeoutSecs =
"connectionTimeoutSecs";
664 public static String disableMessageSigning =
"disableMessageSigning";
665 public static String use =
"use";
670 public static String objectName =
"address";
671 public static String address =
"address";
672 public static String port =
"port";
677 public static String objectName =
"rx";
678 public static String address =
"address";
679 public static String port =
"port";
684 public static String objectName =
"tx";
685 public static String address =
"address";
686 public static String port =
"port";
691 public static String objectName =
"rangerPackets";
692 public static String hangTimerSecs =
"hangTimerSecs";
693 public static String count =
"count";
698 public static String objectName =
"rtpProfile";
699 public static String mode =
"mode";
700 public static String jitterMaxMs =
"jitterMaxMs";
701 public static String jitterMinMs =
"jitterMinMs";
702 public static String jitterMaxFactor =
"jitterMaxFactor";
703 public static String latePacketSequenceRange =
"latePacketSequenceRange";
704 public static String latePacketTimestampRangeMs =
"latePacketTimestampRangeMs";
705 public static String jitterTrimPercentage =
"jitterTrimPercentage";
706 public static String jitterUnderrunReductionThresholdMs =
"jitterUnderrunReductionThresholdMs";
707 public static String jitterUnderrunReductionAger =
"jitterUnderrunReductionAger";
708 public static String jitterForceTrimAtMs =
"jitterForceTrimAtMs";
709 public static String jitterMaxTrimMs =
"jitterMaxTrimMs";
710 public static String jitterMaxExceededClipPerc =
"jitterMaxExceededClipPerc";
711 public static String jitterMaxExceededClipHangMs =
"jitterMaxExceededClipHangMs";
712 public static String inboundProcessorInactivityMs =
"inboundProcessorInactivityMs";
713 public static String rtcpPresenceTimeoutMs =
"rtcpPresenceTimeoutMs";
714 public static String zombieLifetimeMs =
"zombieLifetimeMs";
715 public static String signalledInboundProcessorInactivityMs =
"signalledInboundProcessorInactivityMs";
720 public static String objectName =
"group";
721 public static String arrayName =
"groups";
722 public static String
id =
"id";
723 public static String name =
"name";
724 public static String spokenName =
"spokenName";
725 public static String type =
"type";
726 public static String source =
"source";
727 public static String cryptoPassword =
"cryptoPassword";
728 public static String alias =
"alias";
729 public static String maxRxSecs =
"maxRxSecs";
730 public static String enableMulticastFailover =
"enableMulticastFailover";
731 public static String multicastFailoverSecs =
"multicastFailoverSecs";
732 public static String interfaceName =
"interfaceName";
733 public static String anonymousAlias =
"anonymousAlias";
734 public static String lbCrypto =
"lbCrypto";
735 public static String rtpProfile =
"rtpProfile";
736 public static String specializerAffinities =
"specializerAffinities";
737 public static String languageCode =
"languageCode";
741 public static String objectName =
"timeline";
742 public static String enabled =
"enabled";
747 public static String objectName =
"audio";
748 public static String inputId =
"inputId";
749 public static String outputId =
"outputId";
754 public static String objectName =
"priorityTranslation";
755 public static String priority =
"priority";
756 public static String rx =
"rx";
757 public static String tx =
"tx";
763 public static String objectName =
"txAudio";
764 public static String fdx =
"fdx";
765 public static String encoder =
"encoder";
766 public static String framingMs =
"framingMs";
767 public static String maxTxSecs =
"maxTxSecs";
768 public static String noHdrExt =
"noHdrExt";
769 public static String customRtpPayloadType =
"customRtpPayloadType";
770 public static String encoderName =
"encoderName";
771 public static String extensionSendInterval =
"extensionSendInterval";
772 public static String initialHeaderBurst =
"initialHeaderBurst";
773 public static String trailingHeaderBurst =
"initialHeaderBurst";
774 public static String enableSmoothing =
"enableSmoothing";
775 public static String dtx =
"dtx";
776 public static String smoothedHangTimeMs =
"smoothedHangTimeMs";
777 public static String resetRtpOnTx =
"resetRtpOnTx";
778 public static String startTxNotifications =
"startTxNotifications";
783 public static String objectName =
"txOptions";
784 public static String priority =
"priority";
785 public static String ttl =
"ttl";
790 public static String objectName =
"presence";
791 public static String format =
"format";
792 public static String intervalSecs =
"intervalSecs";
793 public static String listenOnly =
"listenOnly";
794 public static String minIntervalSecs =
"minIntervalSecs";
799 public static String objectName =
"presence";
800 public static String
self =
"self";
801 public static String comment =
"comment";
802 public static String custom =
"custom";
806 public static String arrayName =
"groupAliases";
807 public static String
id =
"groupId";
808 public static String alias =
"alias";
809 public static String status =
"status";
815 public static String objectName =
"identity";
816 public static String nodeId =
"nodeId";
817 public static String userId =
"userId";
818 public static String displayName =
"displayName";
819 public static String type =
"type";
820 public static String format =
"format";
821 public static String avatar =
"avatar";
826 public static String objectName =
"location";
827 public static String longitude =
"longitude";
828 public static String latitude =
"latitude";
829 public static String altitude =
"altitude";
830 public static String direction =
"direction";
831 public static String speed =
"speed";
836 public static String objectName =
"connectivity";
837 public static String type =
"type";
838 public static String strength =
"strength";
839 public static String rating =
"rating";
844 public static String objectName =
"power";
845 public static String source =
"source";
846 public static String state =
"state";
847 public static String level =
"level";
852 public static String objectName =
"rtpHeader";
853 public static String pt =
"pt";
854 public static String marker =
"marker";
855 public static String seq =
"seq";
856 public static String ssrc =
"ssrc";
857 public static String ts =
"ts";
862 public static String objectName =
"blobHeader";
863 public static String source =
"source";
864 public static String target =
"target";
865 public static String payloadType =
"payloadType";
866 public static String blobSize =
"size";
867 public static String rtpHeader =
"rtpHeader";
872 public static String objectName =
"descriptor";
873 public static String file =
"file";
874 public static String verified =
"verified";
875 public static String channels =
"channels";
876 public static String sampleCount =
"sampleCount";
877 public static String meta =
"meta";
878 public static String certificate =
"certificate";
879 public static String signature =
"signature";
886 public static String objectName =
"audio";
887 public static String ms =
"ms";
888 public static String samples =
"samples";
891 public static String objectName =
"event";
892 public static String alias =
"alias";
893 public static String direction =
"direction";
894 public static String ended =
"ended";
895 public static String groupId =
"groupId";
896 public static String
id =
"id";
897 public static String inProgress =
"inProgress";
898 public static String nodeId =
"nodeId";
899 public static String started =
"started";
900 public static String thisNodeId =
"thisNodeId";
901 public static String type =
"type";
902 public static String uri =
"uri";
903 public static String jsonAttachment =
"jsonAttachment";
904 public static String blobAttachment =
"blobAttachment";
909 public static String maxCount =
"maxCount";
910 public static String mostRecentFirst =
"mostRecentFirst";
911 public static String startedOnOrAfter =
"startedOnOrAfter";
912 public static String endedOnOrBefore =
"endedOnOrBefore";
913 public static String onlyDirection =
"onlyDirection";
914 public static String onlyType =
"onlyType";
915 public static String onlyCommitted =
"onlyCommitted";
916 public static String onlyAlias =
"onlyAlias";
917 public static String onlyNodeId =
"onlyNodeId";
918 public static String onlyTxId =
"onlyTxId";
919 public static String sql =
"sql";
924 public static String success =
"success";
925 public static String errorMessage =
"errorMessage";
926 public static String started =
"started";
927 public static String ended =
"ended";
928 public static String execMs =
"execMs";
929 public static String records =
"records";
930 public static String events =
"events";
931 public static String count =
"count";
935 #region Callback delegate types
936 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
937 private delegate
void EngageVoidCallback(
string eventExtraJson);
939 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
940 private delegate
void EngageStringCallback(
string s,
string eventExtraJson);
942 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
943 private delegate
void EngageString2Callback(
string s1,
string s2,
string eventExtraJson);
945 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
946 private delegate
void EngageStringAndIntCallback(
string s,
int i,
string eventExtraJson);
948 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
949 private delegate
void EngageString2AndInt2Callback(
string s,
int i1,
int i2,
string eventExtraJson);
951 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
952 private delegate
void EngageStringAndArgvCallback(
string s, IntPtr ptr,
string eventExtraJson);
954 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
955 private delegate
void EngageStringAndBlobCallback(
string s, IntPtr ptr,
int i,
string eventExtraJson);
957 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
958 private delegate
void EngageString2AndBlobCallback(
string s,
string j, IntPtr ptr,
int i,
string eventExtraJson);
960 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
961 private delegate
void EngageStringAndTwoIntCallback(
string s,
int i1,
int i2,
string eventExtraJson);
963 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
964 private delegate
void EngageLoggingCallback(
int level,
string tag,
string message);
968 [StructLayout(LayoutKind.Sequential, Pack = 1)]
971 [MarshalAs(UnmanagedType.ByValArray, SizeConst = ENGAGE_MAX_GROUP_ID_SZ)]
974 [MarshalAs(UnmanagedType.ByValArray, SizeConst = ENGAGE_MAX_GROUP_NAME_SZ)]
977 [MarshalAs(UnmanagedType.U1)]
978 public Boolean isEncrypted;
980 [MarshalAs(UnmanagedType.U1)]
981 public Boolean allowsFullDuplex;
984 [StructLayout(LayoutKind.Sequential, Pack = 1)]
987 public EngageVoidCallback PFN_ENGAGE_ENGINE_STARTED;
988 public EngageVoidCallback PFN_ENGAGE_ENGINE_STOPPED;
990 public EngageStringCallback PFN_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT;
991 public EngageStringCallback PFN_ENGAGE_RP_CONNECTING;
992 public EngageStringCallback PFN_ENGAGE_RP_CONNECTED;
993 public EngageStringCallback PFN_ENGAGE_RP_DISCONNECTED;
994 public EngageStringAndTwoIntCallback PFN_ENGAGE_RP_ROUNDTRIP_REPORT;
996 public EngageStringCallback PFN_ENGAGE_GROUP_CREATED;
997 public EngageStringCallback PFN_ENGAGE_GROUP_CREATE_FAILED;
998 public EngageStringCallback PFN_ENGAGE_GROUP_DELETED;
1000 public EngageStringCallback PFN_ENGAGE_GROUP_CONNECTED;
1001 public EngageStringCallback PFN_ENGAGE_GROUP_CONNECT_FAILED;
1002 public EngageStringCallback PFN_ENGAGE_GROUP_DISCONNECTED;
1004 public EngageStringCallback PFN_ENGAGE_GROUP_JOINED;
1005 public EngageStringCallback PFN_ENGAGE_GROUP_JOIN_FAILED;
1006 public EngageStringCallback PFN_ENGAGE_GROUP_LEFT;
1008 public EngageStringAndIntCallback PFN_ENGAGE_GROUP_MEMBER_COUNT_CHANGED;
1010 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_DISCOVERED;
1011 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_REDISCOVERED;
1012 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_UNDISCOVERED;
1014 public EngageStringCallback PFN_ENGAGE_GROUP_RX_STARTED;
1015 public EngageStringCallback PFN_ENGAGE_GROUP_RX_ENDED;
1016 public EngageString2Callback PFN_ENGAGE_GROUP_RX_SPEAKERS_CHANGED;
1017 public EngageStringCallback PFN_ENGAGE_GROUP_RX_MUTED;
1018 public EngageStringCallback PFN_ENGAGE_GROUP_RX_UNMUTED;
1020 public EngageStringCallback PFN_ENGAGE_GROUP_TX_STARTED;
1021 public EngageStringCallback PFN_ENGAGE_GROUP_TX_ENDED;
1022 public EngageStringCallback PFN_ENGAGE_GROUP_TX_FAILED;
1023 public EngageStringCallback PFN_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY;
1024 public EngageStringCallback PFN_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED;
1025 public EngageStringCallback PFN_ENGAGE_GROUP_TX_MUTED;
1026 public EngageStringCallback PFN_ENGAGE_GROUP_TX_UNMUTED;
1028 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_DISCOVERED;
1029 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_REDISCOVERED;
1030 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_UNDISCOVERED;
1032 public EngageVoidCallback PFN_ENGAGE_LICENSE_CHANGED;
1033 public EngageVoidCallback PFN_ENGAGE_LICENSE_EXPIRED;
1034 public EngageStringCallback PFN_ENGAGE_LICENSE_EXPIRING;
1036 public EngageStringCallback PFN_ENGAGE_GROUP_BLOB_SENT;
1037 public EngageStringCallback PFN_ENGAGE_GROUP_BLOB_SEND_FAILED;
1038 public EngageString2AndBlobCallback PFN_ENGAGE_GROUP_BLOB_RECEIVED;
1040 public EngageStringCallback PFN_ENGAGE_GROUP_RTP_SENT;
1041 public EngageStringCallback PFN_ENGAGE_GROUP_RTP_SEND_FAILED;
1042 public EngageString2AndBlobCallback PFN_ENGAGE_GROUP_RTP_RECEIVED;
1044 public EngageStringCallback PFN_ENGAGE_GROUP_RAW_SENT;
1045 public EngageStringCallback PFN_ENGAGE_GROUP_RAW_SEND_FAILED;
1046 public EngageStringAndBlobCallback PFN_ENGAGE_GROUP_RAW_RECEIVED;
1048 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_STARTED;
1049 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED;
1050 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_ENDED;
1051 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_REPORT;
1052 public EngageStringCallback PFN_ENGAGE_GROUP_TIMELINE_REPORT_FAILED;
1053 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_GROOMED;
1055 public EngageString2Callback PFN_ENGAGE_GROUP_HEALTH_REPORT;
1056 public EngageStringCallback PFN_ENGAGE_GROUP_HEALTH_REPORT_FAILED;
1058 public EngageStringCallback PFN_ENGAGE_BRIDGE_CREATED;
1059 public EngageStringCallback PFN_ENGAGE_BRIDGE_CREATE_FAILED;
1060 public EngageStringCallback PFN_ENGAGE_BRIDGE_DELETED;
1062 public EngageString2Callback PFN_ENGAGE_GROUP_STATS_REPORT;
1063 public EngageStringCallback PFN_ENGAGE_GROUP_STATS_REPORT_FAILED;
1065 public EngageString2AndInt2Callback PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED;
1066 public EngageString2Callback PFN_ENGAGE_GROUP_RX_DTMF;
1068 public EngageVoidCallback PFN_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED;
1070 public EngageStringCallback PFN_ENGAGE_GROUP_RECONFIGURED;
1071 public EngageStringCallback PFN_ENGAGE_GROUP_RECONFIGURATION_FAILED;
1073 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_STARTED;
1074 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_FAILED;
1075 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_ENDED;
1078 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1081 [MarshalAs(UnmanagedType.U1)]
1084 [MarshalAs(UnmanagedType.U4)]
1087 [MarshalAs(UnmanagedType.U1)]
1090 [MarshalAs(UnmanagedType.U1)]
1093 [MarshalAs(UnmanagedType.U1)]
1096 [MarshalAs(UnmanagedType.U1)]
1100 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1103 [MarshalAs(UnmanagedType.U1)]
1106 [MarshalAs(UnmanagedType.U1)]
1110 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1113 [MarshalAs(UnmanagedType.U1)]
1116 [MarshalAs(UnmanagedType.U2)]
1120 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1123 [MarshalAs(UnmanagedType.U1)]
1126 [MarshalAs(UnmanagedType.U4)]
1130 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1133 [MarshalAs(UnmanagedType.U1)]
1136 [MarshalAs(UnmanagedType.U8)]
1141 #region Library functions
1142 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1143 private static extern void engageWin32LibraryInit();
1145 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1146 private static extern void engageWin32LibraryDeinit();
1148 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1149 private static extern int engageRegisterEventCallbacks(ref
EngageEvents_t callbacks);
1151 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1152 private static extern int engageEnableNotifications(
int enable);
1154 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1155 private static extern int engageInitialize(
string enginePolicyConfiguration,
string userIdentity,
string tempStoragePath);
1157 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1158 private static extern int engageShutdown();
1160 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1161 private static extern int engageStart();
1163 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1164 private static extern int engageStop();
1166 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1167 private static extern int engageCreateGroup(
string jsonConfiguration);
1169 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1170 private static extern int engageDeleteGroup(
string id);
1172 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1173 private static extern int engageJoinGroup(
string id);
1175 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1176 private static extern int engageLeaveGroup(
string id);
1178 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1179 private static extern int engageSetGroupRules(
string id,
string jsonParams);
1181 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1182 private static extern int engageBeginGroupTx(
string id,
int txPriority,
int txFlags);
1184 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1185 private static extern int engageBeginGroupTxAdvanced(
string id,
string jsonParams);
1187 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1188 private static extern int engageEndGroupTx(
string id);
1190 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1191 private static extern int engageSetGroupRxTag(
string id,
int tag);
1193 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1194 private static extern int engageMuteGroupRx(
string id);
1196 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1197 private static extern int engageUnmuteGroupRx(
string id);
1199 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1200 private static extern int engageMuteGroupTx(
string id);
1202 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1203 private static extern int engageUnmuteGroupTx(
string id);
1205 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1206 private static extern int engageSetGroupRxVolume(
string id,
int left,
int right);
1208 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1209 private static extern IntPtr engageGetVersion();
1211 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1212 private static extern IntPtr engageGetHardwareReport();
1214 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1215 private static extern IntPtr engageGetActiveLicenseDescriptor();
1217 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1218 private static extern IntPtr engageGetLicenseDescriptor(
string entitlement,
string key,
string activationCode,
string manufacturerId);
1220 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1221 private static extern int engageUpdateLicense(
string entitlement,
string key,
string activationCode,
string manufacturerId);
1223 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1224 private static extern int engageUpdatePresenceDescriptor(
string id,
string jsonDescriptor,
int forceBeacon);
1226 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1227 private static extern int engageSendGroupBlob(
string id, IntPtr blob,
int blobSize,
string jsonBlobParams);
1229 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1230 private static extern int engageSendGroupRtp(
string id, IntPtr payload,
int payloadSize,
string jsonRtpHeader);
1232 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1233 private static extern int engageSendGroupRaw(
string id, IntPtr raw,
int rawSize,
string jsonRtpHeader);
1235 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1236 private static extern int engageQueryGroupTimeline(
string id,
string jsonParams);
1238 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1239 private static extern int engageSetLogLevel(
int level);
1241 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1242 private static extern int engageSetLogTagExtension(
string tagExtension);
1244 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1245 private static extern int engageSetLoggingOutputOverride(EngageLoggingCallback hookFn);
1247 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1248 private static extern int engageEnableSyslog(
int enable);
1250 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1251 private static extern int engageWatchdog(
int enable);
1253 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1254 private static extern int engageLogMsg(
int level,
string tag,
string msg);
1256 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1257 private static extern IntPtr engageGetNetworkInterfaceDevices();
1259 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1260 private static extern IntPtr engageGetAudioDevices();
1262 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1263 private static extern IntPtr engageGenerateMission(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName);
1265 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1266 private static extern IntPtr engageGenerateMissionUsingCertStore(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName,
string certStoreFn,
string certStorePasswordHexByteString,
string certStoreElement);
1268 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1269 private static extern int engageSetMissionId(
string missionId);
1271 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1272 private static extern int engageOpenCertStore(
string fileName,
string passwordHexByteString);
1274 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1275 private static extern IntPtr engageGetCertStoreDescriptor();
1277 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1278 private static extern int engageCloseCertStore();
1280 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1281 private static extern int engageSetCertStoreCertificatePem(
string id,
string certificatePem,
string privateKeyPem,
string tags);
1283 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1284 private static extern int engageSetCertStoreCertificateP12(
string id,IntPtr data,
int size,
string password,
string tags);
1286 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1287 private static extern int engageDeleteCertStoreCertificate(
string id);
1289 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1290 private static extern IntPtr engageGetCertStoreCertificatePem(
string id);
1292 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1293 private static extern IntPtr engageGetCertificateDescriptorFromPem(
string pem);
1295 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1296 private static extern IntPtr engageGetArrayOfCertificateDescriptorsFromPem(
string pem);
1298 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1299 private static extern int engageImportCertStoreElementFromCertStore(
string id,
string srcId,
string srcFileName,
string srcPasswordHexByteString,
string tags);
1301 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1302 private static extern IntPtr engageQueryCertStoreContents(
string fileName,
string passwordHexByteString);
1304 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1305 private static extern int engageQueryGroupHealth(
string id);
1307 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1308 private static extern int engageQueryGroupStats(
string id);
1310 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1311 private static extern int engageCreateBridge(
string jsonConfiguration);
1313 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1314 private static extern int engageDeleteBridge(
string id);
1316 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1317 private static extern int engageEncrypt(IntPtr src,
int size, IntPtr dst,
string passwordHexByteString);
1319 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1320 private static extern int engageDecrypt(IntPtr src,
int size, IntPtr dst,
string passwordHexByteString);
1322 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1323 private static extern int engagePlatformNotifyChanges(
string jsonChangesArray);
1325 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1326 private static extern IntPtr engageBeginFileRecording(
string jsonParams);
1328 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1329 private static extern IntPtr engageEndFileRecording(
string id);
1337 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1338 private static extern int engageSetFipsCrypto(
string jsonParams);
1340 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1341 private static extern int engageIsCryptoFipsValidated();
1343 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1344 private static extern IntPtr engageGetDeviceId();
1346 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1347 private static extern int engageSetCertStore(IntPtr buff,
int size,
string passwordHexByteString);
1349 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1350 private static extern int engageVerifyRiff(
string fn);
1352 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1353 private static extern IntPtr engageGetRiffDescriptor(
string fn);
1357 #region Internal functions
1358 private static string[] stringArrayFromArgvStrPtrArray(IntPtr ptr)
1369 strPtr = Marshal.ReadIntPtr(arrayPtr);
1370 if (strPtr == (IntPtr)0)
1376 arrayPtr += Marshal.SizeOf(arrayPtr);
1382 rc =
new string[count];
1388 strPtr = Marshal.ReadIntPtr(arrayPtr);
1389 if (strPtr == (IntPtr)0)
1394 rc[idx] = Marshal.PtrToStringAnsi(strPtr);
1396 arrayPtr += Marshal.SizeOf(arrayPtr);
1404 private int registerEventCallbacks()
1408 cb.PFN_ENGAGE_ENGINE_STARTED = on_ENGAGE_ENGINE_STARTED;
1409 cb.PFN_ENGAGE_ENGINE_STOPPED = on_ENGAGE_ENGINE_STOPPED;
1410 cb.PFN_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED = on_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED;
1412 cb.PFN_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT = on_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT;
1413 cb.PFN_ENGAGE_RP_CONNECTING = on_ENGAGE_RP_CONNECTING;
1414 cb.PFN_ENGAGE_RP_CONNECTED = on_ENGAGE_RP_CONNECTED;
1415 cb.PFN_ENGAGE_RP_DISCONNECTED = on_ENGAGE_RP_DISCONNECTED;
1416 cb.PFN_ENGAGE_RP_ROUNDTRIP_REPORT = on_ENGAGE_RP_ROUNDTRIP_REPORT;
1418 cb.PFN_ENGAGE_GROUP_CREATED = on_ENGAGE_GROUP_CREATED;
1419 cb.PFN_ENGAGE_GROUP_CREATE_FAILED = on_ENGAGE_GROUP_CREATE_FAILED;
1420 cb.PFN_ENGAGE_GROUP_DELETED = on_ENGAGE_GROUP_DELETED;
1422 cb.PFN_ENGAGE_GROUP_CONNECTED = on_ENGAGE_GROUP_CONNECTED;
1423 cb.PFN_ENGAGE_GROUP_CONNECT_FAILED = on_ENGAGE_GROUP_CONNECT_FAILED;
1424 cb.PFN_ENGAGE_GROUP_DISCONNECTED = on_ENGAGE_GROUP_DISCONNECTED;
1426 cb.PFN_ENGAGE_GROUP_JOINED = on_ENGAGE_GROUP_JOINED;
1427 cb.PFN_ENGAGE_GROUP_JOIN_FAILED = on_ENGAGE_GROUP_JOIN_FAILED;
1428 cb.PFN_ENGAGE_GROUP_LEFT = on_ENGAGE_GROUP_LEFT;
1431 cb.PFN_ENGAGE_GROUP_MEMBER_COUNT_CHANGED =
null;
1434 cb.PFN_ENGAGE_GROUP_RX_STARTED = on_ENGAGE_GROUP_RX_STARTED;
1435 cb.PFN_ENGAGE_GROUP_RX_ENDED = on_ENGAGE_GROUP_RX_ENDED;
1437 cb.PFN_ENGAGE_GROUP_RX_MUTED = on_ENGAGE_GROUP_RX_MUTED;
1438 cb.PFN_ENGAGE_GROUP_RX_UNMUTED = on_ENGAGE_GROUP_RX_UNMUTED;
1440 cb.PFN_ENGAGE_GROUP_TX_MUTED = on_ENGAGE_GROUP_TX_MUTED;
1441 cb.PFN_ENGAGE_GROUP_TX_UNMUTED = on_ENGAGE_GROUP_TX_UNMUTED;
1443 cb.PFN_ENGAGE_GROUP_RX_SPEAKERS_CHANGED = on_ENGAGE_GROUP_RX_SPEAKERS_CHANGED;
1445 cb.PFN_ENGAGE_GROUP_TX_STARTED = on_ENGAGE_GROUP_TX_STARTED;
1446 cb.PFN_ENGAGE_GROUP_TX_ENDED = on_ENGAGE_GROUP_TX_ENDED;
1447 cb.PFN_ENGAGE_GROUP_TX_FAILED = on_ENGAGE_GROUP_TX_FAILED;
1448 cb.PFN_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY = on_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY;
1449 cb.PFN_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED = on_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED;
1451 cb.PFN_ENGAGE_GROUP_NODE_DISCOVERED = on_ENGAGE_GROUP_NODE_DISCOVERED;
1452 cb.PFN_ENGAGE_GROUP_NODE_REDISCOVERED = on_ENGAGE_GROUP_NODE_REDISCOVERED;
1453 cb.PFN_ENGAGE_GROUP_NODE_UNDISCOVERED = on_ENGAGE_GROUP_NODE_UNDISCOVERED;
1455 cb.PFN_ENGAGE_GROUP_ASSET_DISCOVERED = on_ENGAGE_GROUP_ASSET_DISCOVERED;
1456 cb.PFN_ENGAGE_GROUP_ASSET_REDISCOVERED = on_ENGAGE_GROUP_ASSET_REDISCOVERED;
1457 cb.PFN_ENGAGE_GROUP_ASSET_UNDISCOVERED = on_ENGAGE_GROUP_ASSET_UNDISCOVERED;
1459 cb.PFN_ENGAGE_LICENSE_CHANGED = on_ENGAGE_LICENSE_CHANGED;
1460 cb.PFN_ENGAGE_LICENSE_EXPIRED = on_ENGAGE_LICENSE_EXPIRED;
1461 cb.PFN_ENGAGE_LICENSE_EXPIRING = on_ENGAGE_LICENSE_EXPIRING;
1463 cb.PFN_ENGAGE_GROUP_BLOB_SENT = on_ENGAGE_GROUP_BLOB_SENT;
1464 cb.PFN_ENGAGE_GROUP_BLOB_SEND_FAILED = on_ENGAGE_GROUP_BLOB_SEND_FAILED;
1465 cb.PFN_ENGAGE_GROUP_BLOB_RECEIVED = on_ENGAGE_GROUP_BLOB_RECEIVED;
1467 cb.PFN_ENGAGE_GROUP_RTP_SENT = on_ENGAGE_GROUP_RTP_SENT;
1468 cb.PFN_ENGAGE_GROUP_RTP_SEND_FAILED = on_ENGAGE_GROUP_RTP_SEND_FAILED;
1469 cb.PFN_ENGAGE_GROUP_RTP_RECEIVED = on_ENGAGE_GROUP_RTP_RECEIVED;
1471 cb.PFN_ENGAGE_GROUP_RAW_SENT = on_ENGAGE_GROUP_RAW_SENT;
1472 cb.PFN_ENGAGE_GROUP_RAW_SEND_FAILED = on_ENGAGE_GROUP_RAW_SEND_FAILED;
1473 cb.PFN_ENGAGE_GROUP_RAW_RECEIVED = on_ENGAGE_GROUP_RAW_RECEIVED;
1475 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_STARTED = on_ENGAGE_GROUP_TIMELINE_EVENT_STARTED;
1476 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED = on_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED;
1477 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_ENDED = on_ENGAGE_GROUP_TIMELINE_EVENT_ENDED;
1479 cb.PFN_ENGAGE_GROUP_TIMELINE_REPORT = on_ENGAGE_GROUP_TIMELINE_REPORT;
1480 cb.PFN_ENGAGE_GROUP_TIMELINE_REPORT_FAILED = on_ENGAGE_GROUP_TIMELINE_REPORT_FAILED;
1481 cb.PFN_ENGAGE_GROUP_TIMELINE_GROOMED = on_ENGAGE_GROUP_TIMELINE_GROOMED;
1483 cb.PFN_ENGAGE_GROUP_HEALTH_REPORT = on_ENGAGE_GROUP_HEALTH_REPORT;
1484 cb.PFN_ENGAGE_GROUP_HEALTH_REPORT_FAILED = on_ENGAGE_GROUP_HEALTH_REPORT_FAILED;
1486 cb.PFN_ENGAGE_BRIDGE_CREATED = on_ENGAGE_BRIDGE_CREATED;
1487 cb.PFN_ENGAGE_BRIDGE_CREATE_FAILED = on_ENGAGE_BRIDGE_CREATE_FAILED;
1488 cb.PFN_ENGAGE_BRIDGE_DELETED = on_ENGAGE_BRIDGE_DELETED;
1490 cb.PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED = on_ENGAGE_GROUP_RX_VOLUME_CHANGED;
1491 cb.PFN_ENGAGE_GROUP_RX_DTMF = on_ENGAGE_GROUP_RX_DTMF;
1493 cb.PFN_ENGAGE_GROUP_RECONFIGURED = on_ENGAGE_GROUP_RECONFIGURED;
1494 cb.PFN_ENGAGE_GROUP_RECONFIGURATION_FAILED = on_ENGAGE_GROUP_RECONFIGURATION_FAILED;
1496 cb.PFN_ENGAGE_AUDIO_RECORDING_STARTED = on_ENGAGE_AUDIO_RECORDING_STARTED;
1497 cb.PFN_ENGAGE_AUDIO_RECORDING_FAILED = on_ENGAGE_AUDIO_RECORDING_FAILED;
1498 cb.PFN_ENGAGE_AUDIO_RECORDING_ENDED = on_ENGAGE_AUDIO_RECORDING_ENDED;
1500 return engageRegisterEventCallbacks(ref cb);
1503 private string makeUserJsonConfiguration(
string alias,
string displayName,
int txPriority)
1505 StringBuilder sb =
new StringBuilder();
1510 string myAlias = alias;
1511 string myDisplayName = displayName;
1512 int myTransmitPirority = txPriority;
1514 if (myAlias ==
null || myAlias.Length == 0)
1516 myAlias = String.Format(
"C#{0:X14}",
new Random().Next());
1519 if (myDisplayName ==
null || myDisplayName.Length == 0)
1521 myDisplayName =
"C# User " + myAlias;
1524 if(myTransmitPirority < 0)
1526 myTransmitPirority = 0;
1530 sb.Append(
"\"alias\":");
1531 sb.Append(
"\"" + myAlias +
"\"");
1533 sb.Append(
",\"displayName\":");
1534 sb.Append(
"\"" + myDisplayName +
"\"");
1536 sb.Append(
",\"txPriority\":");
1537 sb.Append(myTransmitPirority);
1540 return sb.ToString();
1544 #region Member variables
1545 private static List<IEngineNotifications> _engineNotificationSubscribers =
new List<IEngineNotifications>();
1546 private static List<IRallypointNotifications> _rallypointNotificationSubscribers =
new List<IRallypointNotifications>();
1547 private static List<IGroupNotifications> _groupNotificationSubscribers =
new List<IGroupNotifications>();
1548 private static List<ILicenseNotifications> _licenseNotificationSubscribers =
new List<ILicenseNotifications>();
1549 private static List<IHumanBiometricsNotifications> _humanBiometricsNotifications =
new List<IHumanBiometricsNotifications>();
1550 private static List<IBridgeNotifications> _bridgeNotificationSubscribers =
new List<IBridgeNotifications>();
1551 private static List<ILoggingNotifications> _loggingNotificationSubscribers =
new List<ILoggingNotifications>();
1552 private static List<IAudioRecordingNotifications> _audioRecordingNotificationSubscribers =
new List<IAudioRecordingNotifications>();
1555 #region Callback delegates
1556 private EngageVoidCallback on_ENGAGE_ENGINE_STARTED = (
string eventExtraJson) =>
1558 lock (_engineNotificationSubscribers)
1560 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1562 n.onEngineStarted(eventExtraJson);
1567 private EngageVoidCallback on_ENGAGE_ENGINE_STOPPED = (
string eventExtraJson) =>
1569 lock (_engineNotificationSubscribers)
1571 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1573 n.onEngineStopped(eventExtraJson);
1578 private EngageVoidCallback on_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED = (
string eventExtraJson) =>
1580 lock (_engineNotificationSubscribers)
1582 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1584 n.onEngineAudioDevicesRefreshed(eventExtraJson);
1589 private EngageStringCallback on_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT = (
string id,
string eventExtraJson) =>
1591 lock (_rallypointNotificationSubscribers)
1593 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1595 n.onRallypointPausingConnectionAttempt(
id, eventExtraJson);
1600 private EngageStringCallback on_ENGAGE_RP_CONNECTING = (
string id,
string eventExtraJson) =>
1602 lock (_rallypointNotificationSubscribers)
1604 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1606 n.onRallypointConnecting(
id, eventExtraJson);
1611 private EngageStringCallback on_ENGAGE_RP_CONNECTED = (
string id,
string eventExtraJson) =>
1613 lock (_rallypointNotificationSubscribers)
1615 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1617 n.onRallypointConnected(
id, eventExtraJson);
1622 private EngageStringCallback on_ENGAGE_RP_DISCONNECTED = (
string id,
string eventExtraJson) =>
1624 lock (_rallypointNotificationSubscribers)
1626 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1628 n.onRallypointDisconnected(
id, eventExtraJson);
1633 private EngageStringAndTwoIntCallback on_ENGAGE_RP_ROUNDTRIP_REPORT = (
string id,
int rtMs,
int rtRating,
string eventExtraJson) =>
1635 lock (_rallypointNotificationSubscribers)
1637 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1639 n.onRallypointRoundtripReport(
id, rtMs, rtRating, eventExtraJson);
1644 private EngageLoggingCallback on_ENGAGE_LOG_MESSAGE_HOOK_CALLBACK = (
int level,
string tag,
string message) =>
1646 lock (_loggingNotificationSubscribers)
1648 foreach (ILoggingNotifications n
in _loggingNotificationSubscribers)
1650 n.onEngageLogMessage(level, tag, message);
1656 private EngageStringCallback on_ENGAGE_GROUP_CREATED = (
string id,
string eventExtraJson) =>
1658 lock (_groupNotificationSubscribers)
1660 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1662 n.onGroupCreated(
id, eventExtraJson);
1667 private EngageStringCallback on_ENGAGE_GROUP_CREATE_FAILED = (
string id,
string eventExtraJson) =>
1669 lock (_groupNotificationSubscribers)
1671 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1673 n.onGroupCreateFailed(
id, eventExtraJson);
1678 private EngageStringCallback on_ENGAGE_GROUP_DELETED = (
string id,
string eventExtraJson) =>
1680 lock (_groupNotificationSubscribers)
1682 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1684 n.onGroupDeleted(
id, eventExtraJson);
1689 private EngageStringCallback on_ENGAGE_GROUP_CONNECTED = (
string id,
string eventExtraJson) =>
1691 lock (_groupNotificationSubscribers)
1693 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1695 n.onGroupConnected(
id, eventExtraJson);
1700 private EngageStringCallback on_ENGAGE_GROUP_CONNECT_FAILED = (
string id,
string eventExtraJson) =>
1702 lock (_groupNotificationSubscribers)
1704 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1706 n.onGroupConnectFailed(
id, eventExtraJson);
1711 private EngageStringCallback on_ENGAGE_GROUP_DISCONNECTED = (
string id,
string eventExtraJson) =>
1713 lock (_groupNotificationSubscribers)
1715 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1717 n.onGroupDisconnected(
id, eventExtraJson);
1722 private EngageStringCallback on_ENGAGE_GROUP_JOINED = (
string id,
string eventExtraJson) =>
1724 lock (_groupNotificationSubscribers)
1726 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1728 n.onGroupJoined(
id, eventExtraJson);
1733 private EngageStringCallback on_ENGAGE_GROUP_JOIN_FAILED = (
string id,
string eventExtraJson) =>
1735 lock (_groupNotificationSubscribers)
1737 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1739 n.onGroupJoinFailed(
id, eventExtraJson);
1744 private EngageStringCallback on_ENGAGE_GROUP_LEFT = (
string id,
string eventExtraJson) =>
1746 lock (_groupNotificationSubscribers)
1748 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1750 n.onGroupLeft(
id, eventExtraJson);
1755 private EngageStringAndIntCallback on_ENGAGE_GROUP_MEMBER_COUNT_CHANGED = (
string id,
int newCount,
string eventExtraJson) =>
1757 lock (_groupNotificationSubscribers)
1759 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1761 n.onGroupMemberCountChanged(
id, newCount, eventExtraJson);
1766 private EngageStringCallback on_ENGAGE_GROUP_RX_STARTED = (
string id,
string eventExtraJson) =>
1768 lock (_groupNotificationSubscribers)
1770 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1772 n.onGroupRxStarted(
id, eventExtraJson);
1777 private EngageStringCallback on_ENGAGE_GROUP_RX_ENDED = (
string id,
string eventExtraJson) =>
1779 lock (_groupNotificationSubscribers)
1781 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1783 n.onGroupRxEnded(
id, eventExtraJson);
1788 private EngageStringCallback on_ENGAGE_GROUP_RX_MUTED = (
string id,
string eventExtraJson) =>
1790 lock (_groupNotificationSubscribers)
1792 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1794 n.onGroupRxMuted(
id, eventExtraJson);
1799 private EngageStringCallback on_ENGAGE_GROUP_RX_UNMUTED = (
string id,
string eventExtraJson) =>
1801 lock (_groupNotificationSubscribers)
1803 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1805 n.onGroupRxUnmuted(
id, eventExtraJson);
1810 private EngageStringCallback on_ENGAGE_GROUP_TX_MUTED = (
string id,
string eventExtraJson) =>
1812 lock (_groupNotificationSubscribers)
1814 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1816 n.onGroupTxMuted(
id, eventExtraJson);
1821 private EngageStringCallback on_ENGAGE_GROUP_TX_UNMUTED = (
string id,
string eventExtraJson) =>
1823 lock (_groupNotificationSubscribers)
1825 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1827 n.onGroupTxUnmuted(
id, eventExtraJson);
1832 private EngageString2Callback on_ENGAGE_GROUP_RX_SPEAKERS_CHANGED = (
string id,
string speakerjson,
string eventExtraJson) =>
1834 lock (_groupNotificationSubscribers)
1836 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1838 n.onGroupRxSpeakersChanged(
id, speakerjson, eventExtraJson);
1843 private EngageStringCallback on_ENGAGE_GROUP_TX_STARTED = (
string id,
string eventExtraJson) =>
1845 lock (_groupNotificationSubscribers)
1847 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1849 n.onGroupTxStarted(
id, eventExtraJson);
1854 private EngageStringCallback on_ENGAGE_GROUP_TX_ENDED = (
string id,
string eventExtraJson) =>
1856 lock (_groupNotificationSubscribers)
1858 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1860 n.onGroupTxEnded(
id, eventExtraJson);
1865 private EngageStringCallback on_ENGAGE_GROUP_TX_FAILED = (
string id,
string eventExtraJson) =>
1867 lock (_groupNotificationSubscribers)
1869 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1871 n.onGroupTxFailed(
id, eventExtraJson);
1876 private EngageStringCallback on_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY = (
string id,
string eventExtraJson) =>
1878 lock (_groupNotificationSubscribers)
1880 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1882 n.onGroupTxUsurpedByPriority(
id, eventExtraJson);
1887 private EngageStringCallback on_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED = (
string id,
string eventExtraJson) =>
1889 lock (_groupNotificationSubscribers)
1891 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1893 n.onGroupMaxTxTimeExceeded(
id, eventExtraJson);
1898 private EngageString2Callback on_ENGAGE_GROUP_NODE_DISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1900 lock (_groupNotificationSubscribers)
1902 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1904 n.onGroupNodeDiscovered(
id, nodeJson, eventExtraJson);
1909 private EngageString2Callback on_ENGAGE_GROUP_NODE_REDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1911 lock (_groupNotificationSubscribers)
1913 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1915 n.onGroupNodeRediscovered(
id, nodeJson, eventExtraJson);
1920 private EngageString2Callback on_ENGAGE_GROUP_NODE_UNDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1922 lock (_groupNotificationSubscribers)
1924 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1926 n.onGroupNodeUndiscovered(
id, nodeJson, eventExtraJson);
1931 private EngageString2Callback on_ENGAGE_GROUP_ASSET_DISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1933 lock (_groupNotificationSubscribers)
1935 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1937 n.onGroupAssetDiscovered(
id, nodeJson, eventExtraJson);
1942 private EngageString2Callback on_ENGAGE_GROUP_ASSET_REDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1944 lock (_groupNotificationSubscribers)
1946 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1948 n.onGroupAssetRediscovered(
id, nodeJson, eventExtraJson);
1953 private EngageString2Callback on_ENGAGE_GROUP_ASSET_UNDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1955 lock (_groupNotificationSubscribers)
1957 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1959 n.onGroupAssetUndiscovered(
id, nodeJson, eventExtraJson);
1964 private EngageVoidCallback on_ENGAGE_LICENSE_CHANGED = (
string eventExtraJson) =>
1966 lock (_licenseNotificationSubscribers)
1968 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
1970 n.onLicenseChanged(eventExtraJson);
1975 private EngageVoidCallback on_ENGAGE_LICENSE_EXPIRED = (
string eventExtraJson) =>
1977 lock (_licenseNotificationSubscribers)
1979 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
1981 n.onLicenseExpired(eventExtraJson);
1986 private EngageStringCallback on_ENGAGE_LICENSE_EXPIRING = (
string secondsLeft,
string eventExtraJson) =>
1988 lock (_licenseNotificationSubscribers)
1990 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
1992 n.onLicenseExpiring(Double.Parse(secondsLeft), eventExtraJson);
1997 private EngageStringCallback on_ENGAGE_GROUP_BLOB_SENT = (
string id,
string eventExtraJson) =>
1999 lock (_groupNotificationSubscribers)
2001 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2003 n.onGroupBlobSent(
id, eventExtraJson);
2008 private EngageStringCallback on_ENGAGE_GROUP_BLOB_SEND_FAILED = (
string id,
string eventExtraJson) =>
2010 lock (_groupNotificationSubscribers)
2012 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2014 n.onGroupBlobSendFailed(
id, eventExtraJson);
2019 private EngageString2AndBlobCallback on_ENGAGE_GROUP_BLOB_RECEIVED = (
string id,
string blobInfoJson, IntPtr blob,
int blobSize,
string eventExtraJson) =>
2021 byte[] csBlob =
new byte[blobSize];
2022 Marshal.Copy(blob, csBlob, 0, blobSize);
2024 lock (_groupNotificationSubscribers)
2026 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2028 n.onGroupBlobReceived(
id, blobInfoJson, csBlob, blobSize, eventExtraJson);
2033 JObject blobInfo = JObject.Parse(blobInfoJson);
2034 if(blobInfo !=
null)
2036 int payloadType = (int)blobInfo[
"payloadType"];
2037 string nodeId = (string)blobInfo[
"source"];
2040 if (payloadType ==
Engage.ENGAGE_BLOB_PT_ENGAGE_BINARY_HUMAN_BIOMETRICS)
2042 lock (_humanBiometricsNotifications)
2044 if (_humanBiometricsNotifications.Count > 0)
2047 string hbmJson = humanBiometricsFromBlob(csBlob);
2049 if (hbmJson !=
null)
2051 foreach (IHumanBiometricsNotifications n
in _humanBiometricsNotifications)
2053 n.onHumanBiometricsReceived(
id, nodeId, hbmJson, eventExtraJson);
2062 private EngageStringCallback on_ENGAGE_GROUP_RTP_SENT = (
string id,
string eventExtraJson) =>
2064 lock (_groupNotificationSubscribers)
2066 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2068 n.onGroupRtpSent(
id, eventExtraJson);
2073 private EngageStringCallback on_ENGAGE_GROUP_RTP_SEND_FAILED = (
string id,
string eventExtraJson) =>
2075 lock (_groupNotificationSubscribers)
2077 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2079 n.onGroupRtpSendFailed(
id, eventExtraJson);
2084 private EngageString2AndBlobCallback on_ENGAGE_GROUP_RTP_RECEIVED = (
string id,
string rtpHeaderJson, IntPtr payload,
int payloadSize,
string eventExtraJson) =>
2086 lock (_groupNotificationSubscribers)
2088 byte[] csPayload =
new byte[payloadSize];
2089 Marshal.Copy(payload, csPayload, 0, payloadSize);
2091 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2093 n.onGroupRtpReceived(
id, rtpHeaderJson, csPayload, payloadSize, eventExtraJson);
2098 private EngageStringCallback on_ENGAGE_GROUP_RAW_SENT = (
string id,
string eventExtraJson) =>
2100 lock (_groupNotificationSubscribers)
2102 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2104 n.onGroupRawSent(
id, eventExtraJson);
2109 private EngageStringCallback on_ENGAGE_GROUP_RAW_SEND_FAILED = (
string id,
string eventExtraJson) =>
2111 lock (_groupNotificationSubscribers)
2113 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2115 n.onGroupRawSendFailed(
id, eventExtraJson);
2120 private EngageStringAndBlobCallback on_ENGAGE_GROUP_RAW_RECEIVED = (
string id, IntPtr raw,
int rawSize,
string eventExtraJson) =>
2122 lock (_groupNotificationSubscribers)
2124 byte[] csRaw =
new byte[rawSize];
2125 Marshal.Copy(raw, csRaw, 0, rawSize);
2127 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2129 n.onGroupRawReceived(
id, csRaw, rawSize, eventExtraJson);
2134 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_STARTED = (
string id,
string eventJson,
string eventExtraJson) =>
2136 lock (_groupNotificationSubscribers)
2138 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2140 n.onGroupTimelineEventStarted(
id, eventJson, eventExtraJson);
2145 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED = (
string id,
string eventJson,
string eventExtraJson) =>
2147 lock (_groupNotificationSubscribers)
2149 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2151 n.onGroupTimelineEventUpdated(
id, eventJson, eventExtraJson);
2156 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_ENDED = (
string id,
string eventJson,
string eventExtraJson) =>
2158 lock (_groupNotificationSubscribers)
2160 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2162 n.onGroupTimelineEventEnded(
id, eventJson, eventExtraJson);
2167 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_REPORT = (
string id,
string reportJson,
string eventExtraJson) =>
2169 lock (_groupNotificationSubscribers)
2171 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2173 n.onGroupTimelineReport(
id, reportJson, eventExtraJson);
2178 private EngageStringCallback on_ENGAGE_GROUP_TIMELINE_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2180 lock (_groupNotificationSubscribers)
2182 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2184 n.onGroupTimelineReportFailed(
id, eventExtraJson);
2189 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_GROOMED = (
string id,
string eventListJson,
string eventExtraJson) =>
2191 lock (_groupNotificationSubscribers)
2193 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2195 n.onGroupTimelineGroomed(
id, eventListJson, eventExtraJson);
2200 private EngageString2Callback on_ENGAGE_GROUP_HEALTH_REPORT = (
string id,
string healthReportJson,
string eventExtraJson) =>
2202 lock (_groupNotificationSubscribers)
2204 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2206 n.onGroupHealthReport(
id, healthReportJson, eventExtraJson);
2211 private EngageStringCallback on_ENGAGE_GROUP_HEALTH_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2213 lock (_groupNotificationSubscribers)
2215 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2217 n.onGroupHealthReportFailed(
id, eventExtraJson);
2222 private EngageString2Callback on_ENGAGE_GROUP_STATS_REPORT = (
string id,
string statsReportJson,
string eventExtraJson) =>
2224 lock (_groupNotificationSubscribers)
2226 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2228 n.onGroupStatsReport(
id, statsReportJson, eventExtraJson);
2233 private EngageStringCallback on_ENGAGE_GROUP_STATS_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2235 lock (_groupNotificationSubscribers)
2237 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2239 n.onGroupStatsReportFailed(
id, eventExtraJson);
2244 private EngageStringCallback on_ENGAGE_BRIDGE_CREATED = (
string id,
string eventExtraJson) =>
2246 lock (_bridgeNotificationSubscribers)
2248 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2250 n.onBridgeCreated(
id, eventExtraJson);
2255 private EngageStringCallback on_ENGAGE_BRIDGE_CREATE_FAILED = (
string id,
string eventExtraJson) =>
2257 lock (_bridgeNotificationSubscribers)
2259 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2261 n.onBridgeCreateFailed(
id, eventExtraJson);
2266 private EngageStringCallback on_ENGAGE_BRIDGE_DELETED = (
string id,
string eventExtraJson) =>
2268 lock (_bridgeNotificationSubscribers)
2270 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2272 n.onBridgeDeleted(
id, eventExtraJson);
2277 private EngageString2AndInt2Callback on_ENGAGE_GROUP_RX_VOLUME_CHANGED = (
string id,
int leftLevelPerc,
int rightLevelPerc,
string eventExtraJson) =>
2279 lock (_groupNotificationSubscribers)
2281 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2283 n.onGroupRxVolumeChanged(
id, leftLevelPerc, rightLevelPerc, eventExtraJson);
2288 private EngageString2Callback on_ENGAGE_GROUP_RX_DTMF = (
string id,
string dtmfJson,
string eventExtraJson) =>
2290 lock (_groupNotificationSubscribers)
2292 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2294 n.onGroupRxDtmf(
id, dtmfJson, eventExtraJson);
2299 private EngageStringCallback on_ENGAGE_GROUP_RECONFIGURED = (
string id,
string eventExtraJson) =>
2301 lock (_groupNotificationSubscribers)
2303 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2305 n.onGroupReconfigured(
id, eventExtraJson);
2310 private EngageStringCallback on_ENGAGE_GROUP_RECONFIGURATION_FAILED = (
string id,
string eventExtraJson) =>
2312 lock (_groupNotificationSubscribers)
2314 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2316 n.onGroupReconfigurationFailed(
id, eventExtraJson);
2321 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_STARTED = (
string id,
string eventExtraJson) =>
2323 lock (_groupNotificationSubscribers)
2325 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2327 n.onGroupAudioRecordingStarted(
id, eventExtraJson);
2332 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_FAILED = (
string id,
string eventExtraJson) =>
2334 lock (_groupNotificationSubscribers)
2336 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2338 n.onGroupAudioRecordingFailed(
id, eventExtraJson);
2343 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_ENDED = (
string id,
string eventExtraJson) =>
2345 lock (_groupNotificationSubscribers)
2347 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2349 n.onGroupAudioRecordingEnded(
id, eventExtraJson);
2356 #region Public functions
2359 engageEnableNotifications(0);
2360 engageWin32LibraryInit();
2361 engageEnableNotifications(1);
2366 engageEnableNotifications(0);
2368 engageWin32LibraryDeinit();
2371 public void subscribe(IEngineNotifications n)
2373 lock(_engineNotificationSubscribers)
2375 _engineNotificationSubscribers.Add(n);
2379 public void unsubscribe(IEngineNotifications n)
2381 lock (_engineNotificationSubscribers)
2383 _engineNotificationSubscribers.Remove(n);
2387 public void subscribe(IRallypointNotifications n)
2389 lock (_rallypointNotificationSubscribers)
2391 _rallypointNotificationSubscribers.Add(n);
2395 public void unsubscribe(IRallypointNotifications n)
2397 lock (_rallypointNotificationSubscribers)
2399 _rallypointNotificationSubscribers.Remove(n);
2403 public void subscribe(IGroupNotifications n)
2405 lock (_groupNotificationSubscribers)
2407 _groupNotificationSubscribers.Add(n);
2411 public void unsubscribe(IGroupNotifications n)
2413 lock (_groupNotificationSubscribers)
2415 _groupNotificationSubscribers.Remove(n);
2419 public void subscribe(ILicenseNotifications n)
2421 lock (_licenseNotificationSubscribers)
2423 _licenseNotificationSubscribers.Add(n);
2427 public void unsubscribe(ILicenseNotifications n)
2429 lock (_licenseNotificationSubscribers)
2431 _licenseNotificationSubscribers.Remove(n);
2435 public void subscribe(IHumanBiometricsNotifications n)
2437 lock (_humanBiometricsNotifications)
2439 _humanBiometricsNotifications.Add(n);
2443 public void unsubscribe(IHumanBiometricsNotifications n)
2445 lock (_humanBiometricsNotifications)
2447 _humanBiometricsNotifications.Remove(n);
2451 public void subscribe(IBridgeNotifications n)
2453 lock (_bridgeNotificationSubscribers)
2455 _bridgeNotificationSubscribers.Add(n);
2459 public void unsubscribe(IBridgeNotifications n)
2461 lock (_bridgeNotificationSubscribers)
2463 _bridgeNotificationSubscribers.Remove(n);
2467 public void subscribe(ILoggingNotifications n)
2469 lock (_loggingNotificationSubscribers)
2471 _loggingNotificationSubscribers.Add(n);
2473 if(_loggingNotificationSubscribers.Count() == 1)
2475 engageSetLoggingOutputOverride(on_ENGAGE_LOG_MESSAGE_HOOK_CALLBACK);
2480 public void unsubscribe(ILoggingNotifications n)
2482 lock (_loggingNotificationSubscribers)
2484 _loggingNotificationSubscribers.Remove(n);
2486 if(_loggingNotificationSubscribers.Count() == 0)
2488 engageSetLoggingOutputOverride(
null);
2493 public void subscribe(IAudioRecordingNotifications n)
2495 lock (_audioRecordingNotificationSubscribers)
2497 _audioRecordingNotificationSubscribers.Add(n);
2501 public void unsubscribe(IAudioRecordingNotifications n)
2503 lock (_audioRecordingNotificationSubscribers)
2505 _audioRecordingNotificationSubscribers.Remove(n);
2509 public void win32Init()
2511 engageWin32LibraryInit();
2514 public void win32DeInit()
2516 engageWin32LibraryDeinit();
2519 public int initialize(
string enginePolicyConfiguration,
string userIdentity,
string tempStoragePath)
2523 rc = registerEventCallbacks();
2524 if(rc != ENGAGE_RESULT_OK)
2529 return engageInitialize(enginePolicyConfiguration, userIdentity, tempStoragePath);
2532 public int shutdown()
2541 return engageStart();
2546 return engageStop();
2549 public int createGroup(
string jsonConfiguration)
2551 return engageCreateGroup(jsonConfiguration);
2554 public int deleteGroup(
string id)
2556 return engageDeleteGroup(
id);
2559 public int joinGroup(
string id)
2561 return engageJoinGroup(
id);
2564 public int leaveGroup(
string id)
2566 return engageLeaveGroup(
id);
2569 public int setGroupRules(
string id,
string jsonParams)
2571 return engageSetGroupRules(
id, jsonParams);
2574 public int beginGroupTx(
string id,
int txPriority,
int txFlags)
2576 return engageBeginGroupTx(
id, txPriority, txFlags);
2579 public int beginGroupTxAdvanced(
string id,
string jsonParams)
2581 return engageBeginGroupTxAdvanced(
id, jsonParams);
2584 public int endGroupTx(
string id)
2586 return engageEndGroupTx(
id);
2589 public int setGroupRxTag(
string id,
int tag)
2591 return engageSetGroupRxTag(
id, tag);
2594 public int muteGroupRx(
string id)
2596 return engageMuteGroupRx(
id);
2599 public int unmuteGroupRx(
string id)
2601 return engageUnmuteGroupRx(
id);
2604 public int muteGroupTx(
string id)
2606 return engageMuteGroupTx(
id);
2609 public int unmuteGroupTx(
string id)
2611 return engageUnmuteGroupTx(
id);
2614 public int setGroupRxVolume(
string id,
int left,
int right)
2616 return engageSetGroupRxVolume(
id, left, right);
2619 public int queryGroupTimeline(
string id,
string jsonParams)
2621 return engageQueryGroupTimeline(
id, jsonParams);
2624 public int queryGroupHealth(
string id)
2626 return engageQueryGroupHealth(
id);
2629 public int queryGroupStats(
string id)
2631 return engageQueryGroupStats(
id);
2634 public int logMsg(
int level,
string tag,
string msg)
2636 return engageLogMsg(level, tag, msg);
2639 public int setLogLevel(
int level)
2641 return engageSetLogLevel(level);
2644 public int setLogTagExtensionLevel(
string tagExtension)
2646 return engageSetLogTagExtension(tagExtension);
2649 public int enableSyslog(
bool enable)
2651 return engageEnableSyslog(enable ? 1 : 0);
2654 public int enableWatchdog(
bool enable)
2656 return engageWatchdog(enable ? 1 : 0);
2659 public String getVersion()
2661 IntPtr ptr = engageGetVersion();
2663 if (ptr == IntPtr.Zero)
2669 return Marshal.PtrToStringAnsi(ptr);
2673 public String getHardwareReport()
2675 IntPtr ptr = engageGetHardwareReport();
2677 if (ptr == IntPtr.Zero)
2683 return Marshal.PtrToStringAnsi(ptr);
2687 public String getActiveLicenseDescriptor()
2689 IntPtr ptr = engageGetActiveLicenseDescriptor();
2691 if (ptr == IntPtr.Zero)
2697 return Marshal.PtrToStringAnsi(ptr);
2701 public String getLicenseDescriptor(
string entitlement,
string key,
string activationCode,
string manufacturerId)
2703 IntPtr ptr = engageGetLicenseDescriptor(entitlement, key, activationCode, manufacturerId);
2705 if (ptr == IntPtr.Zero)
2711 return Marshal.PtrToStringAnsi(ptr);
2715 public int updateLicense(
string entitlement,
string key,
string activationCode,
string manufacturerId)
2717 return engageUpdateLicense(entitlement, key, activationCode, manufacturerId);
2720 public String getNetworkInterfaceDevices()
2722 IntPtr ptr = engageGetNetworkInterfaceDevices();
2724 if (ptr == IntPtr.Zero)
2730 return Marshal.PtrToStringAnsi(ptr);
2734 public String getAudioDevices()
2736 IntPtr ptr = engageGetAudioDevices();
2738 if (ptr == IntPtr.Zero)
2744 return Marshal.PtrToStringAnsi(ptr);
2748 public int setMissionId(
string missionId)
2750 return engageSetMissionId(missionId);
2753 public int openCertStore(
string fileName,
string passwordHexByteString)
2755 return engageOpenCertStore(fileName, passwordHexByteString);
2758 public String getCertStoreDescriptor()
2760 IntPtr ptr = engageGetCertStoreDescriptor();
2762 if (ptr == IntPtr.Zero)
2768 return Marshal.PtrToStringAnsi(ptr);
2772 public int closeCertStore()
2774 return engageCloseCertStore();
2777 public int setCertStoreCertificatePem(
string id,
string certificatePem,
string privateKeyPem,
string tags)
2779 return engageSetCertStoreCertificatePem(
id, certificatePem, privateKeyPem, tags);
2782 public int setCertStoreCertificateP12(
string id,
byte[] data,
int size,
string password,
string tags)
2784 IntPtr pinned_data = Marshal.AllocHGlobal(size);
2785 Marshal.Copy(data, 0, pinned_data, size);
2786 int rc = engageSetCertStoreCertificateP12(
id, pinned_data, size, password, tags);
2787 Marshal.FreeHGlobal(pinned_data);
2792 public int deleteCertStoreCertificate(
string id)
2794 return engageDeleteCertStoreCertificate(
id);
2797 public String getCertStoreCertificatePem(
string id)
2799 IntPtr ptr = engageGetCertStoreCertificatePem(
id);
2801 if (ptr == IntPtr.Zero)
2807 return Marshal.PtrToStringAnsi(ptr);
2811 public String getArrayOfCertificateDescriptorsFromPem(
string pem)
2813 IntPtr ptr = engageGetArrayOfCertificateDescriptorsFromPem(pem);
2815 if (ptr == IntPtr.Zero)
2821 return Marshal.PtrToStringAnsi(ptr);
2825 public String getCertificateDescriptorFromPem(
string pem)
2827 IntPtr ptr = engageGetCertificateDescriptorFromPem(pem);
2829 if (ptr == IntPtr.Zero)
2835 return Marshal.PtrToStringAnsi(ptr);
2839 public int importCertStoreElementFromCertStore(
string id,
string srcId,
string srcFileName,
string srcPasswordHexByteString,
string tags)
2841 return engageImportCertStoreElementFromCertStore(
id, srcId, srcFileName, srcPasswordHexByteString, tags);
2844 public String queryCertStoreContents(
string fileName,
string passwordHexByteString)
2846 IntPtr ptr = engageQueryCertStoreContents(fileName, passwordHexByteString);
2848 if (ptr == IntPtr.Zero)
2854 return Marshal.PtrToStringAnsi(ptr);
2858 public int encrypt(
byte[] src,
int size, out
byte[] dst,
string passwordHexByteString)
2861 IntPtr pinned_src = Marshal.AllocHGlobal(size);
2862 Marshal.Copy(src, 0, pinned_src, size);
2865 IntPtr pinned_dst = Marshal.AllocHGlobal(size + 16 + 16);
2867 int bytesEncrypted = engageEncrypt(pinned_src, size, pinned_dst, passwordHexByteString);
2869 if(bytesEncrypted > 0)
2871 dst =
new byte[bytesEncrypted];
2872 Marshal.Copy(pinned_dst, dst, 0, bytesEncrypted);
2880 Marshal.FreeHGlobal(pinned_src);
2881 Marshal.FreeHGlobal(pinned_dst);
2883 return bytesEncrypted;
2886 public int decrypt(
byte[] src,
int size, out
byte[] dst,
string passwordHexByteString)
2889 IntPtr pinned_src = Marshal.AllocHGlobal(size);
2890 Marshal.Copy(src, 0, pinned_src, size);
2893 IntPtr pinned_dst = Marshal.AllocHGlobal(size + 16);
2895 int bytesDecrypted = engageDecrypt(pinned_src, size, pinned_dst, passwordHexByteString);
2897 if (bytesDecrypted > 0)
2899 dst =
new byte[bytesDecrypted];
2900 Marshal.Copy(pinned_dst, dst, 0, bytesDecrypted);
2908 Marshal.FreeHGlobal(pinned_src);
2909 Marshal.FreeHGlobal(pinned_dst);
2911 return bytesDecrypted;
3014 public String generateMission(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName)
3016 IntPtr ptr = engageGenerateMission(keyPhrase, audioGroupCount, rallypointHost, missionName);
3018 if (ptr == IntPtr.Zero)
3024 return Marshal.PtrToStringAnsi(ptr);
3028 public String generateMissionUsingCertStore(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName,
string certStoreFn,
string certStorePasswordHexByteString,
string certStoreElement)
3030 IntPtr ptr = engageGenerateMissionUsingCertStore(keyPhrase, audioGroupCount, rallypointHost, missionName, certStoreFn, certStorePasswordHexByteString, certStoreElement);
3032 if (ptr == IntPtr.Zero)
3038 return Marshal.PtrToStringAnsi(ptr);
3042 public int updatePresenceDescriptor(
string id,
string jsonDescriptor,
bool forceBeacon)
3044 return engageUpdatePresenceDescriptor(
id, jsonDescriptor, (forceBeacon ? 1 : 0));
3047 public int setFipsCrypto(
string jsonParams)
3049 return engageSetFipsCrypto(jsonParams);
3052 public bool isCryptoFipsValidated()
3054 return (engageIsCryptoFipsValidated() == 1 ?
true : false);
3060 public static uint swapEndianness(uint x)
3062 return ((x & 0x000000ff) << 24) +
3063 ((x & 0x0000ff00) << 8) +
3064 ((x & 0x00ff0000) >> 8) +
3065 ((x & 0xff000000) >> 24);
3068 public static string humanBiometricsFromBlob(
byte[] blob)
3070 JArray dataSeriesArray;
3075 dataSeriesArray =
new JArray();
3078 int bytesLeftInTheBlob = blob.Length;
3081 GCHandle pinnedBlob = GCHandle.Alloc(blob, GCHandleType.Pinned);
3084 IntPtr ptr = pinnedBlob.AddrOfPinnedObject();
3087 while(bytesLeftInTheBlob > 0)
3090 DataSeriesHeader hdr = (DataSeriesHeader)Marshal.PtrToStructure(ptr, typeof(DataSeriesHeader));
3093 if (BitConverter.IsLittleEndian)
3095 hdr.ts = swapEndianness(hdr.ts);
3099 JObject se =
new JObject();
3102 se[
"t"] = (int)hdr.t;
3104 se[
"it"] = (int)hdr.it;
3105 se[
"im"] = (int)hdr.im;
3106 se[
"vt"] = (int)hdr.vt;
3109 ptr = IntPtr.Add(ptr, 9);
3110 bytesLeftInTheBlob -= 9;
3115 JArray s =
new JArray();
3119 for (
byte x = 0; x < hdr.ss; x++)
3121 DataElementUint8 de = (DataElementUint8)Marshal.PtrToStructure(ptr, typeof(DataElementUint8));
3126 ptr = IntPtr.Add(ptr, 2);
3127 bytesLeftInTheBlob -= 2;
3130 else if (hdr.vt == 2)
3134 else if (hdr.vt == 3)
3138 else if (hdr.vt == 4)
3148 dataSeriesArray.Add(se);
3155 dataSeriesArray =
null;
3156 Trace.WriteLine(e.StackTrace);
3161 if(dataSeriesArray !=
null)
3163 JObject hbmData =
new JObject();
3164 hbmData[
"data"] = dataSeriesArray;
3165 rc = hbmData.ToString();
3171 public int platformNotifyChanges(
string jsonChangesArray)
3173 return engagePlatformNotifyChanges(jsonChangesArray);
3176 public String getDeviceId()
3178 IntPtr ptr = engageGetDeviceId();
3180 if (ptr == IntPtr.Zero)
3186 return Marshal.PtrToStringAnsi(ptr);
3190 public int verifyRiff(
string fn)
3192 return engageVerifyRiff(fn);
3195 public String getRiffDescriptor(
string fn)
3197 IntPtr ptr = engageGetRiffDescriptor(fn);
3199 if (ptr == IntPtr.Zero)
3205 return Marshal.PtrToStringAnsi(ptr);