lasselukkari / aWOT

Arduino web server library.
MIT License
283 stars 41 forks source link

Feature Request: Namespace the library (with default using) #112

Closed EmperorArthur closed 3 years ago

EmperorArthur commented 3 years ago

I realized that while Request and Response are pretty specific terms, Application is certainly somewhat ambiguous, and it is entirely possible to have name collisions causing issues.

This can be a breaking change, but I have a solution to that problem. However, I do not want to make a pull request until we have handled the current ones which add additional functions.

Proposal

Wrap the entire library in namespace awot {...}, and then have at the end:

#ifndef ENABLE_AWOT_NAMESPACE
using namespace awot;
#endif

This allows someone to simply add build_flags = -D ENABLE_AWOT_NAMESPACE=True to their platformio.ini file to enable namespacing.

lasselukkari commented 3 years ago

Sound like a good idea. Feel free to make a PR.