| 1 |
// ImageContainer - container class for custom banned image |
| 2 |
|
| 3 |
// For all support, instructions and copyright go to: |
| 4 |
// http://e2guardian.org/ |
| 5 |
// Released under the GPL v2, with the OpenSSL exception described in the README file. |
| 6 |
|
| 7 |
#ifndef __HPP_IMAGECONTAINER |
| 8 |
#define __HPP_IMAGECONTAINER |
| 9 |
|
| 10 |
// INCLUDES |
| 11 |
#include "Socket.hpp" |
| 12 |
#include "String.hpp" |
| 13 |
|
| 14 |
class ImageContainer |
| 15 |
{ |
| 16 |
public: |
| 17 |
ImageContainer(); |
| 18 |
~ImageContainer(); |
| 19 |
|
| 20 |
// wipe loaded image |
| 21 |
void reset(); |
| 22 |
// read image from file |
| 23 |
bool read(const char *filename); |
| 24 |
// send image to client |
| 25 |
bool display(Socket *s); |
| 26 |
bool display_hb(String &eheader, String &ebody); |
| 27 |
|
| 28 |
private: |
| 29 |
long int imagelength; |
| 30 |
String mimetype; |
| 31 |
char *image; |
| 32 |
}; |
| 33 |
#endif |