[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: client api not optimal

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-08-25 21:02:10 CEST

"Ich selbst" <ichselbst@gmx.ch> writes:

> Hi,
>
> After going through the sources of Subversion I have a request for the
> client api.
> It now contains functions which need batons (what is a baton???) and
> typedefs
> from apr headers. I think that's not really good.

Nearly all C callback systems use batons, although they don't always
call them batons. If you want examples look at the XtPointer
parameter to XtAddCallback in the Xt library, the void* parameter to
pthread_create in the pthread library, the gpointer parameter to
g_signal_connect in the gtk library, etc. How else is your
application going to pass application specific data to the callback?
You can always set the baton to NULL if you don't want to use it.

Subversion depends on APR, your application is going to link against
APR, so using APR types doesn't seem unreasonable.

[snip]

> - instead of the auth_baton use 'username' and 'password' - thats more
> understandable

When you call svn_client_checkout, say, you do not know if a username
or password is required. Do you intend to always prompt the user for
these, even if they are not required? Isn't that a little primitive?
The point of the auth_baton is that if the data are not required then
there is no need to provide them.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Aug 25 21:02:46 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.