blob: f111fc61fd632e515a295348872db1a76500b11b [file] [log] [blame]
Alexander Afanasyevb6392e32014-05-12 23:43:50 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2013-2014, Regents of the University of California,
4 *
5 * This file is part of NFD Control Center. See AUTHORS.md for complete list of NFD
6 * authors and contributors.
7 *
8 * NFD Control Center is free software: you can redistribute it and/or modify it under the
9 * terms of the GNU General Public License as published by the Free Software Foundation,
10 * either version 3 of the License, or (at your option) any later version.
11 *
12 * NFD Control Center is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along with NFD
17 * Control Center, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * \author Ilya Moiseenko <iliamo@ucla.edu>
20 */
21
22#include <QtDBus>
23#include <QProcess>
24
25#ifndef NCC_QT_NETWORK_MANAGER_HPP
26#define NCC_QT_NETWORK_MANAGER_HPP
27
28#define NM_STATE_DISCONNECTED 20
29#define NM_STATE_CONNECTING 40
30#define NM_STATE_CONNECTED_GLOBAL 70
31
32class NetworkManager : public QObject
33{
34 Q_OBJECT
35
36public:
37 NetworkManager();
38 bool IsAutoconfigRunning();
39
40public slots:
41 void autoconfigDaemon();
42
43private:
44 QProcess *autoconfigProcess;
45 bool isAutoconfigRunning;
46
47private slots:
48 void stateChanged(uint state);
49 void autoconfigFinished();
50};
51
52
53#endif // NCC_QT_NETWORK_MANAGER_HPP