Compare commits
1 Commits
8a61cfe7ef
...
dfdc4b8bdc
| Author | SHA1 | Date | |
|---|---|---|---|
| dfdc4b8bdc |
@@ -13,7 +13,16 @@ public:
|
||||
using RequestFunction = std::function<PIHTTP::MessageMutable(const PIHTTP::MessageConst &)>;
|
||||
|
||||
void registerPath(const PIString & path, PIHTTP::Method method, RequestFunction functor);
|
||||
template<typename T>
|
||||
void
|
||||
registerPath(const PIString & path, PIHTTP::Method method, T * o, PIHTTP::MessageMutable (T::*function)(const PIHTTP::MessageConst &)) {
|
||||
registerPath(path, method, [o, function](const PIHTTP::MessageConst & m) { return (o->*function)(m); });
|
||||
}
|
||||
void registerUnhandled(RequestFunction functor);
|
||||
template<typename T>
|
||||
void registerUnhandled(T * o, PIHTTP::MessageMutable (T::*function)(const PIHTTP::MessageConst &)) {
|
||||
registerUnhandled([o, function](const PIHTTP::MessageConst & m) { return (o->*function)(m); });
|
||||
}
|
||||
void unregisterPath(const PIString & path, PIHTTP::Method method);
|
||||
void unregisterPath(const PIString & path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user