[gnutls-dev] c++ interface to gnutls.h

Nikos Mavrogiannopoulos nmav at gnutls.org
Thu Jun 8 12:56:20 CEST 2006


On 6/7/06, Rupert Kittinger-Sereinig <rks at mur.at> wrote:

> Why do you think so? the functions called from main() were just examples
>   to illustrate the idea of creating temporary objects to get suitable
> subsets of the functionality.
> However, I do like designs that replace redundant meber functions with
> one member function and some free functions, if they can be impelmented
> without friendship.

In that case it would be hard to avoid friendship since everything
depends on the gnutls_session_t. I'll think more about it. Maybe
a nice idea would be to split the classes based on the authentication
method they support.

> Another way to think about a c++ interface: what will be the advantages
> of using it? I can think of the following:
> - automatic resource management
> - more consistent interface (see my last email)
> - exceptions for error propagation

These were actually the original goals.

> - hide as many enums as possible (virtual functions instead of
> switch/case, provide handler functions for alerts, etc)
> the last one is probably the hardest from a design point of view, but
> also the most rewarding:-)

Indeed but currently I don't plan to spend much time on it thus I'll
focus on the shortest to reach goals.

> By the way, I switched from openssl to gnutls mainly because I think the
> gnutls API is much clearer (of course, the documentation is also
> superior...).

Thanks.


best regards,
Nikos



More information about the Gnutls-dev mailing list