Skip to content

Commit 27d850f

Browse files
committed
Added ability to invoke accountsModel.refreshRegistration() from descendants of CallsModel
1 parent 5286850 commit 27d850f

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

siprix_voip_sdk/lib/accounts_model.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ class AccountsModel extends ChangeNotifier implements IAccountsModel {
594594
}
595595

596596
/// Refresh registration of the all existing accounts (with default or specified regExpire>0)
597+
@override
597598
Future<void> refreshRegistration() async {
598599
try {
599600
for(AccountModel acc in _accounts) {

siprix_voip_sdk/lib/calls_model.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ class CallsModel extends ChangeNotifier {
600600
CallModel operator [](int i) => _callItems[i]; // get
601601

602602
@protected List<CallModel> get callItems => _callItems;
603+
@protected IAccountsModel get accountsModel => _accountsModel;
603604

604605
/// Returns id of the switched call (or kEmptyCallId when there are no calls)
605606
int get switchedCallId => _switchedCallId;

siprix_voip_sdk/lib/siprix_voip_sdk.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ abstract interface class IAccountsModel {
482482
bool hasSecureMedia(int accId);
483483
///Returns true if account with specified id has 'upgradeToVideo' set to 'RecvOnly'
484484
bool isUpgradeToVideoModeRecvOnly(String uri);
485+
///Refresh registration of the all accounts
486+
void refreshRegistration();
485487
}
486488

487489

0 commit comments

Comments
 (0)