1
/**************************************************************************
3
* Copyright 2014 Canonical Ltd.
4
* Copyright 2014 Carlos J Mazieri <carlos.mazieri@gmail.com>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation; version 3.
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 Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
26
#include <QStringList>
28
class SmbPlacesThread;
32
* \brief The SmbPlaces class gets the list of current Samba/CIFS shares
35
class SmbPlaces : public QObject
39
explicit SmbPlaces(QObject *parent = 0);
44
* list all Samba/Cifs shares in sync mode, that means it may block any active UI
46
* \return the list of the shares in the current network
48
Q_INVOKABLE QStringList listPlacesSync();
50
Q_INVOKABLE QStringList gePlaces() const;
54
* list all Samba/Cifs shares in async mode, the job is made on a secondary thread
55
* that means it does not block any active UI
57
* After the job is done the signal \ref sharesList is emitted within the current shares list
59
void listPlacesAsync();
62
void sharesList(QStringList);
65
void onSmbPlacesThreadFinished();
68
QStringList m_sharesList;
69
SmbPlacesThread * m_thread;
71
#if defined(REGRESSION_TEST_QSAMBACLIENT)
72
friend class TestQSambaSuite;