Fawkes API  Fawkes Development Version
image_processor.h
1 
2 /***************************************************************************
3  * image_processor.h - Web request processor for viewing images
4  *
5  * Created: Wed Feb 05 17:43:36 2014
6  * Copyright 2006-2014 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __PLUGINS_WEBVIEW_IMAGE_PROCESSOR_H_
24 #define __PLUGINS_WEBVIEW_IMAGE_PROCESSOR_H_
25 
26 #include <webview/request_processor.h>
27 #include <string>
28 
29 namespace fawkes {
30  class Configuration;
31  class Logger;
32  class ThreadCollector;
33  class WebviewJpegStreamProducer;
34 }
35 
37 {
38  public:
39  WebviewImageRequestProcessor(const char *baseurl, fawkes::Configuration *config,
40  fawkes::Logger *logger, fawkes::ThreadCollector *thread_col);
42 
43  virtual fawkes::WebReply * process_request(const fawkes::WebRequest *request);
44 
45  private:
46  fawkes::WebviewJpegStreamProducer * get_stream(const std::string &image_id);
47 
48 
49  private:
50  char *baseurl_;
51  size_t baseurl_len_;
52 
53  fawkes::Configuration *config_;
54  fawkes::Logger *logger_;
55  fawkes::ThreadCollector *thread_col_;
56 
57  std::map<std::string, fawkes::WebviewJpegStreamProducer *> streams_;
58 };
59 
60 #endif
Image stream web processor.
Fawkes library namespace.
Abstract web request processor.
Thread collector.
Web request meta data carrier.
Definition: request.h:42
Basic web reply.
Definition: reply.h:36
Interface for configuration handling.
Definition: config.h:67
Interface for logging.
Definition: logger.h:34