/ohos5.0/base/security/security_guard/test/unittest/data_collect/database_manager/ |
H A D | security_guard_database_manager_test.cpp | 153 std::vector<int64_t> eventIds{}; variable 159 ret = DatabaseManager::GetInstance().QueryRecentEventByEventId("", eventIds, events); 166 std::vector<int64_t> eventIds{}; variable 197 std::vector<int64_t> eventIds{}; variable 201 ret = DatabaseManager::GetInstance().QueryEventByEventId("risk_event", eventIds, events); 203 ret = DatabaseManager::GetInstance().QueryEventByEventId("", eventIds, events); 300 std::vector<int64_t> eventIds{0, 1, 2, 3}; variable 301 int ret = DatabaseManager::GetInstance().SubscribeDb(eventIds, nullptr); 303 ret = DatabaseManager::GetInstance().SubscribeDb(eventIds, mockListener); 313 ret = DatabaseManager::GetInstance().UnSubscribeDb(eventIds, nullptr); [all …]
|
H A D | database_manager.h | 36 …int QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, std::vector<SecE… 39 …int QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &… 47 int32_t SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener); 48 int32_t UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener);
|
/ohos5.0/base/security/security_guard/test/unittest/mock/database_manager/ |
H A D | database_manager.h | 38 virtual int QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, 41 virtual int QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, 50 …virtual int32_t SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener) … 51 …virtual int32_t UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener… 69 MOCK_METHOD5(QueryEventByEventIdAndDate, int(std::string table, std::vector<int64_t> &eventIds, 72 MOCK_METHOD3(QueryEventByEventId, int(std::string table, std::vector<int64_t> &eventIds, 81 …MOCK_METHOD2(SubscribeDb, int32_t(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> list… 82 …MOCK_METHOD2(UnSubscribeDb, int32_t(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> li…
|
/ohos5.0/base/security/security_guard/services/risk_classify/model_manager/src/ |
H A D | model_manager_impl.cpp | 37 int32_t ModelManagerImpl::SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> l… in SubscribeDb() argument 39 return DatabaseManager::GetInstance().SubscribeDb(eventIds, listener); in SubscribeDb() 42 int32_t ModelManagerImpl::UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener>… in UnSubscribeDb() argument 44 return DatabaseManager::GetInstance().UnSubscribeDb(eventIds, listener); in UnSubscribeDb()
|
H A D | db_operate.cpp | 47 int DbOperate::QueryEventByEventId(std::vector<int64_t> &eventIds, std::vector<SecEvent> &events) in QueryEventByEventId() argument 49 return DatabaseManager::GetInstance().QueryEventByEventId(table_, eventIds, events); in QueryEventByEventId()
|
/ohos5.0/base/security/security_guard/test/unittest/mock/data_collection/ |
H A D | data_collection.h | 32 …virtual bool StartCollectors(const std::vector<int64_t>& eventIds, std::shared_ptr<ICollectorFwk> … 33 virtual bool StopCollectors(const std::vector<int64_t>& eventIds) = 0; 48 …MOCK_METHOD2(StartCollectors, bool(const std::vector<int64_t>& eventIds, std::shared_ptr<ICollecto… 49 MOCK_METHOD1(StopCollectors, bool(const std::vector<int64_t>& eventIds));
|
/ohos5.0/base/security/security_guard/services/data_collect/store/src/ |
H A D | database_manager.cpp | 100 int DatabaseManager::QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, in QueryEventByEventIdAndDate() argument 104 …return RiskEventRdbHelper::GetInstance().QueryEventByEventIdAndDate(eventIds, events, beginTime, e… in QueryEventByEventIdAndDate() 118 int DatabaseManager::QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, in QueryEventByEventId() argument 122 return RiskEventRdbHelper::GetInstance().QueryEventByEventId(eventIds, events); in QueryEventByEventId() 186 int32_t DatabaseManager::SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> li… in SubscribeDb() argument 193 for (int64_t eventId : eventIds) { in SubscribeDb() 200 int32_t DatabaseManager::UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> … in UnSubscribeDb() argument 206 for (int64_t eventId : eventIds) { in UnSubscribeDb()
|
H A D | database_helper.cpp | 86 int DatabaseHelper::QueryRecentEventByEventId(const std::vector<int64_t> &eventIds, std::vector<Sec… in QueryRecentEventByEventId() argument 88 int size = static_cast<int>(eventIds.size()); in QueryRecentEventByEventId() 93 SGLOGI("eventId=%{public}" PRId64 "", eventIds[i]); in QueryRecentEventByEventId() 95 predicates.EqualTo(EVENT_ID, std::to_string(eventIds[i])); in QueryRecentEventByEventId() 113 int DatabaseHelper::QueryEventByEventId(std::vector<int64_t> &eventIds, std::vector<SecEvent> &even… in QueryEventByEventId() argument 115 int size = static_cast<int>(eventIds.size()); in QueryEventByEventId() 124 predicates.EqualTo(EVENT_ID, std::to_string(eventIds[i])); in QueryEventByEventId() 129 int DatabaseHelper::QueryEventByEventIdAndDate(std::vector<int64_t> &eventIds, std::vector<SecEvent… in QueryEventByEventIdAndDate() argument 132 int size = static_cast<int>(eventIds.size()); in QueryEventByEventIdAndDate() 142 predicates.EqualTo(EVENT_ID, std::to_string(eventIds[i])); in QueryEventByEventIdAndDate()
|
/ohos5.0/base/security/security_guard/services/security_collector/src/ |
H A D | data_collection.cpp | 34 bool DataCollection::StartCollectors(const std::vector<int64_t>& eventIds, std::shared_ptr<ICollect… in StartCollectors() argument 37 if (eventIds.empty() || !api) { in StartCollectors() 42 for (int64_t eventId : eventIds) { in StartCollectors() 67 bool DataCollection::SecurityGuardSubscribeCollector(const std::vector<int64_t>& eventIds) in SecurityGuardSubscribeCollector() argument 71 for (int64_t eventId : eventIds) { in SecurityGuardSubscribeCollector() 101 bool DataCollection::StopCollectors(const std::vector<int64_t>& eventIds) in StopCollectors() argument 104 if (eventIds.empty()) { in StopCollectors() 110 for (int64_t eventId : eventIds) { in StopCollectors()
|
H A D | security_collector_subscriber_manager.cpp | 86 std::set<int64_t> eventIds; in FindEventIds() local 94 eventIds.emplace(element.first); in FindEventIds() 97 return eventIds; in FindEventIds() 160 std::set<int64_t> eventIds = FindEventIds(remote); in UnsubscribeCollector() local 161 for (int64_t eventId : eventIds) { in UnsubscribeCollector()
|
H A D | collector_cfg_marshalling.cpp | 25 std::vector<std::string> eventIds; in to_json() local 26 std::transform(moduleCfg.eventId.begin(), moduleCfg.eventId.end(), std::back_inserter(eventIds), in to_json() 30 { EVENT_ID, eventIds }, in to_json()
|
/ohos5.0/base/security/security_guard/services/data_collect/store/include/ |
H A D | database_manager.h | 35 …int QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, std::vector<SecE… 38 …int QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &… 46 int32_t SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener); 47 int32_t UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener);
|
H A D | database_helper.h | 34 virtual int QueryEventByEventId(std::vector<int64_t> &eventIds, std::vector<SecEvent> &events); 35 …virtual int QueryEventByEventIdAndDate(std::vector<int64_t> &eventIds, std::vector<SecEvent> &even…
|
/ohos5.0/base/security/security_guard/test/unittest/data_collect/src/ |
H A D | security_guard_data_collect_test.cpp | 187 std::vector<int64_t> eventIds; variable 189 ret = helper.QueryRecentEventByEventId(eventIds, events); 191 eventIds.emplace_back(0); 229 std::vector<int64_t> eventIds; variable 231 ret = helper.QueryEventByEventId(eventIds, events); 233 eventIds.emplace_back(0); 234 ret = helper.QueryEventByEventId(eventIds, events); 269 std::vector<int64_t> eventIds; variable 274 eventIds.emplace_back(0); 310 std::vector<int64_t> eventIds; variable [all …]
|
/ohos5.0/base/security/security_guard/test/unittest/data_collect/include/ |
H A D | database_manager.h | 37 …int QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, std::vector<SecE… 40 …int QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &… 48 int32_t SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener); 49 int32_t UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener);
|
H A D | database_helper.h | 34 virtual int QueryEventByEventId(std::vector<int64_t> &eventIds, std::vector<SecEvent> &events); 35 …virtual int QueryEventByEventIdAndDate(std::vector<int64_t> &eventIds, std::vector<SecEvent> &even…
|
/ohos5.0/base/security/security_guard/services/security_collector/include/ |
H A D | data_collection.h | 37 bool StartCollectors(const std::vector<int64_t>& eventIds, std::shared_ptr<ICollectorFwk> api); 38 bool StopCollectors(const std::vector<int64_t>& eventIds); 42 bool SecurityGuardSubscribeCollector(const std::vector<int64_t>& eventIds);
|
/ohos5.0/base/security/security_guard/test/unittest/mock/data_collect/ |
H A D | risk_event_rdb_helper.h | 35 …virtual int QueryEventByEventId(std::vector<int64_t> &eventIds, std::vector<SecEvent> &events) = 0; 36 …virtual int QueryEventByEventIdAndDate(std::vector<int64_t> &eventIds, std::vector<SecEvent> &even… 62 …MOCK_METHOD2(QueryEventByEventId, int(std::vector<int64_t> &eventIds, std::vector<SecEvent> &event… 63 …MOCK_METHOD4(QueryEventByEventIdAndDate, int(std::vector<int64_t> &eventIds, std::vector<SecEvent>…
|
/ohos5.0/base/security/security_guard/services/risk_classify/model_manager/include/ |
H A D | i_model_manager.h | 33 …virtual int32_t SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener) … 34 …virtual int32_t UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener…
|
H A D | model_manager_impl.h | 32 …int32_t SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener) override; 33 …int32_t UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener) overri…
|
H A D | i_db_operate.h | 32 …virtual int QueryEventByEventId(std::vector<int64_t> &eventIds, std::vector<SecEvent> &events) = 0;
|
/ohos5.0/base/security/security_guard/test/unittest/risk_classify/include/ |
H A D | i_model_manager.h | 33 …virtual int32_t SubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener) … 34 …virtual int32_t UnSubscribeDb(std::vector<int64_t> eventIds, std::shared_ptr<IDbListener> listener…
|
H A D | i_db_operate.h | 32 …virtual int QueryEventByEventId(std::vector<int64_t> &eventIds, std::vector<SecEvent> &events) = 0;
|
/ohos5.0/base/security/security_guard/services/config_manager/src/ |
H A D | config_data_manager.cpp | 40 void ConfigDataManager::InsertModelToEventMap(uint32_t modelId, std::set<int64_t> eventIds) in InsertModelToEventMap() argument 43 modelToEventMap_[modelId] = eventIds; in InsertModelToEventMap()
|
/ohos5.0/base/security/security_guard/services/data_collect/sa/ |
H A D | data_collect_manager_service.cpp | 96 std::vector<int64_t> eventIds = ConfigDataManager::GetInstance().GetAllEventIds(); in OnStart() local 98 for (int64_t eventId : eventIds) { in OnStart() 348 std::vector<int64_t> eventIds{ruler.GetEventId()}; in QueryEventByRuler() local 363 … (void) DatabaseManager::GetInstance().QueryEventByEventIdAndDate(RISK_TABLE, eventIds, events, in QueryEventByRuler()
|