Home
last modified time | relevance | path

Searched refs:plugin (Results 1 – 25 of 98) sorted by relevance

1234

/base/hiviewdfx/hiview/base/test/unittest/common/
Dplugin_test.cpp51 Plugin plugin; variable
52 ASSERT_FALSE(plugin.HasLoaded());
54 plugin.OnLoad();
55 auto event = plugin.GetEvent(Event::SYS_EVENT);
57 ASSERT_TRUE(plugin.OnEvent(event));
61 plugin.Dump(0, {});
63 plugin.OnEventListeningCallback(*(event.get()));
69 plugin.BindWorkLoop(workLoop);
70 ASSERT_NE(plugin.GetWorkLoop(), nullptr);
71 plugin.DelayProcessEvent(pipelineEvent, 1); // 1s delay
[all …]
Dplugin_factory_test.cpp36 auto plugin = PluginFactory::GetGlobalPluginInfo("PluginExample"); variable
37 ASSERT_NE(plugin.get(), nullptr);
38 auto examplePlugin = std::static_pointer_cast<PluginExample>(plugin->getPluginObject());
54 auto plugin = PluginFactory::GetGlobalPluginInfo("PluginExample2"); variable
55 ASSERT_EQ(plugin, nullptr);
58 plugin = PluginFactory::GetGlobalPluginInfo("PluginExample2");
59 ASSERT_NE(plugin, nullptr);
60 auto examplePlugin = std::static_pointer_cast<PluginExample>(plugin->getPluginObject());
/base/security/device_auth/services/cred_manager/src/
Dcred_manager.c45 CredPlugin *plugin = GetAccountRelatedCredPlugin(); in InitCredMgr() local
46 if (plugin != NULL) { in InitCredMgr()
47 int32_t res = plugin->init(); in InitCredMgr()
49 (void)g_credPluginVec.pushBackT(&g_credPluginVec, plugin); in InitCredMgr()
68 int32_t AddCredPlugin(const CredPlugin *plugin) in AddCredPlugin() argument
70 if (plugin == NULL || plugin->init == NULL || in AddCredPlugin()
71 plugin->destroy == NULL || plugin->procCred == NULL) { in AddCredPlugin()
75 int32_t res = plugin->init(); in AddCredPlugin()
84 if ((*pluginPtr)->pluginName == plugin->pluginName) { in AddCredPlugin()
89 if (g_credPluginVec.pushBack(&g_credPluginVec, &plugin) == NULL) { in AddCredPlugin()
[all …]
/base/customization/enterprise_device_management/test/unittest/edm_plugin/src/
Diptables_rule_plugin_test.cpp61 std::shared_ptr<IptablesRulePlugin> plugin = std::make_shared<IptablesRulePlugin>(); in ResetIptablesRule() local
63plugin->OnHandlePolicy(removeFuncCode, removeData, removeReply, policyRemoveData, isChanged, DEFAU… in ResetIptablesRule()
69plugin->OnHandlePolicy(removeFuncCode, removeOutData, removeReply, policyRemoveData, isChanged, DE… in ResetIptablesRule()
79 std::shared_ptr<IptablesRulePlugin> plugin = std::make_shared<IptablesRulePlugin>(); variable
85 …ErrCode ret = plugin->OnHandlePolicy(funcCode, data, reply, policyData, isChanged, DEFAULT_USER_ID…
96 std::shared_ptr<IptablesRulePlugin> plugin = std::make_shared<IptablesRulePlugin>(); variable
104 …ErrCode ret = plugin->OnHandlePolicy(funcCode, data, reply, policyData, isChanged, DEFAULT_USER_ID…
115 std::shared_ptr<IptablesRulePlugin> plugin = std::make_shared<IptablesRulePlugin>(); variable
123 …ErrCode ret = plugin->OnHandlePolicy(funcCode, data, reply, policyData, isChanged, DEFAULT_USER_ID…
134 std::shared_ptr<IptablesRulePlugin> plugin = std::make_shared<IptablesRulePlugin>(); variable
[all …]
Dbundle_install_plugin_test.cpp56 BundleInstallPlugin plugin; variable
59plugin.SetAppInstallControlRuleType(static_cast<AppExecFwk::AppInstallControlRuleType>(policyType)…
62 ErrCode ret = plugin.OnSetPolicy(data, currentData, DEFAULT_USER_ID);
74 BundleInstallPlugin plugin; variable
77plugin.SetAppInstallControlRuleType(static_cast<AppExecFwk::AppInstallControlRuleType>(policyType)…
80 ErrCode ret = plugin.OnSetPolicy(data, currentData, DEFAULT_USER_ID);
93 BundleInstallPlugin plugin; variable
96plugin.SetAppInstallControlRuleType(static_cast<AppExecFwk::AppInstallControlRuleType>(policyType)…
99 ErrCode ret = plugin.OnSetPolicy(data, currentData, DEFAULT_USER_ID);
136 BundleInstallPlugin plugin; variable
[all …]
Dnetwork_manager_plugin_test.cpp61 std::shared_ptr<IPlugin> plugin = GetAllNetworkInterfacesPlugin::GetPlugin(); variable
65 ErrCode ret = plugin->OnGetPolicy(policyData, data, reply, DEFAULT_USER_ID);
76 std::shared_ptr<IPlugin> plugin = GetIpAddressPlugin::GetPlugin(); variable
80 ErrCode ret = plugin->OnGetPolicy(policyData, data, reply, DEFAULT_USER_ID);
91 std::shared_ptr<IPlugin> plugin = GetMacPlugin::GetPlugin(); variable
95 ErrCode ret = plugin->OnGetPolicy(policyData, data, reply, DEFAULT_USER_ID);
106 std::shared_ptr<IPlugin> plugin = DisabledNetworkInterfacePlugin::GetPlugin(); variable
112 ErrCode ret = plugin->OnGetPolicy(policyData, data, reply, DEFAULT_USER_ID);
123 std::shared_ptr<IPlugin> plugin = DisabledNetworkInterfacePlugin::GetPlugin(); variable
129 ErrCode ret = plugin->OnGetPolicy(policyData, data, reply, DEFAULT_USER_ID);
[all …]
Ddisallowed_running_bundles_plugin_test.cpp52 DisallowedRunningBundlesPlugin plugin; variable
55 ErrCode ret = plugin.OnSetPolicy(data, currentData, DEFAULT_USER_ID);
66 DisallowedRunningBundlesPlugin plugin; variable
69 ErrCode ret = plugin.OnSetPolicy(data, currentData, DEFAULT_USER_ID);
81 DisallowedRunningBundlesPlugin plugin; variable
84 ErrCode ret = plugin.OnSetPolicy(data, currentData, DEFAULT_USER_ID);
96 DisallowedRunningBundlesPlugin plugin; variable
100 ErrCode ret = plugin.OnGetPolicy(policyData, data, reply, DEFAULT_USER_ID);
111 DisallowedRunningBundlesPlugin plugin; variable
114 ErrCode ret = plugin.OnRemovePolicy(data, currentData, DEFAULT_USER_ID);
[all …]
Dglobal_proxy_plugin_test.cpp58 GlobalProxyPlugin plugin; variable
64 ErrCode ret = plugin.OnSetPolicy(httpProxy);
75 GlobalProxyPlugin plugin; variable
81 ErrCode ret = plugin.OnSetPolicy(httpProxy);
92 GlobalProxyPlugin plugin; variable
94 ErrCode ret = plugin.OnSetPolicy(httpProxy);
105 std::shared_ptr<IPlugin> plugin = GlobalProxyPlugin::GetPlugin(); variable
109 ErrCode ret = plugin->OnGetPolicy(policyStr, data, reply, DEFAULT_USER_ID);
Dset_browser_policies_plugin_test.cpp47 SetBrowserPoliciesPlugin plugin; variable
51 ErrCode ret = plugin.OnSetPolicy(policies, currentData, DEFAULT_USER_ID);
62 SetBrowserPoliciesPlugin plugin; variable
67 ErrCode ret = plugin.OnSetPolicy(policies, currentData, DEFAULT_USER_ID);
79 SetBrowserPoliciesPlugin plugin; variable
84 ErrCode ret = plugin.OnSetPolicy(policies, currentData, DEFAULT_USER_ID);
97 SetBrowserPoliciesPlugin plugin; variable
106 plugin.OnGetPolicy(jsonString, data, reply, DEFAULT_USER_ID);
118 SetBrowserPoliciesPlugin plugin; variable
127 plugin.OnGetPolicy(jsonString, data, reply, DEFAULT_USER_ID);
Duser_cert_plugin_test.cpp113 std::shared_ptr<UserCertPlugin> plugin = std::make_shared<UserCertPlugin>(); variable
120 …ErrCode ret = plugin->OnHandlePolicy(funcCode, data, reply, policyData, isChanged, DEFAULT_USER_ID…
131 std::shared_ptr<UserCertPlugin> plugin = std::make_shared<UserCertPlugin>(); variable
143 …ErrCode ret = plugin->OnHandlePolicy(funcCode, data, reply, policyData, isChanged, DEFAULT_USER_ID…
157 std::shared_ptr<UserCertPlugin> plugin = std::make_shared<UserCertPlugin>(); variable
166 …ErrCode ret = plugin->OnHandlePolicy(funcCode, data, reply, policyData, isChanged, DEFAULT_USER_ID…
180 std::shared_ptr<UserCertPlugin> plugin = std::make_shared<UserCertPlugin>(); variable
191 …ErrCode ret = plugin->OnHandlePolicy(funcCode, data, reply, policyData, isChanged, DEFAULT_USER_ID…
202 …ret = plugin->OnHandlePolicy(funcCode, dataUninstall, replyUninstall, policyData, isChanged, DEFAU…
Dget_device_name_plugin_test.cpp55 std::shared_ptr<IPlugin> plugin = GetDeviceNamePlugin::GetPlugin(); variable
60 ErrCode code = plugin->OnGetPolicy(policyValue, data, reply, DEFAULT_USER_ID);
63 code = plugin->OnGetPolicy(policyValue, data, reply, DEFAULT_USER_ID);
66 code = plugin->OnGetPolicy(policyValue, data, reply, DEFAULT_USER_ID);
Dis_wifi_active_plugin_test.cpp54 std::shared_ptr<IPlugin> plugin = IsWifiActivePlugin::GetPlugin(); variable
59 ErrCode ret = plugin->OnGetPolicy(policyData, data, reply, DEFAULT_USER_ID);
71 std::shared_ptr<IPlugin> plugin = IsWifiActivePlugin::GetPlugin(); variable
75 ErrCode ret = plugin->OnGetPolicy(policyData, data, reply, DEFAULT_USER_ID);
Ddisallow_add_local_account_plugin_test.cpp44 DisallowAddLocalAccountPlugin plugin; variable
46 ErrCode ret = plugin.OnSetPolicy(data);
51 ret = plugin.OnAdminRemove(adminName, allowAddLocalAccount, DEFAULT_USER_ID);
/base/customization/enterprise_device_management/test/unittest/src/
Diplugin_template_test.cpp43 … std::shared_ptr<IPlugin> plugin = PluginManager::GetInstance()->GetPluginByFuncCode(funcCode); variable
44 ASSERT_TRUE(plugin != nullptr);
45 ASSERT_TRUE(plugin->GetCode() == policyCode);
59 std::shared_ptr<IPlugin> plugin = PluginManager::GetInstance()->GetPluginByFuncCode(funcCode); variable
60 ASSERT_TRUE(plugin != nullptr);
61 … ASSERT_TRUE(plugin->GetPermission(FuncOperateType::GET) == "ohos.permission.EDM_TEST_PERMISSION");
62 ASSERT_TRUE(plugin->GetPolicyName() == "InitAttributePlg");
63 ASSERT_TRUE(plugin->GetCode() == 20);
78 std::shared_ptr<IPlugin> plugin; variable
84 plugin = PluginManager::GetInstance()->GetPluginByFuncCode(funcCode);
[all …]
Dplugin_manager_test.cpp59 std::shared_ptr<IPlugin> plugin = PluginManager::GetInstance()->GetPluginByFuncCode( variable
61 ASSERT_TRUE(plugin != nullptr);
62 ASSERT_TRUE(plugin->GetPolicyName() == "TestPlugin");
74 …std::shared_ptr<IPlugin> plugin = PluginManager::GetInstance()->GetPluginByPolicyName("TestPlugin"… variable
75 ASSERT_TRUE(plugin != nullptr);
76 ASSERT_TRUE(plugin->GetCode() == 0);
/base/msdp/device_status/rust/ipc/server/src/
Dfusion_ipc_delegator.rs70 let plugin = guard.get_mut().load_plugin(intention); in load_plugin() localVariable
71 match plugin { in load_plugin()
72 Some(plugin) => { in load_plugin()
74 Ok(plugin) in load_plugin()
96 let plugin = self.load_plugin(intention)?; in enable() localVariable
99 plugin.enable(&context, data, reply) in enable()
107 let plugin = self.load_plugin(intention)?; in disable() localVariable
110 plugin.disable(&context, data, reply) in disable()
118 let plugin = self.load_plugin(intention)?; in start() localVariable
121 plugin.start(&context, data, reply) in start()
[all …]
/base/hiviewdfx/hiview/build/
Dgen_plugin_build.py57 for plugin, info in plugin_info.items():
64 target = 'lib%s' % (plugin.lower())
97 for plugin, info in plugin_info.items():
98 items.append('%s[' % (plugin))
115 for plugin in plugin_list:
116 items.append('%s ' % (plugin))
121 for plugin, pipeline_list in pipelinegroup.items():
122 items.append('%s:' % (plugin))
226 for plugin, thread_name in value.items():
227 if plugin not in config_plugins:
[all …]
/base/hiviewdfx/hiview/base/
Dpipeline.cpp54 std::weak_ptr<Plugin> plugin = processors_.front(); in OnContinue() local
56 if (auto pluginPtr = plugin.lock()) { in OnContinue()
59 handler_->PauseDispatch(plugin); in OnContinue()
128 auto& plugin = seq.front(); in FillPipelineInfo() local
129 if (auto pluginPtr = plugin.lock()) { in FillPipelineInfo()
147 std::weak_ptr<Plugin> plugin = processors_.front(); in CanProcessEvent() local
148 if (auto pluginPtr = plugin.lock()) { in CanProcessEvent()
160 void Pipeline::AppendProcessor(std::weak_ptr<Plugin> plugin) in AppendProcessor() argument
162 processors_.push_back(plugin); in AppendProcessor()
165 void Pipeline::RemoveProcessor(std::weak_ptr<Plugin> plugin) in RemoveProcessor() argument
[all …]
/base/security/device_auth/test/unittest/deviceauth/source/
Ddevice_auth_ext_mock.c46 node->plugin = (ExtPlugin *)HcMalloc(sizeof(ExtPlugin), 0); in CreateNode()
47 if (node->plugin == NULL) { in CreateNode()
52 node->plugin->pluginType = plugType; in CreateNode()
53 node->plugin->init = InitPlugin; in CreateNode()
54 node->plugin->destroy = DestroyPlugin; in CreateNode()
77 HcFree(node->plugin); in DestroyList()
78 node->plugin = NULL; in DestroyList()
/base/customization/enterprise_device_management/services/edm/src/
Dplugin_manager.cpp91 bool PluginManager::AddPlugin(std::shared_ptr<IPlugin> plugin) in AddPlugin() argument
94 if (plugin == nullptr) { in AddPlugin()
97 std::string permission = plugin->GetPermission(FuncOperateType::SET); in AddPlugin()
99 plugin->GetPermissionType(FuncOperateType::SET)); in AddPlugin()
100 if (result == ERR_OK && plugin->GetPermission(FuncOperateType::GET) != permission) { in AddPlugin()
101 …result = PermissionManager::GetInstance()->AddPermission(plugin->GetPermission(FuncOperateType::GE… in AddPlugin()
102 plugin->GetPermissionType(FuncOperateType::GET)); in AddPlugin()
105 pluginsCode_.insert(std::make_pair(plugin->GetCode(), plugin)); in AddPlugin()
106 pluginsName_.insert(std::make_pair(plugin->GetPolicyName(), plugin)); in AddPlugin()
/base/hiviewdfx/hiview/core/test/unittest/common/
Dplugin_platform_test.cpp126 std::shared_ptr<Plugin> plugin = nullptr; variable
131 plugin = pos->second;
133 ASSERT_NE(plugin, nullptr);
135 auto event = plugin->GetEvent(Event::MessageType::FAULT_EVENT);
137 bool ret = platform.PostSyncEventToTarget(plugin, "DynamicLoadPluginExample", event);
142 auto unloadEvent = plugin->GetEvent(Event::MessageType::PLUGIN_MAINTENANCE);
144 platform.PostUnorderedEvent(plugin, unloadEvent);
/base/security/device_auth/services/frameworks/src/plugin_adapter/
Dext_part_proxy.c32 if (current->plugin == NULL) { in ParsePlugins()
36 switch (current->plugin->pluginType) { in ParsePlugins()
38 SetAccountLifecyclePlugin(NULL, (AccountLifecyleExtPlug *)(current->plugin)); in ParsePlugins()
41 SetAccountAuthPlugin(NULL, (AccountAuthExtPlug *)(current->plugin)); in ParsePlugins()
44 LOGW("Invalid plugin type %d", current->plugin->pluginType); in ParsePlugins()
/base/hiviewdfx/hiview/plugins/faultlogger/test/common/fuzztest/faultloggerservice_fuzzer/
Dfaultlogger_service_fuzzer.cpp35 auto plugin = std::make_shared<HiviewDFX::Faultlogger>(); in CreateFaultloggerInstance() local
36 plugin->SetName("Faultlogger"); in CreateFaultloggerInstance()
37 plugin->SetHandle(nullptr); in CreateFaultloggerInstance()
38 plugin->SetHiviewContext(platform.get()); in CreateFaultloggerInstance()
39 plugin->OnLoad(); in CreateFaultloggerInstance()
40 return plugin; in CreateFaultloggerInstance()
/base/hiviewdfx/hiview/plugins/freeze_detector/test/unittest/common/
Dfreeze_detector_test.cpp167 std::shared_ptr<Plugin> plugin = platform.GetPluginByName("FreezeDetectorPlugin"); variable
168 if (plugin == nullptr) {
173 std::shared_ptr<PluginProxy> pluginProxy = std::static_pointer_cast<PluginProxy>(plugin);
197 plugin->OnEventListeningCallback(*(event.get()));
215 std::shared_ptr<Plugin> plugin = platform.GetPluginByName("FreezeDetectorPlugin"); variable
216 if (plugin == nullptr) {
245 plugin->OnEventListeningCallback(*(event.get()));
265 std::shared_ptr<Plugin> plugin = platform.GetPluginByName("FreezeDetectorPlugin"); variable
266 if (plugin == nullptr) {
296 plugin->OnEventListeningCallback(*(event.get()));
[all …]
/base/hiviewdfx/hiview/plugins/faultlogger/test/common/unittest/
Dfaultlogger_unittest.cpp64 auto plugin = std::make_shared<Faultlogger>(); in CreateFaultloggerInstance() local
65 plugin->SetName("Faultlogger"); in CreateFaultloggerInstance()
66 plugin->SetHandle(nullptr); in CreateFaultloggerInstance()
67 plugin->SetHiviewContext(platform.get()); in CreateFaultloggerInstance()
68 plugin->OnLoad(); in CreateFaultloggerInstance()
69 return plugin; in CreateFaultloggerInstance()
100 auto plugin = CreateFaultloggerInstance(); variable
108 plugin->Dump(fd, cmds);
110 plugin->Dump(fd, cmds);
112 plugin->Dump(fd, cmds);
[all …]

1234