Isa Nanic | 6e4a39a | 2018-12-04 14:26:02 -0500 | [diff] [blame] | 1 | /*************************************************************************** |
Sébastien Blin | 68abac9 | 2019-01-02 17:41:31 -0500 | [diff] [blame^] | 2 | * Copyright (C) 2019-2019 by Savoir-faire Linux * |
Isa Nanic | 6e4a39a | 2018-12-04 14:26:02 -0500 | [diff] [blame] | 3 | * Author: Isa Nanic <isa.nanic@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 | |
| 19 | #pragma once |
| 20 | |
| 21 | #include <QWidget> |
| 22 | #include <QListWidgetItem> |
| 23 | |
| 24 | namespace Ui { |
| 25 | class AdvancedSettingsWidget; |
| 26 | } |
| 27 | |
| 28 | class AdvancedSettingsWidget : public QWidget { |
| 29 | |
| 30 | Q_OBJECT |
| 31 | AdvancedSettingsWidget(const AdvancedSettingsWidget& cpy); |
| 32 | |
| 33 | public: |
| 34 | AdvancedSettingsWidget(QWidget* parent = nullptr); |
| 35 | ~AdvancedSettingsWidget(); |
| 36 | |
| 37 | private: |
| 38 | Ui::AdvancedSettingsWidget* ui; |
| 39 | void updateAdvancedSettings(); |
| 40 | |
| 41 | private slots: |
| 42 | // call settings |
| 43 | void setCallsUntrusted(bool state); |
| 44 | void setAutoAnswerCalls(bool state); |
| 45 | void setEnableRingtone(bool state); |
| 46 | |
| 47 | void openFileCustomRingtone(); |
| 48 | |
| 49 | // name server |
| 50 | void setNameServer(const QString& name); |
| 51 | |
| 52 | // openDHT config |
| 53 | void setEnableProxy(bool state); |
| 54 | |
| 55 | void setProxyAddress(const QString& name); |
| 56 | void setBootstrapAddress(const QString& name); |
| 57 | |
| 58 | // security |
| 59 | void openFileCACert(); |
| 60 | void openFileUserCert(); |
| 61 | void openFilePrivateKey(); |
| 62 | |
| 63 | // connectivity |
| 64 | void setUseUPnP(bool state); |
| 65 | void setUseTURN(bool state); |
| 66 | void setUseSTUN(bool state); |
| 67 | |
| 68 | void setTURNAddress(const QString& name); |
| 69 | void setTURNUsername(const QString& name); |
| 70 | void setTURNPsswd(const QString& name); |
| 71 | void setSTUNAddress(const QString& name); |
| 72 | |
| 73 | // codecs |
| 74 | void updateAudioCodecs(); |
| 75 | void updateVideoCodecs(); |
| 76 | |
| 77 | void audioCodecsStateChange(QListWidgetItem* item = nullptr); |
| 78 | void videoCodecsStateChange(QListWidgetItem* item = nullptr); |
| 79 | |
| 80 | void decreaseAudioCodecPriority(); |
| 81 | void increaseAudioCodecPriority(); |
| 82 | |
| 83 | void decreaseVideoCodecPriority(); |
| 84 | void increaseVideoCodecPriority(); |
| 85 | |
| 86 | void setVideoState(int state); |
| 87 | |
| 88 | |
| 89 | }; |