diff --git a/BlueBerry/Bundles/org.blueberry.osgi/src/berryBundleLoader.h b/BlueBerry/Bundles/org.blueberry.osgi/src/berryBundleLoader.h index 5960af7996..e0784c0c24 100644 --- a/BlueBerry/Bundles/org.blueberry.osgi/src/berryBundleLoader.h +++ b/BlueBerry/Bundles/org.blueberry.osgi/src/berryBundleLoader.h @@ -1,138 +1,138 @@ /*========================================================================= Program: BlueBerry Platform Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef BERRYBUNDLELOADER_H_ #define BERRYBUNDLELOADER_H_ #include "Poco/ClassLoader.h" #include "Poco/Mutex.h" #include "Poco/Path.h" #include "Poco/Any.h" #include "Poco/SharedPtr.h" #include "Poco/Logger.h" #include #include #include #include "event/berryBundleEvents.h" #include "berryIBundleActivator.h" #include "internal/berryBundle.h" #include "internal/berrySystemBundle.h" namespace berry { class CodeCache; struct IBundleContext; /** * Intentionally no BERRY_OSGI macro. This class belongs into "internal" but * needs to stay here. */ class BERRY_OSGI BundleLoader { private: typedef Poco::ClassLoader ActivatorClassLoader; typedef Poco::SharedPtr ActivatorClassLoaderPtr; struct BundleInfo { Bundle::Pointer m_Bundle; ActivatorClassLoaderPtr m_ClassLoader; std::map m_ClassLoaderMap; SmartPointer m_Context; }; typedef std::map BundleMap; BundleMap m_BundleMap; BundleEvents m_BundleEvents; CodeCache* m_CodeCache; - mutable Poco::Logger& m_Logger; + Poco::Logger& m_Logger; Bundle::Pointer m_SystemBundle; mutable Poco::Mutex m_Mutex; bool m_ConsoleLog; QStringList installedCTKPlugins; IBundleActivator* LoadActivator(BundleInfo& bundleInfo); friend class InternalPlatform; friend class BundleContext; void StartSystemBundle(SmartPointer bundle); void ListLibraries(SmartPointer bundle, std::vector& list, const std::string& baseDir); public: BundleLoader(CodeCache* codeCache, Poco::Logger& logger); //, BundleFactory* bundleFactory, BundleContextFactory* bundleContextFactory); virtual ~BundleLoader(); void SetCTKPlugins(const QStringList& installedCTKPlugins); SmartPointer GetContextForBundle(IBundle::ConstPointer bundle); Bundle::Pointer CreateBundle(const Poco::Path& path); BundleEvents& GetEvents(); IBundle::Pointer FindBundle(const std::string& symbolicName); std::vector GetBundles() const; Bundle::Pointer LoadBundle(const Poco::Path& path); void LoadBundle(Bundle::Pointer bundle); Poco::Path GetPathForLibrary(const std::string& libraryName); Poco::Path GetLibraryPathFor(SmartPointer bundle); std::string GetContributionsPathFor(SmartPointer bundle); Poco::Logger& GetLogger() const; void ResolveBundle(SmartPointer bundle); void ResolveAllBundles(); void ReadAllContributions(); void ReadContributions(SmartPointer bundle); void ReadDependentContributions(SmartPointer bundle); void ListLibraries(SmartPointer bundle, std::vector& list); void InstallLibraries(SmartPointer bundle, bool copy = false); // start all resolved bundles, except the system bundle // (it is assumed, that the system bundle has already // been started) void StartAllBundles(); void StartBundle(SmartPointer bundle); void StartDependencies(SmartPointer bundle); template C* LoadClass(const std::string& bundleName, const std::string& className); template C* LoadClass(const std::string& bundleName, const std::string& className, const std::string& manifestName); }; } // namespace berry #include "berryBundleLoader.txx" #endif /*BERRYBUNDLELOADER_H_*/