mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 04:25:33 -04:00
universal7885: interfaces: Instance of virtual class
This commit is contained in:
parent
e03d7d13d9
commit
8df46a635d
4 changed files with 13 additions and 13 deletions
|
|
@ -21,7 +21,7 @@
|
||||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||||
|
|
||||||
// Methods from ::android::hardware::battery::V1_0::IBattery follow.
|
// Methods from ::android::hardware::battery::V1_0::IBattery follow.
|
||||||
Return<int32_t> IBattery::getBatteryStats(parts::V1_0::SysfsType stats) {
|
Return<int32_t> Battery::getBatteryStats(parts::V1_0::SysfsType stats) {
|
||||||
std::ifstream file;
|
std::ifstream file;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
switch (stats) {
|
switch (stats) {
|
||||||
|
|
@ -60,7 +60,7 @@ Return<int32_t> IBattery::getBatteryStats(parts::V1_0::SysfsType stats) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<int32_t> IBattery::setBatteryWritable(parts::V1_0::SysfsType stats,
|
Return<int32_t> Battery::setBatteryWritable(parts::V1_0::SysfsType stats,
|
||||||
parts::V1_0::Number value) {
|
parts::V1_0::Number value) {
|
||||||
std::ofstream file;
|
std::ofstream file;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
|
|
@ -103,7 +103,7 @@ Return<int32_t> IBattery::setBatteryWritable(parts::V1_0::SysfsType stats,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
IBattery* IBattery::getInstance(void) {
|
IBattery* Battery::getInstance(void) {
|
||||||
return new Battery();
|
return new Battery();
|
||||||
}
|
}
|
||||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||||
|
|
||||||
// Methods from ::android::hardware::parts::V1_0::IFlashLight follow.
|
// Methods from ::android::hardware::parts::V1_0::IFlashLight follow.
|
||||||
Return<int32_t> IFlashLight::setFlashlightEnable(parts::V1_0::Number enable) {
|
Return<int32_t> FlashLight::setFlashlightEnable(parts::V1_0::Number enable) {
|
||||||
std::ofstream file;
|
std::ofstream file;
|
||||||
std::string writevalue;
|
std::string writevalue;
|
||||||
switch (enable) {
|
switch (enable) {
|
||||||
|
|
@ -39,7 +39,7 @@ Return<int32_t> IFlashLight::setFlashlightEnable(parts::V1_0::Number enable) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<int32_t> IFlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
Return<int32_t> FlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
||||||
std::ofstream file;
|
std::ofstream file;
|
||||||
std::string writevalue;
|
std::string writevalue;
|
||||||
switch (value) {
|
switch (value) {
|
||||||
|
|
@ -83,7 +83,7 @@ Return<int32_t> IFlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<int32_t> IFlashLight::readFlashlightstats(parts::V1_0::Device device) {
|
Return<int32_t> FlashLight::readFlashlightstats(parts::V1_0::Device device) {
|
||||||
std::ifstream file;
|
std::ifstream file;
|
||||||
std::string value;
|
std::string value;
|
||||||
int32_t intvalue;
|
int32_t intvalue;
|
||||||
|
|
@ -104,7 +104,7 @@ Return<int32_t> IFlashLight::readFlashlightstats(parts::V1_0::Device device) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
IFlashLight* IFlashLight::getInstance(void) {
|
IFlashLight* FlashLight::getInstance(void) {
|
||||||
return new FlashLight();
|
return new FlashLight();
|
||||||
}
|
}
|
||||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||||
|
|
||||||
Return<int32_t> IGpu::setGpuWritable(parts::V1_0::Number enable) {
|
Return<int32_t> Gpu::setGpuWritable(parts::V1_0::Number enable) {
|
||||||
std::ofstream file;
|
std::ofstream file;
|
||||||
std::string writevalue;
|
std::string writevalue;
|
||||||
if (enable == Number::ENABLE) {
|
if (enable == Number::ENABLE) {
|
||||||
|
|
@ -32,7 +32,7 @@ Return<int32_t> IGpu::setGpuWritable(parts::V1_0::Number enable) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<int32_t> IGpu::readGpustats(void) {
|
Return<int32_t> Gpu::readGpustats(void) {
|
||||||
std::ifstream file;
|
std::ifstream file;
|
||||||
std::string value;
|
std::string value;
|
||||||
int32_t intvalue;
|
int32_t intvalue;
|
||||||
|
|
@ -47,7 +47,7 @@ Return<int32_t> IGpu::readGpustats(void) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
IGpu* IGpu::getInstance(void) {
|
IGpu* Gpu::getInstance(void) {
|
||||||
return new Gpu();
|
return new Gpu();
|
||||||
}
|
}
|
||||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||||
|
|
||||||
Return<int32_t> ISELinux::setSELinuxWritable(parts::V1_0::Number enable) {
|
Return<int32_t> SELinux::setSELinuxWritable(parts::V1_0::Number enable) {
|
||||||
std::ofstream file;
|
std::ofstream file;
|
||||||
std::string writevalue;
|
std::string writevalue;
|
||||||
if (enable == Number::ENABLE) {
|
if (enable == Number::ENABLE) {
|
||||||
|
|
@ -32,7 +32,7 @@ Return<int32_t> ISELinux::setSELinuxWritable(parts::V1_0::Number enable) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<int32_t> ISELinux::readSELinuxstats(void) {
|
Return<int32_t> SELinux::readSELinuxstats(void) {
|
||||||
std::ifstream file;
|
std::ifstream file;
|
||||||
std::string value;
|
std::string value;
|
||||||
int32_t intvalue;
|
int32_t intvalue;
|
||||||
|
|
@ -47,7 +47,7 @@ Return<int32_t> ISELinux::readSELinuxstats(void) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ISELinux* ISELinux::getInstance(void) {
|
ISELinux* SELinux::getInstance(void) {
|
||||||
return new SELinux();
|
return new SELinux();
|
||||||
}
|
}
|
||||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue