Files
aqhomecontrol/aqhome/http/httpservice.h
2023-08-07 14:08:52 +02:00

61 lines
1.9 KiB
C

/****************************************************************************
* 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 "aqhome/http/httprequest.h"
#include <gwenhywfar/msg.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/url.h>
#include <gwenhywfar/mutex.h>
typedef int (*AQH_HTTP_SERVICE_HANDLEREQUEST_FN)(AQH_SERVICE *sv, AQH_HTTP_REQUEST *request);
AQHOME_API void AQH_HttpService_Extend(AQH_SERVICE *sv);
AQHOME_API const char *AQH_HttpService_GetConfigFolder(const AQH_SERVICE *sv);
AQHOME_API void AQH_HttpService_SetConfigFolder(AQH_SERVICE *sv, const char *s);
AQHOME_API const char *AQH_HttpService_GetSourceFolder(const AQH_SERVICE *sv);
AQHOME_API void AQH_HttpService_SetSourceFolder(AQH_SERVICE *sv, const char *s);
AQHOME_API const char *AQH_HttpService_GetSiteHeader(const AQH_SERVICE *sv);
AQHOME_API void AQH_HttpService_SetSiteHeader(AQH_SERVICE *sv, const char *s);
AQHOME_API const char *AQH_HttpService_GetSiteFooter(const AQH_SERVICE *sv);
AQHOME_API void AQH_HttpService_SetSiteFooter(AQH_SERVICE *sv, const char *s);
AQHOME_API uint32_t AQH_HttpService_GetNextModuleId(AQH_SERVICE *sv);
AQHOME_API uint32_t AQH_HttpService_GetNextUserId(AQH_SERVICE *sv);
AQHOME_API int AQH_HttpService_GetMaxSessionAgeInSecs(const AQH_SERVICE *sv);
AQHOME_API void AQH_HttpService_SetMaxSessionAgeInSecs(AQH_SERVICE *sv, int i);
AQHOME_API AQH_HTTP_SERVICE_HANDLEREQUEST_FN AQH_HttpService_SetHandleRequestFn(AQH_SERVICE *sv, AQH_HTTP_SERVICE_HANDLEREQUEST_FN fn);
#endif