ctkConfigurationAdminImpl_p.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*=============================================================================
  2. Library: CTK
  3. Copyright (c) German Cancer Research Center,
  4. Division of Medical and Biological Informatics
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. =============================================================================*/
  15. #ifndef CTKCONFIGURATIONADMINIMPL_P_H
  16. #define CTKCONFIGURATIONADMINIMPL_P_H
  17. #include <service/cm/ctkConfigurationAdmin.h>
  18. #include <ctkPlugin.h>
  19. class ctkConfigurationAdminFactory;
  20. class ctkConfigurationStore;
  21. /**
  22. * ctkConfigurationAdminImpl provides the ConfigurationAdmin service implementation
  23. */
  24. class ctkConfigurationAdminImpl : public QObject, public ctkConfigurationAdmin
  25. {
  26. Q_OBJECT
  27. Q_INTERFACES(ctkConfigurationAdmin)
  28. public:
  29. ctkConfigurationAdminImpl(ctkConfigurationAdminFactory* configurationAdminFactory,
  30. ctkConfigurationStore* configurationStore,
  31. QSharedPointer<ctkPlugin> plugin);
  32. ctkConfigurationPtr createFactoryConfiguration(const QString& factoryPid);
  33. ctkConfigurationPtr createFactoryConfiguration(const QString& factoryPid,
  34. const QString& location);
  35. ctkConfigurationPtr getConfiguration(const QString& pid);
  36. ctkConfigurationPtr getConfiguration(const QString& pid, const QString& location);
  37. QList<ctkConfigurationPtr> listConfigurations(const QString& filterString = QString());
  38. private:
  39. ctkConfigurationAdminFactory* const configurationAdminFactory;
  40. const QSharedPointer<ctkPlugin> plugin;
  41. ctkConfigurationStore* const configurationStore;
  42. void checkPID(const QString& pid);
  43. };
  44. #endif // CTKCONFIGURATIONADMINIMPL_P_H