|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2017 Jolla Ltd. <[email protected]> |
| 2 | + * Copyright (c) 2017 - 2022 Jolla Ltd. |
3 | 3 | *
|
4 | 4 | * You may use this file under the terms of the BSD license as follows:
|
5 | 5 | *
|
@@ -48,6 +48,9 @@ class SYSTEMSETTINGS_EXPORT DeviceInfo: public QObject
|
48 | 48 | Q_PROPERTY(QString designation READ designation CONSTANT)
|
49 | 49 | Q_PROPERTY(QString manufacturer READ manufacturer CONSTANT)
|
50 | 50 | Q_PROPERTY(QString prettyName READ prettyName CONSTANT)
|
| 51 | + Q_PROPERTY(QString osName READ osName CONSTANT) |
| 52 | + Q_PROPERTY(QString osVersion READ osVersion CONSTANT) |
| 53 | + Q_PROPERTY(QString adaptationVersion READ adaptationVersion CONSTANT) |
51 | 54 |
|
52 | 55 | public:
|
53 | 56 | enum Feature {
|
@@ -105,12 +108,118 @@ class SYSTEMSETTINGS_EXPORT DeviceInfo: public QObject
|
105 | 108 | Q_INVOKABLE bool hasFeature(DeviceInfo::Feature feature) const;
|
106 | 109 | Q_INVOKABLE bool hasHardwareKey(Qt::Key key) const;
|
107 | 110 |
|
| 111 | + /*! |
| 112 | + * Device model |
| 113 | + * |
| 114 | + * Returns values such as: |
| 115 | + * "SbJ" |
| 116 | + * "tbj" |
| 117 | + * "l500d" |
| 118 | + * "tk7001" |
| 119 | + * "SDK" |
| 120 | + * "SDK Target" |
| 121 | + * "UNKNOWN" |
| 122 | + * |
| 123 | + * Should be functionally equivalent with: |
| 124 | + * SsuDeviceInfo::deviceModel() |
| 125 | + */ |
108 | 126 | QString model() const;
|
| 127 | + |
| 128 | + /*! |
| 129 | + * Device base model |
| 130 | + * |
| 131 | + * If the device is not an variant and there is no base model, |
| 132 | + * returns "UNKNOWN" - otherwise return values are similar as |
| 133 | + * what can be expected from #model(). |
| 134 | + * |
| 135 | + * Should be functionally equivalent with: |
| 136 | + * SsuDeviceInfo::deviceVariant(false) |
| 137 | + */ |
109 | 138 | QString baseModel() const;
|
| 139 | + |
| 140 | + /*! |
| 141 | + * Type designation, like NCC-1701. |
| 142 | + * |
| 143 | + * Returns values such as: |
| 144 | + * "JP-1301" |
| 145 | + * "JT-1501" |
| 146 | + * "Aqua Fish" |
| 147 | + * "TK7001" |
| 148 | + * "UNKNOWN" |
| 149 | + * |
| 150 | + * Should be functionally equivalent with: |
| 151 | + * SsuDeviceInfo::displayName(Ssu::DeviceDesignation) |
| 152 | + * QDeviceInfo::productName() |
| 153 | + */ |
110 | 154 | QString designation() const;
|
| 155 | + |
| 156 | + /*! |
| 157 | + * Manufacturer, like ACME Corp. |
| 158 | + * |
| 159 | + * Returns values such as: |
| 160 | + * "Jolla" |
| 161 | + * "Intex" |
| 162 | + * "Turing Robotic Industries" |
| 163 | + * "UNKNOWN" |
| 164 | + * |
| 165 | + * Should be functionally equivalent with: |
| 166 | + * SsuDeviceInfo::displayName(Ssu::DeviceManufacturer) |
| 167 | + * QDeviceInfo::manufacturer() |
| 168 | + */ |
111 | 169 | QString manufacturer() const;
|
| 170 | + |
| 171 | + /*! |
| 172 | + * Marketed device name, like Pogoblaster 3000. |
| 173 | + * |
| 174 | + * Returns values such as: |
| 175 | + * "Jolla" |
| 176 | + * "Jolla Tablet" |
| 177 | + * "Intex Aqua Fish" |
| 178 | + * "Turing Phone" |
| 179 | + * "UNKNOWN" |
| 180 | + * |
| 181 | + * Should be functionally equivalent with: |
| 182 | + * SsuDeviceInfo::displayName(Ssu::Ssu::DeviceModel) |
| 183 | + * QDeviceInfo::model() |
| 184 | + */ |
112 | 185 | QString prettyName() const;
|
113 | 186 |
|
| 187 | + /*! |
| 188 | + * Operating system name |
| 189 | + * |
| 190 | + * Returns values such as: |
| 191 | + * "Sailfish OS" |
| 192 | + * "UNKNOWN" |
| 193 | + * |
| 194 | + * Should be functionally equivalent with: |
| 195 | + * QDeviceInfo::operatingSystemName() |
| 196 | + */ |
| 197 | + QString osName() const; |
| 198 | + |
| 199 | + /*! |
| 200 | + * Operating system version |
| 201 | + * |
| 202 | + * Returns values such as: |
| 203 | + * "4.2.0.10" |
| 204 | + * "UNKNOWN" |
| 205 | + * |
| 206 | + * Should be functionally equivalent with: |
| 207 | + * QDeviceInfo::version(Os) |
| 208 | + */ |
| 209 | + QString osVersion() const; |
| 210 | + |
| 211 | + /*! |
| 212 | + * Hardware adaptation version |
| 213 | + * |
| 214 | + * Returns values such as: |
| 215 | + * "4.2.0.10" |
| 216 | + * "UNKNOWN" |
| 217 | + * |
| 218 | + * Should be functionally equivalent with: |
| 219 | + * QDeviceInfo::version(Firmware) |
| 220 | + */ |
| 221 | + QString adaptationVersion() const; |
| 222 | + |
114 | 223 | private:
|
115 | 224 |
|
116 | 225 | DeviceInfoPrivate *d_ptr;
|
|
0 commit comments