Files
aqhomecontrol/apps/aqhome-cgi/modules/devices/mdevices_pagectx.h
2026-08-31 12:18:46 +02:00

56 lines
1.8 KiB
C

/****************************************************************************
* This file is part of the project AqHome.
* AqHome (c) by 2026 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_MDEVICES_PAGECTX_H
#define AQHOME_CGI_MDEVICES_PAGECTX_H
#include "aqhome-cgi/modules/devices/mdevices.h"
#include "aqhome/aqhome.h"
#include "aqhome/dataclient/client.h"
#include "aqhome/data/device.h"
#include "aqhome/data/value.h"
#include <aqcgi/request.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/tree2.h>
typedef struct AQH_MD_PAGECTX AQH_MD_PAGECTX;
GWEN_TREE2_FUNCTION_LIB_DEFS(AQH_MD_PAGECTX, AQH_MDPageCtx, AQHOME_API);
AQH_MD_PAGECTX *AQH_MDPageCtx_new(AQCGI_MODULE *module, AQH_DATACLIENT *dataClient);
void AQH_MDPageCtx_free(AQH_MD_PAGECTX *ctx);
AQH_MD_PAGECTX *AQH_MDPageCtx_CopyWithMatchingVars(const AQH_MD_PAGECTX *octx,
int varType, const char *room, int modality, const char *vname, uint64_t lastChange);
AQCGI_MODULE *AQH_MDPageCtx_GetModule(const AQH_MD_PAGECTX *ctx);
AQH_DATACLIENT *AQH_MDPageCtx_GetDataClient(const AQH_MD_PAGECTX *ctx);
const AQH_DEVICE_LIST *AQH_MDPageCtx_GetDevices(const AQH_MD_PAGECTX *ctx);
void AQH_MDPageCtx_SetDevices(AQH_MD_PAGECTX *ctx, const AQH_DEVICE_LIST *dList);
AQH_VALUE_LIST *AQH_MDPageCtx_GetValues(const AQH_MD_PAGECTX *ctx);
void AQH_MDPageCtx_SetValues(AQH_MD_PAGECTX *ctx, AQH_VALUE_LIST *vList);
GWEN_DB_NODE *AQH_MDPageCtx_GetDbVars(const AQH_MD_PAGECTX *ctx);
AQH_VALUE *AQH_MDPageCtx_GetValue(const AQH_MD_PAGECTX *ctx, const char *vName);
#endif