MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / GetUpdatedState

Method GetUpdatedState

framework/src/bundle/BundlePrivate.cpp:198–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196 }
197
198 Bundle::State
199 BundlePrivate::GetUpdatedState()
200 {
201 if (state == Bundle::STATE_INSTALLED)
202 {
203 try
204 {
205 if (state == Bundle::STATE_INSTALLED)
206 {
207 state = Bundle::STATE_RESOLVED;
208 operation = OP_RESOLVING;
209 coreCtx->listeners.BundleChanged(
210 { BundleEvent::BUNDLE_RESOLVED, MakeBundle(this->shared_from_this()) });
211 operation = OP_IDLE;
212 }
213 }
214 catch (...)
215 {
216 resolveFailException = std::current_exception();
217 coreCtx->listeners.SendFrameworkEvent(FrameworkEvent(FrameworkEvent::Type::FRAMEWORK_ERROR,
218 MakeBundle(this->shared_from_this()),
219 std::string(),
220 std::current_exception()));
221 }
222 }
223 return static_cast<Bundle::State>(state.load());
224 }
225
226 void
227 BundlePrivate::SetStateInstalled(bool sendEvent)

Callers

nothing calls this directly

Calls 5

MakeBundleFunction · 0.85
shared_from_thisMethod · 0.80
SendFrameworkEventMethod · 0.80
FrameworkEventClass · 0.50
BundleChangedMethod · 0.45

Tested by

no test coverage detected