gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Nikos Mavrogiannopoulos
Subject: Re: [gnutls-dev] c++ interface to gnutls.h
Date: Thu, 8 Jun 2006 12:56:20 +0200

On 6/7/06, Rupert Kittinger-Sereinig <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]