engage-engine 1.251.90910020 → 1.251.90910022

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1431,6 +1431,9 @@ namespace AppConfigurationObjects
1431
1431
  /** @brief [Optional, Default: false] Indicates that the aliasSpecializer must cause receivers to mute this transmission if they have an affinity for the specializer.. */
1432
1432
  bool receiverRxMuteForAliasSpecializer;
1433
1433
 
1434
+ /** @brief [Optional, Default: false] Indicates that the transmission should be restarted. */
1435
+ bool reBegin;
1436
+
1434
1437
  AdvancedTxParams()
1435
1438
  {
1436
1439
  clear();
@@ -1448,6 +1451,7 @@ namespace AppConfigurationObjects
1448
1451
  audioUri.clear();
1449
1452
  aliasSpecializer = 0;
1450
1453
  receiverRxMuteForAliasSpecializer = false;
1454
+ reBegin = false;
1451
1455
  }
1452
1456
 
1453
1457
  virtual void initForDocumenting()
@@ -1467,7 +1471,8 @@ namespace AppConfigurationObjects
1467
1471
  TOJSON_IMPL(txId),
1468
1472
  TOJSON_IMPL(audioUri),
1469
1473
  TOJSON_IMPL(aliasSpecializer),
1470
- TOJSON_IMPL(receiverRxMuteForAliasSpecializer)
1474
+ TOJSON_IMPL(receiverRxMuteForAliasSpecializer),
1475
+ TOJSON_IMPL(reBegin)
1471
1476
  };
1472
1477
  }
1473
1478
  static void from_json(const nlohmann::json& j, AdvancedTxParams& p)
@@ -1483,6 +1488,7 @@ namespace AppConfigurationObjects
1483
1488
  getOptional<TxAudioUri>("audioUri", p.audioUri, j);
1484
1489
  getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
1485
1490
  getOptional<bool>("receiverRxMuteForAliasSpecializer", p.receiverRxMuteForAliasSpecializer, j, false);
1491
+ getOptional<bool>("reBegin", p.reBegin, j, false);
1486
1492
  }
1487
1493
 
1488
1494
  //-----------------------------------------------------------
@@ -2751,6 +2757,21 @@ namespace AppConfigurationObjects
2751
2757
  IMPLEMENT_JSON_DOCUMENTATION(Rallypoint)
2752
2758
 
2753
2759
  public:
2760
+ /**
2761
+ * @brief RP protocol enum.
2762
+ *
2763
+ */
2764
+ typedef enum
2765
+ {
2766
+ /** @brief [Default] TLS over TCP*/
2767
+ rppTlsTcp = 0,
2768
+
2769
+ /** @brief WebSocket over TLS */
2770
+ rppTlsWs = 1,
2771
+
2772
+ /** @brief Invalid */
2773
+ rppInvalid = -1
2774
+ } RpProtocol_t;
2754
2775
 
2755
2776
  /**
2756
2777
  * @brief This is the host address for the Engine to connect to the RallyPoint service.
@@ -2823,6 +2844,13 @@ namespace AppConfigurationObjects
2823
2844
  std::string sni;
2824
2845
 
2825
2846
 
2847
+ /** @brief [Optional, Default: rppTlsTcp] Specifies the protocol to be used for the Rallypoint connection. See @ref RpProtocol_t for all protocol types */
2848
+ RpProtocol_t protocol;
2849
+
2850
+ /** @brief [Optional, Default: ""] Path to use for the RP connection (only used for WebSocket) */
2851
+ std::string path;
2852
+
2853
+
2826
2854
  Rallypoint()
2827
2855
  {
2828
2856
  clear();
@@ -2840,6 +2868,8 @@ namespace AppConfigurationObjects
2840
2868
  connectionTimeoutSecs = 0;
2841
2869
  tcpTxOptions.clear();
2842
2870
  sni.clear();
2871
+ protocol = rppTlsTcp;
2872
+ path.clear();
2843
2873
  }
2844
2874
 
2845
2875
  bool matches(const Rallypoint& other)
@@ -2849,6 +2879,16 @@ namespace AppConfigurationObjects
2849
2879
  return false;
2850
2880
  }
2851
2881
 
2882
+ if(protocol != other.protocol)
2883
+ {
2884
+ return false;
2885
+ }
2886
+
2887
+ if(path.compare(other.path) != 0)
2888
+ {
2889
+ return false;
2890
+ }
2891
+
2852
2892
  if(certificate.compare(other.certificate) != 0)
2853
2893
  {
2854
2894
  return false;
@@ -2932,7 +2972,9 @@ namespace AppConfigurationObjects
2932
2972
  TOJSON_IMPL(disableMessageSigning),
2933
2973
  TOJSON_IMPL(connectionTimeoutSecs),
2934
2974
  TOJSON_IMPL(tcpTxOptions),
2935
- TOJSON_IMPL(sni)
2975
+ TOJSON_IMPL(sni),
2976
+ TOJSON_IMPL(protocol),
2977
+ TOJSON_IMPL(path)
2936
2978
  };
2937
2979
  }
2938
2980
 
@@ -2950,6 +2992,8 @@ namespace AppConfigurationObjects
2950
2992
  getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
2951
2993
  getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
2952
2994
  getOptional<std::string>("sni", p.sni, j);
2995
+ getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
2996
+ getOptional<std::string>("path", p.path, j);
2953
2997
  }
2954
2998
 
2955
2999
  //-----------------------------------------------------------
@@ -3535,6 +3579,164 @@ namespace AppConfigurationObjects
3535
3579
  // internalKey is not serialized
3536
3580
  }
3537
3581
 
3582
+ //-----------------------------------------------------------
3583
+ JSON_SERIALIZED_CLASS(AudioRegistryDevice)
3584
+ /**
3585
+ * @brief Describes an audio device that is available on the system
3586
+ *
3587
+ * Helper C++ class to serialize and de-serialize AudioRegistryDevice
3588
+ *
3589
+ * Example: @include[doc] examples/AudioRegistryDevice.json
3590
+ *
3591
+ * @see AudioRegistryDevice
3592
+ */
3593
+ class AudioRegistryDevice : public ConfigurationObjectBase
3594
+ {
3595
+ IMPLEMENT_JSON_SERIALIZATION()
3596
+ IMPLEMENT_JSON_DOCUMENTATION(AudioRegistryDevice)
3597
+
3598
+ public:
3599
+ /** @brief The string identifier used to identify the hardware. */
3600
+ std::string hardwareId;
3601
+
3602
+ /** @brief True if this is the default device */
3603
+ bool isDefault;
3604
+
3605
+ /** @brief Name of the device */
3606
+ std::string name;
3607
+
3608
+ /** @brief [Optional] Manufacturer */
3609
+ std::string manufacturer;
3610
+
3611
+ /** @brief [Optional] Model */
3612
+ std::string model;
3613
+
3614
+ /** @brief [Optional] Serial number */
3615
+ std::string serialNumber;
3616
+
3617
+
3618
+ /** @brief [Optional] Type */
3619
+ std::string type;
3620
+
3621
+ /** @brief [Optional] Extra */
3622
+ std::string extra;
3623
+
3624
+ AudioRegistryDevice()
3625
+ {
3626
+ clear();
3627
+ }
3628
+
3629
+ void clear()
3630
+ {
3631
+ hardwareId.clear();
3632
+ isDefault = false;
3633
+ name.clear();
3634
+ manufacturer.clear();
3635
+ model.clear();
3636
+ serialNumber.clear();
3637
+ type.clear();
3638
+ extra.clear();
3639
+ }
3640
+
3641
+ virtual std::string toString()
3642
+ {
3643
+ char buff[2048];
3644
+
3645
+ snprintf(buff, sizeof(buff), "hardwareId=%s, isDefault=%d, name=%s, manufacturer=%s, model=%s, serialNumber=%s, type=%s, extra=%s",
3646
+ hardwareId.c_str(),
3647
+ (int)isDefault,
3648
+ name.c_str(),
3649
+ manufacturer.c_str(),
3650
+ model.c_str(),
3651
+ serialNumber.c_str(),
3652
+ type.c_str(),
3653
+ extra.c_str());
3654
+
3655
+ return std::string(buff);
3656
+ }
3657
+ };
3658
+
3659
+ static void to_json(nlohmann::json& j, const AudioRegistryDevice& p)
3660
+ {
3661
+ j = nlohmann::json{
3662
+ TOJSON_IMPL(hardwareId),
3663
+ TOJSON_IMPL(isDefault),
3664
+ TOJSON_IMPL(name),
3665
+ TOJSON_IMPL(manufacturer),
3666
+ TOJSON_IMPL(model),
3667
+ TOJSON_IMPL(serialNumber),
3668
+ TOJSON_IMPL(type),
3669
+ TOJSON_IMPL(extra)
3670
+ };
3671
+ }
3672
+ static void from_json(const nlohmann::json& j, AudioRegistryDevice& p)
3673
+ {
3674
+ p.clear();
3675
+ getOptional<std::string>("hardwareId", p.hardwareId, j, EMPTY_STRING);
3676
+ getOptional<bool>("isDefault", p.isDefault, j, false);
3677
+ getOptional("name", p.name, j);
3678
+ getOptional("manufacturer", p.manufacturer, j);
3679
+ getOptional("model", p.model, j);
3680
+ getOptional("serialNumber", p.serialNumber, j);
3681
+ getOptional("type", p.type, j);
3682
+ getOptional("extra", p.extra, j);
3683
+ }
3684
+
3685
+
3686
+ //-----------------------------------------------------------
3687
+ JSON_SERIALIZED_CLASS(AudioRegistry)
3688
+ /**
3689
+ * @brief Describes an audio registry
3690
+ *
3691
+ * Helper C++ class to serialize and de-serialize AudioRegistry
3692
+ *
3693
+ * Example: @include[doc] examples/AudioRegistry.json
3694
+ *
3695
+ * @see AudioRegistry
3696
+ */
3697
+ class AudioRegistry : public ConfigurationObjectBase
3698
+ {
3699
+ IMPLEMENT_JSON_SERIALIZATION()
3700
+ IMPLEMENT_JSON_DOCUMENTATION(AudioRegistry)
3701
+
3702
+ public:
3703
+ /** @brief [Optional] List of input devices to use for the registry. */
3704
+ std::vector<AudioRegistryDevice> inputs;
3705
+
3706
+ /** @brief [Optional] List of output devices to use for the registry. */
3707
+ std::vector<AudioRegistryDevice> outputs;
3708
+
3709
+ AudioRegistry()
3710
+ {
3711
+ clear();
3712
+ }
3713
+
3714
+ void clear()
3715
+ {
3716
+ inputs.clear();
3717
+ outputs.clear();
3718
+ }
3719
+
3720
+ virtual std::string toString()
3721
+ {
3722
+ return std::string("");
3723
+ }
3724
+ };
3725
+
3726
+ static void to_json(nlohmann::json& j, const AudioRegistry& p)
3727
+ {
3728
+ j = nlohmann::json{
3729
+ TOJSON_IMPL(inputs),
3730
+ TOJSON_IMPL(outputs)
3731
+ };
3732
+ }
3733
+ static void from_json(const nlohmann::json& j, AudioRegistry& p)
3734
+ {
3735
+ p.clear();
3736
+ getOptional<std::vector<AudioRegistryDevice>>("inputs", p.inputs, j);
3737
+ getOptional<std::vector<AudioRegistryDevice>>("outputs", p.outputs, j);
3738
+ }
3739
+
3538
3740
  //-----------------------------------------------------------
3539
3741
  JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3540
3742
  /**
@@ -3778,12 +3980,18 @@ namespace AppConfigurationObjects
3778
3980
  /** @brief [Optional, Default: first audio device] Id for the input audio device to use for this group. */
3779
3981
  int inputId;
3780
3982
 
3983
+ /** @brief [Optional] Hardware ID of the input audio device to use for this group. If empty, inputId is used. */
3984
+ std::string inputHardwareId;
3985
+
3781
3986
  /** @brief [Optional, Default: 0] The percentage at which to gain the input audio. */
3782
3987
  int inputGain;
3783
3988
 
3784
3989
  /** @brief [Optional, Default: first audio device] Id for the output audio device to use for this group. */
3785
3990
  int outputId;
3786
3991
 
3992
+ /** @brief [Optional] Hardware ID of the output audio device to use for this group. If empty, outputId is used. */
3993
+ std::string outputHardwareId;
3994
+
3787
3995
  /** @brief [Optional, Default: 0] The percentage at which to gain the output audio. */
3788
3996
  int outputGain;
3789
3997
 
@@ -3805,8 +4013,10 @@ namespace AppConfigurationObjects
3805
4013
  {
3806
4014
  enabled = true;
3807
4015
  inputId = 0;
4016
+ inputHardwareId.clear();
3808
4017
  inputGain = 0;
3809
4018
  outputId = 0;
4019
+ outputHardwareId.clear();
3810
4020
  outputGain = 0;
3811
4021
  outputLevelLeft = 100;
3812
4022
  outputLevelRight = 100;
@@ -3819,8 +4029,10 @@ namespace AppConfigurationObjects
3819
4029
  j = nlohmann::json{
3820
4030
  TOJSON_IMPL(enabled),
3821
4031
  TOJSON_IMPL(inputId),
4032
+ TOJSON_IMPL(inputHardwareId),
3822
4033
  TOJSON_IMPL(inputGain),
3823
4034
  TOJSON_IMPL(outputId),
4035
+ TOJSON_IMPL(outputHardwareId),
3824
4036
  TOJSON_IMPL(outputLevelLeft),
3825
4037
  TOJSON_IMPL(outputLevelRight),
3826
4038
  TOJSON_IMPL(outputMuted)
@@ -3831,8 +4043,10 @@ namespace AppConfigurationObjects
3831
4043
  p.clear();
3832
4044
  getOptional<bool>("enabled", p.enabled, j, true);
3833
4045
  getOptional<int>("inputId", p.inputId, j, 0);
4046
+ getOptional<std::string>("inputHardwareId", p.inputHardwareId, j, EMPTY_STRING);
3834
4047
  getOptional<int>("inputGain", p.inputGain, j, 0);
3835
4048
  getOptional<int>("outputId", p.outputId, j, 0);
4049
+ getOptional<std::string>("outputHardwareId", p.outputHardwareId, j, EMPTY_STRING);
3836
4050
  getOptional<int>("outputGain", p.outputGain, j, 0);
3837
4051
  getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
3838
4052
  getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
@@ -4764,11 +4978,14 @@ namespace AppConfigurationObjects
4764
4978
 
4765
4979
  /** @brief Audio payloads are transformed, headers are preserved, multiple parallel output streams are
4766
4980
  * possible/expected. The group must be gtAudio (type = 1).*/
4767
- bomMultistream = 1,
4981
+ bomMultistream = 1,
4768
4982
 
4769
4983
  /** @brief Audio payloads are mixed - output is anonymous (i.e. no metadata) if if the target group(s)
4770
4984
  * allow header extensions. The group must be gtAudio (type = 1)*/
4771
- bomMixedStream = 2,
4985
+ bomMixedStream = 2,
4986
+
4987
+ /** @brief No output will be made to the group regardless of type.*/
4988
+ bomNone = 3
4772
4989
  } BridgingOpMode_t;
4773
4990
 
4774
4991
  /** @brief [Optional] The output mode */
@@ -6018,6 +6235,9 @@ namespace AppConfigurationObjects
6018
6235
  /** @brief [Optional, Default: false] If true, input audio is written to a PCM file in the data directory */
6019
6236
  bool saveOutputPcm;
6020
6237
 
6238
+ /** @brief [Optional] If specified, this registry will be used to discover the input and output devices */
6239
+ AudioRegistry registry;
6240
+
6021
6241
 
6022
6242
  EnginePolicyAudio()
6023
6243
  {
@@ -6040,6 +6260,7 @@ namespace AppConfigurationObjects
6040
6260
  denoiseOutput = false;
6041
6261
  saveInputPcm = false;
6042
6262
  saveOutputPcm = false;
6263
+ registry.clear();
6043
6264
  }
6044
6265
  };
6045
6266
 
@@ -6059,7 +6280,8 @@ namespace AppConfigurationObjects
6059
6280
  TOJSON_IMPL(denoiseInput),
6060
6281
  TOJSON_IMPL(denoiseOutput),
6061
6282
  TOJSON_IMPL(saveInputPcm),
6062
- TOJSON_IMPL(saveOutputPcm)
6283
+ TOJSON_IMPL(saveOutputPcm),
6284
+ TOJSON_IMPL(registry)
6063
6285
  };
6064
6286
  }
6065
6287
  static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
@@ -6080,6 +6302,7 @@ namespace AppConfigurationObjects
6080
6302
  FROMJSON_IMPL(denoiseOutput, bool, false);
6081
6303
  FROMJSON_IMPL(saveInputPcm, bool, false);
6082
6304
  FROMJSON_IMPL(saveOutputPcm, bool, false);
6305
+ getOptional<AudioRegistry>("registry", p.registry, j);
6083
6306
  }
6084
6307
 
6085
6308
  //-----------------------------------------------------------
@@ -7742,6 +7965,12 @@ namespace AppConfigurationObjects
7742
7965
 
7743
7966
  OutboundLeafPolicy_t outboundLeafPolicy;
7744
7967
 
7968
+ /** @brief [Optional, Default: Rallypoint::RpProtocol_t::rppTlsTcp] Protocol to use for the peer */
7969
+ Rallypoint::RpProtocol_t protocol;
7970
+
7971
+ /** @brief [Optional, Default: ""] Path to use for the peer (only used for WebSocket) */
7972
+ std::string path;
7973
+
7745
7974
  RallypointPeer()
7746
7975
  {
7747
7976
  clear();
@@ -7756,6 +7985,8 @@ namespace AppConfigurationObjects
7756
7985
  connectionTimeoutSecs = 0;
7757
7986
  forceIsMeshLeaf = false;
7758
7987
  outboundLeafPolicy = OutboundLeafPolicy_t::olpUseRpConfiguration;
7988
+ protocol = Rallypoint::RpProtocol_t::rppTlsTcp;
7989
+ path.clear();
7759
7990
  }
7760
7991
  };
7761
7992
 
@@ -7768,7 +7999,9 @@ namespace AppConfigurationObjects
7768
7999
  TOJSON_IMPL(certificate),
7769
8000
  TOJSON_IMPL(connectionTimeoutSecs),
7770
8001
  TOJSON_IMPL(forceIsMeshLeaf),
7771
- TOJSON_IMPL(outboundLeafPolicy)
8002
+ TOJSON_IMPL(outboundLeafPolicy),
8003
+ TOJSON_IMPL(protocol),
8004
+ TOJSON_IMPL(path)
7772
8005
  };
7773
8006
  }
7774
8007
  static void from_json(const nlohmann::json& j, RallypointPeer& p)
@@ -7781,6 +8014,8 @@ namespace AppConfigurationObjects
7781
8014
  getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
7782
8015
  getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
7783
8016
  getOptional<RallypointPeer::OutboundLeafPolicy_t>("outboundLeafPolicy", p.outboundLeafPolicy, j, RallypointPeer::OutboundLeafPolicy_t::olpUseRpConfiguration);
8017
+ getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
8018
+ getOptional<std::string>("path", p.path, j);
7784
8019
  }
7785
8020
 
7786
8021
  //-----------------------------------------------------------
@@ -8624,6 +8859,9 @@ namespace AppConfigurationObjects
8624
8859
  /** @brief [Default: false] Indicates whether the client is required to present a certificate */
8625
8860
  bool requireClientCertificate;
8626
8861
 
8862
+ /** @brief [Default: false] Indicates whether TLS is required */
8863
+ bool requireTls;
8864
+
8627
8865
  RallypointWebsocketSettings()
8628
8866
  {
8629
8867
  clear();
@@ -8635,6 +8873,7 @@ namespace AppConfigurationObjects
8635
8873
  listenPort = 8443;
8636
8874
  certificate.clear();
8637
8875
  requireClientCertificate = false;
8876
+ requireTls = true;
8638
8877
  }
8639
8878
  };
8640
8879
 
@@ -8644,7 +8883,8 @@ namespace AppConfigurationObjects
8644
8883
  TOJSON_IMPL(enabled),
8645
8884
  TOJSON_IMPL(listenPort),
8646
8885
  TOJSON_IMPL(certificate),
8647
- TOJSON_IMPL(requireClientCertificate)
8886
+ TOJSON_IMPL(requireClientCertificate),
8887
+ TOJSON_IMPL(requireTls)
8648
8888
  };
8649
8889
  }
8650
8890
  static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
@@ -8654,6 +8894,7 @@ namespace AppConfigurationObjects
8654
8894
  getOptional<int>("listenPort", p.listenPort, j, 8443);
8655
8895
  getOptional<SecurityCertificate>("certificate", p.certificate, j);
8656
8896
  getOptional<bool>("requireClientCertificate", p.requireClientCertificate, j, false);
8897
+ getOptional<bool>("requireTls", p.requireTls, j, true);
8657
8898
  }
8658
8899
 
8659
8900
 
@@ -10156,7 +10397,10 @@ namespace AppConfigurationObjects
10156
10397
  txsBridgedButNotMultistream = -11,
10157
10398
 
10158
10399
  /** @brief Transmission was automatically ended because the group became bridged on a non-multistream configuration */
10159
- txsAutoEndedDueToNonMultistreamBridge = -12
10400
+ txsAutoEndedDueToNonMultistreamBridge = -12,
10401
+
10402
+ /** @brief Restart of transmission was attempted but transmission was not already operational */
10403
+ txsReBeginWithoutPriorBegin = -13
10160
10404
  } TxStatus_t;
10161
10405
 
10162
10406
  /** @brief ID of the group */
@@ -10279,6 +10523,12 @@ namespace AppConfigurationObjects
10279
10523
 
10280
10524
  /** @brief The transport type is invalid */
10281
10525
  csInvalidTransport = -11,
10526
+
10527
+ /** @brief Audio input device not found in registry */
10528
+ csAudioInputDeviceNotFound = -12,
10529
+
10530
+ /** @brief Audio output device not found in registry */
10531
+ csAudioOutputDeviceNotFound = -13
10282
10532
  } CreationStatus_t;
10283
10533
 
10284
10534
  /** @brief ID of the group */
@@ -24,6 +24,7 @@
24
24
  #endif
25
25
 
26
26
  static const size_t ENGAGE_MAX_CRYPTO_PASSWORD_BYTES = 256;
27
+ static const uint64_t ENGAGE_ROOT_CA_CERTIFICATE_CACHE_EXPIRATION_MS = (60 * 1000);
27
28
 
28
29
  static const int ENGAGE_INVALID_IP_ADDRESS_FAMILY = -1;
29
30
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engage-engine",
3
- "version": "1.251.90910020",
3
+ "version": "1.251.90910022",
4
4
  "description": "Use Engage to communicate with everyone, everywhere, from any device",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"