Home
last modified time | relevance | path

Searched refs:capacity (Results 1 – 25 of 39) sorted by relevance

12

/base/security/appverify/interfaces/innerkits/appverify/src/common/
Dhap_byte_buffer.cpp27 HapByteBuffer::HapByteBuffer() : buffer(nullptr), position(0), limit(0), capacity(0) in HapByteBuffer()
31 HapByteBuffer::HapByteBuffer(int bufferCapacity) : buffer(nullptr), position(0), limit(0), capacity in HapByteBuffer()
36 …er::HapByteBuffer(const HapByteBuffer& other) : buffer(nullptr), position(0), limit(0), capacity(0) in HapByteBuffer()
39 if (buffer != nullptr && capacity > 0) { in HapByteBuffer()
40 if (memcpy_s(buffer.get(), capacity, other.GetBufferPtr(), other.GetCapacity()) != EOK) { in HapByteBuffer()
60 capacity = bufferCapacity; in Init()
75 if (buffer != nullptr && other.GetBufferPtr() != nullptr && capacity > 0) { in operator =()
76 if (memcpy_s(buffer.get(), capacity, other.GetBufferPtr(), other.GetCapacity()) != EOK) { in operator =()
132 return capacity; in GetCapacity()
228 if (position >= capacity || limit > capacity || position >= limit || buffer == nullptr) { in Slice()
[all …]
/base/powermgr/battery_manager/services/native/src/
Dbattery_service.cpp186 batteryInfo_.SetCapacity(event.capacity); in ConvertingEvent()
327 void BatteryService::HandlePopupEvent(int32_t capacity) in HandlePopupEvent() argument
329 if ((capacity < warnCapacity_) && !isLowPower_) { in HandlePopupEvent()
335 if (capacity >= warnCapacity_ && isLowPower_) { in HandlePopupEvent()
388 void BatteryService::HandleCapacity(int32_t capacity, BatteryChargeState chargeState) in HandleCapacity() argument
391 if ((capacity <= shutdownCapacityThreshold_) && in HandleCapacity()
401 int capacity = BATTERY_FULL_CAPACITY; in GetCapacity() local
407 iBatteryInterface_->GetCapacity(capacity); in GetCapacity()
408 return capacity; in GetCapacity()
570 void BatteryService::CalculateRemainingChargeTime(int32_t capacity, BatteryChargeState chargeState) in CalculateRemainingChargeTime() argument
[all …]
Dbattery_light.cpp88 bool BatteryLight::UpdateColor(BatteryChargeState chargeState, int32_t capacity) in UpdateColor() argument
100 if ((capacity >= it.beginSoc) && (capacity <= it.endSoc)) { in UpdateColor()
Dbattery_dump.cpp72 int32_t capacity = service->GetCapacity(); in GetBatteryInfo() local
73 dprintf(fd, "capacity: %u \n", capacity); in GetBatteryInfo()
/base/powermgr/battery_manager/frameworks/native/test/unittest/src/
Dbattery_client_test.cpp74 auto capacity = BatterySrvClient.GetCapacity(); variable
75 BATTERY_HILOGI(LABEL_TEST, "BatteryClientTest::capacity=%{public}d", capacity);
76 GTEST_LOG_(INFO) << "BatteryClient::BatteryClient001 executing, capacity=" << capacity;
77 ASSERT_TRUE(capacity == 22);
80 auto capacity = BatterySrvClient.GetCapacity(); variable
81 BATTERY_HILOGI(LABEL_TEST, "BatteryClientTest::capacity=%{public}d", capacity);
82 GTEST_LOG_(INFO) << "BatteryClient::BatteryClient001 executing, capacity=" << capacity;
83 ASSERT_TRUE(capacity <= 100 && capacity >= 0);
401 auto capacity = BatterySrvClient.GetCapacity(); variable
406 if (capacity < BATTERY_EMERGENCY_THRESHOLD) {
[all …]
/base/web/webview/ohos_adapter/battery_mgr_adapter/src/
Dbattery_mgr_client_adapter_impl.cpp56 auto capacity = data.GetWant().GetIntParam(KEY_CAPACITY, defaultInvalid); in OnReceiveEvent() local
64 double changeLevel = capacity / changeFullLevel; in OnReceiveEvent()
65 WVLOG_I("receive capacity %{public}d isChangingType %{public}d", capacity, isChangingType); in OnReceiveEvent()
109 auto capacity = battClient.GetCapacity(); in RequestBatteryInfo() local
117 double changeLevel = capacity / changeFullLevel; in RequestBatteryInfo()
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include/
Dwrite_controller.h38 LruCache(int capacity = DEFAULT_CACHE_CAPACITY): capacity(capacity) {} in capacity() function
57 if (keyCache.size() == capacity) { in Put()
83 size_t capacity;
/base/powermgr/battery_statistics/services/native/src/
Dbattery_stats_subscriber.cpp46 …int capacity = data.GetWant().GetIntParam(BatteryInfo::COMMON_EVENT_KEY_CAPACITY, StatsUtils::INVA… in OnReceiveEvent() local
52 capacity, pluggedType); in OnReceiveEvent()
53 if (capacity == BATTERY_LEVEL_FULL) { in OnReceiveEvent()
/base/security/device_security_level/baselib/utils/src/
Dutils_work_queue.c35 uint32_t capacity; member
87 WorkQueue *CreateWorkQueue(uint32_t capacity, const char *name) in CreateWorkQueue() argument
97 queue->capacity = capacity; in CreateWorkQueue()
157 if (queue->size >= queue->capacity) { in QueueWork()
/base/hiviewdfx/hiview/include/
Dplugin_extra_info.h47 CapacityObtainEvent(const std::string &plugin, const std::string capacity) in CapacityObtainEvent() argument
48 : Event(plugin), plugin_(plugin), capacity_(capacity) {}; in CapacityObtainEvent()
/base/powermgr/battery_manager/services/native/test/unittest/src/
Dbattery_notify_test.cpp37 const int32_t capacity = 100; in SetUp() local
38 g_batteryInfo->SetCapacity(capacity); in SetUp()
306 const int32_t capacity = -100; variable
307 g_batteryInfo->SetCapacity(capacity);
334 const int32_t capacity = -100; variable
335 g_batteryInfo->SetCapacity(capacity);
Dbattery_srv_proxy_mock_test.cpp62 int32_t capacity = g_proxy->GetCapacity(); variable
63 EXPECT_TRUE(capacity == INVALID_BATT_INT_VALUE);
Dbattery_light_test.cpp78 int32_t capacity = 1; variable
79 g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, capacity);
/base/powermgr/battery_manager/frameworks/native/src/
Dbattery_srv_client.cpp89 int32_t capacity = INVALID_BATT_INT_VALUE; in GetCapacity() local
90 RETURN_IF_WITH_RET(Connect() != ERR_OK, capacity); in GetCapacity()
91 capacity = proxy_->GetCapacity(); in GetCapacity()
92 return capacity; in GetCapacity()
/base/powermgr/battery_manager/services/native/include/
Dbattery_service.h98 void CalculateRemainingChargeTime(int32_t capacity, BatteryChargeState chargeState);
99 void HandlePopupEvent(int32_t capacity);
100 void HandleCapacity(int32_t capacity, BatteryChargeState chargeState);
Dbattery_light.h31 bool UpdateColor(BatteryChargeState chargeState, int32_t capacity);
/base/security/device_security_level/baselib/utils/include/
Dutils_work_queue.h40 WorkQueue *CreateWorkQueue(uint32_t capacity, const char *name);
/base/powermgr/battery_manager/test/systemtest/src/
Dbattery_sttest.cpp83 auto capacity = BatterySrvClient.GetCapacity(); variable
84 BATTERY_HILOGD(LABEL_TEST, "BatteryST001::capacity=%{public}d.", capacity);
85 GTEST_LOG_(INFO) << "BatteryST001 executing, capacity=" << capacity;
86 ASSERT_TRUE(capacity == 44);
91 auto capacity = BatterySrvClient.GetCapacity(); variable
92 BATTERY_HILOGD(LABEL_TEST, "BatteryST001::capacity=%{public}d", capacity);
93 GTEST_LOG_(INFO) << "BatteryST001 executing, capacity=" << capacity;
94 ASSERT_TRUE(capacity <= 100 && capacity >= 0);
/base/security/selinux/sepolicy/ohos_policy/powermgr/battery_manager/system/
Dsh.te31 #avc: denied { write } for pid=3040 comm="test_batterycli" name="capacity" dev="mmcblk0p11" ino=…
32 …pid=3040 comm="test_batterycli" path="/data/service/el0/battery/battery/capacity" dev="mmcblk0p11"…
34 …pid=2063 comm="test_batterycli" path="/data/service/el0/battery/battery/capacity" dev="mmcblk0p11"…
37 …pid=3040 comm="test_batterycli" path="/data/service/el0/battery/battery/capacity" dev="mmcblk0p11"…
/base/hiviewdfx/hiview/base/include/
Devent_priority_queue.h40 if ((this->c.capacity() / this->c.size()) > 10) { // 10 times, begin to shrink in ShrinkIfNeedLocked()
/base/update/updater/services/
Dupdater_main.cpp235 bool GetBatteryCapacity(int &capacity) in GetBatteryCapacity() argument
253 capacity = tmpCapacity; in GetBatteryCapacity()
265 int capacity = 0; in IsBatteryCapacitySufficient() local
266 bool ret = GetBatteryCapacity(capacity); in IsBatteryCapacitySufficient()
283 LOG(INFO) << "current capacity:" << capacity << ", low level:" << lowLevel; in IsBatteryCapacitySufficient()
285 return capacity > lowLevel; in IsBatteryCapacitySufficient()
/base/powermgr/battery_manager/interfaces/innerkits/native/include/
Dbattery_info.h200 void SetCapacity(const int32_t capacity) in SetCapacity() argument
202 capacity_ = capacity; in SetCapacity()
/base/security/appverify/interfaces/innerkits/appverify/include/common/
Dhap_byte_buffer.h76 int capacity; variable
/base/update/updater/services/log/
Dlog.cpp139 …int size = vsnprintf_s(reinterpret_cast<char*>(buff.data()), buff.capacity(), buff.capacity(), for… in Logger()
/base/powermgr/battery_manager/services/zidl/src/
Dbattery_srv_proxy.cpp46 int32_t capacity = INVALID_BATT_INT_VALUE; in GetCapacity() local
47 READ_PARCEL_WITH_RET(reply, Int32, capacity, INVALID_BATT_INT_VALUE); in GetCapacity()
48 return capacity; in GetCapacity()

12