Home
last modified time | relevance | path

Searched refs:remoteWatcher (Results 1 – 4 of 4) sorted by relevance

/base/startup/init/services/param/watcher/proxy/
Dwatcher_manager.cpp58 RemoteWatcher *remoteWatcher = new RemoteWatcher(remoteWatcherId, watcher); in AddRemoteWatcher() local
59 WATCHER_CHECK(remoteWatcher != nullptr, return 0, "Failed to create watcher for %u", id); in AddRemoteWatcher()
60 remoteWatcher->SetAgentId(id); in AddRemoteWatcher()
61 AddRemoteWatcher(remoteWatcher); in AddRemoteWatcher()
72 RemoteWatcher *remoteWatcher = GetRemoteWatcher(remoteWatcherId); in DelRemoteWatcher() local
73 … WATCHER_CHECK(remoteWatcher != nullptr, return 0, "Can not find watcher %u", remoteWatcherId); in DelRemoteWatcher()
75 watcher = remoteWatcher->GetWatcher(); in DelRemoteWatcher()
76 DelRemoteWatcher(remoteWatcher); in DelRemoteWatcher()
88 auto remoteWatcher = GetRemoteWatcher(remoteWatcherId); in AddWatcher() local
89 …WATCHER_CHECK(remoteWatcher != nullptr, return -1, "Can not find remote watcher %d", remoteWatcher… in AddWatcher()
[all …]
Dwatcher_manager.h95 int AddRemoteWatcher(RemoteWatcherPtr remoteWatcher);
98 void DelRemoteWatcher(RemoteWatcherPtr remoteWatcher);
105 int AddParamWatcher(WatcherGroupPtr group, RemoteWatcherPtr remoteWatcher);
106 int DelParamWatcher(WatcherGroupPtr group, RemoteWatcherPtr remoteWatcher);
111 void OnRemoteDied(RemoteWatcherPtr remoteWatcher);
/base/startup/init/test/unittest/param/
Dwatcher_agent_unittest.cpp207 … sptr<Watcher> remoteWatcher = new OHOS::init_param::WatcherManagerKits::RemoteWatcher(&instance); in TestWatcherProxy() local
208 ASSERT_NE(remoteWatcher, nullptr); in TestWatcherProxy()
217 remoteWatcher->OnRemoteRequest(IWatcher::PARAM_CHANGE, data, reply, option); in TestWatcherProxy()
223 remoteWatcher->OnRemoteRequest(IWatcher::PARAM_CHANGE, data, reply, option); in TestWatcherProxy()
227 remoteWatcher->OnRemoteRequest(IWatcher::PARAM_CHANGE, data, reply, option); in TestWatcherProxy()
230 remoteWatcher->OnRemoteRequest(IWatcher::PARAM_CHANGE, data, reply, option); in TestWatcherProxy()
236 remoteWatcher->OnRemoteRequest(IWatcher::PARAM_CHANGE + 1, data, reply, option); in TestWatcherProxy()
237 remoteWatcher->OnRemoteRequest(IWatcher::PARAM_CHANGE + 1, data, reply, option); in TestWatcherProxy()
239 uint32_t watcherId = watcherManager->AddRemoteWatcher(1000, remoteWatcher); in TestWatcherProxy()
Dwatcher_proxy_unittest.cpp86 auto remoteWatcher = watcherManager->GetRemoteWatcher(watcherId); in TestAddRemoteWatcher() local
87 if (remoteWatcher != nullptr) { in TestAddRemoteWatcher()
88 EXPECT_EQ(remoteWatcher->GetAgentId(), agentId); in TestAddRemoteWatcher()
220 auto remoteWatcher = watcherManager->GetRemoteWatcher(watcherId); in TestWatchAgentDied() local
221 WATCHER_CHECK(remoteWatcher != nullptr, return -1, "Failed to get remote watcher"); in TestWatchAgentDied()
223 … watcherManager->GetDeathRecipient()->OnRemoteDied(remoteWatcher->GetWatcher()->AsObject()); in TestWatchAgentDied()