| 1 |
/* |
| 2 |
* Copyright (C) 2020 UBports foundation. |
| 3 |
* Author(s): Marius Gripsgard <[email protected]> |
| 4 |
* |
| 5 |
* This program is free software: you can redistribute it and/or modify it under |
| 6 |
* the terms of the GNU General Public License version 3, as published by |
| 7 |
* the Free Software Foundation. |
| 8 |
* |
| 9 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
| 10 |
* ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, |
| 11 |
* SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU General Public License |
| 15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
* |
| 17 |
*/ |
| 18 |
|
| 19 |
#pragma once |
| 20 |
|
| 21 |
#include <memory> |
| 22 |
|
| 23 |
#include "platform.h" |
| 24 |
|
| 25 |
namespace platform { |
| 26 |
class Halium : public Platform { |
| 27 |
public: |
| 28 |
Halium() = default; |
| 29 |
|
| 30 |
std::string name() override; |
| 31 |
std::string prettyName() override; |
| 32 |
std::string buildId() override; |
| 33 |
std::string deviceIdentifier() override; |
| 34 |
DeviceInfo::DeviceType deviceType() override; |
| 35 |
DeviceInfo::DriverType driverType() override; |
| 36 |
|
| 37 |
bool hasValidName() override; |
| 38 |
bool hasValidPrettyName() override; |
| 39 |
bool hasValidDeviceType() override; |
| 40 |
|
| 41 |
static bool usable(); |
| 42 |
private: |
| 43 |
std::string getHaliumProp(const char* prop); |
| 44 |
std::string getHaliumProp(const char* prop, const char* default_value);\ |
| 45 |
|
| 46 |
// Static as this is used by usable() |
| 47 |
static bool hasHaliumProp(const char* key); |
| 48 |
}; |
| 49 |
} |