Mercurial > hg > orthanc
comparison Core/HttpServer/MongooseServer.h @ 1441:f3672356c121
refactoring: IHttpHandler and HttpToolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 01 Jul 2015 10:38:39 +0200 |
parents | 6e7e5ed91c2d |
children | 895ab369d63c |
comparison
equal
deleted
inserted
replaced
1440:3567503c00a7 | 1441:f3672356c121 |
---|---|
30 **/ | 30 **/ |
31 | 31 |
32 | 32 |
33 #pragma once | 33 #pragma once |
34 | 34 |
35 #include "HttpHandler.h" | 35 #include "IHttpHandler.h" |
36 | 36 |
37 #include <list> | 37 #include <list> |
38 #include <map> | 38 #include <map> |
39 #include <set> | 39 #include <set> |
40 #include <stdint.h> | 40 #include <stdint.h> |
58 }; | 58 }; |
59 | 59 |
60 class MongooseServer | 60 class MongooseServer |
61 { | 61 { |
62 public: | 62 public: |
63 typedef std::list<HttpHandler*> Handlers; | 63 typedef std::list<IHttpHandler*> Handlers; |
64 | 64 |
65 private: | 65 private: |
66 // http://stackoverflow.com/questions/311166/stdauto-ptr-or-boostshared-ptr-for-pimpl-idiom | 66 // http://stackoverflow.com/questions/311166/stdauto-ptr-or-boostshared-ptr-for-pimpl-idiom |
67 struct PImpl; | 67 struct PImpl; |
68 boost::shared_ptr<PImpl> pimpl_; | 68 boost::shared_ptr<PImpl> pimpl_; |
101 void ClearUsers(); | 101 void ClearUsers(); |
102 | 102 |
103 void RegisterUser(const char* username, | 103 void RegisterUser(const char* username, |
104 const char* password); | 104 const char* password); |
105 | 105 |
106 void RegisterHandler(HttpHandler& handler); | 106 void RegisterHandler(IHttpHandler& handler); |
107 | 107 |
108 bool IsAuthenticationEnabled() const | 108 bool IsAuthenticationEnabled() const |
109 { | 109 { |
110 return authentication_; | 110 return authentication_; |
111 } | 111 } |