171
171
return watchingAppStarting_;
174
/** Sets up the signals down to the info watchers and we aggregate
175
them up to users of UAL. We connect to all their signals and
177
void Registry::Impl::infoWatchersSetup()
179
std::call_once(flag_infoWatchersSetup, [this] {
180
g_debug("Info watchers signals setup");
182
/* Grab all the app stores and the ZG info watcher */
183
std::list<std::shared_ptr<info_watcher::Base>> watchers{_appStores.begin(), _appStores.end()};
184
watchers.push_back(getZgWatcher());
186
/* Connect each of their signals to us, and track that connection */
187
for (const auto& watcher : watchers)
189
infoWatchers_.emplace_back(std::make_pair(
191
infoWatcherConnections{
192
watcher->infoChanged().connect(
193
[this](const std::shared_ptr<Application>& app) { sig_appInfoUpdated(app); }),
194
watcher->appAdded().connect([this](const std::shared_ptr<Application>& app) { sig_appAdded(app); }),
195
watcher->appRemoved().connect([this](const AppID& appid) { sig_appRemoved(appid); }),
174
201
core::Signal<const std::shared_ptr<Application>&>& Registry::Impl::appInfoUpdated()
176
std::call_once(flag_appInfoUpdated, [this] {
177
g_debug("App Info Updated Signal Initialized");
179
std::list<std::shared_ptr<info_watcher::Base>> apps{_appStores.begin(), _appStores.end()};
180
apps.push_back(getZgWatcher());
182
for (const auto& app : apps)
184
infoWatchers_.emplace_back(
185
std::make_pair(app, app->infoChanged().connect([this](const std::shared_ptr<Application>& app) {
186
sig_appInfoUpdated(app);
190
204
return sig_appInfoUpdated;
207
core::Signal<const std::shared_ptr<Application>&>& Registry::Impl::appAdded()
213
core::Signal<const AppID&>& Registry::Impl::appRemoved()
216
return sig_appRemoved;
193
219
std::shared_ptr<Application> Registry::Impl::createApp(const AppID& appid)
195
221
for (const auto& appStore : appStores())