/usr/include/rds/server/rdsnetworksettings.h is in librdsserver-dev 1.1.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | /***************************************************************************
* Copyright (C) 2011 by Resara LLC *
* brendan@resara.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************/
#ifndef RDSNETWORKSETTINGS_H
#define RDSNETWORKSETTINGS_H
#include <QThread>
#include <QMutex>
#include <QMap>
#include <ReturnValue>
#include <QxtPimpl>
#include <ServiceProxy>
class RdsNetworkSettingsInterfacePrivate;
class RdsNetworkSettingsPrivate;
/**
@author Brendan Powers <brendan@resara.com>
*/
class RdsNetworkSettings : public QtRpc::ServiceProxy
{
Q_OBJECT
QXT_DECLARE_PRIVATE(RdsNetworkSettings);
QTRPC_SERVICEPROXY_PIMPL(RdsNetworkSettings);
public:
class Interface
{
friend class RdsNetworkSettingsInterfacePrivate;
QxtPrivateInterface<Interface, RdsNetworkSettingsInterfacePrivate> qxt_d;
friend QDataStream& operator<<(QDataStream& d, const RdsNetworkSettings::Interface& iface);
friend QDataStream& operator>>(QDataStream& d, RdsNetworkSettings::Interface& iface);
public:
Interface();
Interface(const Interface &other);
~Interface();
Interface &operator=(const Interface &other);
QString name() const;
void setName(const QString &name);
QString type() const;
void setType(const QString &type);
bool autoUp() const;
void setAutoUp(bool up);
QMap<QString, QString> &options();
const QMap<QString, QString> &options() const;
const QMap<QString, QString> &optionsConst() const;
QString comment();
void setComment(const QString &comment);
};
RdsNetworkSettings(QObject *parent = 0);
RdsNetworkSettings(const RdsNetworkSettings &other);
~RdsNetworkSettings();
RdsNetworkSettings &operator=(const RdsNetworkSettings &other);
ReturnValue auth(QtRpc::AuthToken token);
ReturnValue loadNetworkConfig();
ReturnValue saveNetworkConfig();
ReturnValue setInterface(const QString &name, const QString &type, bool autoup, const QMap<QString, QString> &options, const QString &comment = "");
ReturnValue removeInterface(const QString &name);
ReturnValue listInterfaces() const;
QList<Interface> getInterfaces();
Interface getInterface(QString interface);
ReturnValue ifUp(const QString &interface);
ReturnValue ifDown(const QString &interface);
ReturnValue allIfUp();
ReturnValue allIfDown();
ReturnValue getInterfaceLinkState(const QString &interface) const;
ReturnValue getInterfaceLinkSpeed(const QString &interface) const;
ReturnValue getInterfaceIp(QString interface) const;
ReturnValue getInterfaceNetmask(QString interface) const;
ReturnValue getInterfaceMac(QString interface) const;
ReturnValue listAllInterfaces() const;
ReturnValue getDefaultInterface() const;
ReturnValue getDefaultGateway() const;
ReturnValue getDnsServers() const;
ReturnValue getDomain() const;
ReturnValue killDhcpClient();
};
QDataStream& operator<<(QDataStream& d, const RdsNetworkSettings::Interface& iface);
QDataStream& operator>>(QDataStream& d, RdsNetworkSettings::Interface& iface);
#endif
|