ctkDicomAbstractHost.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 CTKDICOMABSTRACTHOST_H
  16. #define CTKDICOMABSTRACTHOST_H
  17. #include <ctkDicomHostInterface.h>
  18. #include <ctkDicomAppInterface.h>
  19. #include <QScopedPointer>
  20. #include <org_commontk_dah_host_Export.h>
  21. class ctkDicomAbstractHostPrivate;
  22. /**
  23. * Provide a basic implementation for an application host.
  24. *
  25. * It starts a http server and serves one hosted application. Multiple instances
  26. * can be used for hosting multiple applications.
  27. *
  28. * The methods of the ctkDicomHostInterface have to be implemented for the business logic,
  29. *
  30. */
  31. class org_commontk_dah_host_EXPORT ctkDicomAbstractHost : public ctkDicomHostInterface
  32. {
  33. public:
  34. /**
  35. * Start the soap sever on the specified port or choose port automatically.
  36. */
  37. ctkDicomAbstractHost(int hostPort = 0, int appPort = 0);
  38. int getHostPort() const;
  39. int getAppPort() const;
  40. ~ctkDicomAbstractHost();
  41. ctkDicomAppInterface* getDicomAppService() const;
  42. private:
  43. Q_DECLARE_PRIVATE(ctkDicomAbstractHost)
  44. const QScopedPointer<ctkDicomAbstractHostPrivate> d_ptr;
  45. };
  46. #endif // CTKDICOMABSTRACTHOST_H