diff options
author | Andrey Oleynik <aoleynik@luxoft.com> | 2017-01-03 16:55:16 +0200 |
---|---|---|
committer | Andrey Oleynik <aoleynik@luxoft.com> | 2017-01-03 16:59:40 +0200 |
commit | f20f0856747aac5c144430d8560667b4521f5be6 (patch) | |
tree | b7d7d57e7818d7d7648081e8365ca88f00b3bc89 /src/components/application_manager/src/request_info.cc | |
parent | ee9315b11dd2952f9de6c2e3ff038de815ed98c3 (diff) | |
download | sdl_core-f20f0856747aac5c144430d8560667b4521f5be6.tar.gz |
Removes unused code from RequestInfo class
Relates-to: APPLINK-25591
Diffstat (limited to 'src/components/application_manager/src/request_info.cc')
-rw-r--r-- | src/components/application_manager/src/request_info.cc | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/components/application_manager/src/request_info.cc b/src/components/application_manager/src/request_info.cc index 80b18a53c6..9a5828d939 100644 --- a/src/components/application_manager/src/request_info.cc +++ b/src/components/application_manager/src/request_info.cc @@ -268,66 +268,6 @@ void RequestInfoSet::CheckSetSizes() { DCHECK(set_sizes_equal); } -bool RequestInfoSet::CheckTimeScaleMaxRequest( - uint32_t app_id, - uint32_t app_time_scale, - uint32_t max_request_per_time_scale) { - LOG4CXX_AUTO_TRACE(logger_); - if (max_request_per_time_scale > 0 && app_time_scale > 0) { - TimevalStruct end = date_time::DateTime::getCurrentTime(); - TimevalStruct start = {0, 0}; - start.tv_sec = end.tv_sec - app_time_scale; - - sync_primitives::AutoLock lock(this_lock_); - TimeScale scale(start, end, app_id); - const uint32_t count = std::count_if(time_sorted_pending_requests_.begin(), - time_sorted_pending_requests_.end(), - scale); - if (count >= max_request_per_time_scale) { - LOG4CXX_WARN(logger_, - "Processing requests count " << count - << " exceed application limit " - << max_request_per_time_scale); - return false; - } - LOG4CXX_DEBUG(logger_, "Requests count " << count); - } else { - LOG4CXX_DEBUG(logger_, "CheckTimeScaleMaxRequest disabled"); - } - return true; -} - -bool RequestInfoSet::CheckHMILevelTimeScaleMaxRequest( - mobile_apis::HMILevel::eType hmi_level, - uint32_t app_id, - uint32_t app_time_scale, - uint32_t max_request_per_time_scale) { - LOG4CXX_AUTO_TRACE(logger_); - if (max_request_per_time_scale > 0 && app_time_scale > 0) { - TimevalStruct end = date_time::DateTime::getCurrentTime(); - TimevalStruct start = {0, 0}; - start.tv_sec = end.tv_sec - app_time_scale; - - sync_primitives::AutoLock lock(this_lock_); - HMILevelTimeScale scale(start, end, app_id, hmi_level); - const uint32_t count = std::count_if(time_sorted_pending_requests_.begin(), - time_sorted_pending_requests_.end(), - scale); - if (count >= max_request_per_time_scale) { - LOG4CXX_WARN(logger_, - "Processing requests count " - << count << " exceed application limit " - << max_request_per_time_scale << " in hmi level " - << hmi_level); - return false; - } - LOG4CXX_DEBUG(logger_, "Requests count " << count); - } else { - LOG4CXX_DEBUG(logger_, "CheckHMILevelTimeScaleMaxRequest disabled"); - } - return true; -} - bool RequestInfoSet::AppIdCompararator::operator()( const RequestInfoPtr value_compare) const { switch (compare_type_) { |