File indexing completed on 2025-01-05 03:53:05

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2012-05-28
0007  * Description : Media Server configuration dialog to share a single list of files
0008  *
0009  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_DMEDIA_SERVER_DLG_H
0016 #define DIGIKAM_DMEDIA_SERVER_DLG_H
0017 
0018 // Qt includes
0019 
0020 #include <QUrl>
0021 
0022 // Local includes
0023 
0024 #include "dinfointerface.h"
0025 #include "dplugindialog.h"
0026 
0027 using namespace Digikam;
0028 
0029 namespace DigikamGenericMediaServerPlugin
0030 {
0031 
0032 class DMediaServerDlg : public DPluginDialog
0033 {
0034     Q_OBJECT
0035 
0036 public:
0037 
0038     explicit DMediaServerDlg(QObject* const parent,
0039                              DInfoInterface* const iface = nullptr);
0040     ~DMediaServerDlg()              override;
0041 
0042 private:
0043 
0044     void readSettings();
0045     void saveSettings();
0046     void updateServerStatus();
0047     bool setMediaServerContents();
0048     void startMediaServer();
0049 
0050 private Q_SLOTS:
0051 
0052     void accept()                   override;
0053     void slotToggleMediaServer();
0054     void slotSelectionChanged();
0055 
0056 private:
0057 
0058     // Disable
0059     explicit DMediaServerDlg(QWidget*) = delete;
0060 
0061 private:
0062 
0063     class Private;
0064     Private* const d;
0065 };
0066 
0067 } // namespace DigikamGenericMediaServerPlugin
0068 
0069 #endif // DIGIKAM_DMEDIA_SERVER_DLG_H