blob: f7f07c35de51e0906667534f3e10cc014a617b05 [file] [log] [blame]
Sébastien Blin1f915762020-08-03 13:27:42 -04001/*
2 * Copyright (C) 2019-2020 by Savoir-faire Linux
3 * Author: Yang Wang <yang.wang@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, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.15
20import QtQuick.Window 2.14
21import QtQuick.Controls 2.14
22import QtQuick.Controls.Universal 2.12
23import QtQuick.Layouts 1.3
24import QtGraphicalEffects 1.14
25import net.jami.Models 1.0
26
27import "../../commoncomponents"
28
29Rectangle {
ababi6fa08612020-08-10 19:13:28 +020030 id: sipAccountViewRect
Sébastien Blin1f915762020-08-03 13:27:42 -040031 signal navigateToMainView
32 signal navigateToNewWizardView
ababia284cae2020-08-10 12:33:34 +020033 signal backArrowClicked
Sébastien Blin1f915762020-08-03 13:27:42 -040034
ababi6fa08612020-08-10 19:13:28 +020035 property int preferredColumnWidth : sipAccountViewRect.width / 2 - 50
36
Sébastien Blin1f915762020-08-03 13:27:42 -040037 function updateAccountInfoDisplayed() {
38 displaySIPNameLineEdit.text = ClientWrapper.settingsAdaptor.getCurrentAccount_Profile_Info_Alias()
39 usernameSIP.text = ClientWrapper.settingsAdaptor.getAccountConfig_Username()
40 hostnameSIP.text = ClientWrapper.settingsAdaptor.getAccountConfig_Hostname()
41 passSIPlineEdit.text = ClientWrapper.settingsAdaptor.getAccountConfig_Password()
42 proxySIP.text = ClientWrapper.settingsAdaptor.getAccountConfig_ProxyServer()
43
44 accountSIPEnableCheckBox.checked = ClientWrapper.settingsAdaptor.get_CurrentAccountInfo_Enabled()
45
46 setAvatar()
47
48 if (advanceSIPSettingsView.visible) {
49 advanceSIPSettingsView.updateAccountInfoDisplayedAdvanceSIP()
50 }
51 }
52
53 function isPhotoBoothOpened() {
54 return currentSIPAccountAvatar.takePhotoState
55 }
56
57 function setAvatar() {
58 currentSIPAccountAvatar.setAvatarPixmap(
59 ClientWrapper.settingsAdaptor.getAvatarImage_Base64(
ababi6fa08612020-08-10 19:13:28 +020060 currentSIPAccountAvatar.boothWidth),
Sébastien Blin1f915762020-08-03 13:27:42 -040061 ClientWrapper.settingsAdaptor.getIsDefaultAvatar())
62 }
63
64 function stopBooth() {
65 currentSIPAccountAvatar.stopBooth()
66 }
67
68 // slots
69 function setAccEnableSlot(state) {
70 ClientWrapper.accountModel.setAccountEnabled(ClientWrapper.utilsAdaptor.getCurrAccId(), state)
71 }
72
73 function delAccountSlot() {
74 deleteAccountDialog_SIP.open()
75 }
76
77 DeleteAccountDialog{
78 id: deleteAccountDialog_SIP
79
80 anchors.centerIn: parent.Center
81 x: (parent.width - width) / 2
82 y: (parent.height - height) / 2
83
84 onAccepted: {
Sébastien Blin1f915762020-08-03 13:27:42 -040085 ClientWrapper.accountAdaptor.setSelectedConvId()
86
87 if(ClientWrapper.utilsAdaptor.getAccountListSize() > 0){
88 navigateToMainView()
89 } else {
90 navigateToNewWizardView()
91 }
92 }
93 }
94
95 Layout.fillHeight: true
ababi6fa08612020-08-10 19:13:28 +020096 Layout.maximumWidth: JamiTheme.maximumWidthSettingsView
97 anchors.centerIn: parent
Sébastien Blin1f915762020-08-03 13:27:42 -040098
99 ColumnLayout {
ababi6fa08612020-08-10 19:13:28 +0200100 anchors.fill: sipAccountViewRect
Sébastien Blin1f915762020-08-03 13:27:42 -0400101
102 RowLayout {
ababi6fa08612020-08-10 19:13:28 +0200103 id: sipAccountPageTitle
104 Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
105 Layout.leftMargin: JamiTheme.preferredMarginSize
Sébastien Blin1f915762020-08-03 13:27:42 -0400106 Layout.fillWidth: true
ababi6fa08612020-08-10 19:13:28 +0200107 Layout.maximumHeight: 64
108 Layout.minimumHeight: 64
109 Layout.preferredHeight: 64
Sébastien Blin1f915762020-08-03 13:27:42 -0400110
ababia284cae2020-08-10 12:33:34 +0200111 HoverableButton {
ababi6fa08612020-08-10 19:13:28 +0200112 id: backToSettingsMenuButton
ababia284cae2020-08-10 12:33:34 +0200113
114 Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
ababi6fa08612020-08-10 19:13:28 +0200115 Layout.preferredWidth: JamiTheme.preferredFieldHeight
116 Layout.preferredHeight: JamiTheme.preferredFieldHeight
117 Layout.rightMargin: JamiTheme.preferredMarginSize
ababia284cae2020-08-10 12:33:34 +0200118
ababi6fa08612020-08-10 19:13:28 +0200119 radius: 32
ababia284cae2020-08-10 12:33:34 +0200120 source: "qrc:/images/icons/ic_arrow_back_24px.svg"
121 backgroundColor: "white"
122 onExitColor: "white"
123
Yang Wangb97bde42020-08-07 11:24:18 -0400124 toolTipText: qsTr("Toggle to display side panel")
125 hoverEnabled: true
ababia284cae2020-08-10 12:33:34 +0200126 visible: mainViewWindow.sidePanelHidden
127
128 onClicked: {
129 backArrowClicked()
130 }
131 }
132
ababi6fa08612020-08-10 19:13:28 +0200133 ElidedTextLabel {
Sébastien Blin1f915762020-08-03 13:27:42 -0400134 Layout.fillWidth: true
ababi6fa08612020-08-10 19:13:28 +0200135 Layout.maximumHeight: JamiTheme.preferredFieldHeight
136 Layout.preferredHeight: JamiTheme.preferredFieldHeight
137 Layout.minimumHeight: JamiTheme.preferredFieldHeight
138
139 eText: qsTr("Account Settings")
140 fontSize: JamiTheme.titleFontSize
141 maxWidth: !backToSettingsMenuButton.visible ? sipAccountViewRect.width - 100 :
142 sipAccountViewRect.width - backToSettingsMenuButton.width - 100
143
Sébastien Blin1f915762020-08-03 13:27:42 -0400144 }
145 }
146
147 ScrollView {
ababi6fa08612020-08-10 19:13:28 +0200148 id: sipAccountScrollView
Sébastien Blin1f915762020-08-03 13:27:42 -0400149
Sébastien Blin1f915762020-08-03 13:27:42 -0400150 property ScrollBar vScrollBar: ScrollBar.vertical
151
152 Layout.fillHeight: true
153 Layout.fillWidth: true
ababi6fa08612020-08-10 19:13:28 +0200154 Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Sébastien Blin1f915762020-08-03 13:27:42 -0400155
ababi6fa08612020-08-10 19:13:28 +0200156 width: sipAccountViewRect.width
157 height: sipAccountViewRect.height - sipAccountPageTitle.height
158
159 ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
Sébastien Blin1f915762020-08-03 13:27:42 -0400160 ScrollBar.vertical.policy: ScrollBar.AsNeeded
161
Sébastien Blin1f915762020-08-03 13:27:42 -0400162 clip: true
163
164 ColumnLayout {
165 id: accountSIPLayout
166
167 Layout.fillHeight: true
ababi6fa08612020-08-10 19:13:28 +0200168 Layout.preferredWidth: sipAccountViewRect.width
169 Layout.alignment: Qt.AlignHCenter
Sébastien Blin1f915762020-08-03 13:27:42 -0400170
ababi6fa08612020-08-10 19:13:28 +0200171 spacing: 24
Sébastien Blin1f915762020-08-03 13:27:42 -0400172
ababi6fa08612020-08-10 19:13:28 +0200173 ToggleSwitch {
174 id: accountSIPEnableCheckBox
175
176 Layout.topMargin: JamiTheme.preferredMarginSize
177 Layout.leftMargin: JamiTheme.preferredMarginSize
178
179 labelText: qsTr("Enable")
180 fontPointSize: JamiTheme.headerFontSize
181
182 onSwitchToggled: {
183 setAccEnableSlot(checked)
184 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400185 }
186
187 ColumnLayout {
Sébastien Blin1f915762020-08-03 13:27:42 -0400188 Layout.fillWidth: true
ababi6fa08612020-08-10 19:13:28 +0200189 Layout.fillHeight: true
190 Layout.leftMargin: JamiTheme.preferredMarginSize
191 spacing: 8
Sébastien Blin1f915762020-08-03 13:27:42 -0400192
ababi6fa08612020-08-10 19:13:28 +0200193 Label {
194 Layout.fillWidth: true
Sébastien Blin1f915762020-08-03 13:27:42 -0400195
ababi6fa08612020-08-10 19:13:28 +0200196 Layout.maximumHeight: JamiTheme.preferredFieldHeight
197 Layout.preferredHeight: JamiTheme.preferredFieldHeight
198 Layout.minimumHeight: JamiTheme.preferredFieldHeight
Sébastien Blin1f915762020-08-03 13:27:42 -0400199
ababi6fa08612020-08-10 19:13:28 +0200200 text: qsTr("Profile")
201 font.pointSize: JamiTheme.headerFontSize
202 font.kerning: true
203
204 horizontalAlignment: Text.AlignLeft
205 verticalAlignment: Text.AlignVCenter
Sébastien Blin1f915762020-08-03 13:27:42 -0400206 }
207
ababi6fa08612020-08-10 19:13:28 +0200208 PhotoboothView {
209 id: currentSIPAccountAvatar
Sébastien Blin1f915762020-08-03 13:27:42 -0400210
ababi6fa08612020-08-10 19:13:28 +0200211 Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Sébastien Blin1f915762020-08-03 13:27:42 -0400212
ababi6fa08612020-08-10 19:13:28 +0200213 boothWidth: Math.min(224, sipAccountViewRect.width - 100)
214
215 Layout.maximumWidth: boothWidth+50
216 Layout.preferredWidth: boothWidth+50
217 Layout.minimumWidth: boothWidth+50
218 Layout.maximumHeight: boothWidth+50
219 Layout.preferredHeight: boothWidth+50
220 Layout.minimumHeight: boothWidth+50
221
222 onImageAcquired: {
223 ClientWrapper.settingsAdaptor.setCurrAccAvatar(imgBase64)
224 }
225
226 onImageCleared: {
227 ClientWrapper.settingsAdaptor.clearCurrentAvatar()
228 setAvatar()
Sébastien Blin1f915762020-08-03 13:27:42 -0400229 }
230 }
231
ababi6fa08612020-08-10 19:13:28 +0200232 InfoLineEdit {
233 id: displaySIPNameLineEdit
Sébastien Blin1f915762020-08-03 13:27:42 -0400234
ababi6fa08612020-08-10 19:13:28 +0200235 Layout.maximumWidth: JamiTheme.preferredButtonWidth
236 Layout.minimumHeight: JamiTheme.preferredFieldHeight
237 Layout.preferredHeight: JamiTheme.preferredFieldHeight
238 Layout.maximumHeight: JamiTheme.preferredFieldHeight
239
240 Layout.alignment: Qt.AlignHCenter
241
242 font.pointSize: JamiTheme.textFontSize
243 font.kerning: true
244
245 horizontalAlignment: Text.AlignHCenter
246 verticalAlignment: Text.AlignVCenter
247
248 onEditingFinished: {
249 ClientWrapper.accountAdaptor.setCurrAccDisplayName(
250 displaySIPNameLineEdit.text)
251 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400252 }
ababi6fa08612020-08-10 19:13:28 +0200253 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400254
ababi6fa08612020-08-10 19:13:28 +0200255
256 ColumnLayout {
257 Layout.fillWidth: true
258 Layout.alignment: Qt.AlignHCenter
259 Layout.leftMargin: JamiTheme.preferredMarginSize
260 spacing: 8
261
262 ElidedTextLabel {
Sébastien Blin1f915762020-08-03 13:27:42 -0400263 Layout.fillWidth: true
264
ababi6fa08612020-08-10 19:13:28 +0200265 Layout.maximumHeight: JamiTheme.preferredFieldHeight
266 Layout.preferredHeight: JamiTheme.preferredFieldHeight
267 Layout.minimumHeight: JamiTheme.preferredFieldHeight
268
269 eText: qsTr("Identity")
270 maxWidth: sipAccountViewRect.width - 72
271 fontSize: JamiTheme.headerFontSize
272 }
273
274
275 GridLayout {
276 rows: 4
277 columns: 2
278 flow: GridLayout.LeftToRight
279 rowSpacing: 8
280 columnSpacing: 6
281
282 Layout.fillWidth: true
283 Layout.leftMargin: JamiTheme.preferredMarginSize
284
285 // user name
286 ElidedTextLabel {
Sébastien Blin1f915762020-08-03 13:27:42 -0400287 Layout.fillWidth: true
ababi6fa08612020-08-10 19:13:28 +0200288 Layout.maximumHeight: JamiTheme.preferredFieldHeight
289 Layout.preferredHeight: JamiTheme.preferredFieldHeight
290 Layout.minimumHeight: JamiTheme.preferredFieldHeight
Sébastien Blin1f915762020-08-03 13:27:42 -0400291
ababi6fa08612020-08-10 19:13:28 +0200292 eText: qsTr("Username")
293 fontSize: JamiTheme.settingsFontSize
294 maxWidth: preferredColumnWidth
295 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400296
ababi6fa08612020-08-10 19:13:28 +0200297 InfoLineEdit {
298 id: usernameSIP
299
300 fieldLayoutWidth: preferredColumnWidth
301
302 font.pointSize: JamiTheme.settingsFontSize // Albert: buttonSize?
Sébastien Blin1f915762020-08-03 13:27:42 -0400303 font.kerning: true
304
305 horizontalAlignment: Text.AlignLeft
306 verticalAlignment: Text.AlignVCenter
Sébastien Blin1f915762020-08-03 13:27:42 -0400307
ababi6fa08612020-08-10 19:13:28 +0200308 onEditingFinished: {
309 ClientWrapper.settingsAdaptor.setAccountConfig_Username(
310 usernameSIP.text)
Sébastien Blin1f915762020-08-03 13:27:42 -0400311 }
312 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400313
ababi6fa08612020-08-10 19:13:28 +0200314 // host name
315 ElidedTextLabel {
Sébastien Blin1f915762020-08-03 13:27:42 -0400316 Layout.fillWidth: true
ababi6fa08612020-08-10 19:13:28 +0200317 Layout.maximumHeight: JamiTheme.preferredFieldHeight
318 Layout.preferredHeight: JamiTheme.preferredFieldHeight
319 Layout.minimumHeight: JamiTheme.preferredFieldHeight
Sébastien Blin1f915762020-08-03 13:27:42 -0400320
ababi6fa08612020-08-10 19:13:28 +0200321 eText: qsTr("Hostname")
322 fontSize: JamiTheme.settingsFontSize
323 maxWidth: preferredColumnWidth
324 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400325
ababi6fa08612020-08-10 19:13:28 +0200326 InfoLineEdit {
327 id: hostnameSIP
328
329 fieldLayoutWidth: preferredColumnWidth
330
331 font.pointSize: JamiTheme.settingsFontSize // Albert: button?
Sébastien Blin1f915762020-08-03 13:27:42 -0400332 font.kerning: true
333
334 horizontalAlignment: Text.AlignLeft
335 verticalAlignment: Text.AlignVCenter
Sébastien Blin1f915762020-08-03 13:27:42 -0400336
ababi6fa08612020-08-10 19:13:28 +0200337 onEditingFinished: {
338 ClientWrapper.settingsAdaptor.setAccountConfig_Hostname(
339 hostnameSIP.text)
Sébastien Blin1f915762020-08-03 13:27:42 -0400340 }
341 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400342
ababi6fa08612020-08-10 19:13:28 +0200343 // proxy
344 ElidedTextLabel {
Sébastien Blin1f915762020-08-03 13:27:42 -0400345 Layout.fillWidth: true
ababi6fa08612020-08-10 19:13:28 +0200346 Layout.maximumHeight: JamiTheme.preferredFieldHeight
347 Layout.preferredHeight: JamiTheme.preferredFieldHeight
348 Layout.minimumHeight: JamiTheme.preferredFieldHeight
349
350 text: qsTr("Proxy")
351 font.pointSize: JamiTheme.settingsFontSize
352 maxWidth: preferredColumnWidth
Sébastien Blin1f915762020-08-03 13:27:42 -0400353 }
354
ababi6fa08612020-08-10 19:13:28 +0200355 InfoLineEdit {
356 id: proxySIP
Sébastien Blin1f915762020-08-03 13:27:42 -0400357
ababi6fa08612020-08-10 19:13:28 +0200358 fieldLayoutWidth: preferredColumnWidth
Sébastien Blin1f915762020-08-03 13:27:42 -0400359
ababi6fa08612020-08-10 19:13:28 +0200360 font.pointSize: JamiTheme.settingsFontSize // Albert
Sébastien Blin1f915762020-08-03 13:27:42 -0400361 font.kerning: true
362
ababi6fa08612020-08-10 19:13:28 +0200363 horizontalAlignment: Text.AlignLeft
364 verticalAlignment: Text.AlignVCenter
Sébastien Blin1f915762020-08-03 13:27:42 -0400365
ababi6fa08612020-08-10 19:13:28 +0200366 onEditingFinished: {
367 ClientWrapper.settingsAdaptor.setAccountConfig_ProxyServer(
368 proxySIP.text)
Sébastien Blin1f915762020-08-03 13:27:42 -0400369 }
370 }
371
ababi6fa08612020-08-10 19:13:28 +0200372 // password
373 ElidedTextLabel {
Sébastien Blin1f915762020-08-03 13:27:42 -0400374 Layout.fillWidth: true
ababi6fa08612020-08-10 19:13:28 +0200375 Layout.maximumHeight: JamiTheme.preferredFieldHeight
376 Layout.preferredHeight: JamiTheme.preferredFieldHeight
377 Layout.minimumHeight: JamiTheme.preferredFieldHeight
378
379 eText: qsTr("Password")
380 fontSize: JamiTheme.settingsFontSize
381 maxWidth: preferredColumnWidth
382 }
383
384 InfoLineEdit {
385 id: passSIPlineEdit
386
387 fieldLayoutWidth: preferredColumnWidth
388
389 font.pointSize: JamiTheme.settingsFontSize
390 font.kerning: true
391
392 echoMode: TextInput.Password
393 horizontalAlignment: Text.AlignLeft
394 verticalAlignment: Text.AlignVCenter
395
396 onEditingFinished: {
397 ClientWrapper.settingsAdaptor.setAccountConfig_Password(
398 passSIPlineEdit.text)
399 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400400 }
401 }
ababi6fa08612020-08-10 19:13:28 +0200402
403
404 HoverableButtonTextItem {
405 id: btnDeletAccount
406
407 backgroundColor: "red"
408 onEnterColor: Qt.rgba(150 / 256, 0, 0, 0.7)
409 onDisabledBackgroundColor: Qt.rgba(
410 255 / 256,
411 0, 0, 0.8)
412 onPressColor: backgroundColor
413 textColor: "white"
414
415 Layout.alignment: Qt.AlignHCenter
416 Layout.minimumWidth: JamiTheme.preferredButtonWidth
417 Layout.preferredWidth: JamiTheme.preferredButtonWidth
418 Layout.maximumWidth: JamiTheme.preferredButtonWidth
419 Layout.minimumHeight: JamiTheme.preferredFieldHeight
420 Layout.preferredHeight: JamiTheme.preferredFieldHeight
421 Layout.maximumHeight: JamiTheme.preferredFieldHeight
422
423 text: qsTr("Delete Account")
Yang Wangb97bde42020-08-07 11:24:18 -0400424 toolTipText: qsTr("Delete this account")
ababi6fa08612020-08-10 19:13:28 +0200425 font.pointSize: JamiTheme.textFontSize
426 font.kerning: true
427 radius: height / 2
428
429 onClicked: {
430 delAccountSlot()
431 }
432 }
433 }
434
435 RowLayout {
436 id: rowAdvancedSettingsBtn
437 Layout.fillWidth: true
438 Layout.leftMargin: JamiTheme.preferredMarginSize
439
440 ElidedTextLabel {
441
442 id: lblAdvancedAccountSettings
443
444 Layout.fillWidth: true
445 Layout.maximumHeight: JamiTheme.preferredFieldHeight
446 Layout.preferredHeight: JamiTheme.preferredFieldHeight
447 Layout.minimumHeight: JamiTheme.preferredFieldHeight
448
449 eText: qsTr("Advanced Account Settings")
450 fontSize: JamiTheme.headerFontSize
451 maxWidth: sipAccountViewRect.width - advancedAccountSettingsSIPButton.width - 80
452 }
453
454 HoverableRadiusButton {
455 id: advancedAccountSettingsSIPButton
456
457 Layout.leftMargin: JamiTheme.preferredMarginSize
458
459 Layout.minimumWidth: JamiTheme.preferredFieldHeight
460 Layout.preferredWidth: JamiTheme.preferredFieldHeight
461 Layout.maximumWidth: JamiTheme.preferredFieldHeight
462 Layout.minimumHeight: JamiTheme.preferredFieldHeight
463 Layout.preferredHeight: JamiTheme.preferredFieldHeight
464 Layout.maximumHeight: JamiTheme.preferredFieldHeight
465
466 Layout.alignment: Qt.AlignHCenter
467
468 radius: height / 2
469
470 icon.source: {
471 if (advanceSIPSettingsView.visible) {
472 return "qrc:/images/icons/round-arrow_drop_up-24px.svg"
473 } else {
474 return "qrc:/images/icons/round-arrow_drop_down-24px.svg"
475 }
476 }
477
478 onClicked: {
479 advanceSIPSettingsView.visible = !advanceSIPSettingsView.visible
480 if(advanceSIPSettingsView.visible){
481 advanceSIPSettingsView.updateAccountInfoDisplayedAdvanceSIP()
482 sipAccountScrollView.vScrollBar.position = rowAdvancedSettingsBtn.y / accountSIPLayout.height
483 } else {
484 sipAccountScrollView.vScrollBar.position = 0
485 }
486 }
487 }
488 }
489
490 // instantiate advance setting page
491 AdvancedSIPSettingsView {
492 id: advanceSIPSettingsView
493 Layout.leftMargin: JamiTheme.preferredMarginSize
494 visible: false
Sébastien Blin1f915762020-08-03 13:27:42 -0400495 }
496
497 Item {
ababi6fa08612020-08-10 19:13:28 +0200498 Layout.preferredWidth: sipAccountViewRect.width - 32
499 Layout.minimumWidth: sipAccountViewRect.width - 32
500 Layout.maximumWidth: JamiTheme.maximumWidthSettingsView - 32
Sébastien Blin1f915762020-08-03 13:27:42 -0400501 Layout.fillHeight: true
Sébastien Blin1f915762020-08-03 13:27:42 -0400502 }
503 }
504 }
Sébastien Blin1f915762020-08-03 13:27:42 -0400505 }
506}