File: iprange.h

package info (click to toggle)
guidedog 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 372 kB
  • ctags: 161
  • sloc: cpp: 2,118; sh: 84; makefile: 14
file content (59 lines) | stat: -rw-r--r-- 1,910 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/***************************************************************************
                          iprange.h  -  description
                             -------------------
    begin                : Thu May 10 08:08:00 EST 2001
    copyright            : (C) 2000-2001 by Simon Edwards
    email                : simon@simonzone.com
 ***************************************************************************/
/***************************************************************************
    Converted to a pure Qt5 application
    begin                : December 2014
    by                   : Antonio Martins
    email                : digiplan.pt@gmail.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef IPRANGE_H
#define IPRANGE_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <QString>

/*!
 * \brief The IPRangeType enum
 */
enum IPRangeType {invalid, localmachine, domainname, ip, iprange};


/*!
 * \brief The IPRange class
 */
class IPRange {
public:
    IPRange();
    IPRange(const QString &a);
    ~IPRange();
    void setAddress(const QString &a);
    QString getAddress() const;
    IPRangeType getType();

private:
    QString address;
    bool gottype;
    IPRangeType type;

    IPRangeType guessType();
};

#endif