File indexing completed on 2024-04-21 05:01:38

0001 /*
0002     These are the private helper classes of the Smb4KGlobal namespace.
0003 
0004     SPDX-FileCopyrightText: 2007-2024 Alexander Reinholdt <alexander.reinholdt@kdemail.net>
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef SMB4KGLOBAL_P_H
0009 #define SMB4KGLOBAL_P_H
0010 
0011 // application specific includes
0012 #include "smb4khost.h"
0013 #include "smb4kshare.h"
0014 #include "smb4kworkgroup.h"
0015 
0016 // Qt includes
0017 #include <QFileSystemWatcher>
0018 #include <QList>
0019 #include <QMap>
0020 #include <QObject>
0021 #include <QSharedPointer>
0022 
0023 /**
0024  * This class is a private helper for the Smb4KGlobal namespace.
0025  *
0026  * @author Alexander Reinholdt <alexander.reinholdt@kdemail.net>
0027  */
0028 
0029 class Smb4KGlobalPrivate : public QObject
0030 {
0031     Q_OBJECT
0032 
0033 public:
0034     /**
0035      * Constructor
0036      */
0037     Smb4KGlobalPrivate();
0038 
0039     /**
0040      * Destructor
0041      */
0042     ~Smb4KGlobalPrivate();
0043 
0044     /**
0045      * This is the global workgroup list.
0046      */
0047     QList<QSharedPointer<Smb4KWorkgroup>> workgroupsList;
0048 
0049     /**
0050      * This is the global host list.
0051      */
0052     QList<QSharedPointer<Smb4KHost>> hostsList;
0053 
0054     /**
0055      * This is global list of mounted shares.
0056      */
0057     QList<QSharedPointer<Smb4KShare>> mountedSharesList;
0058 
0059     /**
0060      * This is the global list of shares.
0061      */
0062     QList<QSharedPointer<Smb4KShare>> sharesList;
0063 
0064     /**
0065      * Boolean that is TRUE when only foreign shares
0066      * are in the list of mounted shares
0067      */
0068     bool onlyForeignShares;
0069 
0070 #ifdef Q_OS_LINUX
0071     /**
0072      * This list contains all allowed arguments for the mount.cifs binary and
0073      * is only present under the Linux operating system.
0074      */
0075     QStringList allowedMountArguments;
0076 #endif
0077 
0078     /**
0079      * The machine's NetBIOS name
0080      */
0081     QString machineNetbiosName;
0082 
0083     /**
0084      * The machine's workgroup name
0085      */
0086     QString machineWorkgroupName;
0087 
0088 protected Q_SLOTS:
0089     /**
0090      * This slot does last things before the application quits
0091      */
0092     void slotAboutToQuit();
0093 };
0094 
0095 #endif