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);
32 void onEngineGroupByGroupPcmPowerLevels(
string eventExtraJson);
33 void onEngineAudioDevicesEvent(
string eventExtraJson);
38 void onLicenseChanged(
string eventExtraJson);
39 void onLicenseExpired(
string eventExtraJson);
40 void onLicenseExpiring(
double secondsLeft,
string eventExtraJson);
45 void onEngageLogMessage(
int level,
string tag,
string message);
50 void onRallypointPausingConnectionAttempt(
string id,
string eventExtraJson);
51 void onRallypointConnecting(
string id,
string eventExtraJson);
52 void onRallypointConnected(
string id,
string eventExtraJson);
53 void onRallypointDisconnected(
string id,
string eventExtraJson);
54 void onRallypointRoundtripReport(
string id,
int rtMs,
int rtRating,
string eventExtraJson);
59 void onGroupCreated(
string id,
string eventExtraJson);
60 void onGroupCreateFailed(
string id,
string eventExtraJson);
61 void onGroupDeleted(
string id,
string eventExtraJson);
62 void onGroupConnected(
string id,
string eventExtraJson);
63 void onGroupConnectFailed(
string id,
string eventExtraJson);
64 void onGroupDisconnected(
string id,
string eventExtraJson);
65 void onGroupJoined(
string id,
string eventExtraJson);
66 void onGroupJoinFailed(
string id,
string eventExtraJson);
67 void onGroupLeft(
string id,
string eventExtraJson);
68 void onGroupMemberCountChanged(
string id,
int newCount,
string eventExtraJson);
69 void onGroupRxStarted(
string id,
string eventExtraJson);
70 void onGroupRxEnded(
string id,
string eventExtraJson);
71 void onGroupRxMuted(
string id,
string eventExtraJson);
72 void onGroupRxUnmuted(
string id,
string eventExtraJson);
73 void onGroupTxMuted(
string id,
string eventExtraJson);
74 void onGroupTxUnmuted(
string id,
string eventExtraJson);
75 void onGroupRxSpeakersChanged(
string id,
string groupTalkerJson,
string eventExtraJson);
76 void onGroupTxStarted(
string id,
string eventExtraJson);
77 void onGroupTxEnded(
string id,
string eventExtraJson);
78 void onGroupTxFailed(
string id,
string eventExtraJson);
79 void onGroupTxUsurpedByPriority(
string id,
string eventExtraJson);
80 void onGroupMaxTxTimeExceeded(
string id,
string eventExtraJson);
81 void onGroupNodeDiscovered(
string id,
string nodeJson,
string eventExtraJson);
82 void onGroupNodeRediscovered(
string id,
string nodeJson,
string eventExtraJson);
83 void onGroupNodeUndiscovered(
string id,
string nodeJson,
string eventExtraJson);
84 void onGroupAssetDiscovered(
string id,
string nodeJson,
string eventExtraJson);
85 void onGroupAssetRediscovered(
string id,
string nodeJson,
string eventExtraJson);
86 void onGroupAssetUndiscovered(
string id,
string nodeJson,
string eventExtraJson);
87 void onGroupBlobSent(
string id,
string eventExtraJson);
88 void onGroupBlobSendFailed(
string id,
string eventExtraJson);
89 void onGroupBlobReceived(
string id,
string blobInfoJson,
byte[] blob,
int blobSize,
string eventExtraJson);
90 void onGroupRtpSent(
string id,
string eventExtraJson);
91 void onGroupRtpSendFailed(
string id,
string eventExtraJson);
92 void onGroupRtpReceived(
string id,
string rtpInfoJson,
byte[] payload,
int payloadSize,
string eventExtraJson);
93 void onGroupRawSent(
string id,
string eventExtraJson);
94 void onGroupRawSendFailed(
string id,
string eventExtraJson);
95 void onGroupRawReceived(
string id,
byte[] raw,
int rawSize,
string eventExtraJson);
97 void onGroupTimelineEventStarted(
string id,
string eventJson,
string eventExtraJson);
98 void onGroupTimelineEventUpdated(
string id,
string eventJson,
string eventExtraJson);
99 void onGroupTimelineEventEnded(
string id,
string eventJson,
string eventExtraJson);
100 void onGroupTimelineReport(
string id,
string reportJson,
string eventExtraJson);
101 void onGroupTimelineReportFailed(
string id,
string eventExtraJson);
102 void onGroupTimelineGroomed(
string id,
string eventListJson,
string eventExtraJson);
104 void onGroupHealthReport(
string id,
string healthReportJson,
string eventExtraJson);
105 void onGroupHealthReportFailed(
string id,
string eventExtraJson);
107 void onGroupStatsReport(
string id,
string statsReportJson,
string eventExtraJson);
108 void onGroupStatsReportFailed(
string id,
string eventExtraJson);
110 void onGroupRxVolumeChanged(
string id,
int leftLevelPerc,
int rightLevelPerc,
string eventExtraJson);
111 void onGroupRxDtmf(
string id,
string dtmfJson,
string eventExtraJson);
113 void onGroupReconfigured(
string id,
string eventExtraJson);
114 void onGroupReconfigurationFailed(
string id,
string eventExtraJson);
116 void onGroupAudioRecordingStarted(
string id,
string eventExtraJson);
117 void onGroupAudioRecordingFailed(
string id,
string eventExtraJson);
118 void onGroupAudioRecordingEnded(
string id,
string eventExtraJson);
123 void onHumanBiometricsReceived(
string groupId,
string nodeId,
string hbmJson,
string eventExtraJson);
128 void onBridgeCreated(
string id,
string eventExtraJson);
129 void onBridgeCreateFailed(
string id,
string eventExtraJson);
130 void onBridgeDeleted(
string id,
string eventExtraJson);
135 void onAudioRecordingStarted(
string id,
string eventExtraJson);
136 void onAudioRecordingFailed(
string id,
string eventExtraJson);
137 void onAudioRecordingEnded(
string id,
string eventExtraJson);
143 private const string ENGAGE_DLL =
"engage-shared.dll";
146 public const int ENGAGE_MAX_GROUP_ID_SZ = 64;
147 public const int ENGAGE_MAX_GROUP_NAME_SZ = 128;
150 public const int ENGAGE_RESULT_OK = 0;
151 public const int ENGAGE_RESULT_INVALID_PARAMETERS = -1;
152 public const int ENGAGE_RESULT_NOT_INITIALIZED = -2;
153 public const int ENGAGE_RESULT_ALREADY_INITIALIZED = -3;
154 public const int ENGAGE_RESULT_GENERAL_FAILURE = -4;
155 public const int ENGAGE_RESULT_NOT_STARTED = -5;
156 public const int ENGAGE_RESULT_ALREADY_STARTED = -6;
157 public const int ENGAGE_RESULT_INSUFFICIENT_DESTINATION_SPACE = -7;
158 public const int ENGAGE_RESULT_CRYPTO_MODULE_INITIALIZATION_FAILURE = -8;
159 public const int ENGAGE_RESULT_HIGH_RES_TIMER_ALREADY_EXISTS = -9;
162 public enum JitterBufferLatency :
int
169 public enum ConnectionType :
int
177 public enum TxStatus :
int
182 ERR_NOT_AN_AUDIO_GROUP = -1,
184 ERR_NOT_CONNECTED = -3,
185 ERR_ALREADY_TRANSMITTING = -4,
186 ERR_INVALID_PARAMS = -5,
187 ERR_PRIORITY_TOO_LOW = -6,
188 ERR_RX_ACTIVE_ON_NON_FDX = -7,
189 ERR_CANNOT_SUBSCRIBE_TO_MIC = -8,
191 ERR_TX_ENDED_WITH_FAILURE = -10,
192 ERR_OTHERS_ACTIVE = -11
196 public enum LicensingStatusCode :
int
199 ERR_NULL_ENTITLEMENT_KEY = -1,
200 ERR_NULL_LICENSE_KEY = -2,
201 ERR_INVALID_LICENSE_KEY_LEN = -3,
202 ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4,
203 ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5,
204 ERR_INVALID_EXPIRATION_DATE = -6,
205 ERR_GENERAL_FAILURE = -7,
206 ERR_NOT_INITIALIZED = -8,
207 ERR_REQUIRES_ACTIVATION = -9,
208 ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10
212 public enum LoggingLevel :
int
222 public const byte ENGAGE_BLOB_PT_UNDEFINED = 0;
223 public const byte ENGAGE_BLOB_PT_APP_TEXT_UTF8 = 1;
224 public const byte ENGAGE_BLOB_PT_JSON_TEXT_UTF8 = 2;
225 public const byte ENGAGE_BLOB_PT_APP_BINARY = 3;
226 public const byte ENGAGE_BLOB_PT_ENGAGE_BINARY_HUMAN_BIOMETRICS = 4;
229 public const byte ENGAGE_HBM_HEART_RATE = 1;
230 public const byte ENGAGE_HBM_SKIN_TEMP = 2;
231 public const byte ENGAGE_HBM_CORE_TEMP = 3;
232 public const byte ENGAGE_HBM_HYDRATION = 4;
233 public const byte ENGAGE_HBM_BLOOD_OXYGENATION = 5;
234 public const byte ENGAGE_HBM_FATIGUE_LEVEL = 6;
235 public const byte ENGAGE_HBM_TASK_EFFECTIVENESS = 7;
238 public const String GROUP_SOURCE_ENGAGE_INTERNAL =
"com.rallytac.engage.internal";
239 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_CORE =
"com.rallytac.magellan.core";
240 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH =
"com.rallytac.engage.magellan.cistech";
241 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE =
"com.rallytac.engage.magellan.trellisware";
242 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS =
"com.rallytac.engage.magellan.silvus";
243 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT =
"com.rallytac.engage.magellan.persistent";
244 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO =
"com.rallytac.engage.magellan.domo";
245 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD =
"com.rallytac.engage.magellan.kenwood";
246 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT =
"com.rallytac.engage.magellan.tait";
247 public const String GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY=
"com.rallytac.engage.magellan.vocality";
250 public const String GROUP_DISCONNECTED_REASON_NO_REAON =
"NoReason";
251 public const String GROUP_DISCONNECTED_REASON_NO_LINK =
"NoLink";
252 public const String GROUP_DISCONNECTED_REASON_UNREGISTERED =
"Unregistered";
253 public const String GROUP_DISCONNECTED_REASON_NOT_ALLOWED =
"NotAllowed";
254 public const String GROUP_DISCONNECTED_REASON_GENERAL_DENIAL =
"GeneralDenial";
257 public const int ENGAGE_PDGI_FLAG_JOINED = 0x0001;
258 public const int ENGAGE_PDGI_FLAG_CONNECTED = 0x0002;
259 public const int ENGAGE_PDGI_FLAG_RX_MUTED = 0x0004;
260 public const int ENGAGE_PDGI_FLAG_TX_MUTED = 0x0008;
263 public enum NetworkTxPriority :
int
275 public static String objectName =
"fipsCrypto";
276 public static String enabled =
"enabled";
277 public static String path =
"path";
282 public static String objectName =
"tls";
283 public static String verifyPeers =
"verifyPeers";
284 public static String allowSelfSignedCertificates =
"allowSelfSignedCertificates";
285 public static String caCertificates =
"caCertificates";
286 public static String subjectRestrictions =
"subjectRestrictions";
287 public static String issuerRestrictions =
"issuerRestrictions";
292 public static String objectName =
"watchdog";
293 public static String enabled =
"enabled";
294 public static String intervalMs =
"intervalMs";
295 public static String hangDetectionMs =
"hangDetectionMs";
296 public static String abortOnHang =
"abortOnHang";
297 public static String slowExecutionThresholdMs =
"slowExecutionThresholdMs";
302 public static String objectName =
"groupCreationDetail";
303 public static String
id =
"id";
304 public static String status =
"status";
309 public static String objectName =
"groupTxDetail";
310 public static String
id =
"id";
311 public static String status =
"status";
312 public static String localPriority =
"localPriority";
313 public static String remotePriority =
"remotePriority";
314 public static String nonFdxMsHangRemaining =
"nonFdxMsHangRemaining";
319 public static String objectName =
"rallypointConnectionDetail";
320 public static String internalId =
"internalId";
321 public static String host =
"host";
322 public static String port =
"port";
323 public static String msToNextConnectionAttempt =
"msToNextConnectionAttempt";
328 public static String objectName =
"groupConnectionDetail";
329 public static String
id =
"id";
330 public static String connectionType =
"connectionType";
331 public static String peer =
"peer";
332 public static String asFailover =
"asFailover";
333 public static String reason =
"reason";
338 public static String objectName =
"certStoreCertificateElement";
339 public static String arrayName =
"certificates";
340 public static String
id =
"id";
341 public static String hasPrivateKey =
"hasPrivateKey";
342 public static String tags =
"tags";
347 public static String objectName =
"certStoreDescriptor";
348 public static String
id =
"id";
349 public static String fileName =
"fileName";
350 public static String version =
"version";
351 public static String flags =
"flags";
352 public static String certificates =
"certificates";
357 public static String objectName =
"list";
362 public static String objectName =
"audioDevice";
363 public static String deviceId =
"deviceId";
364 public static String samplingRate =
"samplingRate";
365 public static String msPerBuffer =
"msPerBuffer";
366 public static String bufferCount =
"bufferCount";
367 public static String channels =
"channels";
368 public static String direction =
"direction";
369 public static String boostPercentage =
"boostPercentage";
370 public static String isAdad =
"isAdad";
371 public static String name =
"name";
372 public static String manufacturer =
"manufacturer";
373 public static String model =
"model";
374 public static String hardwareId =
"hardwareId";
375 public static String serialNumber =
"serialNumber";
376 public static String isDefault =
"isDefault";
377 public static String extra =
"extra";
378 public static String type =
"type";
379 public static String isPresent =
"isPresent";
384 public static String objectName =
"list";
389 public static String objectName =
"networkInterfaceDevice";
390 public static String name =
"name";
391 public static String friendlyName =
"friendlyName";
392 public static String description =
"description";
393 public static String family =
"family";
394 public static String address =
"address";
395 public static String available =
"available";
396 public static String isLoopback =
"isLoopback";
397 public static String supportsMulticast =
"supportsMulticast";
398 public static String hardwareAddress =
"hardwareAddress";
403 public static String objectName =
"advancedTxParams";
404 public static String flags =
"flags";
405 public static String priority =
"priority";
406 public static String subchannelTag =
"subchannelTag";
407 public static String includeNodeId =
"includeNodeId";
408 public static String alias =
"alias";
409 public static String muted =
"muted";
410 public static String txId =
"txId";
411 public static String aliasSpecializer =
"aliasSpecializer";
412 public static String receiverRxMuteForAliasSpecializer =
"receiverRxMuteForAliasSpecializer";
413 public static String reBegin =
"reBegin";
417 public static String objectName =
"audioUri";
418 public static String uri =
"uri";
419 public static String repeatCount =
"repeatCount";
425 public static String objectName =
"license";
426 public static String entitlement =
"entitlement";
427 public static String key =
"key";
428 public static String activationCode =
"activationCode";
429 public static String deviceId =
"deviceId";
430 public static String type =
"type";
431 public static String expires =
"expires";
432 public static String expiresFormatted =
"expiresFormatted";
433 public static String manufacturerId =
"manufacturerId";
438 public static String objectName =
"talkerInformation";
439 public static String alias =
"alias";
440 public static String nodeId =
"nodeId";
441 public static String rxFlags =
"rxFlags";
442 public static String txPriority =
"txPriority";
443 public static String txId =
"txId";
444 public static String aliasSpecializer =
"aliasSpecializer";
445 public static String rxMuted =
"rxMuted";
450 public static String objectName =
"GroupTalkers";
451 public static String list =
"list";
458 public static String objectName =
"database";
459 public static String enabled =
"enabled";
460 public static String type =
"type";
461 public static String fixedFileName =
"fixedFileName";
466 public static String objectName =
"internals";
467 public static String housekeeperIntervalMs =
"housekeeperIntervalMs";
468 public static String logTaskQueueStatsIntervalMs =
"logTaskQueueStatsIntervalMs";
469 public static String maxTxSecs =
"maxTxSecs";
470 public static String maxRxSecs =
"maxRxSecs";
471 public static String enableLazySpeakerClosure =
"enableLazySpeakerClosure";
472 public static String rtpExpirationCheckIntervalMs =
"rtpExpirationCheckIntervalMs";
473 public static String delayedMicrophoneClosureSecs =
"delayedMicrophoneClosureSecs";
478 public static String objectName =
"timelines";
479 public static String enabled =
"enabled";
480 public static String maxEventAgeSecs =
"maxEventAgeSecs";
481 public static String storageRoot =
"storageRoot";
482 public static String maxStorageMb =
"maxStorageMb";
483 public static String maxMemMb =
"maxMemMb";
484 public static String maxAudioEventMemMb =
"maxAudioEventMemMb";
485 public static String maxDiskMb =
"maxDiskMb";
486 public static String maxEvents =
"maxEvents";
487 public static String groomingIntervalSecs =
"groomingIntervalSecs";
488 public static String autosaveIntervalSecs =
"autosaveIntervalSecs";
489 public static String disableSigningAndVerification =
"disableSigningAndVerification";
490 public static String ephemeral =
"ephemeral";
495 public static String objectName =
"security";
500 public static String objectName =
"certificate";
501 public static String certificate =
"certificate";
502 public static String key =
"key";
507 public static String objectName =
"licensing";
508 public static String entitlement =
"entitlement";
509 public static String key =
"key";
510 public static String activationCode =
"activationCode";
511 public static String manufacturerId =
"manufacturerId";
516 public static String objectName =
"networking";
517 public static String defaultNic =
"defaultNic";
518 public static String maxOutputQueuePackets =
"maxOutputQueuePackets";
519 public static String rtpJitterMinMs =
"rtpJitterMinMs";
520 public static String rtpJitterMaxFactor =
"rtpJitterMaxFactor";
521 public static String rtpJitterMaxMs =
"rtpJitterMaxMs";
522 public static String rtpLatePacketSequenceRange =
"rtpLatePacketSequenceRange";
523 public static String rtpJitterTrimPercentage =
"rtpJitterTrimPercentage";
524 public static String rtpJitterUnderrunReductionThresholdMs =
"rtpJitterUnderrunReductionThresholdMs";
525 public static String rtpJitterUnderrunReductionAger =
"rtpJitterUnderrunReductionAger";
526 public static String rtpJitterForceTrimAtMs =
"rtpJitterForceTrimAtMs";
527 public static String rtpLatePacketTimestampRangeMs =
"rtpLatePacketTimestampRangeMs";
528 public static String rtpInboundProcessorInactivityMs =
"rtpInboundProcessorInactivityMs";
529 public static String multicastRejoinSecs =
"multicastRejoinSecs";
530 public static String rpLeafConnectTimeoutSecs =
"rpLeafConnectTimeoutSecs";
531 public static String maxReconnectPauseMs =
"maxReconnectPauseMs";
532 public static String reconnectFailurePauseIncrementMs =
"reconnectFailurePauseIncrementMs";
533 public static String sendFailurePauseMs =
"sendFailurePauseMs";
534 public static String rallypointRtTestIntervalMs =
"rallypointRtTestIntervalMs";
535 public static String logRtpJitterBufferStats =
"logRtpJitterBufferStats";
536 public static String preventMulticastFailover =
"preventMulticastFailover";
537 public static String rtcpPresenceTimeoutMs =
"rtcpPresenceTimeoutMs";
538 public static String rtpJtterLatencyMode =
"rtpJtterLatencyMode";
539 public static String rtpJitterMaxExceededClipPerc =
"rtpJitterMaxExceededClipPerc";
540 public static String rtpJitterMaxExceededClipHangMs =
"rtpJitterMaxExceededClipHangMs";
541 public static String rtpZombieLifetimeMs =
"rtpZombieLifetimeMs";
542 public static String rtpMaxTrimMs =
"rtpMaxTrimMs";
547 public static String objectName =
"audio";
548 public static String enabled =
"enabled";
549 public static String internalRate =
"internalRate";
550 public static String internalChannels =
"internalChannels";
551 public static String allowOutputOnTransmit =
"allowOutputOnTransmit";
552 public static String muteTxOnTx =
"muteTxOnTx";
553 public static String denoiseInput =
"denoiseInput";
554 public static String denoiseOutput =
"denoiseOutput";
555 public static String saveInputPcm =
"saveInputPcm";
556 public static String saveOutputPcm =
"saveOutputPcm";
560 public static String objectName =
"aec";
561 public static String enabled =
"enabled";
562 public static String mode =
"mode";
563 public static String speakerTailMs =
"speakerTailMs";
564 public static String cng =
"cng";
569 public static String objectName =
"vad";
570 public static String enabled =
"enabled";
571 public static String mode =
"mode";
576 public static String objectName =
"android";
577 public static String api =
"api";
582 public static String objectName =
"inputAgc";
583 public static String enabled =
"enabled";
584 public static String minLevel =
"minLevel";
585 public static String maxLevel =
"maxLevel";
586 public static String compressionGainDb =
"compressionGainDb";
587 public static String enableLimiter =
"enableLimiter";
588 public static String targetLevelDb =
"targetLevelDb";
593 public static String objectName =
"outputAgc";
594 public static String enabled =
"enabled";
595 public static String minLevel =
"minLevel";
596 public static String maxLevel =
"maxLevel";
597 public static String compressionGainDb =
"compressionGainDb";
598 public static String enableLimiter =
"enableLimiter";
599 public static String targetLevelDb =
"targetLevelDb";
605 public static String objectName =
"discovery";
609 public static String objectName =
"magellan";
610 public static String enabled =
"enabled";
615 public static String objectName =
"ssdp";
616 public static String enabled =
"enabled";
617 public static String ageTimeoutMs =
"ageTimeoutMs";
618 public static String address =
"address";
623 public static String objectName =
"cistech";
624 public static String enabled =
"enabled";
625 public static String ageTimeoutMs =
"ageTimeoutMs";
626 public static String address =
"address";
631 public static String objectName =
"trellisware";
632 public static String enabled =
"enabled";
636 public static String dataDirectory =
"dataDirectory";
641 public static String
id =
"id";
642 public static String name =
"name";
643 public static String description =
"description";
644 public static String modPin =
"modPin";
645 public static String certStoreId =
"certStoreId";
646 public static String multicastFailoverPolicy =
"multicastFailoverPolicy";
651 public static String objectName =
"rallypoint";
652 public static String arrayName =
"rallypoints";
656 public static String objectName =
"host";
657 public static String address =
"address";
658 public static String port =
"port";
661 public static String certificate =
"certificate";
662 public static String certificateKey =
"certificateKey";
663 public static String verifyPeer =
"verifyPeer";
664 public static String allowSelfSignedCertificate =
"allowSelfSignedCertificate";
665 public static String transactionTimeoutMs =
"transactionTimeoutMs";
666 public static String connectionTimeoutSecs =
"connectionTimeoutSecs";
667 public static String disableMessageSigning =
"disableMessageSigning";
668 public static String use =
"use";
673 public static String objectName =
"address";
674 public static String address =
"address";
675 public static String port =
"port";
680 public static String objectName =
"rx";
681 public static String address =
"address";
682 public static String port =
"port";
687 public static String objectName =
"tx";
688 public static String address =
"address";
689 public static String port =
"port";
694 public static String objectName =
"rangerPackets";
695 public static String hangTimerSecs =
"hangTimerSecs";
696 public static String count =
"count";
701 public static String objectName =
"rtpProfile";
702 public static String mode =
"mode";
703 public static String jitterMaxMs =
"jitterMaxMs";
704 public static String jitterMinMs =
"jitterMinMs";
705 public static String jitterMaxFactor =
"jitterMaxFactor";
706 public static String latePacketSequenceRange =
"latePacketSequenceRange";
707 public static String latePacketTimestampRangeMs =
"latePacketTimestampRangeMs";
708 public static String jitterTrimPercentage =
"jitterTrimPercentage";
709 public static String jitterUnderrunReductionThresholdMs =
"jitterUnderrunReductionThresholdMs";
710 public static String jitterUnderrunReductionAger =
"jitterUnderrunReductionAger";
711 public static String jitterForceTrimAtMs =
"jitterForceTrimAtMs";
712 public static String jitterMaxTrimMs =
"jitterMaxTrimMs";
713 public static String jitterMaxExceededClipPerc =
"jitterMaxExceededClipPerc";
714 public static String jitterMaxExceededClipHangMs =
"jitterMaxExceededClipHangMs";
715 public static String inboundProcessorInactivityMs =
"inboundProcessorInactivityMs";
716 public static String rtcpPresenceTimeoutMs =
"rtcpPresenceTimeoutMs";
717 public static String zombieLifetimeMs =
"zombieLifetimeMs";
718 public static String signalledInboundProcessorInactivityMs =
"signalledInboundProcessorInactivityMs";
723 public static String objectName =
"group";
724 public static String arrayName =
"groups";
725 public static String
id =
"id";
726 public static String name =
"name";
727 public static String spokenName =
"spokenName";
728 public static String type =
"type";
729 public static String source =
"source";
730 public static String cryptoPassword =
"cryptoPassword";
731 public static String alias =
"alias";
732 public static String maxRxSecs =
"maxRxSecs";
733 public static String enableMulticastFailover =
"enableMulticastFailover";
734 public static String multicastFailoverSecs =
"multicastFailoverSecs";
735 public static String interfaceName =
"interfaceName";
736 public static String anonymousAlias =
"anonymousAlias";
737 public static String lbCrypto =
"lbCrypto";
738 public static String rtpProfile =
"rtpProfile";
739 public static String specializerAffinities =
"specializerAffinities";
740 public static String languageCode =
"languageCode";
744 public static String objectName =
"timeline";
745 public static String enabled =
"enabled";
750 public static String objectName =
"audio";
751 public static String inputId =
"inputId";
752 public static String outputId =
"outputId";
757 public static String objectName =
"priorityTranslation";
758 public static String priority =
"priority";
759 public static String rx =
"rx";
760 public static String tx =
"tx";
766 public static String objectName =
"txAudio";
767 public static String fdx =
"fdx";
768 public static String encoder =
"encoder";
769 public static String framingMs =
"framingMs";
770 public static String maxTxSecs =
"maxTxSecs";
771 public static String noHdrExt =
"noHdrExt";
772 public static String customRtpPayloadType =
"customRtpPayloadType";
773 public static String encoderName =
"encoderName";
774 public static String extensionSendInterval =
"extensionSendInterval";
775 public static String initialHeaderBurst =
"initialHeaderBurst";
776 public static String trailingHeaderBurst =
"initialHeaderBurst";
777 public static String enableSmoothing =
"enableSmoothing";
778 public static String dtx =
"dtx";
779 public static String smoothedHangTimeMs =
"smoothedHangTimeMs";
780 public static String resetRtpOnTx =
"resetRtpOnTx";
781 public static String startTxNotifications =
"startTxNotifications";
786 public static String objectName =
"txOptions";
787 public static String priority =
"priority";
788 public static String ttl =
"ttl";
793 public static String objectName =
"presence";
794 public static String format =
"format";
795 public static String intervalSecs =
"intervalSecs";
796 public static String listenOnly =
"listenOnly";
797 public static String minIntervalSecs =
"minIntervalSecs";
802 public static String objectName =
"presence";
803 public static String
self =
"self";
804 public static String comment =
"comment";
805 public static String custom =
"custom";
809 public static String arrayName =
"groupAliases";
810 public static String
id =
"groupId";
811 public static String alias =
"alias";
812 public static String status =
"status";
818 public static String objectName =
"identity";
819 public static String nodeId =
"nodeId";
820 public static String userId =
"userId";
821 public static String displayName =
"displayName";
822 public static String type =
"type";
823 public static String format =
"format";
824 public static String avatar =
"avatar";
829 public static String objectName =
"location";
830 public static String longitude =
"longitude";
831 public static String latitude =
"latitude";
832 public static String altitude =
"altitude";
833 public static String direction =
"direction";
834 public static String speed =
"speed";
839 public static String objectName =
"connectivity";
840 public static String type =
"type";
841 public static String strength =
"strength";
842 public static String rating =
"rating";
847 public static String objectName =
"power";
848 public static String source =
"source";
849 public static String state =
"state";
850 public static String level =
"level";
855 public static String objectName =
"rtpHeader";
856 public static String pt =
"pt";
857 public static String marker =
"marker";
858 public static String seq =
"seq";
859 public static String ssrc =
"ssrc";
860 public static String ts =
"ts";
865 public static String objectName =
"blobHeader";
866 public static String source =
"source";
867 public static String target =
"target";
868 public static String payloadType =
"payloadType";
869 public static String blobSize =
"size";
870 public static String rtpHeader =
"rtpHeader";
875 public static String objectName =
"descriptor";
876 public static String file =
"file";
877 public static String verified =
"verified";
878 public static String channels =
"channels";
879 public static String sampleCount =
"sampleCount";
880 public static String meta =
"meta";
881 public static String certificate =
"certificate";
882 public static String signature =
"signature";
889 public static String objectName =
"audio";
890 public static String ms =
"ms";
891 public static String samples =
"samples";
894 public static String objectName =
"event";
895 public static String alias =
"alias";
896 public static String direction =
"direction";
897 public static String ended =
"ended";
898 public static String groupId =
"groupId";
899 public static String
id =
"id";
900 public static String inProgress =
"inProgress";
901 public static String nodeId =
"nodeId";
902 public static String started =
"started";
903 public static String thisNodeId =
"thisNodeId";
904 public static String type =
"type";
905 public static String uri =
"uri";
906 public static String jsonAttachment =
"jsonAttachment";
907 public static String blobAttachment =
"blobAttachment";
912 public static String maxCount =
"maxCount";
913 public static String mostRecentFirst =
"mostRecentFirst";
914 public static String startedOnOrAfter =
"startedOnOrAfter";
915 public static String endedOnOrBefore =
"endedOnOrBefore";
916 public static String onlyDirection =
"onlyDirection";
917 public static String onlyType =
"onlyType";
918 public static String onlyCommitted =
"onlyCommitted";
919 public static String onlyAlias =
"onlyAlias";
920 public static String onlyNodeId =
"onlyNodeId";
921 public static String onlyTxId =
"onlyTxId";
922 public static String sql =
"sql";
927 public static String success =
"success";
928 public static String errorMessage =
"errorMessage";
929 public static String started =
"started";
930 public static String ended =
"ended";
931 public static String execMs =
"execMs";
932 public static String records =
"records";
933 public static String events =
"events";
934 public static String count =
"count";
938 #region Callback delegate types
939 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
940 private delegate
void EngageVoidCallback(
string eventExtraJson);
942 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
943 private delegate
void EngageStringCallback(
string s,
string eventExtraJson);
945 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
946 private delegate
void EngageString2Callback(
string s1,
string s2,
string eventExtraJson);
948 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
949 private delegate
void EngageStringAndIntCallback(
string s,
int i,
string eventExtraJson);
951 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
952 private delegate
void EngageString2AndInt2Callback(
string s,
int i1,
int i2,
string eventExtraJson);
954 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
955 private delegate
void EngageStringAndArgvCallback(
string s, IntPtr ptr,
string eventExtraJson);
957 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
958 private delegate
void EngageStringAndBlobCallback(
string s, IntPtr ptr,
int i,
string eventExtraJson);
960 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
961 private delegate
void EngageString2AndBlobCallback(
string s,
string j, IntPtr ptr,
int i,
string eventExtraJson);
963 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
964 private delegate
void EngageStringAndTwoIntCallback(
string s,
int i1,
int i2,
string eventExtraJson);
966 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
967 private delegate
void EngageLoggingCallback(
int level,
string tag,
string message);
971 [StructLayout(LayoutKind.Sequential, Pack = 1)]
974 [MarshalAs(UnmanagedType.ByValArray, SizeConst = ENGAGE_MAX_GROUP_ID_SZ)]
977 [MarshalAs(UnmanagedType.ByValArray, SizeConst = ENGAGE_MAX_GROUP_NAME_SZ)]
980 [MarshalAs(UnmanagedType.U1)]
981 public Boolean isEncrypted;
983 [MarshalAs(UnmanagedType.U1)]
984 public Boolean allowsFullDuplex;
987 [StructLayout(LayoutKind.Sequential, Pack = 1)]
990 public EngageVoidCallback PFN_ENGAGE_ENGINE_STARTED;
991 public EngageVoidCallback PFN_ENGAGE_ENGINE_STOPPED;
993 public EngageStringCallback PFN_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT;
994 public EngageStringCallback PFN_ENGAGE_RP_CONNECTING;
995 public EngageStringCallback PFN_ENGAGE_RP_CONNECTED;
996 public EngageStringCallback PFN_ENGAGE_RP_DISCONNECTED;
997 public EngageStringAndTwoIntCallback PFN_ENGAGE_RP_ROUNDTRIP_REPORT;
999 public EngageStringCallback PFN_ENGAGE_GROUP_CREATED;
1000 public EngageStringCallback PFN_ENGAGE_GROUP_CREATE_FAILED;
1001 public EngageStringCallback PFN_ENGAGE_GROUP_DELETED;
1003 public EngageStringCallback PFN_ENGAGE_GROUP_CONNECTED;
1004 public EngageStringCallback PFN_ENGAGE_GROUP_CONNECT_FAILED;
1005 public EngageStringCallback PFN_ENGAGE_GROUP_DISCONNECTED;
1007 public EngageStringCallback PFN_ENGAGE_GROUP_JOINED;
1008 public EngageStringCallback PFN_ENGAGE_GROUP_JOIN_FAILED;
1009 public EngageStringCallback PFN_ENGAGE_GROUP_LEFT;
1011 public EngageStringAndIntCallback PFN_ENGAGE_GROUP_MEMBER_COUNT_CHANGED;
1013 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_DISCOVERED;
1014 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_REDISCOVERED;
1015 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_UNDISCOVERED;
1017 public EngageStringCallback PFN_ENGAGE_GROUP_RX_STARTED;
1018 public EngageStringCallback PFN_ENGAGE_GROUP_RX_ENDED;
1019 public EngageString2Callback PFN_ENGAGE_GROUP_RX_SPEAKERS_CHANGED;
1020 public EngageStringCallback PFN_ENGAGE_GROUP_RX_MUTED;
1021 public EngageStringCallback PFN_ENGAGE_GROUP_RX_UNMUTED;
1023 public EngageStringCallback PFN_ENGAGE_GROUP_TX_STARTED;
1024 public EngageStringCallback PFN_ENGAGE_GROUP_TX_ENDED;
1025 public EngageStringCallback PFN_ENGAGE_GROUP_TX_FAILED;
1026 public EngageStringCallback PFN_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY;
1027 public EngageStringCallback PFN_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED;
1028 public EngageStringCallback PFN_ENGAGE_GROUP_TX_MUTED;
1029 public EngageStringCallback PFN_ENGAGE_GROUP_TX_UNMUTED;
1031 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_DISCOVERED;
1032 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_REDISCOVERED;
1033 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_UNDISCOVERED;
1035 public EngageVoidCallback PFN_ENGAGE_LICENSE_CHANGED;
1036 public EngageVoidCallback PFN_ENGAGE_LICENSE_EXPIRED;
1037 public EngageStringCallback PFN_ENGAGE_LICENSE_EXPIRING;
1039 public EngageStringCallback PFN_ENGAGE_GROUP_BLOB_SENT;
1040 public EngageStringCallback PFN_ENGAGE_GROUP_BLOB_SEND_FAILED;
1041 public EngageString2AndBlobCallback PFN_ENGAGE_GROUP_BLOB_RECEIVED;
1043 public EngageStringCallback PFN_ENGAGE_GROUP_RTP_SENT;
1044 public EngageStringCallback PFN_ENGAGE_GROUP_RTP_SEND_FAILED;
1045 public EngageString2AndBlobCallback PFN_ENGAGE_GROUP_RTP_RECEIVED;
1047 public EngageStringCallback PFN_ENGAGE_GROUP_RAW_SENT;
1048 public EngageStringCallback PFN_ENGAGE_GROUP_RAW_SEND_FAILED;
1049 public EngageStringAndBlobCallback PFN_ENGAGE_GROUP_RAW_RECEIVED;
1051 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_STARTED;
1052 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED;
1053 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_ENDED;
1054 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_REPORT;
1055 public EngageStringCallback PFN_ENGAGE_GROUP_TIMELINE_REPORT_FAILED;
1056 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_GROOMED;
1058 public EngageString2Callback PFN_ENGAGE_GROUP_HEALTH_REPORT;
1059 public EngageStringCallback PFN_ENGAGE_GROUP_HEALTH_REPORT_FAILED;
1061 public EngageStringCallback PFN_ENGAGE_BRIDGE_CREATED;
1062 public EngageStringCallback PFN_ENGAGE_BRIDGE_CREATE_FAILED;
1063 public EngageStringCallback PFN_ENGAGE_BRIDGE_DELETED;
1065 public EngageString2Callback PFN_ENGAGE_GROUP_STATS_REPORT;
1066 public EngageStringCallback PFN_ENGAGE_GROUP_STATS_REPORT_FAILED;
1068 public EngageString2AndInt2Callback PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED;
1069 public EngageString2Callback PFN_ENGAGE_GROUP_RX_DTMF;
1071 public EngageVoidCallback PFN_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED;
1072 public EngageVoidCallback PFN_ENGAGE_ENGINE_GROUP_BY_GROUP_PCM_POWER_LEVEL_REPORT;
1073 public EngageVoidCallback PFN_ENGAGE_ENGINE_AUDIO_DEVICE_EVENT;
1075 public EngageStringCallback PFN_ENGAGE_GROUP_RECONFIGURED;
1076 public EngageStringCallback PFN_ENGAGE_GROUP_RECONFIGURATION_FAILED;
1078 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_STARTED;
1079 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_FAILED;
1080 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_ENDED;
1083 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1086 [MarshalAs(UnmanagedType.U1)]
1089 [MarshalAs(UnmanagedType.U4)]
1092 [MarshalAs(UnmanagedType.U1)]
1095 [MarshalAs(UnmanagedType.U1)]
1098 [MarshalAs(UnmanagedType.U1)]
1101 [MarshalAs(UnmanagedType.U1)]
1105 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1108 [MarshalAs(UnmanagedType.U1)]
1111 [MarshalAs(UnmanagedType.U1)]
1115 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1118 [MarshalAs(UnmanagedType.U1)]
1121 [MarshalAs(UnmanagedType.U2)]
1125 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1128 [MarshalAs(UnmanagedType.U1)]
1131 [MarshalAs(UnmanagedType.U4)]
1135 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1138 [MarshalAs(UnmanagedType.U1)]
1141 [MarshalAs(UnmanagedType.U8)]
1146 #region Library functions
1147 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1148 private static extern void engageWin32LibraryInit();
1150 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1151 private static extern void engageWin32LibraryDeinit();
1153 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1154 private static extern int engageRegisterEventCallbacks(ref
EngageEvents_t callbacks);
1156 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1157 private static extern int engageEnableNotifications(
int enable);
1159 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1160 private static extern int engageInitialize(
string enginePolicyConfiguration,
string userIdentity,
string tempStoragePath);
1162 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1163 private static extern int engageShutdown();
1165 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1166 private static extern int engageStart();
1168 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1169 private static extern int engageStop();
1171 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1172 private static extern int engageCreateGroup(
string jsonConfiguration);
1174 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1175 private static extern int engageDeleteGroup(
string id);
1177 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1178 private static extern int engageJoinGroup(
string id);
1180 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1181 private static extern int engageLeaveGroup(
string id);
1183 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1184 private static extern int engageSetGroupRules(
string id,
string jsonParams);
1186 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1187 private static extern int engageBeginGroupTx(
string id,
int txPriority,
int txFlags);
1189 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1190 private static extern int engageBeginGroupTxAdvanced(
string id,
string jsonParams);
1192 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1193 private static extern int engageEndGroupTx(
string id);
1195 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1196 private static extern int engageSetGroupRxTag(
string id,
int tag);
1198 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1199 private static extern int engageMuteGroupRx(
string id);
1201 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1202 private static extern int engageUnmuteGroupRx(
string id);
1204 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1205 private static extern int engageMuteGroupTx(
string id);
1207 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1208 private static extern int engageUnmuteGroupTx(
string id);
1210 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1211 private static extern int engageSetGroupRxVolume(
string id,
int left,
int right);
1213 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1214 private static extern IntPtr engageGetVersion();
1216 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1217 private static extern IntPtr engageGetHardwareReport();
1219 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1220 private static extern IntPtr engageGetActiveLicenseDescriptor();
1222 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1223 private static extern IntPtr engageGetLicenseDescriptor(
string entitlement,
string key,
string activationCode,
string manufacturerId);
1225 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1226 private static extern int engageUpdateLicense(
string entitlement,
string key,
string activationCode,
string manufacturerId);
1228 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1229 private static extern int engageUpdatePresenceDescriptor(
string id,
string jsonDescriptor,
int forceBeacon);
1231 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1232 private static extern int engageSendGroupBlob(
string id, IntPtr blob,
int blobSize,
string jsonBlobParams);
1234 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1235 private static extern int engageSendGroupRtp(
string id, IntPtr payload,
int payloadSize,
string jsonRtpHeader);
1237 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1238 private static extern int engageSendGroupRaw(
string id, IntPtr raw,
int rawSize,
string jsonRtpHeader);
1240 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1241 private static extern int engageQueryGroupTimeline(
string id,
string jsonParams);
1243 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1244 private static extern int engageSetLogLevel(
int level);
1246 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1247 private static extern int engageSetLogTagExtension(
string tagExtension);
1249 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1250 private static extern int engageSetLoggingOutputOverride(EngageLoggingCallback hookFn);
1252 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1253 private static extern int engageEnableSyslog(
int enable);
1255 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1256 private static extern int engageWatchdog(
int enable);
1258 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1259 private static extern int engageLogMsg(
int level,
string tag,
string msg);
1261 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1262 private static extern IntPtr engageGetNetworkInterfaceDevices();
1264 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1265 private static extern IntPtr engageGetAudioDevices();
1267 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1268 private static extern IntPtr engageGenerateMission(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName);
1270 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1271 private static extern IntPtr engageGenerateMissionUsingCertStore(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName,
string certStoreFn,
string certStorePasswordHexByteString,
string certStoreElement);
1273 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1274 private static extern int engageSetMissionId(
string missionId);
1276 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1277 private static extern int engageOpenCertStore(
string fileName,
string passwordHexByteString);
1279 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1280 private static extern IntPtr engageGetCertStoreDescriptor();
1282 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1283 private static extern int engageCloseCertStore();
1285 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1286 private static extern int engageSetCertStoreCertificatePem(
string id,
string certificatePem,
string privateKeyPem,
string tags);
1288 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1289 private static extern int engageSetCertStoreCertificateP12(
string id,IntPtr data,
int size,
string password,
string tags);
1291 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1292 private static extern int engageDeleteCertStoreCertificate(
string id);
1294 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1295 private static extern IntPtr engageGetCertStoreCertificatePem(
string id);
1297 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1298 private static extern IntPtr engageGetCertificateDescriptorFromPem(
string pem);
1300 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1301 private static extern IntPtr engageGetArrayOfCertificateDescriptorsFromPem(
string pem);
1303 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1304 private static extern int engageImportCertStoreElementFromCertStore(
string id,
string srcId,
string srcFileName,
string srcPasswordHexByteString,
string tags);
1306 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1307 private static extern IntPtr engageQueryCertStoreContents(
string fileName,
string passwordHexByteString);
1309 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1310 private static extern int engageQueryGroupHealth(
string id);
1312 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1313 private static extern int engageQueryGroupStats(
string id);
1315 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1316 private static extern int engageCreateBridge(
string jsonConfiguration);
1318 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1319 private static extern int engageDeleteBridge(
string id);
1321 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1322 private static extern int engageEncrypt(IntPtr src,
int size, IntPtr dst,
string passwordHexByteString);
1324 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1325 private static extern int engageDecrypt(IntPtr src,
int size, IntPtr dst,
string passwordHexByteString);
1327 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1328 private static extern int engagePlatformNotifyChanges(
string jsonChangesArray);
1330 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1331 private static extern IntPtr engageBeginFileRecording(
string jsonParams);
1333 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1334 private static extern IntPtr engageEndFileRecording(
string id);
1342 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1343 private static extern int engageSetFipsCrypto(
string jsonParams);
1345 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1346 private static extern int engageIsCryptoFipsValidated();
1348 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1349 private static extern IntPtr engageGetDeviceId();
1351 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1352 private static extern int engageSetCertStore(IntPtr buff,
int size,
string passwordHexByteString);
1354 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1355 private static extern int engageVerifyRiff(
string fn);
1357 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1358 private static extern IntPtr engageGetRiffDescriptor(
string fn);
1360 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1361 private static extern int engageBeginGroupPcmPowerTracking(
string id);
1363 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1364 private static extern int engageEndGroupPcmPowerTracking(
string id);
1368 #region Internal functions
1369 private static string[] stringArrayFromArgvStrPtrArray(IntPtr ptr)
1380 strPtr = Marshal.ReadIntPtr(arrayPtr);
1381 if (strPtr == (IntPtr)0)
1387 arrayPtr += Marshal.SizeOf(arrayPtr);
1393 rc =
new string[count];
1399 strPtr = Marshal.ReadIntPtr(arrayPtr);
1400 if (strPtr == (IntPtr)0)
1405 rc[idx] = Marshal.PtrToStringAnsi(strPtr);
1407 arrayPtr += Marshal.SizeOf(arrayPtr);
1415 private int registerEventCallbacks()
1419 cb.PFN_ENGAGE_ENGINE_STARTED = on_ENGAGE_ENGINE_STARTED;
1420 cb.PFN_ENGAGE_ENGINE_STOPPED = on_ENGAGE_ENGINE_STOPPED;
1421 cb.PFN_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED = on_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED;
1422 cb.PFN_ENGAGE_ENGINE_GROUP_BY_GROUP_PCM_POWER_LEVEL_REPORT = on_ENGAGE_ENGINE_GROUP_BY_GROUP_PCM_POWER_LEVEL_REPORT;
1423 cb.PFN_ENGAGE_ENGINE_AUDIO_DEVICE_EVENT = on_ENGAGE_ENGINE_AUDIO_DEVICE_EVENT;
1425 cb.PFN_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT = on_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT;
1426 cb.PFN_ENGAGE_RP_CONNECTING = on_ENGAGE_RP_CONNECTING;
1427 cb.PFN_ENGAGE_RP_CONNECTED = on_ENGAGE_RP_CONNECTED;
1428 cb.PFN_ENGAGE_RP_DISCONNECTED = on_ENGAGE_RP_DISCONNECTED;
1429 cb.PFN_ENGAGE_RP_ROUNDTRIP_REPORT = on_ENGAGE_RP_ROUNDTRIP_REPORT;
1431 cb.PFN_ENGAGE_GROUP_CREATED = on_ENGAGE_GROUP_CREATED;
1432 cb.PFN_ENGAGE_GROUP_CREATE_FAILED = on_ENGAGE_GROUP_CREATE_FAILED;
1433 cb.PFN_ENGAGE_GROUP_DELETED = on_ENGAGE_GROUP_DELETED;
1435 cb.PFN_ENGAGE_GROUP_CONNECTED = on_ENGAGE_GROUP_CONNECTED;
1436 cb.PFN_ENGAGE_GROUP_CONNECT_FAILED = on_ENGAGE_GROUP_CONNECT_FAILED;
1437 cb.PFN_ENGAGE_GROUP_DISCONNECTED = on_ENGAGE_GROUP_DISCONNECTED;
1439 cb.PFN_ENGAGE_GROUP_JOINED = on_ENGAGE_GROUP_JOINED;
1440 cb.PFN_ENGAGE_GROUP_JOIN_FAILED = on_ENGAGE_GROUP_JOIN_FAILED;
1441 cb.PFN_ENGAGE_GROUP_LEFT = on_ENGAGE_GROUP_LEFT;
1444 cb.PFN_ENGAGE_GROUP_MEMBER_COUNT_CHANGED =
null;
1447 cb.PFN_ENGAGE_GROUP_RX_STARTED = on_ENGAGE_GROUP_RX_STARTED;
1448 cb.PFN_ENGAGE_GROUP_RX_ENDED = on_ENGAGE_GROUP_RX_ENDED;
1450 cb.PFN_ENGAGE_GROUP_RX_MUTED = on_ENGAGE_GROUP_RX_MUTED;
1451 cb.PFN_ENGAGE_GROUP_RX_UNMUTED = on_ENGAGE_GROUP_RX_UNMUTED;
1453 cb.PFN_ENGAGE_GROUP_TX_MUTED = on_ENGAGE_GROUP_TX_MUTED;
1454 cb.PFN_ENGAGE_GROUP_TX_UNMUTED = on_ENGAGE_GROUP_TX_UNMUTED;
1456 cb.PFN_ENGAGE_GROUP_RX_SPEAKERS_CHANGED = on_ENGAGE_GROUP_RX_SPEAKERS_CHANGED;
1458 cb.PFN_ENGAGE_GROUP_TX_STARTED = on_ENGAGE_GROUP_TX_STARTED;
1459 cb.PFN_ENGAGE_GROUP_TX_ENDED = on_ENGAGE_GROUP_TX_ENDED;
1460 cb.PFN_ENGAGE_GROUP_TX_FAILED = on_ENGAGE_GROUP_TX_FAILED;
1461 cb.PFN_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY = on_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY;
1462 cb.PFN_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED = on_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED;
1464 cb.PFN_ENGAGE_GROUP_NODE_DISCOVERED = on_ENGAGE_GROUP_NODE_DISCOVERED;
1465 cb.PFN_ENGAGE_GROUP_NODE_REDISCOVERED = on_ENGAGE_GROUP_NODE_REDISCOVERED;
1466 cb.PFN_ENGAGE_GROUP_NODE_UNDISCOVERED = on_ENGAGE_GROUP_NODE_UNDISCOVERED;
1468 cb.PFN_ENGAGE_GROUP_ASSET_DISCOVERED = on_ENGAGE_GROUP_ASSET_DISCOVERED;
1469 cb.PFN_ENGAGE_GROUP_ASSET_REDISCOVERED = on_ENGAGE_GROUP_ASSET_REDISCOVERED;
1470 cb.PFN_ENGAGE_GROUP_ASSET_UNDISCOVERED = on_ENGAGE_GROUP_ASSET_UNDISCOVERED;
1472 cb.PFN_ENGAGE_LICENSE_CHANGED = on_ENGAGE_LICENSE_CHANGED;
1473 cb.PFN_ENGAGE_LICENSE_EXPIRED = on_ENGAGE_LICENSE_EXPIRED;
1474 cb.PFN_ENGAGE_LICENSE_EXPIRING = on_ENGAGE_LICENSE_EXPIRING;
1476 cb.PFN_ENGAGE_GROUP_BLOB_SENT = on_ENGAGE_GROUP_BLOB_SENT;
1477 cb.PFN_ENGAGE_GROUP_BLOB_SEND_FAILED = on_ENGAGE_GROUP_BLOB_SEND_FAILED;
1478 cb.PFN_ENGAGE_GROUP_BLOB_RECEIVED = on_ENGAGE_GROUP_BLOB_RECEIVED;
1480 cb.PFN_ENGAGE_GROUP_RTP_SENT = on_ENGAGE_GROUP_RTP_SENT;
1481 cb.PFN_ENGAGE_GROUP_RTP_SEND_FAILED = on_ENGAGE_GROUP_RTP_SEND_FAILED;
1482 cb.PFN_ENGAGE_GROUP_RTP_RECEIVED = on_ENGAGE_GROUP_RTP_RECEIVED;
1484 cb.PFN_ENGAGE_GROUP_RAW_SENT = on_ENGAGE_GROUP_RAW_SENT;
1485 cb.PFN_ENGAGE_GROUP_RAW_SEND_FAILED = on_ENGAGE_GROUP_RAW_SEND_FAILED;
1486 cb.PFN_ENGAGE_GROUP_RAW_RECEIVED = on_ENGAGE_GROUP_RAW_RECEIVED;
1488 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_STARTED = on_ENGAGE_GROUP_TIMELINE_EVENT_STARTED;
1489 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED = on_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED;
1490 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_ENDED = on_ENGAGE_GROUP_TIMELINE_EVENT_ENDED;
1492 cb.PFN_ENGAGE_GROUP_TIMELINE_REPORT = on_ENGAGE_GROUP_TIMELINE_REPORT;
1493 cb.PFN_ENGAGE_GROUP_TIMELINE_REPORT_FAILED = on_ENGAGE_GROUP_TIMELINE_REPORT_FAILED;
1494 cb.PFN_ENGAGE_GROUP_TIMELINE_GROOMED = on_ENGAGE_GROUP_TIMELINE_GROOMED;
1496 cb.PFN_ENGAGE_GROUP_HEALTH_REPORT = on_ENGAGE_GROUP_HEALTH_REPORT;
1497 cb.PFN_ENGAGE_GROUP_HEALTH_REPORT_FAILED = on_ENGAGE_GROUP_HEALTH_REPORT_FAILED;
1499 cb.PFN_ENGAGE_BRIDGE_CREATED = on_ENGAGE_BRIDGE_CREATED;
1500 cb.PFN_ENGAGE_BRIDGE_CREATE_FAILED = on_ENGAGE_BRIDGE_CREATE_FAILED;
1501 cb.PFN_ENGAGE_BRIDGE_DELETED = on_ENGAGE_BRIDGE_DELETED;
1503 cb.PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED = on_ENGAGE_GROUP_RX_VOLUME_CHANGED;
1504 cb.PFN_ENGAGE_GROUP_RX_DTMF = on_ENGAGE_GROUP_RX_DTMF;
1506 cb.PFN_ENGAGE_GROUP_RECONFIGURED = on_ENGAGE_GROUP_RECONFIGURED;
1507 cb.PFN_ENGAGE_GROUP_RECONFIGURATION_FAILED = on_ENGAGE_GROUP_RECONFIGURATION_FAILED;
1509 cb.PFN_ENGAGE_AUDIO_RECORDING_STARTED = on_ENGAGE_AUDIO_RECORDING_STARTED;
1510 cb.PFN_ENGAGE_AUDIO_RECORDING_FAILED = on_ENGAGE_AUDIO_RECORDING_FAILED;
1511 cb.PFN_ENGAGE_AUDIO_RECORDING_ENDED = on_ENGAGE_AUDIO_RECORDING_ENDED;
1513 return engageRegisterEventCallbacks(ref cb);
1516 private string makeUserJsonConfiguration(
string alias,
string displayName,
int txPriority)
1518 StringBuilder sb =
new StringBuilder();
1523 string myAlias = alias;
1524 string myDisplayName = displayName;
1525 int myTransmitPirority = txPriority;
1527 if (myAlias ==
null || myAlias.Length == 0)
1529 myAlias = String.Format(
"C#{0:X14}",
new Random().Next());
1532 if (myDisplayName ==
null || myDisplayName.Length == 0)
1534 myDisplayName =
"C# User " + myAlias;
1537 if(myTransmitPirority < 0)
1539 myTransmitPirority = 0;
1543 sb.Append(
"\"alias\":");
1544 sb.Append(
"\"" + myAlias +
"\"");
1546 sb.Append(
",\"displayName\":");
1547 sb.Append(
"\"" + myDisplayName +
"\"");
1549 sb.Append(
",\"txPriority\":");
1550 sb.Append(myTransmitPirority);
1553 return sb.ToString();
1557 #region Member variables
1558 private static List<IEngineNotifications> _engineNotificationSubscribers =
new List<IEngineNotifications>();
1559 private static List<IRallypointNotifications> _rallypointNotificationSubscribers =
new List<IRallypointNotifications>();
1560 private static List<IGroupNotifications> _groupNotificationSubscribers =
new List<IGroupNotifications>();
1561 private static List<ILicenseNotifications> _licenseNotificationSubscribers =
new List<ILicenseNotifications>();
1562 private static List<IHumanBiometricsNotifications> _humanBiometricsNotifications =
new List<IHumanBiometricsNotifications>();
1563 private static List<IBridgeNotifications> _bridgeNotificationSubscribers =
new List<IBridgeNotifications>();
1564 private static List<ILoggingNotifications> _loggingNotificationSubscribers =
new List<ILoggingNotifications>();
1565 private static List<IAudioRecordingNotifications> _audioRecordingNotificationSubscribers =
new List<IAudioRecordingNotifications>();
1568 #region Callback delegates
1569 private EngageVoidCallback on_ENGAGE_ENGINE_STARTED = (
string eventExtraJson) =>
1571 lock (_engineNotificationSubscribers)
1573 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1575 n.onEngineStarted(eventExtraJson);
1580 private EngageVoidCallback on_ENGAGE_ENGINE_STOPPED = (
string eventExtraJson) =>
1582 lock (_engineNotificationSubscribers)
1584 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1586 n.onEngineStopped(eventExtraJson);
1591 private EngageVoidCallback on_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED = (
string eventExtraJson) =>
1593 lock (_engineNotificationSubscribers)
1595 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1597 n.onEngineAudioDevicesRefreshed(eventExtraJson);
1602 private EngageVoidCallback on_ENGAGE_ENGINE_GROUP_BY_GROUP_PCM_POWER_LEVEL_REPORT = (
string eventExtraJson) =>
1604 lock (_engineNotificationSubscribers)
1606 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1608 n.onEngineGroupByGroupPcmPowerLevels(eventExtraJson);
1613 private EngageVoidCallback on_ENGAGE_ENGINE_AUDIO_DEVICE_EVENT = (
string eventExtraJson) =>
1615 lock (_engineNotificationSubscribers)
1617 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1619 n.onEngineAudioDevicesEvent(eventExtraJson);
1624 private EngageStringCallback on_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT = (
string id,
string eventExtraJson) =>
1626 lock (_rallypointNotificationSubscribers)
1628 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1630 n.onRallypointPausingConnectionAttempt(
id, eventExtraJson);
1635 private EngageStringCallback on_ENGAGE_RP_CONNECTING = (
string id,
string eventExtraJson) =>
1637 lock (_rallypointNotificationSubscribers)
1639 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1641 n.onRallypointConnecting(
id, eventExtraJson);
1646 private EngageStringCallback on_ENGAGE_RP_CONNECTED = (
string id,
string eventExtraJson) =>
1648 lock (_rallypointNotificationSubscribers)
1650 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1652 n.onRallypointConnected(
id, eventExtraJson);
1657 private EngageStringCallback on_ENGAGE_RP_DISCONNECTED = (
string id,
string eventExtraJson) =>
1659 lock (_rallypointNotificationSubscribers)
1661 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1663 n.onRallypointDisconnected(
id, eventExtraJson);
1668 private EngageStringAndTwoIntCallback on_ENGAGE_RP_ROUNDTRIP_REPORT = (
string id,
int rtMs,
int rtRating,
string eventExtraJson) =>
1670 lock (_rallypointNotificationSubscribers)
1672 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1674 n.onRallypointRoundtripReport(
id, rtMs, rtRating, eventExtraJson);
1679 private EngageLoggingCallback on_ENGAGE_LOG_MESSAGE_HOOK_CALLBACK = (
int level,
string tag,
string message) =>
1681 lock (_loggingNotificationSubscribers)
1683 foreach (ILoggingNotifications n
in _loggingNotificationSubscribers)
1685 n.onEngageLogMessage(level, tag, message);
1691 private EngageStringCallback on_ENGAGE_GROUP_CREATED = (
string id,
string eventExtraJson) =>
1693 lock (_groupNotificationSubscribers)
1695 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1697 n.onGroupCreated(
id, eventExtraJson);
1702 private EngageStringCallback on_ENGAGE_GROUP_CREATE_FAILED = (
string id,
string eventExtraJson) =>
1704 lock (_groupNotificationSubscribers)
1706 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1708 n.onGroupCreateFailed(
id, eventExtraJson);
1713 private EngageStringCallback on_ENGAGE_GROUP_DELETED = (
string id,
string eventExtraJson) =>
1715 lock (_groupNotificationSubscribers)
1717 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1719 n.onGroupDeleted(
id, eventExtraJson);
1724 private EngageStringCallback on_ENGAGE_GROUP_CONNECTED = (
string id,
string eventExtraJson) =>
1726 lock (_groupNotificationSubscribers)
1728 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1730 n.onGroupConnected(
id, eventExtraJson);
1735 private EngageStringCallback on_ENGAGE_GROUP_CONNECT_FAILED = (
string id,
string eventExtraJson) =>
1737 lock (_groupNotificationSubscribers)
1739 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1741 n.onGroupConnectFailed(
id, eventExtraJson);
1746 private EngageStringCallback on_ENGAGE_GROUP_DISCONNECTED = (
string id,
string eventExtraJson) =>
1748 lock (_groupNotificationSubscribers)
1750 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1752 n.onGroupDisconnected(
id, eventExtraJson);
1757 private EngageStringCallback on_ENGAGE_GROUP_JOINED = (
string id,
string eventExtraJson) =>
1759 lock (_groupNotificationSubscribers)
1761 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1763 n.onGroupJoined(
id, eventExtraJson);
1768 private EngageStringCallback on_ENGAGE_GROUP_JOIN_FAILED = (
string id,
string eventExtraJson) =>
1770 lock (_groupNotificationSubscribers)
1772 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1774 n.onGroupJoinFailed(
id, eventExtraJson);
1779 private EngageStringCallback on_ENGAGE_GROUP_LEFT = (
string id,
string eventExtraJson) =>
1781 lock (_groupNotificationSubscribers)
1783 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1785 n.onGroupLeft(
id, eventExtraJson);
1790 private EngageStringAndIntCallback on_ENGAGE_GROUP_MEMBER_COUNT_CHANGED = (
string id,
int newCount,
string eventExtraJson) =>
1792 lock (_groupNotificationSubscribers)
1794 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1796 n.onGroupMemberCountChanged(
id, newCount, eventExtraJson);
1801 private EngageStringCallback on_ENGAGE_GROUP_RX_STARTED = (
string id,
string eventExtraJson) =>
1803 lock (_groupNotificationSubscribers)
1805 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1807 n.onGroupRxStarted(
id, eventExtraJson);
1812 private EngageStringCallback on_ENGAGE_GROUP_RX_ENDED = (
string id,
string eventExtraJson) =>
1814 lock (_groupNotificationSubscribers)
1816 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1818 n.onGroupRxEnded(
id, eventExtraJson);
1823 private EngageStringCallback on_ENGAGE_GROUP_RX_MUTED = (
string id,
string eventExtraJson) =>
1825 lock (_groupNotificationSubscribers)
1827 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1829 n.onGroupRxMuted(
id, eventExtraJson);
1834 private EngageStringCallback on_ENGAGE_GROUP_RX_UNMUTED = (
string id,
string eventExtraJson) =>
1836 lock (_groupNotificationSubscribers)
1838 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1840 n.onGroupRxUnmuted(
id, eventExtraJson);
1845 private EngageStringCallback on_ENGAGE_GROUP_TX_MUTED = (
string id,
string eventExtraJson) =>
1847 lock (_groupNotificationSubscribers)
1849 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1851 n.onGroupTxMuted(
id, eventExtraJson);
1856 private EngageStringCallback on_ENGAGE_GROUP_TX_UNMUTED = (
string id,
string eventExtraJson) =>
1858 lock (_groupNotificationSubscribers)
1860 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1862 n.onGroupTxUnmuted(
id, eventExtraJson);
1867 private EngageString2Callback on_ENGAGE_GROUP_RX_SPEAKERS_CHANGED = (
string id,
string speakerjson,
string eventExtraJson) =>
1869 lock (_groupNotificationSubscribers)
1871 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1873 n.onGroupRxSpeakersChanged(
id, speakerjson, eventExtraJson);
1878 private EngageStringCallback on_ENGAGE_GROUP_TX_STARTED = (
string id,
string eventExtraJson) =>
1880 lock (_groupNotificationSubscribers)
1882 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1884 n.onGroupTxStarted(
id, eventExtraJson);
1889 private EngageStringCallback on_ENGAGE_GROUP_TX_ENDED = (
string id,
string eventExtraJson) =>
1891 lock (_groupNotificationSubscribers)
1893 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1895 n.onGroupTxEnded(
id, eventExtraJson);
1900 private EngageStringCallback on_ENGAGE_GROUP_TX_FAILED = (
string id,
string eventExtraJson) =>
1902 lock (_groupNotificationSubscribers)
1904 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1906 n.onGroupTxFailed(
id, eventExtraJson);
1911 private EngageStringCallback on_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY = (
string id,
string eventExtraJson) =>
1913 lock (_groupNotificationSubscribers)
1915 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1917 n.onGroupTxUsurpedByPriority(
id, eventExtraJson);
1922 private EngageStringCallback on_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED = (
string id,
string eventExtraJson) =>
1924 lock (_groupNotificationSubscribers)
1926 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1928 n.onGroupMaxTxTimeExceeded(
id, eventExtraJson);
1933 private EngageString2Callback on_ENGAGE_GROUP_NODE_DISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1935 lock (_groupNotificationSubscribers)
1937 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1939 n.onGroupNodeDiscovered(
id, nodeJson, eventExtraJson);
1944 private EngageString2Callback on_ENGAGE_GROUP_NODE_REDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1946 lock (_groupNotificationSubscribers)
1948 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1950 n.onGroupNodeRediscovered(
id, nodeJson, eventExtraJson);
1955 private EngageString2Callback on_ENGAGE_GROUP_NODE_UNDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1957 lock (_groupNotificationSubscribers)
1959 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1961 n.onGroupNodeUndiscovered(
id, nodeJson, eventExtraJson);
1966 private EngageString2Callback on_ENGAGE_GROUP_ASSET_DISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1968 lock (_groupNotificationSubscribers)
1970 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1972 n.onGroupAssetDiscovered(
id, nodeJson, eventExtraJson);
1977 private EngageString2Callback on_ENGAGE_GROUP_ASSET_REDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1979 lock (_groupNotificationSubscribers)
1981 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1983 n.onGroupAssetRediscovered(
id, nodeJson, eventExtraJson);
1988 private EngageString2Callback on_ENGAGE_GROUP_ASSET_UNDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1990 lock (_groupNotificationSubscribers)
1992 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1994 n.onGroupAssetUndiscovered(
id, nodeJson, eventExtraJson);
1999 private EngageVoidCallback on_ENGAGE_LICENSE_CHANGED = (
string eventExtraJson) =>
2001 lock (_licenseNotificationSubscribers)
2003 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
2005 n.onLicenseChanged(eventExtraJson);
2010 private EngageVoidCallback on_ENGAGE_LICENSE_EXPIRED = (
string eventExtraJson) =>
2012 lock (_licenseNotificationSubscribers)
2014 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
2016 n.onLicenseExpired(eventExtraJson);
2021 private EngageStringCallback on_ENGAGE_LICENSE_EXPIRING = (
string secondsLeft,
string eventExtraJson) =>
2023 lock (_licenseNotificationSubscribers)
2025 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
2027 n.onLicenseExpiring(Double.Parse(secondsLeft), eventExtraJson);
2032 private EngageStringCallback on_ENGAGE_GROUP_BLOB_SENT = (
string id,
string eventExtraJson) =>
2034 lock (_groupNotificationSubscribers)
2036 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2038 n.onGroupBlobSent(
id, eventExtraJson);
2043 private EngageStringCallback on_ENGAGE_GROUP_BLOB_SEND_FAILED = (
string id,
string eventExtraJson) =>
2045 lock (_groupNotificationSubscribers)
2047 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2049 n.onGroupBlobSendFailed(
id, eventExtraJson);
2054 private EngageString2AndBlobCallback on_ENGAGE_GROUP_BLOB_RECEIVED = (
string id,
string blobInfoJson, IntPtr blob,
int blobSize,
string eventExtraJson) =>
2056 byte[] csBlob =
new byte[blobSize];
2057 Marshal.Copy(blob, csBlob, 0, blobSize);
2059 lock (_groupNotificationSubscribers)
2061 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2063 n.onGroupBlobReceived(
id, blobInfoJson, csBlob, blobSize, eventExtraJson);
2068 JObject blobInfo = JObject.Parse(blobInfoJson);
2069 if(blobInfo !=
null)
2071 int payloadType = (int)blobInfo[
"payloadType"];
2072 string nodeId = (string)blobInfo[
"source"];
2075 if (payloadType ==
Engage.ENGAGE_BLOB_PT_ENGAGE_BINARY_HUMAN_BIOMETRICS)
2077 lock (_humanBiometricsNotifications)
2079 if (_humanBiometricsNotifications.Count > 0)
2082 string hbmJson = humanBiometricsFromBlob(csBlob);
2084 if (hbmJson !=
null)
2086 foreach (IHumanBiometricsNotifications n
in _humanBiometricsNotifications)
2088 n.onHumanBiometricsReceived(
id, nodeId, hbmJson, eventExtraJson);
2097 private EngageStringCallback on_ENGAGE_GROUP_RTP_SENT = (
string id,
string eventExtraJson) =>
2099 lock (_groupNotificationSubscribers)
2101 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2103 n.onGroupRtpSent(
id, eventExtraJson);
2108 private EngageStringCallback on_ENGAGE_GROUP_RTP_SEND_FAILED = (
string id,
string eventExtraJson) =>
2110 lock (_groupNotificationSubscribers)
2112 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2114 n.onGroupRtpSendFailed(
id, eventExtraJson);
2119 private EngageString2AndBlobCallback on_ENGAGE_GROUP_RTP_RECEIVED = (
string id,
string rtpHeaderJson, IntPtr payload,
int payloadSize,
string eventExtraJson) =>
2121 lock (_groupNotificationSubscribers)
2123 byte[] csPayload =
new byte[payloadSize];
2124 Marshal.Copy(payload, csPayload, 0, payloadSize);
2126 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2128 n.onGroupRtpReceived(
id, rtpHeaderJson, csPayload, payloadSize, eventExtraJson);
2133 private EngageStringCallback on_ENGAGE_GROUP_RAW_SENT = (
string id,
string eventExtraJson) =>
2135 lock (_groupNotificationSubscribers)
2137 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2139 n.onGroupRawSent(
id, eventExtraJson);
2144 private EngageStringCallback on_ENGAGE_GROUP_RAW_SEND_FAILED = (
string id,
string eventExtraJson) =>
2146 lock (_groupNotificationSubscribers)
2148 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2150 n.onGroupRawSendFailed(
id, eventExtraJson);
2155 private EngageStringAndBlobCallback on_ENGAGE_GROUP_RAW_RECEIVED = (
string id, IntPtr raw,
int rawSize,
string eventExtraJson) =>
2157 lock (_groupNotificationSubscribers)
2159 byte[] csRaw =
new byte[rawSize];
2160 Marshal.Copy(raw, csRaw, 0, rawSize);
2162 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2164 n.onGroupRawReceived(
id, csRaw, rawSize, eventExtraJson);
2169 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_STARTED = (
string id,
string eventJson,
string eventExtraJson) =>
2171 lock (_groupNotificationSubscribers)
2173 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2175 n.onGroupTimelineEventStarted(
id, eventJson, eventExtraJson);
2180 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED = (
string id,
string eventJson,
string eventExtraJson) =>
2182 lock (_groupNotificationSubscribers)
2184 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2186 n.onGroupTimelineEventUpdated(
id, eventJson, eventExtraJson);
2191 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_ENDED = (
string id,
string eventJson,
string eventExtraJson) =>
2193 lock (_groupNotificationSubscribers)
2195 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2197 n.onGroupTimelineEventEnded(
id, eventJson, eventExtraJson);
2202 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_REPORT = (
string id,
string reportJson,
string eventExtraJson) =>
2204 lock (_groupNotificationSubscribers)
2206 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2208 n.onGroupTimelineReport(
id, reportJson, eventExtraJson);
2213 private EngageStringCallback on_ENGAGE_GROUP_TIMELINE_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2215 lock (_groupNotificationSubscribers)
2217 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2219 n.onGroupTimelineReportFailed(
id, eventExtraJson);
2224 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_GROOMED = (
string id,
string eventListJson,
string eventExtraJson) =>
2226 lock (_groupNotificationSubscribers)
2228 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2230 n.onGroupTimelineGroomed(
id, eventListJson, eventExtraJson);
2235 private EngageString2Callback on_ENGAGE_GROUP_HEALTH_REPORT = (
string id,
string healthReportJson,
string eventExtraJson) =>
2237 lock (_groupNotificationSubscribers)
2239 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2241 n.onGroupHealthReport(
id, healthReportJson, eventExtraJson);
2246 private EngageStringCallback on_ENGAGE_GROUP_HEALTH_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2248 lock (_groupNotificationSubscribers)
2250 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2252 n.onGroupHealthReportFailed(
id, eventExtraJson);
2257 private EngageString2Callback on_ENGAGE_GROUP_STATS_REPORT = (
string id,
string statsReportJson,
string eventExtraJson) =>
2259 lock (_groupNotificationSubscribers)
2261 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2263 n.onGroupStatsReport(
id, statsReportJson, eventExtraJson);
2268 private EngageStringCallback on_ENGAGE_GROUP_STATS_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2270 lock (_groupNotificationSubscribers)
2272 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2274 n.onGroupStatsReportFailed(
id, eventExtraJson);
2279 private EngageStringCallback on_ENGAGE_BRIDGE_CREATED = (
string id,
string eventExtraJson) =>
2281 lock (_bridgeNotificationSubscribers)
2283 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2285 n.onBridgeCreated(
id, eventExtraJson);
2290 private EngageStringCallback on_ENGAGE_BRIDGE_CREATE_FAILED = (
string id,
string eventExtraJson) =>
2292 lock (_bridgeNotificationSubscribers)
2294 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2296 n.onBridgeCreateFailed(
id, eventExtraJson);
2301 private EngageStringCallback on_ENGAGE_BRIDGE_DELETED = (
string id,
string eventExtraJson) =>
2303 lock (_bridgeNotificationSubscribers)
2305 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2307 n.onBridgeDeleted(
id, eventExtraJson);
2312 private EngageString2AndInt2Callback on_ENGAGE_GROUP_RX_VOLUME_CHANGED = (
string id,
int leftLevelPerc,
int rightLevelPerc,
string eventExtraJson) =>
2314 lock (_groupNotificationSubscribers)
2316 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2318 n.onGroupRxVolumeChanged(
id, leftLevelPerc, rightLevelPerc, eventExtraJson);
2323 private EngageString2Callback on_ENGAGE_GROUP_RX_DTMF = (
string id,
string dtmfJson,
string eventExtraJson) =>
2325 lock (_groupNotificationSubscribers)
2327 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2329 n.onGroupRxDtmf(
id, dtmfJson, eventExtraJson);
2334 private EngageStringCallback on_ENGAGE_GROUP_RECONFIGURED = (
string id,
string eventExtraJson) =>
2336 lock (_groupNotificationSubscribers)
2338 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2340 n.onGroupReconfigured(
id, eventExtraJson);
2345 private EngageStringCallback on_ENGAGE_GROUP_RECONFIGURATION_FAILED = (
string id,
string eventExtraJson) =>
2347 lock (_groupNotificationSubscribers)
2349 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2351 n.onGroupReconfigurationFailed(
id, eventExtraJson);
2356 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_STARTED = (
string id,
string eventExtraJson) =>
2358 lock (_groupNotificationSubscribers)
2360 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2362 n.onGroupAudioRecordingStarted(
id, eventExtraJson);
2367 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_FAILED = (
string id,
string eventExtraJson) =>
2369 lock (_groupNotificationSubscribers)
2371 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2373 n.onGroupAudioRecordingFailed(
id, eventExtraJson);
2378 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_ENDED = (
string id,
string eventExtraJson) =>
2380 lock (_groupNotificationSubscribers)
2382 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2384 n.onGroupAudioRecordingEnded(
id, eventExtraJson);
2391 #region Public functions
2394 engageEnableNotifications(0);
2395 engageWin32LibraryInit();
2396 engageEnableNotifications(1);
2401 engageEnableNotifications(0);
2403 engageWin32LibraryDeinit();
2406 public void subscribe(IEngineNotifications n)
2408 lock(_engineNotificationSubscribers)
2410 _engineNotificationSubscribers.Add(n);
2414 public void unsubscribe(IEngineNotifications n)
2416 lock (_engineNotificationSubscribers)
2418 _engineNotificationSubscribers.Remove(n);
2422 public void subscribe(IRallypointNotifications n)
2424 lock (_rallypointNotificationSubscribers)
2426 _rallypointNotificationSubscribers.Add(n);
2430 public void unsubscribe(IRallypointNotifications n)
2432 lock (_rallypointNotificationSubscribers)
2434 _rallypointNotificationSubscribers.Remove(n);
2438 public void subscribe(IGroupNotifications n)
2440 lock (_groupNotificationSubscribers)
2442 _groupNotificationSubscribers.Add(n);
2446 public void unsubscribe(IGroupNotifications n)
2448 lock (_groupNotificationSubscribers)
2450 _groupNotificationSubscribers.Remove(n);
2454 public void subscribe(ILicenseNotifications n)
2456 lock (_licenseNotificationSubscribers)
2458 _licenseNotificationSubscribers.Add(n);
2462 public void unsubscribe(ILicenseNotifications n)
2464 lock (_licenseNotificationSubscribers)
2466 _licenseNotificationSubscribers.Remove(n);
2470 public void subscribe(IHumanBiometricsNotifications n)
2472 lock (_humanBiometricsNotifications)
2474 _humanBiometricsNotifications.Add(n);
2478 public void unsubscribe(IHumanBiometricsNotifications n)
2480 lock (_humanBiometricsNotifications)
2482 _humanBiometricsNotifications.Remove(n);
2486 public void subscribe(IBridgeNotifications n)
2488 lock (_bridgeNotificationSubscribers)
2490 _bridgeNotificationSubscribers.Add(n);
2494 public void unsubscribe(IBridgeNotifications n)
2496 lock (_bridgeNotificationSubscribers)
2498 _bridgeNotificationSubscribers.Remove(n);
2502 public void subscribe(ILoggingNotifications n)
2504 lock (_loggingNotificationSubscribers)
2506 _loggingNotificationSubscribers.Add(n);
2508 if(_loggingNotificationSubscribers.Count() == 1)
2510 engageSetLoggingOutputOverride(on_ENGAGE_LOG_MESSAGE_HOOK_CALLBACK);
2515 public void unsubscribe(ILoggingNotifications n)
2517 lock (_loggingNotificationSubscribers)
2519 _loggingNotificationSubscribers.Remove(n);
2521 if(_loggingNotificationSubscribers.Count() == 0)
2523 engageSetLoggingOutputOverride(
null);
2528 public void subscribe(IAudioRecordingNotifications n)
2530 lock (_audioRecordingNotificationSubscribers)
2532 _audioRecordingNotificationSubscribers.Add(n);
2536 public void unsubscribe(IAudioRecordingNotifications n)
2538 lock (_audioRecordingNotificationSubscribers)
2540 _audioRecordingNotificationSubscribers.Remove(n);
2544 public void win32Init()
2546 engageWin32LibraryInit();
2549 public void win32DeInit()
2551 engageWin32LibraryDeinit();
2554 public int initialize(
string enginePolicyConfiguration,
string userIdentity,
string tempStoragePath)
2558 rc = registerEventCallbacks();
2559 if(rc != ENGAGE_RESULT_OK)
2564 return engageInitialize(enginePolicyConfiguration, userIdentity, tempStoragePath);
2567 public int shutdown()
2576 return engageStart();
2581 return engageStop();
2584 public int createGroup(
string jsonConfiguration)
2586 return engageCreateGroup(jsonConfiguration);
2589 public int deleteGroup(
string id)
2591 return engageDeleteGroup(
id);
2594 public int joinGroup(
string id)
2596 return engageJoinGroup(
id);
2599 public int leaveGroup(
string id)
2601 return engageLeaveGroup(
id);
2604 public int setGroupRules(
string id,
string jsonParams)
2606 return engageSetGroupRules(
id, jsonParams);
2609 public int beginGroupTx(
string id,
int txPriority,
int txFlags)
2611 return engageBeginGroupTx(
id, txPriority, txFlags);
2614 public int beginGroupTxAdvanced(
string id,
string jsonParams)
2616 return engageBeginGroupTxAdvanced(
id, jsonParams);
2619 public int endGroupTx(
string id)
2621 return engageEndGroupTx(
id);
2624 public int setGroupRxTag(
string id,
int tag)
2626 return engageSetGroupRxTag(
id, tag);
2629 public int muteGroupRx(
string id)
2631 return engageMuteGroupRx(
id);
2634 public int unmuteGroupRx(
string id)
2636 return engageUnmuteGroupRx(
id);
2639 public int muteGroupTx(
string id)
2641 return engageMuteGroupTx(
id);
2644 public int unmuteGroupTx(
string id)
2646 return engageUnmuteGroupTx(
id);
2649 public int setGroupRxVolume(
string id,
int left,
int right)
2651 return engageSetGroupRxVolume(
id, left, right);
2654 public int queryGroupTimeline(
string id,
string jsonParams)
2656 return engageQueryGroupTimeline(
id, jsonParams);
2659 public int queryGroupHealth(
string id)
2661 return engageQueryGroupHealth(
id);
2664 public int queryGroupStats(
string id)
2666 return engageQueryGroupStats(
id);
2669 public int logMsg(
int level,
string tag,
string msg)
2671 return engageLogMsg(level, tag, msg);
2674 public int setLogLevel(
int level)
2676 return engageSetLogLevel(level);
2679 public int setLogTagExtensionLevel(
string tagExtension)
2681 return engageSetLogTagExtension(tagExtension);
2684 public int enableSyslog(
bool enable)
2686 return engageEnableSyslog(enable ? 1 : 0);
2689 public int enableWatchdog(
bool enable)
2691 return engageWatchdog(enable ? 1 : 0);
2694 public String getVersion()
2696 IntPtr ptr = engageGetVersion();
2698 if (ptr == IntPtr.Zero)
2704 return Marshal.PtrToStringAnsi(ptr);
2708 public String getHardwareReport()
2710 IntPtr ptr = engageGetHardwareReport();
2712 if (ptr == IntPtr.Zero)
2718 return Marshal.PtrToStringAnsi(ptr);
2722 public String getActiveLicenseDescriptor()
2724 IntPtr ptr = engageGetActiveLicenseDescriptor();
2726 if (ptr == IntPtr.Zero)
2732 return Marshal.PtrToStringAnsi(ptr);
2736 public String getLicenseDescriptor(
string entitlement,
string key,
string activationCode,
string manufacturerId)
2738 IntPtr ptr = engageGetLicenseDescriptor(entitlement, key, activationCode, manufacturerId);
2740 if (ptr == IntPtr.Zero)
2746 return Marshal.PtrToStringAnsi(ptr);
2750 public int updateLicense(
string entitlement,
string key,
string activationCode,
string manufacturerId)
2752 return engageUpdateLicense(entitlement, key, activationCode, manufacturerId);
2755 public String getNetworkInterfaceDevices()
2757 IntPtr ptr = engageGetNetworkInterfaceDevices();
2759 if (ptr == IntPtr.Zero)
2765 return Marshal.PtrToStringAnsi(ptr);
2769 public String getAudioDevices()
2771 IntPtr ptr = engageGetAudioDevices();
2773 if (ptr == IntPtr.Zero)
2779 return Marshal.PtrToStringAnsi(ptr);
2783 public int setMissionId(
string missionId)
2785 return engageSetMissionId(missionId);
2788 public int openCertStore(
string fileName,
string passwordHexByteString)
2790 return engageOpenCertStore(fileName, passwordHexByteString);
2793 public String getCertStoreDescriptor()
2795 IntPtr ptr = engageGetCertStoreDescriptor();
2797 if (ptr == IntPtr.Zero)
2803 return Marshal.PtrToStringAnsi(ptr);
2807 public int closeCertStore()
2809 return engageCloseCertStore();
2812 public int setCertStoreCertificatePem(
string id,
string certificatePem,
string privateKeyPem,
string tags)
2814 return engageSetCertStoreCertificatePem(
id, certificatePem, privateKeyPem, tags);
2817 public int setCertStoreCertificateP12(
string id,
byte[] data,
int size,
string password,
string tags)
2819 IntPtr pinned_data = Marshal.AllocHGlobal(size);
2820 Marshal.Copy(data, 0, pinned_data, size);
2821 int rc = engageSetCertStoreCertificateP12(
id, pinned_data, size, password, tags);
2822 Marshal.FreeHGlobal(pinned_data);
2827 public int deleteCertStoreCertificate(
string id)
2829 return engageDeleteCertStoreCertificate(
id);
2832 public String getCertStoreCertificatePem(
string id)
2834 IntPtr ptr = engageGetCertStoreCertificatePem(
id);
2836 if (ptr == IntPtr.Zero)
2842 return Marshal.PtrToStringAnsi(ptr);
2846 public String getArrayOfCertificateDescriptorsFromPem(
string pem)
2848 IntPtr ptr = engageGetArrayOfCertificateDescriptorsFromPem(pem);
2850 if (ptr == IntPtr.Zero)
2856 return Marshal.PtrToStringAnsi(ptr);
2860 public String getCertificateDescriptorFromPem(
string pem)
2862 IntPtr ptr = engageGetCertificateDescriptorFromPem(pem);
2864 if (ptr == IntPtr.Zero)
2870 return Marshal.PtrToStringAnsi(ptr);
2874 public int importCertStoreElementFromCertStore(
string id,
string srcId,
string srcFileName,
string srcPasswordHexByteString,
string tags)
2876 return engageImportCertStoreElementFromCertStore(
id, srcId, srcFileName, srcPasswordHexByteString, tags);
2879 public String queryCertStoreContents(
string fileName,
string passwordHexByteString)
2881 IntPtr ptr = engageQueryCertStoreContents(fileName, passwordHexByteString);
2883 if (ptr == IntPtr.Zero)
2889 return Marshal.PtrToStringAnsi(ptr);
2893 public int encrypt(
byte[] src,
int size, out
byte[] dst,
string passwordHexByteString)
2896 IntPtr pinned_src = Marshal.AllocHGlobal(size);
2897 Marshal.Copy(src, 0, pinned_src, size);
2900 IntPtr pinned_dst = Marshal.AllocHGlobal(size + 16 + 16);
2902 int bytesEncrypted = engageEncrypt(pinned_src, size, pinned_dst, passwordHexByteString);
2904 if(bytesEncrypted > 0)
2906 dst =
new byte[bytesEncrypted];
2907 Marshal.Copy(pinned_dst, dst, 0, bytesEncrypted);
2915 Marshal.FreeHGlobal(pinned_src);
2916 Marshal.FreeHGlobal(pinned_dst);
2918 return bytesEncrypted;
2921 public int decrypt(
byte[] src,
int size, out
byte[] dst,
string passwordHexByteString)
2924 IntPtr pinned_src = Marshal.AllocHGlobal(size);
2925 Marshal.Copy(src, 0, pinned_src, size);
2928 IntPtr pinned_dst = Marshal.AllocHGlobal(size + 16);
2930 int bytesDecrypted = engageDecrypt(pinned_src, size, pinned_dst, passwordHexByteString);
2932 if (bytesDecrypted > 0)
2934 dst =
new byte[bytesDecrypted];
2935 Marshal.Copy(pinned_dst, dst, 0, bytesDecrypted);
2943 Marshal.FreeHGlobal(pinned_src);
2944 Marshal.FreeHGlobal(pinned_dst);
2946 return bytesDecrypted;
3049 public String generateMission(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName)
3051 IntPtr ptr = engageGenerateMission(keyPhrase, audioGroupCount, rallypointHost, missionName);
3053 if (ptr == IntPtr.Zero)
3059 return Marshal.PtrToStringAnsi(ptr);
3063 public String generateMissionUsingCertStore(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName,
string certStoreFn,
string certStorePasswordHexByteString,
string certStoreElement)
3065 IntPtr ptr = engageGenerateMissionUsingCertStore(keyPhrase, audioGroupCount, rallypointHost, missionName, certStoreFn, certStorePasswordHexByteString, certStoreElement);
3067 if (ptr == IntPtr.Zero)
3073 return Marshal.PtrToStringAnsi(ptr);
3077 public int updatePresenceDescriptor(
string id,
string jsonDescriptor,
bool forceBeacon)
3079 return engageUpdatePresenceDescriptor(
id, jsonDescriptor, (forceBeacon ? 1 : 0));
3082 public int setFipsCrypto(
string jsonParams)
3084 return engageSetFipsCrypto(jsonParams);
3087 public bool isCryptoFipsValidated()
3089 return (engageIsCryptoFipsValidated() == 1 ?
true : false);
3092 public int beginGroupPcmPowerTracking(
string id)
3094 return engageBeginGroupPcmPowerTracking(
id);
3097 public int endGroupPcmPowerTracking(
string id)
3099 return engageEndGroupPcmPowerTracking(
id);
3106 public static uint swapEndianness(uint x)
3108 return ((x & 0x000000ff) << 24) +
3109 ((x & 0x0000ff00) << 8) +
3110 ((x & 0x00ff0000) >> 8) +
3111 ((x & 0xff000000) >> 24);
3114 public static string humanBiometricsFromBlob(
byte[] blob)
3116 JArray dataSeriesArray;
3121 dataSeriesArray =
new JArray();
3124 int bytesLeftInTheBlob = blob.Length;
3127 GCHandle pinnedBlob = GCHandle.Alloc(blob, GCHandleType.Pinned);
3130 IntPtr ptr = pinnedBlob.AddrOfPinnedObject();
3133 while(bytesLeftInTheBlob > 0)
3136 DataSeriesHeader hdr = (DataSeriesHeader)Marshal.PtrToStructure(ptr, typeof(DataSeriesHeader));
3139 if (BitConverter.IsLittleEndian)
3141 hdr.ts = swapEndianness(hdr.ts);
3145 JObject se =
new JObject();
3148 se[
"t"] = (int)hdr.t;
3150 se[
"it"] = (int)hdr.it;
3151 se[
"im"] = (int)hdr.im;
3152 se[
"vt"] = (int)hdr.vt;
3155 ptr = IntPtr.Add(ptr, 9);
3156 bytesLeftInTheBlob -= 9;
3161 JArray s =
new JArray();
3165 for (
byte x = 0; x < hdr.ss; x++)
3167 DataElementUint8 de = (DataElementUint8)Marshal.PtrToStructure(ptr, typeof(DataElementUint8));
3172 ptr = IntPtr.Add(ptr, 2);
3173 bytesLeftInTheBlob -= 2;
3176 else if (hdr.vt == 2)
3180 else if (hdr.vt == 3)
3184 else if (hdr.vt == 4)
3194 dataSeriesArray.Add(se);
3201 dataSeriesArray =
null;
3202 Trace.WriteLine(e.StackTrace);
3207 if(dataSeriesArray !=
null)
3209 JObject hbmData =
new JObject();
3210 hbmData[
"data"] = dataSeriesArray;
3211 rc = hbmData.ToString();
3217 public int platformNotifyChanges(
string jsonChangesArray)
3219 return engagePlatformNotifyChanges(jsonChangesArray);
3222 public String getDeviceId()
3224 IntPtr ptr = engageGetDeviceId();
3226 if (ptr == IntPtr.Zero)
3232 return Marshal.PtrToStringAnsi(ptr);
3236 public int verifyRiff(
string fn)
3238 return engageVerifyRiff(fn);
3241 public String getRiffDescriptor(
string fn)
3243 IntPtr ptr = engageGetRiffDescriptor(fn);
3245 if (ptr == IntPtr.Zero)
3251 return Marshal.PtrToStringAnsi(ptr);