aqhome: more work on http server.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user