Home
last modified time | relevance | path

Searched refs:rules (Results 1 – 25 of 58) sorted by relevance

123

/base/global/i18n_lite/frameworks/i18n/src/
Dplural_rules.cpp20 PluralRules::PluralRules(std::string *rules, const int rulesLength, const int *ruleSize, const int … in PluralRules() argument
22 if ((rules != nullptr) && (ruleSize != nullptr) && in PluralRules()
24 mZeroRule = rules[PluralRuleType::ZERO]; in PluralRules()
26 mOneRule = rules[PluralRuleType::ONE]; in PluralRules()
28 mTwoRule = rules[PluralRuleType::TWO]; in PluralRules()
30 mFewRule = rules[PluralRuleType::FEW]; in PluralRules()
32 mManyRule = rules[PluralRuleType::MANY]; in PluralRules()
34 mOtherRule = rules[PluralRuleType::OTHER]; in PluralRules()
Dplural_format_impl.cpp59 std::string rules[RULES_NUM]; in InitPluralRules() local
60 Split(unprocessedPluralData, rules, RULES_NUM, PLURAL_SEP); in InitPluralRules()
61 int zeroRuleSize = static_cast<int>(rules[PluralRuleType::ZERO].size()); in InitPluralRules()
62 int oneRuleSize = static_cast<int>(rules[PluralRuleType::ONE].size()); in InitPluralRules()
63 int twoRuleSize = static_cast<int>(rules[PluralRuleType::TWO].size()); in InitPluralRules()
64 int fewRuleSize = static_cast<int>(rules[PluralRuleType::FEW].size()); in InitPluralRules()
65 int manyRuleSize = static_cast<int>(rules[PluralRuleType::MANY].size()); in InitPluralRules()
66 int otherRuleSize = static_cast<int>(rules[PluralRuleType::OTHER].size()); in InitPluralRules()
68 return new PluralRules(rules, RULES_NUM, ruleSizes, RULES_NUM); in InitPluralRules()
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent_manager/
Dhisysevent_manager_c.cpp32 int HiSysEventQuery(const HiSysEventQueryArg& arg, HiSysEventQueryRule rules[], size_t ruleSize, in HiSysEventQuery() argument
37 if (strlen(rules[i].domain) == 0 || rules[i].eventListSize == 0) { in HiSysEventQuery()
41 for (size_t j = 0; j < rules[i].eventListSize; ++j) { in HiSysEventQuery()
42 eventList.emplace_back(rules[i].eventList[j]); in HiSysEventQuery()
44 std::string cond = rules[i].condition == nullptr ? "" : rules[i].condition; in HiSysEventQuery()
45 queryRules.emplace_back(rules[i].domain, eventList, WHOLE_WORD, 0, cond); in HiSysEventQuery()
57 int OH_HiSysEvent_Query(const HiSysEventQueryArg& arg, HiSysEventQueryRule rules[], size_t ruleSize, in OH_HiSysEvent_Query() argument
60 return HiSysEventQuery(arg, rules, ruleSize, callback); in OH_HiSysEvent_Query()
Dhisysevent_base_manager.cpp29 std::vector<ListenerRule>& rules) in AddListener() argument
38 return listener->listenerProxy->AddListener(listener, rules); in AddListener()
53 int32_t HiSysEventBaseManager::Query(struct QueryArg& arg, std::vector<QueryRule>& rules, in Query() argument
58 return proxy->Query(arg, rules, callback); in Query()
Dhisysevent_manager.cpp32 std::vector<ListenerRule>& rules) in AddListener() argument
43 return HiSysEventBaseManager::AddListener(baseListener, rules); in AddListener()
65 int32_t HiSysEventManager::Query(struct QueryArg& arg, std::vector<QueryRule>& rules, in Query() argument
69 return HiSysEventBaseManager::Query(arg, rules, baseQueryCallback); in Query()
/base/hiviewdfx/hisysevent/adapter/native/idl/include/
Dparcelable_vector_rw.h32 bool ReadVectorFromParcel(Parcel& parcel, std::vector<T>& rules) in ReadVectorFromParcel() argument
43 rules.clear(); in ReadVectorFromParcel()
49 rules.emplace_back(*rulePtr); in ReadVectorFromParcel()
58 bool WriteVectorToParcel(Parcel& parcel, const std::vector<T>& rules) in WriteVectorToParcel() argument
60 if (rules.size() == 0) { in WriteVectorToParcel()
68 size_t size = rules.size(); in WriteVectorToParcel()
73 if (!parcel.WriteParcelable(&rules[i])) { in WriteVectorToParcel()
Dhisysevent_delegate.h45 const std::vector<ListenerRule>& rules);
47 int32_t Query(const struct QueryArg& arg, const std::vector<QueryRule>& rules,
53 void ConvertListenerRule(const std::vector<ListenerRule>& rules,
55 void ConvertQueryRule(const std::vector<QueryRule>& rules,
Disys_event_service.h32 virtual int32_t AddListener(const std::vector<SysEventRule>& rules,
35 …tual int32_t Query(const QueryArgument& queryArgument, const std::vector<SysEventQueryRule>& rules,
Dsys_event_service_proxy.h32 …int32_t AddListener(const std::vector<SysEventRule>& rules, const sptr<ISysEventCallback>& callbac…
34 int32_t Query(const QueryArgument& queryArgument, const std::vector<SysEventQueryRule>& rules,
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/include/
Dparcelable_vector_rw.h32 bool ReadVectorFromParcel(Parcel& parcel, std::vector<T>& rules) in ReadVectorFromParcel() argument
43 rules.clear(); in ReadVectorFromParcel()
49 rules.emplace_back(*rulePtr); in ReadVectorFromParcel()
58 bool WriteVectorToParcel(Parcel& parcel, const std::vector<T>& rules) in WriteVectorToParcel() argument
60 if (rules.size() == 0) { in WriteVectorToParcel()
68 size_t size = rules.size(); in WriteVectorToParcel()
73 if (!parcel.WriteParcelable(&rules[i])) { in WriteVectorToParcel()
Drunning_status_log_util.h28 static void LogTooManyWatchRules(const std::vector<SysEventRule>& rules);
30 static void LogTooManyQueryRules(const std::vector<SysEventQueryRule>& rules);
Disys_event_service.h32 virtual int32_t AddListener(const std::vector<SysEventRule>& rules,
35 …tual int32_t Query(const QueryArgument& queryArgument, const std::vector<SysEventQueryRule>& rules,
Dsys_event_service_proxy.h32 …int32_t AddListener(const std::vector<SysEventRule>& rules, const sptr<ISysEventCallback>& callbac…
34 int32_t Query(const QueryArgument& queryArgument, const std::vector<SysEventQueryRule>& rules,
/base/hiviewdfx/hisysevent/adapter/native/idl/src/
Dhisysevent_delegate.cpp36 const std::vector<ListenerRule>& rules) in AddListener() argument
44 ConvertListenerRule(rules, eventRules); in AddListener()
85 const std::vector<QueryRule>& rules, in Query() argument
95 ConvertQueryRule(rules, hospRules); in Query()
110 void HiSysEventDelegate::ConvertListenerRule(const std::vector<ListenerRule>& rules, in ConvertListenerRule() argument
113 for_each(rules.cbegin(), rules.cend(), [&sysRules](const ListenerRule& rule) { in ConvertListenerRule()
122 void HiSysEventDelegate::ConvertQueryRule(const std::vector<QueryRule>& rules, in ConvertQueryRule() argument
125 for_each(rules.cbegin(), rules.cend(), [&sysRules](const QueryRule &rule) { in ConvertQueryRule()
Dsys_event_service_proxy.cpp27 int32_t SysEventServiceProxy::AddListener(const std::vector<SysEventRule>& rules, in AddListener() argument
40 bool ret = WriteVectorToParcel(data, rules); in AddListener()
105 …erviceProxy::Query(const QueryArgument& queryArgument, const std::vector<SysEventQueryRule>& rules, in Query() argument
122 bool ret = WriteVectorToParcel(data, rules); in Query()
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/src/
Drunning_status_log_util.cpp27 void RunningStatusLogUtil::LogTooManyQueryRules(const std::vector<SysEventQueryRule>& rules) in LogTooManyQueryRules() argument
30 info.append(std::to_string(rules.size())).append(LOG_DETAIL_CONCAT); in LogTooManyQueryRules()
32 for (auto& rule : rules) { in LogTooManyQueryRules()
51 void RunningStatusLogUtil::LogTooManyWatchRules(const std::vector<SysEventRule>& rules) in LogTooManyWatchRules() argument
54 info.append(std::to_string(rules.size())).append(LOG_DETAIL_CONCAT); in LogTooManyWatchRules()
56 for (auto& rule : rules) { in LogTooManyWatchRules()
Dsys_event_service_ohos.cpp85 bool MatchRules(const SysEventRuleGroupOhos& rules, const string& domain, const string& eventName, in MatchRules() argument
88 return any_of(rules.begin(), rules.end(), [domain, eventName, tag, eventType] (auto& rule) { in MatchRules()
102 int32_t CheckEventListenerAddingValidity(const std::vector<SysEventRule>& rules, RegisteredListener… in CheckEventListenerAddingValidity() argument
105 if (rules.size() > watchRuleCntLimit) { in CheckEventListenerAddingValidity()
106 OHOS::HiviewDFX::RunningStatusLogUtil::LogTooManyWatchRules(rules); in CheckEventListenerAddingValidity()
117 int32_t CheckEventQueryingValidity(const SysEventQueryRuleGroupOhos& rules) in CheckEventQueryingValidity() argument
120 if (rules.size() > queryRuleCntLimit) { in CheckEventQueryingValidity()
121 OHOS::HiviewDFX::RunningStatusLogUtil::LogTooManyQueryRules(rules); in CheckEventQueryingValidity()
248 int32_t SysEventServiceOhos::AddListener(const std::vector<SysEventRule>& rules, in AddListener() argument
254 auto checkRet = CheckEventListenerAddingValidity(rules, registeredListeners_); in AddListener()
[all …]
Dsys_event_service_proxy.cpp27 int32_t SysEventServiceProxy::AddListener(const std::vector<SysEventRule>& rules, in AddListener() argument
40 bool ret = WriteVectorToParcel(data, rules); in AddListener()
105 …erviceProxy::Query(const QueryArgument& queryArgument, const std::vector<SysEventQueryRule>& rules, in Query() argument
122 bool ret = WriteVectorToParcel(data, rules); in Query()
/base/hiviewdfx/hisysevent/test/moduletest/common/
Dhisysevent_manager_c_test.cpp128 HiSysEventQueryRule rules[] = { rule }; in QueryTestWithCondition() local
133 … auto res = OH_HiSysEvent_Query(arg, rules, sizeof(rules) / sizeof(HiSysEventQueryRule), callback); in QueryTestWithCondition()
353 HiSysEventQueryRule rules[] = { rule }; variable
358 … auto res = OH_HiSysEvent_Query(arg, rules, sizeof(rules) / sizeof(HiSysEventQueryRule), callback);
513 HiSysEventQueryRule rules[] = { rule1, rule2 }; variable
518 … auto res = OH_HiSysEvent_Query(arg, rules, sizeof(rules) / sizeof(HiSysEventQueryRule), callback);
586 HiSysEventQueryRule rules[] = { rule1, rule2 }; variable
591 … auto res = OH_HiSysEvent_Query(arg, rules, sizeof(rules) / sizeof(HiSysEventQueryRule), callback);
667 HiSysEventQueryRule rules[] = { rule }; variable
670 … auto res = OH_HiSysEvent_Query(arg, rules, sizeof(rules) / sizeof(HiSysEventQueryRule), callback);
[all …]
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent_manager/include/
Dhisysevent_base_manager.h35 std::vector<ListenerRule>& rules);
37 static int32_t Query(struct QueryArg& arg, std::vector<QueryRule>& rules,
Dhisysevent_manager.h37 std::vector<ListenerRule>& rules);
39 static int32_t Query(struct QueryArg& arg, std::vector<QueryRule>& rules,
/base/hiviewdfx/hichecker/interfaces/native/innerkits/include/
Dhichecker.h41 CautionDetail(const Caution& caution, uint64_t rules) : caution_(caution), rules_(rules) {} in CautionDetail() argument
73 static bool HasCautionRule(uint64_t rules);
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/test/unittest/common/
Dsys_event_service_ohos_test.cpp116 …int32_t AddListener(const std::vector<SysEventRule>& rules, const sptr<ISysEventCallback>& callbac… in AddListener() argument
126 int32_t Query(const QueryArgument& queryArgument, const std::vector<SysEventQueryRule>& rules, in Query() argument
178 vector<SysEventRule> rules; in GetTestRules() local
179 rules.push_back(GetTestRule(type, domain, eventName)); in GetTestRules()
180 return rules; in GetTestRules()
192 vector<SysEventRule> rules = GetTestRules(1, "", ""); variable
197 auto ret = service->AddListener(rules, callbackDefault);
215 vector<SysEventRule> rules = GetTestRules(1, "", ""); variable
222 auto ret = service->AddListener(rules, nullptr);
224 ret = service->AddListener(rules, callbackDefault);
[all …]
/base/hiviewdfx/hisysevent/interfaces/js/kits/napi/src/
Dnapi_hisysevent_js.cpp114 std::vector<ListenerRule> rules; in AddWatcher() local
117 if (auto ret = NapiHiSysEventUtil::ParseListenerRules(env, jsRulesVal, rules); in AddWatcher()
127 auto ret = HiSysEventBaseManager::AddListener(listener, rules); in AddWatcher()
188 std::vector<QueryRule> rules; in Query() local
189 … (auto ret = NapiHiSysEventUtil::ParseQueryRules(env, params[QUERY_RULE_ARRAY_PARAM_INDEX], rules); in Query()
207 auto ret = HiSysEventBaseManager::Query(queryArg, rules, querier); in Query()
/base/hiviewdfx/hichecker/
DREADME.md26 - Addition and removal of check rules
27 - Addition and removal of caution rules for logs (default) and app crashes
58 | | addRule(BigInt rule) : void | Adds one or more rules. |
59 | | removeRule(BigInt rule) : void | Removes one or more rules. …
60 | | getRule() : BigInt | Obtains all rules. |

123