Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 1 | /* |
Alexandre Lision | 9fe374b | 2016-01-06 10:17:31 -0500 | [diff] [blame] | 2 | * Copyright (C) 2015-2016 Savoir-faire Linux Inc. |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 3 | * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 18 | */ |
| 19 | #define REGISTRATION_TAG 0 |
| 20 | #define LOCALPORT_TAG 1 |
| 21 | #define STUNURL_TAG 2 |
| 22 | #define PUBLICADDR_TAG 3 |
| 23 | #define PUBLICPORT_TAG 4 |
| 24 | #define MINAUDIO_TAG 5 |
| 25 | #define MAXAUDIO_TAG 6 |
| 26 | #define MINVIDEO_TAG 7 |
| 27 | #define MAXVIDEO_TAG 8 |
| 28 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 29 | #define TURN_SERVER_TAG 9 |
| 30 | #define TURN_USERNAME_TAG 10 |
| 31 | #define TURN_PASSWORD_TAG 11 |
| 32 | #define TURN_REALM_TAG 12 |
| 33 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 34 | #import "AccAdvancedVC.h" |
| 35 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 36 | #import <accountmodel.h> |
| 37 | #import <qitemselectionmodel.h> |
| 38 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 39 | @interface AccAdvancedVC () |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 40 | @property (unsafe_unretained) IBOutlet NSView *registrationContainer; |
| 41 | @property (unsafe_unretained) IBOutlet NSView *mainContainer; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 42 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 43 | @property (unsafe_unretained) IBOutlet NSTextField *registrationField; |
| 44 | @property (unsafe_unretained) IBOutlet NSTextField *localPortField; |
| 45 | @property (unsafe_unretained) IBOutlet NSButton *isUsingSTUN; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 46 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 47 | @property (unsafe_unretained) IBOutlet NSTextField *STUNserverURLField; |
| 48 | @property (unsafe_unretained) IBOutlet NSTextField *minAudioRTPRange; |
| 49 | @property (unsafe_unretained) IBOutlet NSTextField *maxAudioRTPRange; |
| 50 | @property (unsafe_unretained) IBOutlet NSTextField *minVideoRTPRange; |
| 51 | @property (unsafe_unretained) IBOutlet NSTextField *maxVideoRTPRange; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 52 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 53 | @property (unsafe_unretained) IBOutlet NSButton *isUsingTURN; |
| 54 | @property (unsafe_unretained) IBOutlet NSTextField *turnServerURL; |
| 55 | @property (unsafe_unretained) IBOutlet NSTextField *turnUsername; |
| 56 | @property (unsafe_unretained) IBOutlet NSSecureTextField *turnPassword; |
| 57 | @property (unsafe_unretained) IBOutlet NSTextField *turnRealm; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 58 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 59 | @property (unsafe_unretained) IBOutlet NSStepper *registrationStepper; |
| 60 | @property (unsafe_unretained) IBOutlet NSStepper *localPortStepper; |
| 61 | @property (unsafe_unretained) IBOutlet NSStepper *minAudioPortStepper; |
| 62 | @property (unsafe_unretained) IBOutlet NSStepper *maxAudioPortStepper; |
| 63 | @property (unsafe_unretained) IBOutlet NSStepper *minVideoPortStepper; |
| 64 | @property (unsafe_unretained) IBOutlet NSStepper *maxVideoPortStepper; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 65 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 66 | @property (unsafe_unretained) IBOutlet NSMatrix *publishAddrAndPortRadioGroup; |
| 67 | @property (unsafe_unretained) IBOutlet NSTextField *publishedAddrField; |
| 68 | @property (unsafe_unretained) IBOutlet NSTextField *publishedPortField; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 69 | |
| 70 | @end |
| 71 | |
| 72 | @implementation AccAdvancedVC |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 73 | @synthesize registrationField; |
| 74 | @synthesize localPortField; |
| 75 | @synthesize isUsingSTUN; |
| 76 | @synthesize STUNserverURLField; |
| 77 | @synthesize minAudioRTPRange; |
| 78 | @synthesize maxAudioRTPRange; |
| 79 | @synthesize minVideoRTPRange; |
| 80 | @synthesize maxVideoRTPRange; |
| 81 | @synthesize registrationStepper; |
| 82 | @synthesize localPortStepper; |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 83 | @synthesize turnPassword, isUsingTURN, turnRealm, turnServerURL, turnUsername; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 84 | @synthesize minAudioPortStepper; |
| 85 | @synthesize maxAudioPortStepper; |
| 86 | @synthesize minVideoPortStepper; |
| 87 | @synthesize maxVideoPortStepper; |
| 88 | @synthesize publishAddrAndPortRadioGroup; |
| 89 | @synthesize publishedAddrField; |
| 90 | @synthesize publishedPortField; |
| 91 | |
| 92 | - (void)awakeFromNib |
| 93 | { |
| 94 | NSLog(@"INIT Advanced VC"); |
| 95 | [registrationStepper setTag:REGISTRATION_TAG]; |
| 96 | [localPortStepper setTag:LOCALPORT_TAG]; |
| 97 | [minAudioPortStepper setTag:MINAUDIO_TAG]; |
| 98 | [maxAudioPortStepper setTag:MAXAUDIO_TAG]; |
| 99 | [minVideoPortStepper setTag:MINVIDEO_TAG]; |
| 100 | [maxVideoPortStepper setTag:MAXVIDEO_TAG]; |
| 101 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 102 | [turnServerURL setTag:TURN_SERVER_TAG]; |
| 103 | [turnUsername setTag:TURN_USERNAME_TAG]; |
| 104 | [turnPassword setTag:TURN_PASSWORD_TAG]; |
| 105 | [turnRealm setTag:TURN_REALM_TAG]; |
| 106 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 107 | [registrationField setTag:REGISTRATION_TAG]; |
| 108 | [localPortField setTag:LOCALPORT_TAG]; |
| 109 | [minAudioRTPRange setTag:MINAUDIO_TAG]; |
| 110 | [maxAudioRTPRange setTag:MAXAUDIO_TAG]; |
| 111 | [minVideoRTPRange setTag:MINVIDEO_TAG]; |
| 112 | [maxVideoRTPRange setTag:MAXVIDEO_TAG]; |
| 113 | |
| 114 | [STUNserverURLField setTag:STUNURL_TAG]; |
| 115 | [publishedPortField setTag:PUBLICPORT_TAG]; |
| 116 | [publishedAddrField setTag:PUBLICADDR_TAG]; |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 117 | |
Alexandre Lision | d3aa3ad | 2015-10-23 14:28:41 -0400 | [diff] [blame] | 118 | QObject::connect(AccountModel::instance().selectionModel(), |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 119 | &QItemSelectionModel::currentChanged, |
| 120 | [=](const QModelIndex ¤t, const QModelIndex &previous) { |
| 121 | if(!current.isValid()) |
| 122 | return; |
| 123 | [self loadAccount]; |
| 124 | }); |
| 125 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 126 | } |
| 127 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 128 | - (Account*) currentAccount |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 129 | { |
Alexandre Lision | d3aa3ad | 2015-10-23 14:28:41 -0400 | [diff] [blame] | 130 | auto accIdx = AccountModel::instance().selectionModel()->currentIndex(); |
| 131 | return AccountModel::instance().getAccountByModelIndex(accIdx); |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | - (void)loadAccount |
| 135 | { |
| 136 | auto account = [self currentAccount]; |
| 137 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 138 | [self updateControlsWithTag:REGISTRATION_TAG]; |
| 139 | [self updateControlsWithTag:LOCALPORT_TAG]; |
| 140 | [self updateControlsWithTag:MINAUDIO_TAG]; |
| 141 | [self updateControlsWithTag:MAXAUDIO_TAG]; |
| 142 | [self updateControlsWithTag:MINVIDEO_TAG]; |
| 143 | [self updateControlsWithTag:MAXVIDEO_TAG]; |
| 144 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 145 | [STUNserverURLField setStringValue:account->sipStunServer().toNSString()]; |
| 146 | [isUsingSTUN setState:account->isSipStunEnabled()?NSOnState:NSOffState]; |
| 147 | [STUNserverURLField setEnabled:account->isSipStunEnabled()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 148 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 149 | [isUsingTURN setState:account->isTurnEnabled()?NSOnState:NSOffState]; |
| 150 | [self toggleTURN:isUsingTURN]; |
| 151 | [turnServerURL setStringValue:account->turnServer().toNSString()]; |
| 152 | [turnUsername setStringValue:account->turnServerUsername().toNSString()]; |
| 153 | [turnPassword setStringValue:account->turnServerPassword().toNSString()]; |
| 154 | [turnRealm setStringValue:account->turnServerRealm().toNSString()]; |
| 155 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 156 | if(account->isPublishedSameAsLocal()) |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 157 | [publishAddrAndPortRadioGroup selectCellAtRow:0 column:0]; |
| 158 | else { |
| 159 | [publishAddrAndPortRadioGroup selectCellAtRow:1 column:0]; |
| 160 | } |
| 161 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 162 | [publishedAddrField setStringValue:account->publishedAddress().toNSString()]; |
| 163 | [publishedPortField setIntValue:account->publishedPort()]; |
| 164 | [publishedAddrField setEnabled:!account->isPublishedSameAsLocal()]; |
| 165 | [publishedPortField setEnabled:!account->isPublishedSameAsLocal()]; |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 166 | |
| 167 | if(account->protocol() == Account::Protocol::RING) { |
| 168 | [self.registrationContainer setHidden:YES]; |
| 169 | } else { |
| 170 | [self.registrationContainer setHidden:NO]; |
| 171 | } |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | #pragma mark - NSTextFieldDelegate methods |
| 175 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 176 | -(void)controlTextDidChange:(NSNotification *)notif |
| 177 | { |
| 178 | NSTextField *textField = [notif object]; |
| 179 | NSRange test = [[textField currentEditor] selectedRange]; |
| 180 | |
| 181 | [self valueDidChange:textField]; |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 182 | //FIXME: saving account lose focus because in NSTreeController we remove and reinsert row so View selection change |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 183 | [textField.window makeFirstResponder:textField]; |
| 184 | [[textField currentEditor] setSelectedRange:test]; |
| 185 | } |
| 186 | |
| 187 | - (IBAction) valueDidChange: (id) sender |
| 188 | { |
| 189 | switch ([sender tag]) { |
| 190 | case REGISTRATION_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 191 | [self currentAccount]->setRegistrationExpire([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 192 | break; |
| 193 | case LOCALPORT_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 194 | [self currentAccount]->setLocalPort([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 195 | break; |
| 196 | case STUNURL_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 197 | [self currentAccount]->setSipStunServer([[sender stringValue] UTF8String]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 198 | break; |
| 199 | case PUBLICADDR_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 200 | [self currentAccount]->setPublishedAddress([[sender stringValue] UTF8String]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 201 | break; |
| 202 | case PUBLICPORT_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 203 | [self currentAccount]->setPublishedPort([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 204 | break; |
| 205 | case MINAUDIO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 206 | [self currentAccount]->setAudioPortMin([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 207 | break; |
| 208 | case MAXAUDIO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 209 | [self currentAccount]->setAudioPortMax([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 210 | break; |
| 211 | case MINVIDEO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 212 | [self currentAccount]->setVideoPortMin([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 213 | break; |
| 214 | case MAXVIDEO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 215 | [self currentAccount]->setVideoPortMax([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 216 | break; |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 217 | case TURN_SERVER_TAG: |
| 218 | [self currentAccount]->setTurnServer([[sender stringValue] UTF8String]); |
| 219 | break; |
| 220 | case TURN_USERNAME_TAG: |
| 221 | [self currentAccount]->setTurnServerUsername([[sender stringValue] UTF8String]); |
| 222 | break; |
| 223 | case TURN_PASSWORD_TAG: |
| 224 | [self currentAccount]->setTurnServerPassword([[sender stringValue] UTF8String]); |
| 225 | break; |
| 226 | case TURN_REALM_TAG: |
| 227 | [self currentAccount]->setTurnServerRealm([[sender stringValue] UTF8String]); |
| 228 | break; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 229 | default: |
| 230 | break; |
| 231 | } |
| 232 | [self updateControlsWithTag:[sender tag]]; |
| 233 | } |
| 234 | |
| 235 | - (IBAction)toggleSTUN:(NSButton *)sender |
| 236 | { |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 237 | [self currentAccount]->setSipStunEnabled([sender state]); |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 238 | [STUNserverURLField setEnabled:[self currentAccount]->isSipStunEnabled()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 239 | } |
| 240 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 241 | - (IBAction)toggleTURN:(id)sender { |
| 242 | [self currentAccount]->setTurnEnabled([sender state]); |
| 243 | [turnServerURL setEnabled:[sender state]]; |
| 244 | [turnUsername setEnabled:[sender state]]; |
| 245 | [turnPassword setEnabled:[sender state]]; |
| 246 | [turnRealm setEnabled:[sender state]]; |
| 247 | } |
| 248 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 249 | - (IBAction)didSwitchPublishedAddress:(NSMatrix *)matrix |
| 250 | { |
| 251 | NSInteger row = [matrix selectedRow]; |
| 252 | if(row == 0) { |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 253 | [self currentAccount]->setPublishedSameAsLocal(YES); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 254 | } else { |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 255 | [self currentAccount]->setPublishedSameAsLocal(NO); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 256 | } |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 257 | [publishedAddrField setEnabled:![self currentAccount]->isPublishedSameAsLocal()]; |
| 258 | [publishedPortField setEnabled:![self currentAccount]->isPublishedSameAsLocal()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 259 | |
| 260 | } |
| 261 | |
| 262 | - (void) updateControlsWithTag:(NSInteger) tag |
| 263 | { |
| 264 | switch (tag) { |
| 265 | case REGISTRATION_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 266 | [registrationStepper setIntegerValue:[self currentAccount]->registrationExpire()]; |
| 267 | [registrationField setIntegerValue:[self currentAccount]->registrationExpire()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 268 | break; |
| 269 | case LOCALPORT_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 270 | [localPortStepper setIntegerValue:[self currentAccount]->localPort()]; |
| 271 | [localPortField setIntegerValue:[self currentAccount]->localPort()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 272 | break; |
| 273 | case MINAUDIO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 274 | [minAudioPortStepper setIntegerValue:[self currentAccount]->audioPortMin()]; |
| 275 | [minAudioRTPRange setIntegerValue:[self currentAccount]->audioPortMin()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 276 | break; |
| 277 | case MAXAUDIO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 278 | [maxAudioPortStepper setIntegerValue:[self currentAccount]->audioPortMax()]; |
| 279 | [maxAudioRTPRange setIntegerValue:[self currentAccount]->audioPortMax()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 280 | break; |
| 281 | case MINVIDEO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 282 | [minVideoPortStepper setIntegerValue:[self currentAccount]->videoPortMin()]; |
| 283 | [minVideoRTPRange setIntegerValue:[self currentAccount]->videoPortMin()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 284 | break; |
| 285 | case MAXVIDEO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 286 | [maxVideoPortStepper setIntegerValue:[self currentAccount]->videoPortMax()]; |
| 287 | [maxVideoRTPRange setIntegerValue:[self currentAccount]->videoPortMax()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 288 | break; |
| 289 | default: |
| 290 | break; |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | @end |