dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 503 forks source link

Move REST API common code to rest_api.cpp/h #7674

Closed manup closed 8 months ago

manup commented 8 months ago

The de_web_plugin_private.h header is currently a sink hole for all kinds of unrelated code. The PR moves parts which are only needed by REST API handling code into a new module rest_api.h.

REST API handling code doesn't need to know and depend on all what is in de_web_plugin_private.h. Headers like math.h and tuya.h which where also included are now only included in .cpp files which need them. Main goal here is to reduce coupling and also speed up compilation a bit as side effect.