summaryrefslogtreecommitdiff
path: root/DAnCE/tools/Artifact_Installation/Http_Installation_Handler.h
blob: 80496334795ce4f94c0dcf4a82501c759c7b8925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
 * @file Http_Installation_Handler.h
 *
 * @author Martin Corino <mcorino@remedy.nl>
 */

#ifndef DANCE_HTTP_INSTALLATION_HANDLER_H
#define DANCE_HTTP_INSTALLATION_HANDLER_H

#include /**/ "ace/pre.h"

#include "Artifact_Installation_Handler_Svc.h"
#include "Artifact_Installation_Handler_export.h"
#include "ace/Singleton.h"
#include <string>

namespace DAnCE
  {
    class Artifact_Installation_Handler_Export HttpInstallationHandler
      : public ArtifactInstallationHandler
      {
        public:
          static const std::string protocol;

          HttpInstallationHandler ();
          virtual ~HttpInstallationHandler ();

          virtual const std::string& protocol_prefix (void);

          virtual void initialize ();

          virtual void clear ();

          virtual void install (const std::string& plan_uuid,
                                std::string& location,
                                const TPropertyMap& properties);

          virtual void remove (const std::string& plan_uuid,
                               const std::string& location);
      };

    class Artifact_Installation_Handler_Export HttpInstallationHandlerSvc
      : public ArtifactInstallationHandlerSvc
      {
        public:
          HttpInstallationHandlerSvc ();
          virtual ~HttpInstallationHandlerSvc ();

          virtual ArtifactInstallationHandler* handler_instance ();

          static int Initializer (void);
        private:
          typedef ACE_Unmanaged_Singleton<HttpInstallationHandler, ACE_Null_Mutex> THandlerSingleton;
      };

    static int DAnCE_Requires_HttpInstallationHandler_Service_Initializer =
      HttpInstallationHandlerSvc::Initializer ();

    ACE_STATIC_SVC_DECLARE (HttpInstallationHandlerSvc)
    ACE_FACTORY_DECLARE (Artifact_Installation_Handler, HttpInstallationHandlerSvc)

  }

#include /**/ "ace/post.h"
#endif /* DANCE_HTTP_INSTALLATION_HANDLER_H */