aqhome: more work on http server.

This commit is contained in:
Martin Preuss
2023-08-08 23:49:28 +02:00
parent 3378908c93
commit aafecfa704
50 changed files with 2988 additions and 497 deletions

View File

@@ -82,6 +82,40 @@ void AQH_Storage_SetStateFile(AQH_STORAGE *sto, const char *s)
void AQH_Storage_AddRoom(AQH_STORAGE *sto, AQH_ROOM *r)
{
if (sto && r) {
uint64_t id;
id=++(sto->lastRoomId);
AQH_Room_SetId(r, id);
AQH_Room_List_Add(r, sto->roomList);
}
}
AQH_ROOM_LIST *AQH_Storage_GetRoomList(const AQH_STORAGE *sto)
{
return sto?sto->roomList:NULL;
}
AQH_ROOM *AQH_Storage_GetRoomById(const AQH_STORAGE *sto, uint64_t id)
{
return sto?AQH_Room_List_GetById(sto->roomList, id):NULL;
}
AQH_ROOM *AQH_Storage_GetRoomByName(const AQH_STORAGE *sto, const char *s)
{
return sto?AQH_Room_List_GetByName(sto->roomList, s):NULL;
}
void AQH_Storage_AddDevice(AQH_STORAGE *sto, AQH_DEVICE *dev)
{
if (sto && dev) {