File indexing completed on 2024-05-12 17:06:43
0001 /*************************************************************************** 0002 * * 0003 * SPDX-FileCopyrightText: 2021 Aditya Mehra <aix.m@outlook.com> * 0004 * * 0005 * SPDX-License-Identifier: GPL-2.0-or-later * 0006 ***************************************************************************/ 0007 0008 #include "timedated_interface.h" 0009 0010 OrgFreedesktopTimedate1Interface::OrgFreedesktopTimedate1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) 0011 : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) 0012 { 0013 } 0014 0015 OrgFreedesktopTimedate1Interface::~OrgFreedesktopTimedate1Interface() 0016 { 0017 } 0018 0019 bool OrgFreedesktopTimedate1Interface::canNTP() const 0020 { 0021 return qvariant_cast<bool>(property("CanNTP")); 0022 } 0023 0024 bool OrgFreedesktopTimedate1Interface::localRTC() const 0025 { 0026 return qvariant_cast<bool>(property("LocalRTC")); 0027 } 0028 0029 bool OrgFreedesktopTimedate1Interface::nTP() const 0030 { 0031 return qvariant_cast<bool>(property("NTP")); 0032 } 0033 0034 bool OrgFreedesktopTimedate1Interface::nTPSynchronized() const 0035 { 0036 return qvariant_cast<bool>(property("NTPSynchronized")); 0037 } 0038 0039 qulonglong OrgFreedesktopTimedate1Interface::rTCTimeUSec() const 0040 { 0041 return qvariant_cast<qulonglong>(property("RTCTimeUSec")); 0042 } 0043 0044 qulonglong OrgFreedesktopTimedate1Interface::timeUSec() const 0045 { 0046 return qvariant_cast<qulonglong>(property("TimeUSec")); 0047 } 0048 0049 QString OrgFreedesktopTimedate1Interface::timezone() const 0050 { 0051 return qvariant_cast<QString>(property("Timezone")); 0052 } 0053 0054 QDBusPendingReply<> OrgFreedesktopTimedate1Interface::SetLocalRTC(bool in0, bool in1, bool in2) 0055 { 0056 QList<QVariant> argumentList; 0057 argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); 0058 return asyncCallWithArgumentList(QStringLiteral("SetLocalRTC"), argumentList); 0059 } 0060 0061 QDBusPendingReply<> OrgFreedesktopTimedate1Interface::SetNTP(bool in0, bool in1) 0062 { 0063 QList<QVariant> argumentList; 0064 argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); 0065 return asyncCallWithArgumentList(QStringLiteral("SetNTP"), argumentList); 0066 } 0067 0068 QDBusPendingReply<> OrgFreedesktopTimedate1Interface::SetTime(qlonglong in0, bool in1, bool in2) 0069 { 0070 QList<QVariant> argumentList; 0071 argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); 0072 return asyncCallWithArgumentList(QStringLiteral("SetTime"), argumentList); 0073 } 0074 0075 QDBusPendingReply<> OrgFreedesktopTimedate1Interface::SetTimezone(const QString &in0, bool in1) 0076 { 0077 QList<QVariant> argumentList; 0078 argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); 0079 return asyncCallWithArgumentList(QStringLiteral("SetTimezone"), argumentList); 0080 }