Split code into common interface library binary, and smartd + smartctl binaries
This is very hard to do with smartmontools in its current state, because all of the code is compiled into two binaries, if I'm not mistaken. "smartctl" and "smartd".
I would love to see (and help) this project organize code and make files in such a way that developers are able to access the "device_interface" class in code. Particularly "smi()" so we can deal with native "smart_device" objects directly in code, instead of only being able to parse output of "smartctl". A library binary with a header file in the include path.
I've done some digging in the code, and believe this can be easily done, since "smi()" is a shared piece of code between both smartd and smartctl. I do not have lots of experience with C++ and make files for large projects, but I imagine this could be as simple as compiling a static library for the "device_interface" on that machine, and then including that static library in "smartd" and "smartctl" binaries. I would add that this code should also be wrapped in a namespace, should you proceed to create a library out of it.
I would assume that you do not have lots of time to implement this, so I would love to offer help in any way, but I will reiterate that I am not super experienced with large project makefiles, automake, or c++ compilers. I am totally willing to learn. I do however understand the language itself relatively well, and do not have a big problem understanding an overview of the code structure.
What are your thoughts?
I've set a milestone I think is feasible, but please change it to how you see fit. Thank you for your time.