~ubuntu-branches/ubuntu/quantal/smb4k/quantal

« back to all changes in this revision

Viewing changes to core/smb4kworkgroup.h

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2012-05-19 18:54:34 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20120519185434-duffny2n87214n1n
Tags: 1.0.1-1
* New upstream release.
* Update debian/compat: bump to 9.
* Update debian/control:
  - bump debhelper to 9.
  - bump kdelibs5-dev build dependency to 4:4.4.0.
  - bump Standards-Version to 3.9.3 (no changes needed).
  - Replace smbfs dependency by cifs-utils. (Closes: #638162)
* Update debian/copyright:
  - update upstream URL.
  - update upstream e-mail.
* Update debian/smb4k.lintian-overrides file.
* Update debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
    workgroup.
4
4
                             -------------------
5
5
    begin                : Sa Jan 26 2008
6
 
    copyright            : (C) 2008 by Alexander Reinholdt
7
 
    email                : dustpuppy@users.berlios.de
 
6
    copyright            : (C) 2008-2010 by Alexander Reinholdt
 
7
    email                : alexander.reinholdt@kdemail.net
8
8
 ***************************************************************************/
9
9
 
10
10
/***************************************************************************
20
20
 *                                                                         *
21
21
 *   You should have received a copy of the GNU General Public License     *
22
22
 *   along with this program; if not, write to the                         *
23
 
 *   Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,   *
24
 
 *   MA  02111-1307 USA                                                    *
 
23
 *   Free Software Foundation, 51 Franklin Street, Suite 500, Boston,      *
 
24
 *   MA 02110-1335, USA                                                    *
25
25
 ***************************************************************************/
26
26
 
27
27
#ifndef SMB4KWORKGROUP_H
37
37
// KDE includes
38
38
#include <kdemacros.h>
39
39
 
 
40
// application specific includes
 
41
#include <smb4kbasicnetworkitem.h>
 
42
 
40
43
/**
41
44
 * This class is a container that carries information about a workgroup or
42
45
 * domain found in the network neighborhood. It is part of the core classes
45
48
 * @author Alexander Reinholdt <dustpuppy@users.berlios.de>
46
49
 */
47
50
 
48
 
class KDE_EXPORT Smb4KWorkgroup
 
51
class KDE_EXPORT Smb4KWorkgroup : public Smb4KBasicNetworkItem
49
52
{
50
53
  public:
51
54
    /**
81
84
     *
82
85
     * @param name            The name of the workgroup
83
86
     */
84
 
    void setName( const QString &name );
 
87
    void setWorkgroupName( const QString &name );
85
88
 
86
89
    /**
87
90
     * This function returns the name of the workgroup.
88
91
     *
89
92
     * @returns the workgroup name.
90
93
     */
91
 
    const QString &name() const { return m_name; }
92
 
 
93
 
    /**
94
 
     * Set the master browser for the workgroup or domain. You have to
95
 
     * provide at least its name. Additionally, you can pass its IP
96
 
     * address if it's available. However, it will only be accepted
97
 
     * if it is compatible with either IPv4 or IPv6. The @p pseudo
98
 
     * parameter defines whether this is a real master browser or a
99
 
     * faked one, i.e. a pseudo master.
100
 
     *
101
 
     * @param masterName      The name of the master browser
102
 
     *
103
 
     * @param masterIP        The IP address of the master browser
104
 
     *
105
 
     * @param pseudoMaster    Set this to TRUE if this is a pseudo master.
106
 
     */
107
 
    void setMasterBrowser( const QString &masterName,
108
 
                           const QString &masterIP = QString(),
109
 
                           bool pseudoMaster = false );
 
94
    const QString &workgroupName() const { return m_name; }
110
95
 
111
96
    /**
112
97
     * Sets the name of the master browser of this workgroup or domain.
166
151
     */
167
152
    bool isEmpty() const;
168
153
 
 
154
    /**
 
155
     * Compare another Smb4KWorkgroup object with this one an return TRUE if both carry
 
156
     * the same data.
 
157
     *
 
158
     * @param workgroup       The Smb4KWorkgroup object that should be compared with this
 
159
     *                        one.
 
160
     *
 
161
     * @returns TRUE if the data that was compared is the same.
 
162
     */
 
163
    bool equals( Smb4KWorkgroup *workgroup ) const;
 
164
    
 
165
    /**
 
166
     * Operator to check if two items are equal.
 
167
     */
 
168
    bool operator==( Smb4KWorkgroup workgroup ) { return equals( &workgroup ); }
 
169
    
 
170
    /**
 
171
     * Returns TRUE if the workgroup/domain master browsers IP address is set and 
 
172
     * FALSE otherwise.
 
173
     *
 
174
     * @returns TRUE if the master browsers IP address is known.
 
175
     */
 
176
    bool hasMasterBrowserIP() const { return !m_master_ip.isEmpty(); }
 
177
 
169
178
  private:
170
179
    /**
171
180
     * The name of the workgroup.