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 maxEvents =
"maxEvents";
481 public static String groomingIntervalSecs =
"groomingIntervalSecs";
482 public static String autosaveIntervalSecs =
"autosaveIntervalSecs";
483 public static String disableSigningAndVerification =
"disableSigningAndVerification";
484 public static String ephemeral =
"ephemeral";
489 public static String objectName =
"security";
494 public static String objectName =
"certificate";
495 public static String certificate =
"certificate";
496 public static String key =
"key";
501 public static String objectName =
"licensing";
502 public static String entitlement =
"entitlement";
503 public static String key =
"key";
504 public static String activationCode =
"activationCode";
505 public static String manufacturerId =
"manufacturerId";
510 public static String objectName =
"networking";
511 public static String defaultNic =
"defaultNic";
512 public static String maxOutputQueuePackets =
"maxOutputQueuePackets";
513 public static String rtpJitterMinMs =
"rtpJitterMinMs";
514 public static String rtpJitterMaxFactor =
"rtpJitterMaxFactor";
515 public static String rtpJitterMaxMs =
"rtpJitterMaxMs";
516 public static String rtpLatePacketSequenceRange =
"rtpLatePacketSequenceRange";
517 public static String rtpJitterTrimPercentage =
"rtpJitterTrimPercentage";
518 public static String rtpJitterUnderrunReductionThresholdMs =
"rtpJitterUnderrunReductionThresholdMs";
519 public static String rtpJitterUnderrunReductionAger =
"rtpJitterUnderrunReductionAger";
520 public static String rtpJitterForceTrimAtMs =
"rtpJitterForceTrimAtMs";
521 public static String rtpLatePacketTimestampRangeMs =
"rtpLatePacketTimestampRangeMs";
522 public static String rtpInboundProcessorInactivityMs =
"rtpInboundProcessorInactivityMs";
523 public static String multicastRejoinSecs =
"multicastRejoinSecs";
524 public static String rpLeafConnectTimeoutSecs =
"rpLeafConnectTimeoutSecs";
525 public static String maxReconnectPauseMs =
"maxReconnectPauseMs";
526 public static String reconnectFailurePauseIncrementMs =
"reconnectFailurePauseIncrementMs";
527 public static String sendFailurePauseMs =
"sendFailurePauseMs";
528 public static String rallypointRtTestIntervalMs =
"rallypointRtTestIntervalMs";
529 public static String logRtpJitterBufferStats =
"logRtpJitterBufferStats";
530 public static String preventMulticastFailover =
"preventMulticastFailover";
531 public static String rtcpPresenceTimeoutMs =
"rtcpPresenceTimeoutMs";
532 public static String rtpJtterLatencyMode =
"rtpJtterLatencyMode";
533 public static String rtpJitterMaxExceededClipPerc =
"rtpJitterMaxExceededClipPerc";
534 public static String rtpJitterMaxExceededClipHangMs =
"rtpJitterMaxExceededClipHangMs";
535 public static String rtpZombieLifetimeMs =
"rtpZombieLifetimeMs";
536 public static String rtpMaxTrimMs =
"rtpMaxTrimMs";
541 public static String objectName =
"audio";
542 public static String enabled =
"enabled";
543 public static String internalRate =
"internalRate";
544 public static String internalChannels =
"internalChannels";
545 public static String allowOutputOnTransmit =
"allowOutputOnTransmit";
546 public static String muteTxOnTx =
"muteTxOnTx";
547 public static String denoiseInput =
"denoiseInput";
548 public static String denoiseOutput =
"denoiseOutput";
552 public static String objectName =
"aec";
553 public static String enabled =
"enabled";
554 public static String mode =
"mode";
555 public static String speakerTailMs =
"speakerTailMs";
556 public static String cng =
"cng";
561 public static String objectName =
"vad";
562 public static String enabled =
"enabled";
563 public static String mode =
"mode";
568 public static String objectName =
"android";
569 public static String api =
"api";
574 public static String objectName =
"inputAgc";
575 public static String enabled =
"enabled";
576 public static String minLevel =
"minLevel";
577 public static String maxLevel =
"maxLevel";
578 public static String compressionGainDb =
"compressionGainDb";
579 public static String enableLimiter =
"enableLimiter";
580 public static String targetLevelDb =
"targetLevelDb";
585 public static String objectName =
"outputAgc";
586 public static String enabled =
"enabled";
587 public static String minLevel =
"minLevel";
588 public static String maxLevel =
"maxLevel";
589 public static String compressionGainDb =
"compressionGainDb";
590 public static String enableLimiter =
"enableLimiter";
591 public static String targetLevelDb =
"targetLevelDb";
597 public static String objectName =
"discovery";
601 public static String objectName =
"magellan";
602 public static String enabled =
"enabled";
607 public static String objectName =
"ssdp";
608 public static String enabled =
"enabled";
609 public static String ageTimeoutMs =
"ageTimeoutMs";
610 public static String address =
"address";
615 public static String objectName =
"cistech";
616 public static String enabled =
"enabled";
617 public static String ageTimeoutMs =
"ageTimeoutMs";
618 public static String address =
"address";
623 public static String objectName =
"trellisware";
624 public static String enabled =
"enabled";
628 public static String dataDirectory =
"dataDirectory";
633 public static String
id =
"id";
634 public static String name =
"name";
635 public static String description =
"description";
636 public static String modPin =
"modPin";
637 public static String certStoreId =
"certStoreId";
638 public static String multicastFailoverPolicy =
"multicastFailoverPolicy";
643 public static String objectName =
"rallypoint";
644 public static String arrayName =
"rallypoints";
648 public static String objectName =
"host";
649 public static String address =
"address";
650 public static String port =
"port";
653 public static String certificate =
"certificate";
654 public static String certificateKey =
"certificateKey";
655 public static String verifyPeer =
"verifyPeer";
656 public static String allowSelfSignedCertificate =
"allowSelfSignedCertificate";
657 public static String transactionTimeoutMs =
"transactionTimeoutMs";
658 public static String connectionTimeoutSecs =
"connectionTimeoutSecs";
659 public static String disableMessageSigning =
"disableMessageSigning";
660 public static String use =
"use";
665 public static String objectName =
"address";
666 public static String address =
"address";
667 public static String port =
"port";
672 public static String objectName =
"rx";
673 public static String address =
"address";
674 public static String port =
"port";
679 public static String objectName =
"tx";
680 public static String address =
"address";
681 public static String port =
"port";
686 public static String objectName =
"rangerPackets";
687 public static String hangTimerSecs =
"hangTimerSecs";
688 public static String count =
"count";
693 public static String objectName =
"rtpProfile";
694 public static String mode =
"mode";
695 public static String jitterMaxMs =
"jitterMaxMs";
696 public static String jitterMinMs =
"jitterMinMs";
697 public static String jitterMaxFactor =
"jitterMaxFactor";
698 public static String latePacketSequenceRange =
"latePacketSequenceRange";
699 public static String latePacketTimestampRangeMs =
"latePacketTimestampRangeMs";
700 public static String jitterTrimPercentage =
"jitterTrimPercentage";
701 public static String jitterUnderrunReductionThresholdMs =
"jitterUnderrunReductionThresholdMs";
702 public static String jitterUnderrunReductionAger =
"jitterUnderrunReductionAger";
703 public static String jitterForceTrimAtMs =
"jitterForceTrimAtMs";
704 public static String jitterMaxTrimMs =
"jitterMaxTrimMs";
705 public static String jitterMaxExceededClipPerc =
"jitterMaxExceededClipPerc";
706 public static String jitterMaxExceededClipHangMs =
"jitterMaxExceededClipHangMs";
707 public static String inboundProcessorInactivityMs =
"inboundProcessorInactivityMs";
708 public static String rtcpPresenceTimeoutMs =
"rtcpPresenceTimeoutMs";
709 public static String zombieLifetimeMs =
"zombieLifetimeMs";
710 public static String signalledInboundProcessorInactivityMs =
"signalledInboundProcessorInactivityMs";
715 public static String objectName =
"group";
716 public static String arrayName =
"groups";
717 public static String
id =
"id";
718 public static String name =
"name";
719 public static String spokenName =
"spokenName";
720 public static String type =
"type";
721 public static String source =
"source";
722 public static String cryptoPassword =
"cryptoPassword";
723 public static String alias =
"alias";
724 public static String maxRxSecs =
"maxRxSecs";
725 public static String enableMulticastFailover =
"enableMulticastFailover";
726 public static String multicastFailoverSecs =
"multicastFailoverSecs";
727 public static String interfaceName =
"interfaceName";
728 public static String anonymousAlias =
"anonymousAlias";
729 public static String lbCrypto =
"lbCrypto";
730 public static String rtpProfile =
"rtpProfile";
731 public static String specializerAffinities =
"specializerAffinities";
732 public static String languageCode =
"languageCode";
736 public static String objectName =
"timeline";
737 public static String enabled =
"enabled";
742 public static String objectName =
"audio";
743 public static String inputId =
"inputId";
744 public static String outputId =
"outputId";
749 public static String objectName =
"priorityTranslation";
750 public static String priority =
"priority";
751 public static String rx =
"rx";
752 public static String tx =
"tx";
758 public static String objectName =
"txAudio";
759 public static String fdx =
"fdx";
760 public static String encoder =
"encoder";
761 public static String framingMs =
"framingMs";
762 public static String maxTxSecs =
"maxTxSecs";
763 public static String noHdrExt =
"noHdrExt";
764 public static String customRtpPayloadType =
"customRtpPayloadType";
765 public static String encoderName =
"encoderName";
766 public static String extensionSendInterval =
"extensionSendInterval";
767 public static String initialHeaderBurst =
"initialHeaderBurst";
768 public static String trailingHeaderBurst =
"initialHeaderBurst";
769 public static String enableSmoothing =
"enableSmoothing";
770 public static String dtx =
"dtx";
771 public static String smoothedHangTimeMs =
"smoothedHangTimeMs";
772 public static String resetRtpOnTx =
"resetRtpOnTx";
773 public static String startTxNotifications =
"startTxNotifications";
778 public static String objectName =
"txOptions";
779 public static String priority =
"priority";
780 public static String ttl =
"ttl";
785 public static String objectName =
"presence";
786 public static String format =
"format";
787 public static String intervalSecs =
"intervalSecs";
788 public static String listenOnly =
"listenOnly";
789 public static String minIntervalSecs =
"minIntervalSecs";
794 public static String objectName =
"presence";
795 public static String
self =
"self";
796 public static String comment =
"comment";
797 public static String custom =
"custom";
801 public static String arrayName =
"groupAliases";
802 public static String
id =
"groupId";
803 public static String alias =
"alias";
804 public static String status =
"status";
810 public static String objectName =
"identity";
811 public static String nodeId =
"nodeId";
812 public static String userId =
"userId";
813 public static String displayName =
"displayName";
814 public static String type =
"type";
815 public static String format =
"format";
816 public static String avatar =
"avatar";
821 public static String objectName =
"location";
822 public static String longitude =
"longitude";
823 public static String latitude =
"latitude";
824 public static String altitude =
"altitude";
825 public static String direction =
"direction";
826 public static String speed =
"speed";
831 public static String objectName =
"connectivity";
832 public static String type =
"type";
833 public static String strength =
"strength";
834 public static String rating =
"rating";
839 public static String objectName =
"power";
840 public static String source =
"source";
841 public static String state =
"state";
842 public static String level =
"level";
847 public static String objectName =
"rtpHeader";
848 public static String pt =
"pt";
849 public static String marker =
"marker";
850 public static String seq =
"seq";
851 public static String ssrc =
"ssrc";
852 public static String ts =
"ts";
857 public static String objectName =
"blobHeader";
858 public static String source =
"source";
859 public static String target =
"target";
860 public static String payloadType =
"payloadType";
861 public static String blobSize =
"size";
862 public static String rtpHeader =
"rtpHeader";
867 public static String objectName =
"descriptor";
868 public static String file =
"file";
869 public static String verified =
"verified";
870 public static String channels =
"channels";
871 public static String sampleCount =
"sampleCount";
872 public static String meta =
"meta";
873 public static String certificate =
"certificate";
874 public static String signature =
"signature";
881 public static String objectName =
"audio";
882 public static String ms =
"ms";
883 public static String samples =
"samples";
886 public static String objectName =
"event";
887 public static String alias =
"alias";
888 public static String direction =
"direction";
889 public static String ended =
"ended";
890 public static String groupId =
"groupId";
891 public static String
id =
"id";
892 public static String inProgress =
"inProgress";
893 public static String nodeId =
"nodeId";
894 public static String started =
"started";
895 public static String thisNodeId =
"thisNodeId";
896 public static String type =
"type";
897 public static String uri =
"uri";
902 public static String maxCount =
"maxCount";
903 public static String mostRecentFirst =
"mostRecentFirst";
904 public static String startedOnOrAfter =
"startedOnOrAfter";
905 public static String endedOnOrBefore =
"endedOnOrBefore";
906 public static String onlyDirection =
"onlyDirection";
907 public static String onlyType =
"onlyType";
908 public static String onlyCommitted =
"onlyCommitted";
909 public static String onlyAlias =
"onlyAlias";
910 public static String onlyNodeId =
"onlyNodeId";
911 public static String onlyTxId =
"onlyTxId";
912 public static String sql =
"sql";
917 public static String success =
"success";
918 public static String errorMessage =
"errorMessage";
919 public static String started =
"started";
920 public static String ended =
"ended";
921 public static String execMs =
"execMs";
922 public static String records =
"records";
923 public static String events =
"events";
924 public static String count =
"count";
928 #region Callback delegate types
929 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
930 private delegate
void EngageVoidCallback(
string eventExtraJson);
932 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
933 private delegate
void EngageStringCallback(
string s,
string eventExtraJson);
935 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
936 private delegate
void EngageString2Callback(
string s1,
string s2,
string eventExtraJson);
938 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
939 private delegate
void EngageStringAndIntCallback(
string s,
int i,
string eventExtraJson);
941 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
942 private delegate
void EngageString2AndInt2Callback(
string s,
int i1,
int i2,
string eventExtraJson);
944 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
945 private delegate
void EngageStringAndArgvCallback(
string s, IntPtr ptr,
string eventExtraJson);
947 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
948 private delegate
void EngageStringAndBlobCallback(
string s, IntPtr ptr,
int i,
string eventExtraJson);
950 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
951 private delegate
void EngageString2AndBlobCallback(
string s,
string j, IntPtr ptr,
int i,
string eventExtraJson);
953 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
954 private delegate
void EngageStringAndTwoIntCallback(
string s,
int i1,
int i2,
string eventExtraJson);
956 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
957 private delegate
void EngageLoggingCallback(
int level,
string tag,
string message);
961 [StructLayout(LayoutKind.Sequential, Pack = 1)]
964 [MarshalAs(UnmanagedType.ByValArray, SizeConst = ENGAGE_MAX_GROUP_ID_SZ)]
967 [MarshalAs(UnmanagedType.ByValArray, SizeConst = ENGAGE_MAX_GROUP_NAME_SZ)]
970 [MarshalAs(UnmanagedType.U1)]
971 public Boolean isEncrypted;
973 [MarshalAs(UnmanagedType.U1)]
974 public Boolean allowsFullDuplex;
977 [StructLayout(LayoutKind.Sequential, Pack = 1)]
980 public EngageVoidCallback PFN_ENGAGE_ENGINE_STARTED;
981 public EngageVoidCallback PFN_ENGAGE_ENGINE_STOPPED;
983 public EngageStringCallback PFN_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT;
984 public EngageStringCallback PFN_ENGAGE_RP_CONNECTING;
985 public EngageStringCallback PFN_ENGAGE_RP_CONNECTED;
986 public EngageStringCallback PFN_ENGAGE_RP_DISCONNECTED;
987 public EngageStringAndTwoIntCallback PFN_ENGAGE_RP_ROUNDTRIP_REPORT;
989 public EngageStringCallback PFN_ENGAGE_GROUP_CREATED;
990 public EngageStringCallback PFN_ENGAGE_GROUP_CREATE_FAILED;
991 public EngageStringCallback PFN_ENGAGE_GROUP_DELETED;
993 public EngageStringCallback PFN_ENGAGE_GROUP_CONNECTED;
994 public EngageStringCallback PFN_ENGAGE_GROUP_CONNECT_FAILED;
995 public EngageStringCallback PFN_ENGAGE_GROUP_DISCONNECTED;
997 public EngageStringCallback PFN_ENGAGE_GROUP_JOINED;
998 public EngageStringCallback PFN_ENGAGE_GROUP_JOIN_FAILED;
999 public EngageStringCallback PFN_ENGAGE_GROUP_LEFT;
1001 public EngageStringAndIntCallback PFN_ENGAGE_GROUP_MEMBER_COUNT_CHANGED;
1003 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_DISCOVERED;
1004 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_REDISCOVERED;
1005 public EngageString2Callback PFN_ENGAGE_GROUP_NODE_UNDISCOVERED;
1007 public EngageStringCallback PFN_ENGAGE_GROUP_RX_STARTED;
1008 public EngageStringCallback PFN_ENGAGE_GROUP_RX_ENDED;
1009 public EngageString2Callback PFN_ENGAGE_GROUP_RX_SPEAKERS_CHANGED;
1010 public EngageStringCallback PFN_ENGAGE_GROUP_RX_MUTED;
1011 public EngageStringCallback PFN_ENGAGE_GROUP_RX_UNMUTED;
1013 public EngageStringCallback PFN_ENGAGE_GROUP_TX_STARTED;
1014 public EngageStringCallback PFN_ENGAGE_GROUP_TX_ENDED;
1015 public EngageStringCallback PFN_ENGAGE_GROUP_TX_FAILED;
1016 public EngageStringCallback PFN_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY;
1017 public EngageStringCallback PFN_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED;
1018 public EngageStringCallback PFN_ENGAGE_GROUP_TX_MUTED;
1019 public EngageStringCallback PFN_ENGAGE_GROUP_TX_UNMUTED;
1021 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_DISCOVERED;
1022 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_REDISCOVERED;
1023 public EngageString2Callback PFN_ENGAGE_GROUP_ASSET_UNDISCOVERED;
1025 public EngageVoidCallback PFN_ENGAGE_LICENSE_CHANGED;
1026 public EngageVoidCallback PFN_ENGAGE_LICENSE_EXPIRED;
1027 public EngageStringCallback PFN_ENGAGE_LICENSE_EXPIRING;
1029 public EngageStringCallback PFN_ENGAGE_GROUP_BLOB_SENT;
1030 public EngageStringCallback PFN_ENGAGE_GROUP_BLOB_SEND_FAILED;
1031 public EngageString2AndBlobCallback PFN_ENGAGE_GROUP_BLOB_RECEIVED;
1033 public EngageStringCallback PFN_ENGAGE_GROUP_RTP_SENT;
1034 public EngageStringCallback PFN_ENGAGE_GROUP_RTP_SEND_FAILED;
1035 public EngageString2AndBlobCallback PFN_ENGAGE_GROUP_RTP_RECEIVED;
1037 public EngageStringCallback PFN_ENGAGE_GROUP_RAW_SENT;
1038 public EngageStringCallback PFN_ENGAGE_GROUP_RAW_SEND_FAILED;
1039 public EngageStringAndBlobCallback PFN_ENGAGE_GROUP_RAW_RECEIVED;
1041 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_STARTED;
1042 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED;
1043 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_EVENT_ENDED;
1044 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_REPORT;
1045 public EngageStringCallback PFN_ENGAGE_GROUP_TIMELINE_REPORT_FAILED;
1046 public EngageString2Callback PFN_ENGAGE_GROUP_TIMELINE_GROOMED;
1048 public EngageString2Callback PFN_ENGAGE_GROUP_HEALTH_REPORT;
1049 public EngageStringCallback PFN_ENGAGE_GROUP_HEALTH_REPORT_FAILED;
1051 public EngageStringCallback PFN_ENGAGE_BRIDGE_CREATED;
1052 public EngageStringCallback PFN_ENGAGE_BRIDGE_CREATE_FAILED;
1053 public EngageStringCallback PFN_ENGAGE_BRIDGE_DELETED;
1055 public EngageString2Callback PFN_ENGAGE_GROUP_STATS_REPORT;
1056 public EngageStringCallback PFN_ENGAGE_GROUP_STATS_REPORT_FAILED;
1058 public EngageString2AndInt2Callback PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED;
1059 public EngageString2Callback PFN_ENGAGE_GROUP_RX_DTMF;
1061 public EngageVoidCallback PFN_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED;
1063 public EngageStringCallback PFN_ENGAGE_GROUP_RECONFIGURED;
1064 public EngageStringCallback PFN_ENGAGE_GROUP_RECONFIGURATION_FAILED;
1066 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_STARTED;
1067 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_FAILED;
1068 public EngageStringCallback PFN_ENGAGE_AUDIO_RECORDING_ENDED;
1071 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1074 [MarshalAs(UnmanagedType.U1)]
1077 [MarshalAs(UnmanagedType.U4)]
1080 [MarshalAs(UnmanagedType.U1)]
1083 [MarshalAs(UnmanagedType.U1)]
1086 [MarshalAs(UnmanagedType.U1)]
1089 [MarshalAs(UnmanagedType.U1)]
1093 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1096 [MarshalAs(UnmanagedType.U1)]
1099 [MarshalAs(UnmanagedType.U1)]
1103 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1106 [MarshalAs(UnmanagedType.U1)]
1109 [MarshalAs(UnmanagedType.U2)]
1113 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1116 [MarshalAs(UnmanagedType.U1)]
1119 [MarshalAs(UnmanagedType.U4)]
1123 [StructLayout(LayoutKind.Sequential, Pack = 1)]
1126 [MarshalAs(UnmanagedType.U1)]
1129 [MarshalAs(UnmanagedType.U8)]
1134 #region Library functions
1135 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1136 private static extern void engageWin32LibraryInit();
1138 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1139 private static extern void engageWin32LibraryDeinit();
1141 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1142 private static extern int engageRegisterEventCallbacks(ref
EngageEvents_t callbacks);
1144 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1145 private static extern int engageEnableNotifications(
int enable);
1147 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1148 private static extern int engageInitialize(
string enginePolicyConfiguration,
string userIdentity,
string tempStoragePath);
1150 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1151 private static extern int engageShutdown();
1153 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1154 private static extern int engageStart();
1156 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1157 private static extern int engageStop();
1159 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1160 private static extern int engageCreateGroup(
string jsonConfiguration);
1162 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1163 private static extern int engageDeleteGroup(
string id);
1165 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1166 private static extern int engageJoinGroup(
string id);
1168 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1169 private static extern int engageLeaveGroup(
string id);
1171 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1172 private static extern int engageSetGroupRules(
string id,
string jsonParams);
1174 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1175 private static extern int engageBeginGroupTx(
string id,
int txPriority,
int txFlags);
1177 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1178 private static extern int engageBeginGroupTxAdvanced(
string id,
string jsonParams);
1180 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1181 private static extern int engageEndGroupTx(
string id);
1183 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1184 private static extern int engageSetGroupRxTag(
string id,
int tag);
1186 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1187 private static extern int engageMuteGroupRx(
string id);
1189 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1190 private static extern int engageUnmuteGroupRx(
string id);
1192 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1193 private static extern int engageMuteGroupTx(
string id);
1195 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1196 private static extern int engageUnmuteGroupTx(
string id);
1198 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1199 private static extern int engageSetGroupRxVolume(
string id,
int left,
int right);
1201 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1202 private static extern IntPtr engageGetVersion();
1204 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1205 private static extern IntPtr engageGetHardwareReport();
1207 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1208 private static extern IntPtr engageGetActiveLicenseDescriptor();
1210 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1211 private static extern IntPtr engageGetLicenseDescriptor(
string entitlement,
string key,
string activationCode,
string manufacturerId);
1213 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1214 private static extern int engageUpdateLicense(
string entitlement,
string key,
string activationCode,
string manufacturerId);
1216 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1217 private static extern int engageUpdatePresenceDescriptor(
string id,
string jsonDescriptor,
int forceBeacon);
1219 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1220 private static extern int engageSendGroupBlob(
string id, IntPtr blob,
int blobSize,
string jsonBlobParams);
1222 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1223 private static extern int engageSendGroupRtp(
string id, IntPtr payload,
int payloadSize,
string jsonRtpHeader);
1225 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1226 private static extern int engageSendGroupRaw(
string id, IntPtr raw,
int rawSize,
string jsonRtpHeader);
1228 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1229 private static extern int engageQueryGroupTimeline(
string id,
string jsonParams);
1231 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1232 private static extern int engageSetLogLevel(
int level);
1234 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1235 private static extern int engageSetLogTagExtension(
string tagExtension);
1237 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1238 private static extern int engageSetLoggingOutputOverride(EngageLoggingCallback hookFn);
1240 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1241 private static extern int engageEnableSyslog(
int enable);
1243 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1244 private static extern int engageWatchdog(
int enable);
1246 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1247 private static extern int engageLogMsg(
int level,
string tag,
string msg);
1249 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1250 private static extern IntPtr engageGetNetworkInterfaceDevices();
1252 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1253 private static extern IntPtr engageGetAudioDevices();
1255 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1256 private static extern IntPtr engageGenerateMission(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName);
1258 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1259 private static extern IntPtr engageGenerateMissionUsingCertStore(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName,
string certStoreFn,
string certStorePasswordHexByteString,
string certStoreElement);
1261 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1262 private static extern int engageSetMissionId(
string missionId);
1264 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1265 private static extern int engageOpenCertStore(
string fileName,
string passwordHexByteString);
1267 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1268 private static extern IntPtr engageGetCertStoreDescriptor();
1270 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1271 private static extern int engageCloseCertStore();
1273 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1274 private static extern int engageSetCertStoreCertificatePem(
string id,
string certificatePem,
string privateKeyPem,
string tags);
1276 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1277 private static extern int engageSetCertStoreCertificateP12(
string id,IntPtr data,
int size,
string password,
string tags);
1279 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1280 private static extern int engageDeleteCertStoreCertificate(
string id);
1282 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1283 private static extern IntPtr engageGetCertStoreCertificatePem(
string id);
1285 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1286 private static extern IntPtr engageGetCertificateDescriptorFromPem(
string pem);
1288 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1289 private static extern IntPtr engageGetArrayOfCertificateDescriptorsFromPem(
string pem);
1291 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1292 private static extern int engageImportCertStoreElementFromCertStore(
string id,
string srcId,
string srcFileName,
string srcPasswordHexByteString,
string tags);
1294 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1295 private static extern IntPtr engageQueryCertStoreContents(
string fileName,
string passwordHexByteString);
1297 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1298 private static extern int engageQueryGroupHealth(
string id);
1300 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1301 private static extern int engageQueryGroupStats(
string id);
1303 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1304 private static extern int engageCreateBridge(
string jsonConfiguration);
1306 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1307 private static extern int engageDeleteBridge(
string id);
1309 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1310 private static extern int engageEncrypt(IntPtr src,
int size, IntPtr dst,
string passwordHexByteString);
1312 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1313 private static extern int engageDecrypt(IntPtr src,
int size, IntPtr dst,
string passwordHexByteString);
1315 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1316 private static extern int engagePlatformNotifyChanges(
string jsonChangesArray);
1318 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1319 private static extern IntPtr engageBeginFileRecording(
string jsonParams);
1321 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1322 private static extern IntPtr engageEndFileRecording(
string id);
1330 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1331 private static extern int engageSetFipsCrypto(
string jsonParams);
1333 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1334 private static extern int engageIsCryptoFipsValidated();
1336 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1337 private static extern IntPtr engageGetDeviceId();
1339 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1340 private static extern int engageSetCertStore(IntPtr buff,
int size,
string passwordHexByteString);
1342 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1343 private static extern int engageVerifyRiff(
string fn);
1345 [DllImport(ENGAGE_DLL, CallingConvention = CallingConvention.Cdecl)]
1346 private static extern IntPtr engageGetRiffDescriptor(
string fn);
1350 #region Internal functions
1351 private static string[] stringArrayFromArgvStrPtrArray(IntPtr ptr)
1362 strPtr = Marshal.ReadIntPtr(arrayPtr);
1363 if (strPtr == (IntPtr)0)
1369 arrayPtr += Marshal.SizeOf(arrayPtr);
1375 rc =
new string[count];
1381 strPtr = Marshal.ReadIntPtr(arrayPtr);
1382 if (strPtr == (IntPtr)0)
1387 rc[idx] = Marshal.PtrToStringAnsi(strPtr);
1389 arrayPtr += Marshal.SizeOf(arrayPtr);
1397 private int registerEventCallbacks()
1401 cb.PFN_ENGAGE_ENGINE_STARTED = on_ENGAGE_ENGINE_STARTED;
1402 cb.PFN_ENGAGE_ENGINE_STOPPED = on_ENGAGE_ENGINE_STOPPED;
1403 cb.PFN_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED = on_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED;
1405 cb.PFN_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT = on_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT;
1406 cb.PFN_ENGAGE_RP_CONNECTING = on_ENGAGE_RP_CONNECTING;
1407 cb.PFN_ENGAGE_RP_CONNECTED = on_ENGAGE_RP_CONNECTED;
1408 cb.PFN_ENGAGE_RP_DISCONNECTED = on_ENGAGE_RP_DISCONNECTED;
1409 cb.PFN_ENGAGE_RP_ROUNDTRIP_REPORT = on_ENGAGE_RP_ROUNDTRIP_REPORT;
1411 cb.PFN_ENGAGE_GROUP_CREATED = on_ENGAGE_GROUP_CREATED;
1412 cb.PFN_ENGAGE_GROUP_CREATE_FAILED = on_ENGAGE_GROUP_CREATE_FAILED;
1413 cb.PFN_ENGAGE_GROUP_DELETED = on_ENGAGE_GROUP_DELETED;
1415 cb.PFN_ENGAGE_GROUP_CONNECTED = on_ENGAGE_GROUP_CONNECTED;
1416 cb.PFN_ENGAGE_GROUP_CONNECT_FAILED = on_ENGAGE_GROUP_CONNECT_FAILED;
1417 cb.PFN_ENGAGE_GROUP_DISCONNECTED = on_ENGAGE_GROUP_DISCONNECTED;
1419 cb.PFN_ENGAGE_GROUP_JOINED = on_ENGAGE_GROUP_JOINED;
1420 cb.PFN_ENGAGE_GROUP_JOIN_FAILED = on_ENGAGE_GROUP_JOIN_FAILED;
1421 cb.PFN_ENGAGE_GROUP_LEFT = on_ENGAGE_GROUP_LEFT;
1424 cb.PFN_ENGAGE_GROUP_MEMBER_COUNT_CHANGED =
null;
1427 cb.PFN_ENGAGE_GROUP_RX_STARTED = on_ENGAGE_GROUP_RX_STARTED;
1428 cb.PFN_ENGAGE_GROUP_RX_ENDED = on_ENGAGE_GROUP_RX_ENDED;
1430 cb.PFN_ENGAGE_GROUP_RX_MUTED = on_ENGAGE_GROUP_RX_MUTED;
1431 cb.PFN_ENGAGE_GROUP_RX_UNMUTED = on_ENGAGE_GROUP_RX_UNMUTED;
1433 cb.PFN_ENGAGE_GROUP_TX_MUTED = on_ENGAGE_GROUP_TX_MUTED;
1434 cb.PFN_ENGAGE_GROUP_TX_UNMUTED = on_ENGAGE_GROUP_TX_UNMUTED;
1436 cb.PFN_ENGAGE_GROUP_RX_SPEAKERS_CHANGED = on_ENGAGE_GROUP_RX_SPEAKERS_CHANGED;
1438 cb.PFN_ENGAGE_GROUP_TX_STARTED = on_ENGAGE_GROUP_TX_STARTED;
1439 cb.PFN_ENGAGE_GROUP_TX_ENDED = on_ENGAGE_GROUP_TX_ENDED;
1440 cb.PFN_ENGAGE_GROUP_TX_FAILED = on_ENGAGE_GROUP_TX_FAILED;
1441 cb.PFN_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY = on_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY;
1442 cb.PFN_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED = on_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED;
1444 cb.PFN_ENGAGE_GROUP_NODE_DISCOVERED = on_ENGAGE_GROUP_NODE_DISCOVERED;
1445 cb.PFN_ENGAGE_GROUP_NODE_REDISCOVERED = on_ENGAGE_GROUP_NODE_REDISCOVERED;
1446 cb.PFN_ENGAGE_GROUP_NODE_UNDISCOVERED = on_ENGAGE_GROUP_NODE_UNDISCOVERED;
1448 cb.PFN_ENGAGE_GROUP_ASSET_DISCOVERED = on_ENGAGE_GROUP_ASSET_DISCOVERED;
1449 cb.PFN_ENGAGE_GROUP_ASSET_REDISCOVERED = on_ENGAGE_GROUP_ASSET_REDISCOVERED;
1450 cb.PFN_ENGAGE_GROUP_ASSET_UNDISCOVERED = on_ENGAGE_GROUP_ASSET_UNDISCOVERED;
1452 cb.PFN_ENGAGE_LICENSE_CHANGED = on_ENGAGE_LICENSE_CHANGED;
1453 cb.PFN_ENGAGE_LICENSE_EXPIRED = on_ENGAGE_LICENSE_EXPIRED;
1454 cb.PFN_ENGAGE_LICENSE_EXPIRING = on_ENGAGE_LICENSE_EXPIRING;
1456 cb.PFN_ENGAGE_GROUP_BLOB_SENT = on_ENGAGE_GROUP_BLOB_SENT;
1457 cb.PFN_ENGAGE_GROUP_BLOB_SEND_FAILED = on_ENGAGE_GROUP_BLOB_SEND_FAILED;
1458 cb.PFN_ENGAGE_GROUP_BLOB_RECEIVED = on_ENGAGE_GROUP_BLOB_RECEIVED;
1460 cb.PFN_ENGAGE_GROUP_RTP_SENT = on_ENGAGE_GROUP_RTP_SENT;
1461 cb.PFN_ENGAGE_GROUP_RTP_SEND_FAILED = on_ENGAGE_GROUP_RTP_SEND_FAILED;
1462 cb.PFN_ENGAGE_GROUP_RTP_RECEIVED = on_ENGAGE_GROUP_RTP_RECEIVED;
1464 cb.PFN_ENGAGE_GROUP_RAW_SENT = on_ENGAGE_GROUP_RAW_SENT;
1465 cb.PFN_ENGAGE_GROUP_RAW_SEND_FAILED = on_ENGAGE_GROUP_RAW_SEND_FAILED;
1466 cb.PFN_ENGAGE_GROUP_RAW_RECEIVED = on_ENGAGE_GROUP_RAW_RECEIVED;
1468 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_STARTED = on_ENGAGE_GROUP_TIMELINE_EVENT_STARTED;
1469 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED = on_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED;
1470 cb.PFN_ENGAGE_GROUP_TIMELINE_EVENT_ENDED = on_ENGAGE_GROUP_TIMELINE_EVENT_ENDED;
1472 cb.PFN_ENGAGE_GROUP_TIMELINE_REPORT = on_ENGAGE_GROUP_TIMELINE_REPORT;
1473 cb.PFN_ENGAGE_GROUP_TIMELINE_REPORT_FAILED = on_ENGAGE_GROUP_TIMELINE_REPORT_FAILED;
1474 cb.PFN_ENGAGE_GROUP_TIMELINE_GROOMED = on_ENGAGE_GROUP_TIMELINE_GROOMED;
1476 cb.PFN_ENGAGE_GROUP_HEALTH_REPORT = on_ENGAGE_GROUP_HEALTH_REPORT;
1477 cb.PFN_ENGAGE_GROUP_HEALTH_REPORT_FAILED = on_ENGAGE_GROUP_HEALTH_REPORT_FAILED;
1479 cb.PFN_ENGAGE_BRIDGE_CREATED = on_ENGAGE_BRIDGE_CREATED;
1480 cb.PFN_ENGAGE_BRIDGE_CREATE_FAILED = on_ENGAGE_BRIDGE_CREATE_FAILED;
1481 cb.PFN_ENGAGE_BRIDGE_DELETED = on_ENGAGE_BRIDGE_DELETED;
1483 cb.PFN_ENGAGE_GROUP_RX_VOLUME_CHANGED = on_ENGAGE_GROUP_RX_VOLUME_CHANGED;
1484 cb.PFN_ENGAGE_GROUP_RX_DTMF = on_ENGAGE_GROUP_RX_DTMF;
1486 cb.PFN_ENGAGE_GROUP_RECONFIGURED = on_ENGAGE_GROUP_RECONFIGURED;
1487 cb.PFN_ENGAGE_GROUP_RECONFIGURATION_FAILED = on_ENGAGE_GROUP_RECONFIGURATION_FAILED;
1489 cb.PFN_ENGAGE_AUDIO_RECORDING_STARTED = on_ENGAGE_AUDIO_RECORDING_STARTED;
1490 cb.PFN_ENGAGE_AUDIO_RECORDING_FAILED = on_ENGAGE_AUDIO_RECORDING_FAILED;
1491 cb.PFN_ENGAGE_AUDIO_RECORDING_ENDED = on_ENGAGE_AUDIO_RECORDING_ENDED;
1493 return engageRegisterEventCallbacks(ref cb);
1496 private string makeUserJsonConfiguration(
string alias,
string displayName,
int txPriority)
1498 StringBuilder sb =
new StringBuilder();
1503 string myAlias = alias;
1504 string myDisplayName = displayName;
1505 int myTransmitPirority = txPriority;
1507 if (myAlias ==
null || myAlias.Length == 0)
1509 myAlias = String.Format(
"C#{0:X14}",
new Random().Next());
1512 if (myDisplayName ==
null || myDisplayName.Length == 0)
1514 myDisplayName =
"C# User " + myAlias;
1517 if(myTransmitPirority < 0)
1519 myTransmitPirority = 0;
1523 sb.Append(
"\"alias\":");
1524 sb.Append(
"\"" + myAlias +
"\"");
1526 sb.Append(
",\"displayName\":");
1527 sb.Append(
"\"" + myDisplayName +
"\"");
1529 sb.Append(
",\"txPriority\":");
1530 sb.Append(myTransmitPirority);
1533 return sb.ToString();
1537 #region Member variables
1538 private static List<IEngineNotifications> _engineNotificationSubscribers =
new List<IEngineNotifications>();
1539 private static List<IRallypointNotifications> _rallypointNotificationSubscribers =
new List<IRallypointNotifications>();
1540 private static List<IGroupNotifications> _groupNotificationSubscribers =
new List<IGroupNotifications>();
1541 private static List<ILicenseNotifications> _licenseNotificationSubscribers =
new List<ILicenseNotifications>();
1542 private static List<IHumanBiometricsNotifications> _humanBiometricsNotifications =
new List<IHumanBiometricsNotifications>();
1543 private static List<IBridgeNotifications> _bridgeNotificationSubscribers =
new List<IBridgeNotifications>();
1544 private static List<ILoggingNotifications> _loggingNotificationSubscribers =
new List<ILoggingNotifications>();
1545 private static List<IAudioRecordingNotifications> _audioRecordingNotificationSubscribers =
new List<IAudioRecordingNotifications>();
1548 #region Callback delegates
1549 private EngageVoidCallback on_ENGAGE_ENGINE_STARTED = (
string eventExtraJson) =>
1551 lock (_engineNotificationSubscribers)
1553 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1555 n.onEngineStarted(eventExtraJson);
1560 private EngageVoidCallback on_ENGAGE_ENGINE_STOPPED = (
string eventExtraJson) =>
1562 lock (_engineNotificationSubscribers)
1564 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1566 n.onEngineStopped(eventExtraJson);
1571 private EngageVoidCallback on_ENGAGE_ENGINE_AUDIO_DEVICES_REFRESHED = (
string eventExtraJson) =>
1573 lock (_engineNotificationSubscribers)
1575 foreach (IEngineNotifications n
in _engineNotificationSubscribers)
1577 n.onEngineAudioDevicesRefreshed(eventExtraJson);
1582 private EngageStringCallback on_ENGAGE_RP_PAUSING_CONNECTION_ATTEMPT = (
string id,
string eventExtraJson) =>
1584 lock (_rallypointNotificationSubscribers)
1586 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1588 n.onRallypointPausingConnectionAttempt(
id, eventExtraJson);
1593 private EngageStringCallback on_ENGAGE_RP_CONNECTING = (
string id,
string eventExtraJson) =>
1595 lock (_rallypointNotificationSubscribers)
1597 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1599 n.onRallypointConnecting(
id, eventExtraJson);
1604 private EngageStringCallback on_ENGAGE_RP_CONNECTED = (
string id,
string eventExtraJson) =>
1606 lock (_rallypointNotificationSubscribers)
1608 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1610 n.onRallypointConnected(
id, eventExtraJson);
1615 private EngageStringCallback on_ENGAGE_RP_DISCONNECTED = (
string id,
string eventExtraJson) =>
1617 lock (_rallypointNotificationSubscribers)
1619 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1621 n.onRallypointDisconnected(
id, eventExtraJson);
1626 private EngageStringAndTwoIntCallback on_ENGAGE_RP_ROUNDTRIP_REPORT = (
string id,
int rtMs,
int rtRating,
string eventExtraJson) =>
1628 lock (_rallypointNotificationSubscribers)
1630 foreach (IRallypointNotifications n
in _rallypointNotificationSubscribers)
1632 n.onRallypointRoundtripReport(
id, rtMs, rtRating, eventExtraJson);
1637 private EngageLoggingCallback on_ENGAGE_LOG_MESSAGE_HOOK_CALLBACK = (
int level,
string tag,
string message) =>
1639 lock (_loggingNotificationSubscribers)
1641 foreach (ILoggingNotifications n
in _loggingNotificationSubscribers)
1643 n.onEngageLogMessage(level, tag, message);
1649 private EngageStringCallback on_ENGAGE_GROUP_CREATED = (
string id,
string eventExtraJson) =>
1651 lock (_groupNotificationSubscribers)
1653 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1655 n.onGroupCreated(
id, eventExtraJson);
1660 private EngageStringCallback on_ENGAGE_GROUP_CREATE_FAILED = (
string id,
string eventExtraJson) =>
1662 lock (_groupNotificationSubscribers)
1664 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1666 n.onGroupCreateFailed(
id, eventExtraJson);
1671 private EngageStringCallback on_ENGAGE_GROUP_DELETED = (
string id,
string eventExtraJson) =>
1673 lock (_groupNotificationSubscribers)
1675 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1677 n.onGroupDeleted(
id, eventExtraJson);
1682 private EngageStringCallback on_ENGAGE_GROUP_CONNECTED = (
string id,
string eventExtraJson) =>
1684 lock (_groupNotificationSubscribers)
1686 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1688 n.onGroupConnected(
id, eventExtraJson);
1693 private EngageStringCallback on_ENGAGE_GROUP_CONNECT_FAILED = (
string id,
string eventExtraJson) =>
1695 lock (_groupNotificationSubscribers)
1697 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1699 n.onGroupConnectFailed(
id, eventExtraJson);
1704 private EngageStringCallback on_ENGAGE_GROUP_DISCONNECTED = (
string id,
string eventExtraJson) =>
1706 lock (_groupNotificationSubscribers)
1708 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1710 n.onGroupDisconnected(
id, eventExtraJson);
1715 private EngageStringCallback on_ENGAGE_GROUP_JOINED = (
string id,
string eventExtraJson) =>
1717 lock (_groupNotificationSubscribers)
1719 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1721 n.onGroupJoined(
id, eventExtraJson);
1726 private EngageStringCallback on_ENGAGE_GROUP_JOIN_FAILED = (
string id,
string eventExtraJson) =>
1728 lock (_groupNotificationSubscribers)
1730 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1732 n.onGroupJoinFailed(
id, eventExtraJson);
1737 private EngageStringCallback on_ENGAGE_GROUP_LEFT = (
string id,
string eventExtraJson) =>
1739 lock (_groupNotificationSubscribers)
1741 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1743 n.onGroupLeft(
id, eventExtraJson);
1748 private EngageStringAndIntCallback on_ENGAGE_GROUP_MEMBER_COUNT_CHANGED = (
string id,
int newCount,
string eventExtraJson) =>
1750 lock (_groupNotificationSubscribers)
1752 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1754 n.onGroupMemberCountChanged(
id, newCount, eventExtraJson);
1759 private EngageStringCallback on_ENGAGE_GROUP_RX_STARTED = (
string id,
string eventExtraJson) =>
1761 lock (_groupNotificationSubscribers)
1763 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1765 n.onGroupRxStarted(
id, eventExtraJson);
1770 private EngageStringCallback on_ENGAGE_GROUP_RX_ENDED = (
string id,
string eventExtraJson) =>
1772 lock (_groupNotificationSubscribers)
1774 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1776 n.onGroupRxEnded(
id, eventExtraJson);
1781 private EngageStringCallback on_ENGAGE_GROUP_RX_MUTED = (
string id,
string eventExtraJson) =>
1783 lock (_groupNotificationSubscribers)
1785 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1787 n.onGroupRxMuted(
id, eventExtraJson);
1792 private EngageStringCallback on_ENGAGE_GROUP_RX_UNMUTED = (
string id,
string eventExtraJson) =>
1794 lock (_groupNotificationSubscribers)
1796 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1798 n.onGroupRxUnmuted(
id, eventExtraJson);
1803 private EngageStringCallback on_ENGAGE_GROUP_TX_MUTED = (
string id,
string eventExtraJson) =>
1805 lock (_groupNotificationSubscribers)
1807 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1809 n.onGroupTxMuted(
id, eventExtraJson);
1814 private EngageStringCallback on_ENGAGE_GROUP_TX_UNMUTED = (
string id,
string eventExtraJson) =>
1816 lock (_groupNotificationSubscribers)
1818 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1820 n.onGroupTxUnmuted(
id, eventExtraJson);
1825 private EngageString2Callback on_ENGAGE_GROUP_RX_SPEAKERS_CHANGED = (
string id,
string speakerjson,
string eventExtraJson) =>
1827 lock (_groupNotificationSubscribers)
1829 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1831 n.onGroupRxSpeakersChanged(
id, speakerjson, eventExtraJson);
1836 private EngageStringCallback on_ENGAGE_GROUP_TX_STARTED = (
string id,
string eventExtraJson) =>
1838 lock (_groupNotificationSubscribers)
1840 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1842 n.onGroupTxStarted(
id, eventExtraJson);
1847 private EngageStringCallback on_ENGAGE_GROUP_TX_ENDED = (
string id,
string eventExtraJson) =>
1849 lock (_groupNotificationSubscribers)
1851 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1853 n.onGroupTxEnded(
id, eventExtraJson);
1858 private EngageStringCallback on_ENGAGE_GROUP_TX_FAILED = (
string id,
string eventExtraJson) =>
1860 lock (_groupNotificationSubscribers)
1862 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1864 n.onGroupTxFailed(
id, eventExtraJson);
1869 private EngageStringCallback on_ENGAGE_GROUP_TX_USURPED_BY_PRIORITY = (
string id,
string eventExtraJson) =>
1871 lock (_groupNotificationSubscribers)
1873 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1875 n.onGroupTxUsurpedByPriority(
id, eventExtraJson);
1880 private EngageStringCallback on_ENGAGE_GROUP_MAX_TX_TIME_EXCEEDED = (
string id,
string eventExtraJson) =>
1882 lock (_groupNotificationSubscribers)
1884 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1886 n.onGroupMaxTxTimeExceeded(
id, eventExtraJson);
1891 private EngageString2Callback on_ENGAGE_GROUP_NODE_DISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1893 lock (_groupNotificationSubscribers)
1895 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1897 n.onGroupNodeDiscovered(
id, nodeJson, eventExtraJson);
1902 private EngageString2Callback on_ENGAGE_GROUP_NODE_REDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1904 lock (_groupNotificationSubscribers)
1906 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1908 n.onGroupNodeRediscovered(
id, nodeJson, eventExtraJson);
1913 private EngageString2Callback on_ENGAGE_GROUP_NODE_UNDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1915 lock (_groupNotificationSubscribers)
1917 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1919 n.onGroupNodeUndiscovered(
id, nodeJson, eventExtraJson);
1924 private EngageString2Callback on_ENGAGE_GROUP_ASSET_DISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1926 lock (_groupNotificationSubscribers)
1928 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1930 n.onGroupAssetDiscovered(
id, nodeJson, eventExtraJson);
1935 private EngageString2Callback on_ENGAGE_GROUP_ASSET_REDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1937 lock (_groupNotificationSubscribers)
1939 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1941 n.onGroupAssetRediscovered(
id, nodeJson, eventExtraJson);
1946 private EngageString2Callback on_ENGAGE_GROUP_ASSET_UNDISCOVERED = (
string id,
string nodeJson,
string eventExtraJson) =>
1948 lock (_groupNotificationSubscribers)
1950 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1952 n.onGroupAssetUndiscovered(
id, nodeJson, eventExtraJson);
1957 private EngageVoidCallback on_ENGAGE_LICENSE_CHANGED = (
string eventExtraJson) =>
1959 lock (_licenseNotificationSubscribers)
1961 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
1963 n.onLicenseChanged(eventExtraJson);
1968 private EngageVoidCallback on_ENGAGE_LICENSE_EXPIRED = (
string eventExtraJson) =>
1970 lock (_licenseNotificationSubscribers)
1972 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
1974 n.onLicenseExpired(eventExtraJson);
1979 private EngageStringCallback on_ENGAGE_LICENSE_EXPIRING = (
string secondsLeft,
string eventExtraJson) =>
1981 lock (_licenseNotificationSubscribers)
1983 foreach (ILicenseNotifications n
in _licenseNotificationSubscribers)
1985 n.onLicenseExpiring(Double.Parse(secondsLeft), eventExtraJson);
1990 private EngageStringCallback on_ENGAGE_GROUP_BLOB_SENT = (
string id,
string eventExtraJson) =>
1992 lock (_groupNotificationSubscribers)
1994 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
1996 n.onGroupBlobSent(
id, eventExtraJson);
2001 private EngageStringCallback on_ENGAGE_GROUP_BLOB_SEND_FAILED = (
string id,
string eventExtraJson) =>
2003 lock (_groupNotificationSubscribers)
2005 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2007 n.onGroupBlobSendFailed(
id, eventExtraJson);
2012 private EngageString2AndBlobCallback on_ENGAGE_GROUP_BLOB_RECEIVED = (
string id,
string blobInfoJson, IntPtr blob,
int blobSize,
string eventExtraJson) =>
2014 byte[] csBlob =
new byte[blobSize];
2015 Marshal.Copy(blob, csBlob, 0, blobSize);
2017 lock (_groupNotificationSubscribers)
2019 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2021 n.onGroupBlobReceived(
id, blobInfoJson, csBlob, blobSize, eventExtraJson);
2026 JObject blobInfo = JObject.Parse(blobInfoJson);
2027 if(blobInfo !=
null)
2029 int payloadType = (int)blobInfo[
"payloadType"];
2030 string nodeId = (string)blobInfo[
"source"];
2033 if (payloadType ==
Engage.ENGAGE_BLOB_PT_ENGAGE_BINARY_HUMAN_BIOMETRICS)
2035 lock (_humanBiometricsNotifications)
2037 if (_humanBiometricsNotifications.Count > 0)
2040 string hbmJson = humanBiometricsFromBlob(csBlob);
2042 if (hbmJson !=
null)
2044 foreach (IHumanBiometricsNotifications n
in _humanBiometricsNotifications)
2046 n.onHumanBiometricsReceived(
id, nodeId, hbmJson, eventExtraJson);
2055 private EngageStringCallback on_ENGAGE_GROUP_RTP_SENT = (
string id,
string eventExtraJson) =>
2057 lock (_groupNotificationSubscribers)
2059 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2061 n.onGroupRtpSent(
id, eventExtraJson);
2066 private EngageStringCallback on_ENGAGE_GROUP_RTP_SEND_FAILED = (
string id,
string eventExtraJson) =>
2068 lock (_groupNotificationSubscribers)
2070 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2072 n.onGroupRtpSendFailed(
id, eventExtraJson);
2077 private EngageString2AndBlobCallback on_ENGAGE_GROUP_RTP_RECEIVED = (
string id,
string rtpHeaderJson, IntPtr payload,
int payloadSize,
string eventExtraJson) =>
2079 lock (_groupNotificationSubscribers)
2081 byte[] csPayload =
new byte[payloadSize];
2082 Marshal.Copy(payload, csPayload, 0, payloadSize);
2084 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2086 n.onGroupRtpReceived(
id, rtpHeaderJson, csPayload, payloadSize, eventExtraJson);
2091 private EngageStringCallback on_ENGAGE_GROUP_RAW_SENT = (
string id,
string eventExtraJson) =>
2093 lock (_groupNotificationSubscribers)
2095 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2097 n.onGroupRawSent(
id, eventExtraJson);
2102 private EngageStringCallback on_ENGAGE_GROUP_RAW_SEND_FAILED = (
string id,
string eventExtraJson) =>
2104 lock (_groupNotificationSubscribers)
2106 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2108 n.onGroupRawSendFailed(
id, eventExtraJson);
2113 private EngageStringAndBlobCallback on_ENGAGE_GROUP_RAW_RECEIVED = (
string id, IntPtr raw,
int rawSize,
string eventExtraJson) =>
2115 lock (_groupNotificationSubscribers)
2117 byte[] csRaw =
new byte[rawSize];
2118 Marshal.Copy(raw, csRaw, 0, rawSize);
2120 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2122 n.onGroupRawReceived(
id, csRaw, rawSize, eventExtraJson);
2127 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_STARTED = (
string id,
string eventJson,
string eventExtraJson) =>
2129 lock (_groupNotificationSubscribers)
2131 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2133 n.onGroupTimelineEventStarted(
id, eventJson, eventExtraJson);
2138 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_UPDATED = (
string id,
string eventJson,
string eventExtraJson) =>
2140 lock (_groupNotificationSubscribers)
2142 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2144 n.onGroupTimelineEventUpdated(
id, eventJson, eventExtraJson);
2149 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_EVENT_ENDED = (
string id,
string eventJson,
string eventExtraJson) =>
2151 lock (_groupNotificationSubscribers)
2153 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2155 n.onGroupTimelineEventEnded(
id, eventJson, eventExtraJson);
2160 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_REPORT = (
string id,
string reportJson,
string eventExtraJson) =>
2162 lock (_groupNotificationSubscribers)
2164 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2166 n.onGroupTimelineReport(
id, reportJson, eventExtraJson);
2171 private EngageStringCallback on_ENGAGE_GROUP_TIMELINE_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2173 lock (_groupNotificationSubscribers)
2175 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2177 n.onGroupTimelineReportFailed(
id, eventExtraJson);
2182 private EngageString2Callback on_ENGAGE_GROUP_TIMELINE_GROOMED = (
string id,
string eventListJson,
string eventExtraJson) =>
2184 lock (_groupNotificationSubscribers)
2186 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2188 n.onGroupTimelineGroomed(
id, eventListJson, eventExtraJson);
2193 private EngageString2Callback on_ENGAGE_GROUP_HEALTH_REPORT = (
string id,
string healthReportJson,
string eventExtraJson) =>
2195 lock (_groupNotificationSubscribers)
2197 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2199 n.onGroupHealthReport(
id, healthReportJson, eventExtraJson);
2204 private EngageStringCallback on_ENGAGE_GROUP_HEALTH_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2206 lock (_groupNotificationSubscribers)
2208 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2210 n.onGroupHealthReportFailed(
id, eventExtraJson);
2215 private EngageString2Callback on_ENGAGE_GROUP_STATS_REPORT = (
string id,
string statsReportJson,
string eventExtraJson) =>
2217 lock (_groupNotificationSubscribers)
2219 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2221 n.onGroupStatsReport(
id, statsReportJson, eventExtraJson);
2226 private EngageStringCallback on_ENGAGE_GROUP_STATS_REPORT_FAILED = (
string id,
string eventExtraJson) =>
2228 lock (_groupNotificationSubscribers)
2230 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2232 n.onGroupStatsReportFailed(
id, eventExtraJson);
2237 private EngageStringCallback on_ENGAGE_BRIDGE_CREATED = (
string id,
string eventExtraJson) =>
2239 lock (_bridgeNotificationSubscribers)
2241 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2243 n.onBridgeCreated(
id, eventExtraJson);
2248 private EngageStringCallback on_ENGAGE_BRIDGE_CREATE_FAILED = (
string id,
string eventExtraJson) =>
2250 lock (_bridgeNotificationSubscribers)
2252 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2254 n.onBridgeCreateFailed(
id, eventExtraJson);
2259 private EngageStringCallback on_ENGAGE_BRIDGE_DELETED = (
string id,
string eventExtraJson) =>
2261 lock (_bridgeNotificationSubscribers)
2263 foreach (IBridgeNotifications n
in _bridgeNotificationSubscribers)
2265 n.onBridgeDeleted(
id, eventExtraJson);
2270 private EngageString2AndInt2Callback on_ENGAGE_GROUP_RX_VOLUME_CHANGED = (
string id,
int leftLevelPerc,
int rightLevelPerc,
string eventExtraJson) =>
2272 lock (_groupNotificationSubscribers)
2274 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2276 n.onGroupRxVolumeChanged(
id, leftLevelPerc, rightLevelPerc, eventExtraJson);
2281 private EngageString2Callback on_ENGAGE_GROUP_RX_DTMF = (
string id,
string dtmfJson,
string eventExtraJson) =>
2283 lock (_groupNotificationSubscribers)
2285 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2287 n.onGroupRxDtmf(
id, dtmfJson, eventExtraJson);
2292 private EngageStringCallback on_ENGAGE_GROUP_RECONFIGURED = (
string id,
string eventExtraJson) =>
2294 lock (_groupNotificationSubscribers)
2296 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2298 n.onGroupReconfigured(
id, eventExtraJson);
2303 private EngageStringCallback on_ENGAGE_GROUP_RECONFIGURATION_FAILED = (
string id,
string eventExtraJson) =>
2305 lock (_groupNotificationSubscribers)
2307 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2309 n.onGroupReconfigurationFailed(
id, eventExtraJson);
2314 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_STARTED = (
string id,
string eventExtraJson) =>
2316 lock (_groupNotificationSubscribers)
2318 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2320 n.onGroupAudioRecordingStarted(
id, eventExtraJson);
2325 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_FAILED = (
string id,
string eventExtraJson) =>
2327 lock (_groupNotificationSubscribers)
2329 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2331 n.onGroupAudioRecordingFailed(
id, eventExtraJson);
2336 private EngageStringCallback on_ENGAGE_AUDIO_RECORDING_ENDED = (
string id,
string eventExtraJson) =>
2338 lock (_groupNotificationSubscribers)
2340 foreach (IGroupNotifications n
in _groupNotificationSubscribers)
2342 n.onGroupAudioRecordingEnded(
id, eventExtraJson);
2349 #region Public functions
2352 engageEnableNotifications(0);
2353 engageWin32LibraryInit();
2354 engageEnableNotifications(1);
2359 engageEnableNotifications(0);
2361 engageWin32LibraryDeinit();
2364 public void subscribe(IEngineNotifications n)
2366 lock(_engineNotificationSubscribers)
2368 _engineNotificationSubscribers.Add(n);
2372 public void unsubscribe(IEngineNotifications n)
2374 lock (_engineNotificationSubscribers)
2376 _engineNotificationSubscribers.Remove(n);
2380 public void subscribe(IRallypointNotifications n)
2382 lock (_rallypointNotificationSubscribers)
2384 _rallypointNotificationSubscribers.Add(n);
2388 public void unsubscribe(IRallypointNotifications n)
2390 lock (_rallypointNotificationSubscribers)
2392 _rallypointNotificationSubscribers.Remove(n);
2396 public void subscribe(IGroupNotifications n)
2398 lock (_groupNotificationSubscribers)
2400 _groupNotificationSubscribers.Add(n);
2404 public void unsubscribe(IGroupNotifications n)
2406 lock (_groupNotificationSubscribers)
2408 _groupNotificationSubscribers.Remove(n);
2412 public void subscribe(ILicenseNotifications n)
2414 lock (_licenseNotificationSubscribers)
2416 _licenseNotificationSubscribers.Add(n);
2420 public void unsubscribe(ILicenseNotifications n)
2422 lock (_licenseNotificationSubscribers)
2424 _licenseNotificationSubscribers.Remove(n);
2428 public void subscribe(IHumanBiometricsNotifications n)
2430 lock (_humanBiometricsNotifications)
2432 _humanBiometricsNotifications.Add(n);
2436 public void unsubscribe(IHumanBiometricsNotifications n)
2438 lock (_humanBiometricsNotifications)
2440 _humanBiometricsNotifications.Remove(n);
2444 public void subscribe(IBridgeNotifications n)
2446 lock (_bridgeNotificationSubscribers)
2448 _bridgeNotificationSubscribers.Add(n);
2452 public void unsubscribe(IBridgeNotifications n)
2454 lock (_bridgeNotificationSubscribers)
2456 _bridgeNotificationSubscribers.Remove(n);
2460 public void subscribe(ILoggingNotifications n)
2462 lock (_loggingNotificationSubscribers)
2464 _loggingNotificationSubscribers.Add(n);
2466 if(_loggingNotificationSubscribers.Count() == 1)
2468 engageSetLoggingOutputOverride(on_ENGAGE_LOG_MESSAGE_HOOK_CALLBACK);
2473 public void unsubscribe(ILoggingNotifications n)
2475 lock (_loggingNotificationSubscribers)
2477 _loggingNotificationSubscribers.Remove(n);
2479 if(_loggingNotificationSubscribers.Count() == 0)
2481 engageSetLoggingOutputOverride(
null);
2486 public void subscribe(IAudioRecordingNotifications n)
2488 lock (_audioRecordingNotificationSubscribers)
2490 _audioRecordingNotificationSubscribers.Add(n);
2494 public void unsubscribe(IAudioRecordingNotifications n)
2496 lock (_audioRecordingNotificationSubscribers)
2498 _audioRecordingNotificationSubscribers.Remove(n);
2502 public void win32Init()
2504 engageWin32LibraryInit();
2507 public void win32DeInit()
2509 engageWin32LibraryDeinit();
2512 public int initialize(
string enginePolicyConfiguration,
string userIdentity,
string tempStoragePath)
2516 rc = registerEventCallbacks();
2517 if(rc != ENGAGE_RESULT_OK)
2522 return engageInitialize(enginePolicyConfiguration, userIdentity, tempStoragePath);
2525 public int shutdown()
2534 return engageStart();
2539 return engageStop();
2542 public int createGroup(
string jsonConfiguration)
2544 return engageCreateGroup(jsonConfiguration);
2547 public int deleteGroup(
string id)
2549 return engageDeleteGroup(
id);
2552 public int joinGroup(
string id)
2554 return engageJoinGroup(
id);
2557 public int leaveGroup(
string id)
2559 return engageLeaveGroup(
id);
2562 public int setGroupRules(
string id,
string jsonParams)
2564 return engageSetGroupRules(
id, jsonParams);
2567 public int beginGroupTx(
string id,
int txPriority,
int txFlags)
2569 return engageBeginGroupTx(
id, txPriority, txFlags);
2572 public int beginGroupTxAdvanced(
string id,
string jsonParams)
2574 return engageBeginGroupTxAdvanced(
id, jsonParams);
2577 public int endGroupTx(
string id)
2579 return engageEndGroupTx(
id);
2582 public int setGroupRxTag(
string id,
int tag)
2584 return engageSetGroupRxTag(
id, tag);
2587 public int muteGroupRx(
string id)
2589 return engageMuteGroupRx(
id);
2592 public int unmuteGroupRx(
string id)
2594 return engageUnmuteGroupRx(
id);
2597 public int muteGroupTx(
string id)
2599 return engageMuteGroupTx(
id);
2602 public int unmuteGroupTx(
string id)
2604 return engageUnmuteGroupTx(
id);
2607 public int setGroupRxVolume(
string id,
int left,
int right)
2609 return engageSetGroupRxVolume(
id, left, right);
2612 public int queryGroupTimeline(
string id,
string jsonParams)
2614 return engageQueryGroupTimeline(
id, jsonParams);
2617 public int queryGroupHealth(
string id)
2619 return engageQueryGroupHealth(
id);
2622 public int queryGroupStats(
string id)
2624 return engageQueryGroupStats(
id);
2627 public int logMsg(
int level,
string tag,
string msg)
2629 return engageLogMsg(level, tag, msg);
2632 public int setLogLevel(
int level)
2634 return engageSetLogLevel(level);
2637 public int setLogTagExtensionLevel(
string tagExtension)
2639 return engageSetLogTagExtension(tagExtension);
2642 public int enableSyslog(
bool enable)
2644 return engageEnableSyslog(enable ? 1 : 0);
2647 public int enableWatchdog(
bool enable)
2649 return engageWatchdog(enable ? 1 : 0);
2652 public String getVersion()
2654 IntPtr ptr = engageGetVersion();
2656 if (ptr == IntPtr.Zero)
2662 return Marshal.PtrToStringAnsi(ptr);
2666 public String getHardwareReport()
2668 IntPtr ptr = engageGetHardwareReport();
2670 if (ptr == IntPtr.Zero)
2676 return Marshal.PtrToStringAnsi(ptr);
2680 public String getActiveLicenseDescriptor()
2682 IntPtr ptr = engageGetActiveLicenseDescriptor();
2684 if (ptr == IntPtr.Zero)
2690 return Marshal.PtrToStringAnsi(ptr);
2694 public String getLicenseDescriptor(
string entitlement,
string key,
string activationCode,
string manufacturerId)
2696 IntPtr ptr = engageGetLicenseDescriptor(entitlement, key, activationCode, manufacturerId);
2698 if (ptr == IntPtr.Zero)
2704 return Marshal.PtrToStringAnsi(ptr);
2708 public int updateLicense(
string entitlement,
string key,
string activationCode,
string manufacturerId)
2710 return engageUpdateLicense(entitlement, key, activationCode, manufacturerId);
2713 public String getNetworkInterfaceDevices()
2715 IntPtr ptr = engageGetNetworkInterfaceDevices();
2717 if (ptr == IntPtr.Zero)
2723 return Marshal.PtrToStringAnsi(ptr);
2727 public String getAudioDevices()
2729 IntPtr ptr = engageGetAudioDevices();
2731 if (ptr == IntPtr.Zero)
2737 return Marshal.PtrToStringAnsi(ptr);
2741 public int setMissionId(
string missionId)
2743 return engageSetMissionId(missionId);
2746 public int openCertStore(
string fileName,
string passwordHexByteString)
2748 return engageOpenCertStore(fileName, passwordHexByteString);
2751 public String getCertStoreDescriptor()
2753 IntPtr ptr = engageGetCertStoreDescriptor();
2755 if (ptr == IntPtr.Zero)
2761 return Marshal.PtrToStringAnsi(ptr);
2765 public int closeCertStore()
2767 return engageCloseCertStore();
2770 public int setCertStoreCertificatePem(
string id,
string certificatePem,
string privateKeyPem,
string tags)
2772 return engageSetCertStoreCertificatePem(
id, certificatePem, privateKeyPem, tags);
2775 public int setCertStoreCertificateP12(
string id,
byte[] data,
int size,
string password,
string tags)
2777 IntPtr pinned_data = Marshal.AllocHGlobal(size);
2778 Marshal.Copy(data, 0, pinned_data, size);
2779 int rc = engageSetCertStoreCertificateP12(
id, pinned_data, size, password, tags);
2780 Marshal.FreeHGlobal(pinned_data);
2785 public int deleteCertStoreCertificate(
string id)
2787 return engageDeleteCertStoreCertificate(
id);
2790 public String getCertStoreCertificatePem(
string id)
2792 IntPtr ptr = engageGetCertStoreCertificatePem(
id);
2794 if (ptr == IntPtr.Zero)
2800 return Marshal.PtrToStringAnsi(ptr);
2804 public String getArrayOfCertificateDescriptorsFromPem(
string pem)
2806 IntPtr ptr = engageGetArrayOfCertificateDescriptorsFromPem(pem);
2808 if (ptr == IntPtr.Zero)
2814 return Marshal.PtrToStringAnsi(ptr);
2818 public String getCertificateDescriptorFromPem(
string pem)
2820 IntPtr ptr = engageGetCertificateDescriptorFromPem(pem);
2822 if (ptr == IntPtr.Zero)
2828 return Marshal.PtrToStringAnsi(ptr);
2832 public int importCertStoreElementFromCertStore(
string id,
string srcId,
string srcFileName,
string srcPasswordHexByteString,
string tags)
2834 return engageImportCertStoreElementFromCertStore(
id, srcId, srcFileName, srcPasswordHexByteString, tags);
2837 public String queryCertStoreContents(
string fileName,
string passwordHexByteString)
2839 IntPtr ptr = engageQueryCertStoreContents(fileName, passwordHexByteString);
2841 if (ptr == IntPtr.Zero)
2847 return Marshal.PtrToStringAnsi(ptr);
2851 public int encrypt(
byte[] src,
int size, out
byte[] dst,
string passwordHexByteString)
2854 IntPtr pinned_src = Marshal.AllocHGlobal(size);
2855 Marshal.Copy(src, 0, pinned_src, size);
2858 IntPtr pinned_dst = Marshal.AllocHGlobal(size + 16 + 16);
2860 int bytesEncrypted = engageEncrypt(pinned_src, size, pinned_dst, passwordHexByteString);
2862 if(bytesEncrypted > 0)
2864 dst =
new byte[bytesEncrypted];
2865 Marshal.Copy(pinned_dst, dst, 0, bytesEncrypted);
2873 Marshal.FreeHGlobal(pinned_src);
2874 Marshal.FreeHGlobal(pinned_dst);
2876 return bytesEncrypted;
2879 public int decrypt(
byte[] src,
int size, out
byte[] dst,
string passwordHexByteString)
2882 IntPtr pinned_src = Marshal.AllocHGlobal(size);
2883 Marshal.Copy(src, 0, pinned_src, size);
2886 IntPtr pinned_dst = Marshal.AllocHGlobal(size + 16);
2888 int bytesDecrypted = engageDecrypt(pinned_src, size, pinned_dst, passwordHexByteString);
2890 if (bytesDecrypted > 0)
2892 dst =
new byte[bytesDecrypted];
2893 Marshal.Copy(pinned_dst, dst, 0, bytesDecrypted);
2901 Marshal.FreeHGlobal(pinned_src);
2902 Marshal.FreeHGlobal(pinned_dst);
2904 return bytesDecrypted;
3007 public String generateMission(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName)
3009 IntPtr ptr = engageGenerateMission(keyPhrase, audioGroupCount, rallypointHost, missionName);
3011 if (ptr == IntPtr.Zero)
3017 return Marshal.PtrToStringAnsi(ptr);
3021 public String generateMissionUsingCertStore(
string keyPhrase,
int audioGroupCount,
string rallypointHost,
string missionName,
string certStoreFn,
string certStorePasswordHexByteString,
string certStoreElement)
3023 IntPtr ptr = engageGenerateMissionUsingCertStore(keyPhrase, audioGroupCount, rallypointHost, missionName, certStoreFn, certStorePasswordHexByteString, certStoreElement);
3025 if (ptr == IntPtr.Zero)
3031 return Marshal.PtrToStringAnsi(ptr);
3035 public int updatePresenceDescriptor(
string id,
string jsonDescriptor,
bool forceBeacon)
3037 return engageUpdatePresenceDescriptor(
id, jsonDescriptor, (forceBeacon ? 1 : 0));
3040 public int setFipsCrypto(
string jsonParams)
3042 return engageSetFipsCrypto(jsonParams);
3045 public bool isCryptoFipsValidated()
3047 return (engageIsCryptoFipsValidated() == 1 ?
true : false);
3053 public static uint swapEndianness(uint x)
3055 return ((x & 0x000000ff) << 24) +
3056 ((x & 0x0000ff00) << 8) +
3057 ((x & 0x00ff0000) >> 8) +
3058 ((x & 0xff000000) >> 24);
3061 public static string humanBiometricsFromBlob(
byte[] blob)
3063 JArray dataSeriesArray;
3068 dataSeriesArray =
new JArray();
3071 int bytesLeftInTheBlob = blob.Length;
3074 GCHandle pinnedBlob = GCHandle.Alloc(blob, GCHandleType.Pinned);
3077 IntPtr ptr = pinnedBlob.AddrOfPinnedObject();
3080 while(bytesLeftInTheBlob > 0)
3083 DataSeriesHeader hdr = (DataSeriesHeader)Marshal.PtrToStructure(ptr, typeof(DataSeriesHeader));
3086 if (BitConverter.IsLittleEndian)
3088 hdr.ts = swapEndianness(hdr.ts);
3092 JObject se =
new JObject();
3095 se[
"t"] = (int)hdr.t;
3097 se[
"it"] = (int)hdr.it;
3098 se[
"im"] = (int)hdr.im;
3099 se[
"vt"] = (int)hdr.vt;
3102 ptr = IntPtr.Add(ptr, 9);
3103 bytesLeftInTheBlob -= 9;
3108 JArray s =
new JArray();
3112 for (
byte x = 0; x < hdr.ss; x++)
3114 DataElementUint8 de = (DataElementUint8)Marshal.PtrToStructure(ptr, typeof(DataElementUint8));
3119 ptr = IntPtr.Add(ptr, 2);
3120 bytesLeftInTheBlob -= 2;
3123 else if (hdr.vt == 2)
3127 else if (hdr.vt == 3)
3131 else if (hdr.vt == 4)
3141 dataSeriesArray.Add(se);
3148 dataSeriesArray =
null;
3149 Trace.WriteLine(e.StackTrace);
3154 if(dataSeriesArray !=
null)
3156 JObject hbmData =
new JObject();
3157 hbmData[
"data"] = dataSeriesArray;
3158 rc = hbmData.ToString();
3164 public int platformNotifyChanges(
string jsonChangesArray)
3166 return engagePlatformNotifyChanges(jsonChangesArray);
3169 public String getDeviceId()
3171 IntPtr ptr = engageGetDeviceId();
3173 if (ptr == IntPtr.Zero)
3179 return Marshal.PtrToStringAnsi(ptr);
3183 public int verifyRiff(
string fn)
3185 return engageVerifyRiff(fn);
3188 public String getRiffDescriptor(
string fn)
3190 IntPtr ptr = engageGetRiffDescriptor(fn);
3192 if (ptr == IntPtr.Zero)
3198 return Marshal.PtrToStringAnsi(ptr);