1
/***************************************************************************
2
smb4kglobal - This is the global namespace for Smb4K.
5
copyright : (C) 2005-2008 by Alexander Reinholdt
6
email : dustpuppy@users.berlios.de
7
***************************************************************************/
9
/***************************************************************************
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
15
* This program is distributed in the hope that it will be useful, but *
16
* WITHOUT ANY WARRANTY; without even the implied warranty of *
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18
* General Public License for more details. *
20
* You should have received a copy of the GNU General Public License *
21
* along with this program; if not, write to the *
22
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
24
***************************************************************************/
33
#include <kdemacros.h>
35
// forward declarations
41
* This is the global namespace for the core classes of Smb4K.
43
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
49
* This function returns the interval of the timer.
51
* @returns The interval of the timer in msec.
53
KDE_EXPORT int timerInterval();
56
* This function creates a temporary directory and returns its name. If it already
57
* exists, only the name will be returned. If an failure occurrs, an error message
58
* will be shown and an empty string is returned.
60
* @returns the name of the temporary directory.
62
KDE_EXPORT const QString &tempDir();
65
* This function returns the global list of workgroups that were discovered by
66
* Smb4K. Use this if you want to access and modify the list with your code.
68
* @returns the global list of known workgroups.
70
KDE_EXPORT QList<Smb4KWorkgroup *> *workgroupsList();
73
* This function returns the global list of hosts that were discovered by
74
* Smb4K. Use this if you want to access and modify the list with your code.
76
* @returns the global list of known hosts.
78
KDE_EXPORT QList<Smb4KHost *> *hostsList();
81
* This function returns the global list of mounted shares that were discovered by
82
* Smb4K. Use this if you want to access and modify the list with your code.
84
* @returns the global list of known mounted shares.
86
KDE_EXPORT QList<Smb4KShare *> *mountedSharesList();
89
* This function returns the workgroup or domain that matches the name @p name or
90
* NULL if there is no such workgroup.
92
* @returns a pointer to the workgroup with name @p name.
94
KDE_EXPORT Smb4KWorkgroup *findWorkgroup( const QString &name );
97
* This function returns the host matching the name @p name or NULL if there is no
98
* such host. The name of the host is mandatory. The workgroup may be empty, but
99
* should be given, because this will speed up the search process.
101
* @param name The name of the host
103
* @param workgroup The workgroup where the host is located
105
* @returns an Smb4KHost item of NULL if none was found that matches @p name.
107
KDE_EXPORT Smb4KHost *findHost( const QString &name,
108
const QString &workgroup = QString() );
111
* Find a mounted share by its path (i.e. mount point).
113
* @returns the share that is mounted to @p path.
115
KDE_EXPORT Smb4KShare *findShareByPath( const QByteArray &path );
118
* Find all mounts of a particular share with UNC @p unc on the system.
119
* The UNC has to be defined as //[USER@]HOST/SHARE.
121
* @param unc The UNC of the share
123
* @returns the complete list of mounts with the UNC @p unc.
125
KDE_EXPORT QList<Smb4KShare *> findShareByUNC( const QString &unc );
128
* This function returns the list of inaccessible shares.
130
* @returns the list of inaccessible shares.
132
KDE_EXPORT QList<Smb4KShare *> findInaccessibleShares();