mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
We use the Android APN list here in order to determine the APN settings from SIM information. Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/285 Address feedback
31 lines
811 B
C++
31 lines
811 B
C++
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later OR LicenseRef-KDE-Accepted-GPL
|
|
|
|
#pragma once
|
|
|
|
#include <kdedmodule.h>
|
|
|
|
#include <QCoroDBusPendingReply>
|
|
|
|
#include <ModemManagerQt/GenericTypes>
|
|
#include <ModemManagerQt/ModemDevice>
|
|
#include <NetworkManagerQt/ModemDevice>
|
|
|
|
class AutoDetectAPN : public KDEDModule
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
AutoDetectAPN(QObject *parent, const QList<QVariant> &);
|
|
|
|
struct APNEntry {
|
|
QString apn;
|
|
QString carrier;
|
|
};
|
|
|
|
std::optional<APNEntry> findAPN(const QString &operatorCode, const QString &gid1, const QString &spn, const QString &imsi) const;
|
|
|
|
private:
|
|
QCoro::Task<void> checkAndAddAutodetectedAPN();
|
|
NetworkManager::ModemDevice::Ptr findNMModem(ModemManager::Modem::Ptr mmModem);
|
|
};
|