00001 #ifndef _HTTP_UI_H_
00002 #define _HTTP_UI_H_
00003
00004 #include "GOptionsFile.h"
00005
00006 class GHttpCallback
00007 {
00008 public:
00009 virtual ~GHttpCallback() {}
00010
00011 char *FormDecode(char *s);
00012 char *HtmlEncode(char *s);
00013 bool ParseHtmlWithDom(GVariant &Out, GDom *Dom, char *Html);
00014
00015 virtual int OnRequest(char *Action, char *Uri, char *Headers, char *Body, GVariant &Out) = 0;
00016 };
00017
00018 class GHttpServer
00019 {
00020 struct GHttpServerPriv *d;
00021
00022 public:
00023 GHttpServer(GHttpCallback *cb, int port);
00024 ~GHttpServer();
00025 };
00026
00027 #endif