aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/httpserver.h')
-rw-r--r--src/httpserver.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/httpserver.h b/src/httpserver.h
index c6a7804195..648e8b6f86 100644
--- a/src/httpserver.h
+++ b/src/httpserver.h
@@ -117,8 +117,11 @@ public:
class HTTPEvent
{
public:
- /** Create a new event */
- HTTPEvent(struct event_base* base, bool deleteWhenTriggered, HTTPClosure* handler);
+ /** Create a new event.
+ * deleteWhenTriggered deletes this event object after the event is triggered (and the handler called)
+ * handler is the handler to call when the event is triggered.
+ */
+ HTTPEvent(struct event_base* base, bool deleteWhenTriggered, const boost::function<void(void)>& handler);
~HTTPEvent();
/** Trigger the event. If tv is 0, trigger it immediately. Otherwise trigger it after
@@ -126,13 +129,10 @@ public:
*/
void trigger(struct timeval* tv);
- /** Internal function for handling, do not call directly */
- void _handle();
-
-private:
bool deleteWhenTriggered;
+ boost::function<void(void)> handler;
+private:
struct event* ev;
- boost::scoped_ptr<HTTPClosure> handler;
};
#endif // BITCOIN_HTTPSERVER_H