Comment 1 for bug 1585659

Revision history for this message
Pete Woods (pete-woods) wrote :

Sounds good. Tell me what string to expect from libqofono here:

static Modem::Bearer str2technology(const QString& str)
{
    if (str.isEmpty() || str == "none")
        return Modem::Bearer::notAvailable;
    if (str == "gprs")
        return Modem::Bearer::gprs;
    if (str == "edge")
        return Modem::Bearer::edge;
    if (str == "umts")
        return Modem::Bearer::umts;
    if (str == "hspa" || str == "hsupa" || str == "hsdpa")
        return Modem::Bearer::hspa;
    if (str == "hspap")
        return Modem::Bearer::hspa_plus;
    if (str == "lte")
        return Modem::Bearer::lte;
    if (str == "??????")
        return Modem::Bearer::lte_a;

    qWarning() << __PRETTY_FUNCTION__ << ": Unknown technology" << str;
    return Modem::Bearer::notAvailable;
}

and the name of the icon to use here:

QString Icons::bearerIcon(wwan::Modem::Bearer bearer)
{
    switch (bearer)
    {
    case wwan::Modem::Bearer::notAvailable:
        return "";
    case wwan::Modem::Bearer::gprs:
        return "network-cellular-pre-edge";
    case wwan::Modem::Bearer::edge:
        return "network-cellular-edge";
    case wwan::Modem::Bearer::umts:
        return "network-cellular-3g";
    case wwan::Modem::Bearer::hspa:
        return "network-cellular-hspa";
    case wwan::Modem::Bearer::hspa_plus:
        return "network-cellular-hspa-plus";
    case wwan::Modem::Bearer::lte:
        return "network-cellular-lte";
    case wwan::Modem::Bearer::lte_a:
        return "network-cellular-????????";
    }
    // shouldn't be reached
    return QString();
}

and I'm all good!