clepple/nut — pull request #2 by balooloo (2012-09-04 14:17:10+00:00)
Title: High level C and C++ libnutclient

Hi Charles, Hi all,

This is a proposal for a new client library which scopes an higher level than the existing libupsclient.

It needs less dependencies to be compiled than the libupsclient and can be easier to integrate in other projects (including on windows with visual studio projects). The original need for this library was to have a minimal platform to integrate in Balooloo/hazelnut to communicate to upsd on Windows but which can be easily statically compiled on VS.

It is developed in C++ with a wrapper in pure C, inspired from jNut API.
Its object model targets a client/device/variable/command model rather than a network query/answer.
Client is an interface class which declare methods to manipulate devices, derived classes are implementations (actually only TcpClient for TCP based current protocol) to support specific communication channel (perhaps we will have DBUS, message busses or others in a near future).
Device, Variable and Command classes are helpers to easily manipulate such concepts.

Actually, libnutclient support all features of libupsclient excluding only SSL support. I will develop it soon when integrated in nut trunk.

Best regards.

Emilien