• Home
  • Raw
  • Download

Lines Matching refs:info

55 int32_t BatteryNotify::PublishEvents(const BatteryInfo& info)  in PublishEvents()  argument
66 bool ret = PublishChangedEvent(info); in PublishEvents()
68 ret = PublishLowEvent(info); in PublishEvents()
70 ret = PublishOkayEvent(info); in PublishEvents()
72 ret = PublishPowerConnectedEvent(info); in PublishEvents()
74 ret = PublishPowerDisconnectedEvent(info); in PublishEvents()
76 ret = PublishChargingEvent(info); in PublishEvents()
78 ret = PublishDischargingEvent(info); in PublishEvents()
102 bool BatteryNotify::PublishChangedEvent(const BatteryInfo& info) const in PublishChangedEvent()
105 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_CAPACITY, info.GetCapacity()); in PublishChangedEvent()
106 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_VOLTAGE, info.GetVoltage()); in PublishChangedEvent()
107 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_TEMPERATURE, info.GetTemperature()); in PublishChangedEvent()
108 …want.SetParam(BatteryInfo::COMMON_EVENT_KEY_HEALTH_STATE, static_cast<int32_t>(info.GetHealthState… in PublishChangedEvent()
109 …want.SetParam(BatteryInfo::COMMON_EVENT_KEY_PLUGGED_TYPE, static_cast<int32_t>(info.GetPluggedType… in PublishChangedEvent()
110 …want.SetParam(BatteryInfo::COMMON_EVENT_KEY_CHARGE_STATE, static_cast<int32_t>(info.GetChargeState… in PublishChangedEvent()
111 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_PRESENT, info.IsPresent()); in PublishChangedEvent()
112 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_TECHNOLOGY, info.GetTechnology()); in PublishChangedEvent()
114 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_PLUGGED_MAX_CURRENT, info.GetPluggedMaxCurrent()); in PublishChangedEvent()
115 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_PLUGGED_MAX_VOLTAGE, info.GetPluggedMaxVoltage()); in PublishChangedEvent()
116 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_PLUGGED_NOW_CURRENT, info.GetNowCurrent()); in PublishChangedEvent()
117 want.SetParam(BatteryInfo::COMMON_EVENT_KEY_CHARGE_COUNTER, info.GetChargeCounter()); in PublishChangedEvent()
127 ChangedEventDeprecated(want, info); in PublishChangedEvent()
137 "LEVEL", info.GetCapacity(), "CHARGER", static_cast<int32_t>(info.GetPluggedType()), in PublishChangedEvent()
138 "VOLTAGE", info.GetVoltage(), "TEMPERATURE", info.GetTemperature(), in PublishChangedEvent()
139 "HEALTH", static_cast<int32_t>(info.GetHealthState()), "CURRENT", info.GetNowCurrent()); in PublishChangedEvent()
147 void BatteryNotify::ChangedEventDeprecated(Want& want, const BatteryInfo& info) const in ChangedEventDeprecated()
149 want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_CAPACITY), info.GetCapacity()); in ChangedEventDeprecated()
150 want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_VOLTAGE), info.GetVoltage()); in ChangedEventDeprecated()
151 want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_TEMPERATURE), info.GetTemperature()); in ChangedEventDeprecated()
152 …want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_HEALTH_STATE), static_cast<int32_t>(info.Get… in ChangedEventDeprecated()
153 …want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_PLUGGED_TYPE), static_cast<int32_t>(info.Get… in ChangedEventDeprecated()
154 …want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_PLUGGED_MAX_CURRENT), info.GetPluggedMaxCurr… in ChangedEventDeprecated()
155 …want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_PLUGGED_MAX_VOLTAGE), info.GetPluggedMaxVolt… in ChangedEventDeprecated()
156 …want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_CHARGE_STATE), static_cast<int32_t>(info.Get… in ChangedEventDeprecated()
157 want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_CHARGE_COUNTER), info.GetChargeCounter()); in ChangedEventDeprecated()
158 want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_PRESENT), info.IsPresent()); in ChangedEventDeprecated()
159 want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_TECHNOLOGY), info.GetTechnology()); in ChangedEventDeprecated()
160 … want.SetParam(ToString(BatteryInfo::COMMON_EVENT_CODE_PLUGGED_NOW_CURRENT), info.GetNowCurrent()); in ChangedEventDeprecated()
163 bool BatteryNotify::PublishLowEvent(const BatteryInfo& info) const in PublishLowEvent()
173 if (info.GetCapacity() > lowCapacity_) { in PublishLowEvent()
182 data.SetCode(info.GetCapacity()); in PublishLowEvent()
183 BATTERY_HILOGD(FEATURE_BATT_INFO, "publisher capacity=%{public}d", info.GetCapacity()); in PublishLowEvent()
192 bool BatteryNotify::PublishOkayEvent(const BatteryInfo& info) const in PublishOkayEvent()
202 if (info.GetCapacity() <= lowCapacity_) { in PublishOkayEvent()
211 data.SetCode(info.GetCapacity()); in PublishOkayEvent()
212 BATTERY_HILOGD(FEATURE_BATT_INFO, "publisher capacity=%{public}d", info.GetCapacity()); in PublishOkayEvent()
221 bool BatteryNotify::PublishPowerConnectedEvent(const BatteryInfo& info) const in PublishPowerConnectedEvent()
231 if ((info.GetPluggedType() == BatteryPluggedType::PLUGGED_TYPE_NONE) || in PublishPowerConnectedEvent()
232 (info.GetPluggedType() == BatteryPluggedType::PLUGGED_TYPE_BUTT)) { in PublishPowerConnectedEvent()
241 data.SetCode(static_cast<int32_t>(info.GetPluggedType())); in PublishPowerConnectedEvent()
243 static_cast<uint32_t>(info.GetPluggedType())); in PublishPowerConnectedEvent()
253 bool BatteryNotify::PublishPowerDisconnectedEvent(const BatteryInfo& info) const in PublishPowerDisconnectedEvent()
263 if ((info.GetPluggedType() != BatteryPluggedType::PLUGGED_TYPE_NONE) && in PublishPowerDisconnectedEvent()
264 (info.GetPluggedType() != BatteryPluggedType::PLUGGED_TYPE_BUTT)) { in PublishPowerDisconnectedEvent()
273 data.SetCode(static_cast<int32_t>(info.GetPluggedType())); in PublishPowerDisconnectedEvent()
275 static_cast<uint32_t>(info.GetPluggedType())); in PublishPowerDisconnectedEvent()
285 bool BatteryNotify::PublishChargingEvent(const BatteryInfo& info) const in PublishChargingEvent()
295 if (info.GetChargeState() != BatteryChargeState::CHARGE_STATE_ENABLE) { in PublishChargingEvent()
304 data.SetCode(static_cast<int32_t>(info.GetChargeState())); in PublishChargingEvent()
306 static_cast<uint32_t>(info.GetChargeState())); in PublishChargingEvent()
316 bool BatteryNotify::PublishDischargingEvent(const BatteryInfo& info) const in PublishDischargingEvent()
326 if (info.GetChargeState() == BatteryChargeState::CHARGE_STATE_ENABLE) { in PublishDischargingEvent()
335 data.SetCode(static_cast<int32_t>(info.GetChargeState())); in PublishDischargingEvent()
337 static_cast<uint32_t>(info.GetChargeState())); in PublishDischargingEvent()