Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 1 | /* |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 2 | * Copyright (C) 2015 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. |
| 18 | * |
| 19 | * Additional permission under GNU GPL version 3 section 7: |
| 20 | * |
| 21 | * If you modify this program, or any covered work, by linking or |
| 22 | * combining it with the OpenSSL project's OpenSSL library (or a |
| 23 | * modified version of that library), containing parts covered by the |
| 24 | * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. |
| 25 | * grants you additional permission to convey the resulting work. |
| 26 | * Corresponding Source for a non-source form of such a combination |
| 27 | * shall include the source code for the parts of OpenSSL used as well |
| 28 | * as that of the covered work. |
| 29 | */ |
| 30 | #define REGISTRATION_TAG 0 |
| 31 | #define LOCALPORT_TAG 1 |
| 32 | #define STUNURL_TAG 2 |
| 33 | #define PUBLICADDR_TAG 3 |
| 34 | #define PUBLICPORT_TAG 4 |
| 35 | #define MINAUDIO_TAG 5 |
| 36 | #define MAXAUDIO_TAG 6 |
| 37 | #define MINVIDEO_TAG 7 |
| 38 | #define MAXVIDEO_TAG 8 |
| 39 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 40 | #define TURN_SERVER_TAG 9 |
| 41 | #define TURN_USERNAME_TAG 10 |
| 42 | #define TURN_PASSWORD_TAG 11 |
| 43 | #define TURN_REALM_TAG 12 |
| 44 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 45 | #import "AccAdvancedVC.h" |
| 46 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 47 | #import <accountmodel.h> |
| 48 | #import <qitemselectionmodel.h> |
| 49 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 50 | @interface AccAdvancedVC () |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 51 | @property (unsafe_unretained) IBOutlet NSView *registrationContainer; |
| 52 | @property (unsafe_unretained) IBOutlet NSView *mainContainer; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 53 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 54 | @property (unsafe_unretained) IBOutlet NSTextField *registrationField; |
| 55 | @property (unsafe_unretained) IBOutlet NSTextField *localPortField; |
| 56 | @property (unsafe_unretained) IBOutlet NSButton *isUsingSTUN; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 57 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 58 | @property (unsafe_unretained) IBOutlet NSTextField *STUNserverURLField; |
| 59 | @property (unsafe_unretained) IBOutlet NSTextField *minAudioRTPRange; |
| 60 | @property (unsafe_unretained) IBOutlet NSTextField *maxAudioRTPRange; |
| 61 | @property (unsafe_unretained) IBOutlet NSTextField *minVideoRTPRange; |
| 62 | @property (unsafe_unretained) IBOutlet NSTextField *maxVideoRTPRange; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 63 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 64 | @property (unsafe_unretained) IBOutlet NSButton *isUsingTURN; |
| 65 | @property (unsafe_unretained) IBOutlet NSTextField *turnServerURL; |
| 66 | @property (unsafe_unretained) IBOutlet NSTextField *turnUsername; |
| 67 | @property (unsafe_unretained) IBOutlet NSSecureTextField *turnPassword; |
| 68 | @property (unsafe_unretained) IBOutlet NSTextField *turnRealm; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 69 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 70 | @property (unsafe_unretained) IBOutlet NSStepper *registrationStepper; |
| 71 | @property (unsafe_unretained) IBOutlet NSStepper *localPortStepper; |
| 72 | @property (unsafe_unretained) IBOutlet NSStepper *minAudioPortStepper; |
| 73 | @property (unsafe_unretained) IBOutlet NSStepper *maxAudioPortStepper; |
| 74 | @property (unsafe_unretained) IBOutlet NSStepper *minVideoPortStepper; |
| 75 | @property (unsafe_unretained) IBOutlet NSStepper *maxVideoPortStepper; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 76 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 77 | @property (unsafe_unretained) IBOutlet NSMatrix *publishAddrAndPortRadioGroup; |
| 78 | @property (unsafe_unretained) IBOutlet NSTextField *publishedAddrField; |
| 79 | @property (unsafe_unretained) IBOutlet NSTextField *publishedPortField; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 80 | |
| 81 | @end |
| 82 | |
| 83 | @implementation AccAdvancedVC |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 84 | @synthesize registrationField; |
| 85 | @synthesize localPortField; |
| 86 | @synthesize isUsingSTUN; |
| 87 | @synthesize STUNserverURLField; |
| 88 | @synthesize minAudioRTPRange; |
| 89 | @synthesize maxAudioRTPRange; |
| 90 | @synthesize minVideoRTPRange; |
| 91 | @synthesize maxVideoRTPRange; |
| 92 | @synthesize registrationStepper; |
| 93 | @synthesize localPortStepper; |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 94 | @synthesize turnPassword, isUsingTURN, turnRealm, turnServerURL, turnUsername; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 95 | @synthesize minAudioPortStepper; |
| 96 | @synthesize maxAudioPortStepper; |
| 97 | @synthesize minVideoPortStepper; |
| 98 | @synthesize maxVideoPortStepper; |
| 99 | @synthesize publishAddrAndPortRadioGroup; |
| 100 | @synthesize publishedAddrField; |
| 101 | @synthesize publishedPortField; |
| 102 | |
| 103 | - (void)awakeFromNib |
| 104 | { |
| 105 | NSLog(@"INIT Advanced VC"); |
| 106 | [registrationStepper setTag:REGISTRATION_TAG]; |
| 107 | [localPortStepper setTag:LOCALPORT_TAG]; |
| 108 | [minAudioPortStepper setTag:MINAUDIO_TAG]; |
| 109 | [maxAudioPortStepper setTag:MAXAUDIO_TAG]; |
| 110 | [minVideoPortStepper setTag:MINVIDEO_TAG]; |
| 111 | [maxVideoPortStepper setTag:MAXVIDEO_TAG]; |
| 112 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 113 | [turnServerURL setTag:TURN_SERVER_TAG]; |
| 114 | [turnUsername setTag:TURN_USERNAME_TAG]; |
| 115 | [turnPassword setTag:TURN_PASSWORD_TAG]; |
| 116 | [turnRealm setTag:TURN_REALM_TAG]; |
| 117 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 118 | [registrationField setTag:REGISTRATION_TAG]; |
| 119 | [localPortField setTag:LOCALPORT_TAG]; |
| 120 | [minAudioRTPRange setTag:MINAUDIO_TAG]; |
| 121 | [maxAudioRTPRange setTag:MAXAUDIO_TAG]; |
| 122 | [minVideoRTPRange setTag:MINVIDEO_TAG]; |
| 123 | [maxVideoRTPRange setTag:MAXVIDEO_TAG]; |
| 124 | |
| 125 | [STUNserverURLField setTag:STUNURL_TAG]; |
| 126 | [publishedPortField setTag:PUBLICPORT_TAG]; |
| 127 | [publishedAddrField setTag:PUBLICADDR_TAG]; |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 128 | |
| 129 | QObject::connect(AccountModel::instance()->selectionModel(), |
| 130 | &QItemSelectionModel::currentChanged, |
| 131 | [=](const QModelIndex ¤t, const QModelIndex &previous) { |
| 132 | if(!current.isValid()) |
| 133 | return; |
| 134 | [self loadAccount]; |
| 135 | }); |
| 136 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 137 | } |
| 138 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 139 | - (Account*) currentAccount |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 140 | { |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 141 | auto accIdx = AccountModel::instance()->selectionModel()->currentIndex(); |
| 142 | return AccountModel::instance()->getAccountByModelIndex(accIdx); |
| 143 | } |
| 144 | |
| 145 | - (void)loadAccount |
| 146 | { |
| 147 | auto account = [self currentAccount]; |
| 148 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 149 | [self updateControlsWithTag:REGISTRATION_TAG]; |
| 150 | [self updateControlsWithTag:LOCALPORT_TAG]; |
| 151 | [self updateControlsWithTag:MINAUDIO_TAG]; |
| 152 | [self updateControlsWithTag:MAXAUDIO_TAG]; |
| 153 | [self updateControlsWithTag:MINVIDEO_TAG]; |
| 154 | [self updateControlsWithTag:MAXVIDEO_TAG]; |
| 155 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 156 | [STUNserverURLField setStringValue:account->sipStunServer().toNSString()]; |
| 157 | [isUsingSTUN setState:account->isSipStunEnabled()?NSOnState:NSOffState]; |
| 158 | [STUNserverURLField setEnabled:account->isSipStunEnabled()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 159 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 160 | [isUsingTURN setState:account->isTurnEnabled()?NSOnState:NSOffState]; |
| 161 | [self toggleTURN:isUsingTURN]; |
| 162 | [turnServerURL setStringValue:account->turnServer().toNSString()]; |
| 163 | [turnUsername setStringValue:account->turnServerUsername().toNSString()]; |
| 164 | [turnPassword setStringValue:account->turnServerPassword().toNSString()]; |
| 165 | [turnRealm setStringValue:account->turnServerRealm().toNSString()]; |
| 166 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 167 | if(account->isPublishedSameAsLocal()) |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 168 | [publishAddrAndPortRadioGroup selectCellAtRow:0 column:0]; |
| 169 | else { |
| 170 | [publishAddrAndPortRadioGroup selectCellAtRow:1 column:0]; |
| 171 | } |
| 172 | |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 173 | [publishedAddrField setStringValue:account->publishedAddress().toNSString()]; |
| 174 | [publishedPortField setIntValue:account->publishedPort()]; |
| 175 | [publishedAddrField setEnabled:!account->isPublishedSameAsLocal()]; |
| 176 | [publishedPortField setEnabled:!account->isPublishedSameAsLocal()]; |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 177 | |
| 178 | if(account->protocol() == Account::Protocol::RING) { |
| 179 | [self.registrationContainer setHidden:YES]; |
| 180 | } else { |
| 181 | [self.registrationContainer setHidden:NO]; |
| 182 | } |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | #pragma mark - NSTextFieldDelegate methods |
| 186 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 187 | -(void)controlTextDidChange:(NSNotification *)notif |
| 188 | { |
| 189 | NSTextField *textField = [notif object]; |
| 190 | NSRange test = [[textField currentEditor] selectedRange]; |
| 191 | |
| 192 | [self valueDidChange:textField]; |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 193 | //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] | 194 | [textField.window makeFirstResponder:textField]; |
| 195 | [[textField currentEditor] setSelectedRange:test]; |
| 196 | } |
| 197 | |
| 198 | - (IBAction) valueDidChange: (id) sender |
| 199 | { |
| 200 | switch ([sender tag]) { |
| 201 | case REGISTRATION_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 202 | [self currentAccount]->setRegistrationExpire([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 203 | break; |
| 204 | case LOCALPORT_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 205 | [self currentAccount]->setLocalPort([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 206 | break; |
| 207 | case STUNURL_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 208 | [self currentAccount]->setSipStunServer([[sender stringValue] UTF8String]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 209 | break; |
| 210 | case PUBLICADDR_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 211 | [self currentAccount]->setPublishedAddress([[sender stringValue] UTF8String]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 212 | break; |
| 213 | case PUBLICPORT_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 214 | [self currentAccount]->setPublishedPort([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 215 | break; |
| 216 | case MINAUDIO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 217 | [self currentAccount]->setAudioPortMin([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 218 | break; |
| 219 | case MAXAUDIO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 220 | [self currentAccount]->setAudioPortMax([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 221 | break; |
| 222 | case MINVIDEO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 223 | [self currentAccount]->setVideoPortMin([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 224 | break; |
| 225 | case MAXVIDEO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 226 | [self currentAccount]->setVideoPortMax([sender integerValue]); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 227 | break; |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 228 | case TURN_SERVER_TAG: |
| 229 | [self currentAccount]->setTurnServer([[sender stringValue] UTF8String]); |
| 230 | break; |
| 231 | case TURN_USERNAME_TAG: |
| 232 | [self currentAccount]->setTurnServerUsername([[sender stringValue] UTF8String]); |
| 233 | break; |
| 234 | case TURN_PASSWORD_TAG: |
| 235 | [self currentAccount]->setTurnServerPassword([[sender stringValue] UTF8String]); |
| 236 | break; |
| 237 | case TURN_REALM_TAG: |
| 238 | [self currentAccount]->setTurnServerRealm([[sender stringValue] UTF8String]); |
| 239 | break; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 240 | default: |
| 241 | break; |
| 242 | } |
| 243 | [self updateControlsWithTag:[sender tag]]; |
| 244 | } |
| 245 | |
| 246 | - (IBAction)toggleSTUN:(NSButton *)sender |
| 247 | { |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 248 | [self currentAccount]->setSipStunEnabled([sender state]); |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 249 | [STUNserverURLField setEnabled:[self currentAccount]->isSipStunEnabled()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 250 | } |
| 251 | |
Alexandre Lision | 9ddfd8d | 2015-08-10 15:11:16 -0400 | [diff] [blame] | 252 | - (IBAction)toggleTURN:(id)sender { |
| 253 | [self currentAccount]->setTurnEnabled([sender state]); |
| 254 | [turnServerURL setEnabled:[sender state]]; |
| 255 | [turnUsername setEnabled:[sender state]]; |
| 256 | [turnPassword setEnabled:[sender state]]; |
| 257 | [turnRealm setEnabled:[sender state]]; |
| 258 | } |
| 259 | |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 260 | - (IBAction)didSwitchPublishedAddress:(NSMatrix *)matrix |
| 261 | { |
| 262 | NSInteger row = [matrix selectedRow]; |
| 263 | if(row == 0) { |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 264 | [self currentAccount]->setPublishedSameAsLocal(YES); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 265 | } else { |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 266 | [self currentAccount]->setPublishedSameAsLocal(NO); |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 267 | } |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 268 | [publishedAddrField setEnabled:![self currentAccount]->isPublishedSameAsLocal()]; |
| 269 | [publishedPortField setEnabled:![self currentAccount]->isPublishedSameAsLocal()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 270 | |
| 271 | } |
| 272 | |
| 273 | - (void) updateControlsWithTag:(NSInteger) tag |
| 274 | { |
| 275 | switch (tag) { |
| 276 | case REGISTRATION_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 277 | [registrationStepper setIntegerValue:[self currentAccount]->registrationExpire()]; |
| 278 | [registrationField setIntegerValue:[self currentAccount]->registrationExpire()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 279 | break; |
| 280 | case LOCALPORT_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 281 | [localPortStepper setIntegerValue:[self currentAccount]->localPort()]; |
| 282 | [localPortField setIntegerValue:[self currentAccount]->localPort()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 283 | break; |
| 284 | case MINAUDIO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 285 | [minAudioPortStepper setIntegerValue:[self currentAccount]->audioPortMin()]; |
| 286 | [minAudioRTPRange setIntegerValue:[self currentAccount]->audioPortMin()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 287 | break; |
| 288 | case MAXAUDIO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 289 | [maxAudioPortStepper setIntegerValue:[self currentAccount]->audioPortMax()]; |
| 290 | [maxAudioRTPRange setIntegerValue:[self currentAccount]->audioPortMax()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 291 | break; |
| 292 | case MINVIDEO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 293 | [minVideoPortStepper setIntegerValue:[self currentAccount]->videoPortMin()]; |
| 294 | [minVideoRTPRange setIntegerValue:[self currentAccount]->videoPortMin()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 295 | break; |
| 296 | case MAXVIDEO_TAG: |
Alexandre Lision | 7f3164c | 2015-06-12 11:45:37 -0400 | [diff] [blame] | 297 | [maxVideoPortStepper setIntegerValue:[self currentAccount]->videoPortMax()]; |
| 298 | [maxVideoRTPRange setIntegerValue:[self currentAccount]->videoPortMax()]; |
Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 299 | break; |
| 300 | default: |
| 301 | break; |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | @end |