summaryrefslogtreecommitdiffstats
path: root/src/dbi.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-30 20:06:07 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-30 20:20:07 +0100
commitedac32bb986e8dab23a14a79317c2109bc523270 (patch)
tree61354e3e6106ea9f28cf75d3c09e456376c4c213 /src/dbi.h
parent1ce56240323c21e3e3251dfd6173cb45ae959574 (diff)
rest: add GET /room/info
Add GET /room/info to obtain room information, this includes the name, gateway and netmask. curl -X GET -H "Authorization: $API_KEY" http://127.0.0.1:8888/room/info -d '{ "id" : 1 }
Diffstat (limited to 'src/dbi.h')
-rw-r--r--src/dbi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dbi.h b/src/dbi.h
index 8db3a9c..7e0757c 100644
--- a/src/dbi.h
+++ b/src/dbi.h
@@ -94,6 +94,7 @@ struct og_computer {
};
struct og_room {
+ uint32_t id;
uint32_t center;
uint32_t group;
char location[OG_DB_ROOM_LOC_MAXLEN + 1];
@@ -114,6 +115,8 @@ struct og_repository {
struct in_addr;
int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer,
struct in_addr addr);
+int og_dbi_get_room_info(struct og_dbi *dbi, struct og_room *room,
+ uint32_t room_id);
int og_dbi_add_image(struct og_dbi *dbi, const struct og_image *image);
int og_dbi_schema_update(void);