aqhome: added service definitions, started implementing HTTP service.
This commit is contained in:
48
aqhome/http/httpservice.h
Normal file
48
aqhome/http/httpservice.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2023 Martin Preuss, all rights reserved.
|
||||
*
|
||||
* The license for this file can be found in the file COPYING which you
|
||||
* should have received along with this file.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef AQH_HTTP_SERVICE_H
|
||||
#define AQH_HTTP_SERVICE_H
|
||||
|
||||
|
||||
|
||||
#include "aqhome/service/service.h"
|
||||
|
||||
#include <gwenhywfar/db.h>
|
||||
#include <gwenhywfar/buffer.h>
|
||||
#include <gwenhywfar/msg.h>
|
||||
|
||||
|
||||
|
||||
void AQH_HttpService_Extend(AQH_SERVICE *sv);
|
||||
|
||||
|
||||
const char *AQH_HttpService_GetSourceFolder(const AQH_SERVICE *sv);
|
||||
void AQH_HttpService_SetSourceFolder(AQH_SERVICE *sv, const char *s);
|
||||
|
||||
const char *AQH_HttpService_GetSiteHeader(const AQH_SERVICE *sv);
|
||||
void AQH_HttpService_SetSiteHeader(AQH_SERVICE *sv, const char *s);
|
||||
|
||||
|
||||
const char *AQH_HttpService_GetSiteFooter(const AQH_SERVICE *sv);
|
||||
void AQH_HttpService_SetSiteFooter(AQH_SERVICE *sv, const char *s);
|
||||
|
||||
|
||||
int AQH_HttpService_AddFile(AQH_SERVICE *sv, const char *fname, GWEN_BUFFER *buf);
|
||||
void AQH_HttpService_AddStatusLine(AQH_SERVICE *sv, int code, const char *msg, const char *proto, GWEN_BUFFER *buf);
|
||||
void AQH_HttpService_AddHeader(AQH_SERVICE *sv, GWEN_DB_NODE *dbHeader, GWEN_BUFFER *buf);
|
||||
|
||||
int AQH_HttpService_ParsePostBody(AQH_SERVICE *sv, const GWEN_MSG *msgReceived, GWEN_DB_NODE *dbBody);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user