55 lines
1.5 KiB
C
55 lines
1.5 KiB
C
/****************************************************************************
|
|
* This file is part of the project AqHome.
|
|
* AqHome (c) by 2025 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 AQHOME_CGI_MODULES_DEVICES_H
|
|
#define AQHOME_CGI_MODULES_DEVICES_H
|
|
|
|
|
|
#include "aqhome-cgi/modules/mdataclient.h"
|
|
|
|
#include "aqhome/aqhome.h"
|
|
#include "aqhome/dataclient/client.h"
|
|
|
|
#include <aqcgi/request.h>
|
|
|
|
#include <gwenhywfar/buffer.h>
|
|
|
|
|
|
#define AQH_MODDEVICES_PERMS_DEVICEREAD 0x001
|
|
#define AQH_MODDEVICES_PERMS_DEVICEWRITE 0x002
|
|
#define AQH_MODDEVICES_PERMS_DEVICEADD 0x004
|
|
#define AQH_MODDEVICES_PERMS_DEVICEDEL 0x008
|
|
|
|
#define AQH_MODDEVICES_PERMS_VALUEREAD 0x010
|
|
#define AQH_MODDEVICES_PERMS_VALUEWRITE 0x020
|
|
#define AQH_MODDEVICES_PERMS_VALUEADD 0x040
|
|
#define AQH_MODDEVICES_PERMS_VALUEDEL 0x080
|
|
#define AQH_MODDEVICES_PERMS_VALUESET 0x100
|
|
|
|
|
|
#define AQH_MODDEVICES_GRAPH_WIDTH 640
|
|
#define AQH_MODDEVICES_GRAPH_HEIGHT 480
|
|
|
|
|
|
|
|
void AQH_ModDevices_Extend(AQH_MODULE *m, AQH_SERVICE *sv, const char *baseFolder);
|
|
int AQH_ModDevices_Create(AQH_SERVICE *sv);
|
|
|
|
|
|
uint32_t AQH_ModDevices_ColorFromHexString(const char *s);
|
|
uint32_t AQH_ModDevices_HtmlColorToValueRGBW(uint32_t colorIn);
|
|
uint32_t AQH_ModDevices_RgbwToHtmlColor(uint32_t colorIn);
|
|
|
|
AQH_VALUE *AQH_ModDevices_GetValueForDevice(AQH_DATACLIENT *dc, const char *sDeviceName, const char *sValueName);
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|