Changeset View
Changeset View
Standalone View
Standalone View
libdiscover/backends/FwupdBackend/FwupdResource.h
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 34 | public: | |||
---|---|---|---|---|---|
68 | void setSummary(const QString &summary){ m_summary = summary;} | 68 | void setSummary(const QString &summary){ m_summary = summary;} | ||
69 | void setDescription(const QString &description){ m_description = description;} | 69 | void setDescription(const QString &description){ m_description = description;} | ||
70 | void setVersion(const QString &version){ m_version = version;} | 70 | void setVersion(const QString &version){ m_version = version;} | ||
71 | void setVendor(const QString &vendor){ m_vendor = vendor;} | 71 | void setVendor(const QString &vendor){ m_vendor = vendor;} | ||
72 | void addCategories(const QString &category); | 72 | void addCategories(const QString &category); | ||
73 | void setHomePage(const QUrl &homepage){ m_homepage = homepage;} | 73 | void setHomePage(const QUrl &homepage){ m_homepage = homepage;} | ||
74 | void setLicense(const QString &license){ m_license = license;} | 74 | void setLicense(const QString &license){ m_license = license;} | ||
75 | void setIconName(const QString &iconName){ m_iconName = iconName;} | 75 | void setIconName(const QString &iconName){ m_iconName = iconName;} | ||
76 | void setReleaseDate(const QDate &date){ m_releaseDate = date;} | ||||
76 | virtual QStringList allResourceNames() const; | 77 | virtual QStringList allResourceNames() const; | ||
77 | 78 | | |||
78 | void setIsDeviceLocked(bool status){ isDeviceLocked = status;} | 79 | void setIsDeviceLocked(bool status){ isDeviceLocked = status;} | ||
79 | void setDeviceID(const QString &deviceID){ m_deviceID = deviceID;} | 80 | void setDeviceID(const QString &deviceID){ m_deviceID = deviceID;} | ||
80 | void setUpdateURI(const QString &updateURI){m_updateURI = updateURI;} | 81 | void setUpdateURI(const QString &updateURI){m_updateURI = updateURI;} | ||
81 | 82 | | |||
82 | void setAddonInstalled(const QString& addon, bool installed); | 83 | void setAddonInstalled(const QString& addon, bool installed); | ||
83 | QString sourceIcon() const override { return QStringLiteral("player-time"); } | 84 | QString sourceIcon() const override { return m_iconName; } | ||
84 | QDate releaseDate() const override { return {}; } | 85 | QDate releaseDate() const override { return m_releaseDate; } | ||
85 | 86 | | |||
86 | public: | 87 | public: | ||
87 | QString m_id; | 88 | QString m_id; | ||
88 | QString m_name; | 89 | QString m_name; | ||
89 | QString m_summary; | 90 | QString m_summary; | ||
90 | QString m_description; | 91 | QString m_description; | ||
91 | QString m_version; | 92 | QString m_version; | ||
92 | QString m_updateVersion; | 93 | QString m_updateVersion; | ||
93 | QString m_vendor; | 94 | QString m_vendor; | ||
94 | QStringList m_categories; | 95 | QStringList m_categories; | ||
95 | QString m_license; | 96 | QString m_license; | ||
97 | QDate m_releaseDate; | ||||
96 | 98 | | |||
97 | AbstractResource::State m_state; | 99 | AbstractResource::State m_state; | ||
98 | QUrl m_homepage; | 100 | QUrl m_homepage; | ||
99 | QString m_iconName; | 101 | QString m_iconName; | ||
100 | QList<PackageState> m_addons; | 102 | QList<PackageState> m_addons; | ||
101 | bool m_isTechnical; | 103 | bool m_isTechnical; | ||
102 | int m_size; | 104 | int m_size; | ||
103 | 105 | | |||
104 | QString m_deviceID; | 106 | QString m_deviceID; | ||
105 | QString m_updateURI; | 107 | QString m_updateURI; | ||
106 | QString m_file; | 108 | QString m_file; | ||
107 | bool isDeviceLocked = false; // True if device is locked! | 109 | bool isDeviceLocked = false; // True if device is locked! | ||
108 | bool isOnlyOffline = false; // True if only offline updates | 110 | bool isOnlyOffline = false; // True if only offline updates | ||
109 | bool isLiveUpdatable = false; // True if device is live updatable | 111 | bool isLiveUpdatable = false; // True if device is live updatable | ||
110 | bool needsReboot = false; // True if device needs Reboot | 112 | bool needsReboot = false; // True if device needs Reboot | ||
111 | bool isDeviceRemoval = false; //True if device is Removal | 113 | bool isDeviceRemoval = false; //True if device is Removal | ||
114 | bool needsBootLoader = false; //True if BootLoader Required | ||||
112 | QString guidString; | 115 | QString guidString; | ||
113 | 116 | | |||
114 | 117 | | |||
115 | QVector<FwupdResource*> m_releases; // A list of all references to releases of a device. | 118 | QVector<FwupdResource*> m_releases; // A list of all references to releases of a device. | ||
116 | }; | 119 | }; | ||
117 | 120 | | |||
118 | #endif // FWUPDRESOURCE_H | 121 | #endif // FWUPDRESOURCE_H |