SIM : 'SIM',
PERIPHERAL : 'PERIPHERAL',
MEMORY : 'MEMORY',
- CAMERA_FLASH : 'CAMERA_FLASH',
- ADS : 'ADS'
+ CAMERA_FLASH : 'CAMERA_FLASH'
};
//class SystemInfoDeviceCapability ////////////////////////////////////////////////////
});
}
-//class SystemInfoADS ////////////////////////////////////////////////////
-function SystemInfoADS(data) {
- Object.defineProperties(this, {
- id : {value: data.id, writable: false, enumerable: true},
- });
-}
-
SystemInfoCameraFlash.prototype.setBrightness = function(brightness) {
var args = validator_.validateArgs(arguments, [
{name: 'brightness', type: types_.DOUBLE}
constructor : SystemInfoCameraFlash,
broadcastFunction : _systeminfoCameraFlashListenerCallback,
signalLabel : 'SystemInfoCameraFlashChangeBroadcast'
- },
- 'ADS' : {
- callbacks : {}, //adding callbacks for ADS is not possible
- constructor : SystemInfoADS,
- broadcastFunction : function(){},
- signalLabel : ''
- }
+ }
};
/// It common function to be called when listener would be triggered
return ReportMemory(res_obj);
} else if ("CAMERA_FLASH" == property) {
return ReportCameraFlash(res_obj, index);
- } else if ("ADS" == property) {
- return ReportAds(res_obj);
}
return LogAndCreateResult(
ErrorCode::NOT_SUPPORTED_ERR, "Property with given id is not supported");
return PlatformResult(ErrorCode::NO_ERROR);
}
-/// ADS
-PlatformResult SysteminfoPropertiesManager::ReportAds(picojson::object* out) {
- LoggerD("Entered");
- std::string ads_id = "";
- PlatformResult ret = SysteminfoUtils::GetRuntimeInfoString(
- SYSTEM_SETTINGS_KEY_ADS_ID, &ads_id);
- if (ret.IsError()) {
- return ret;
- }
-
- out->insert(std::make_pair("id", picojson::value(ads_id)));
- return PlatformResult(ErrorCode::NO_ERROR);
-}
} // namespace systeminfo
} // namespace webapi
common::PlatformResult ReportCameraFlash(picojson::object* out, unsigned long count);
common::PlatformResult ReportMemory(picojson::object* out);
common::PlatformResult ReportStorage(picojson::object* out);
- common::PlatformResult ReportAds(picojson::object* out);
common::PlatformResult FetchIsAutoRotation(bool* result);
common::PlatformResult FetchStatus(std::string* result);