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

Re: [PATCH] notification callbacks for network data transfers (V6)

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-08-28 15:05:34 CEST

Stefan Küng wrote:

> Branko Čibej wrote:
>
>> You don't have to rev the svn_ra__vtable_t::open callback. The
>> svn_ra__vtable_t type is private to libsvn_ra*, so you can change the
>> signature of the open() callback instead of revving it. It's not a
>> public API. :)
>>
>> Otherwise, it looks fine. Please change the svn_ra__vtable_t thing
>> and update the log message, and I'll test and commit.
>
>
> Patch attached.

O.K. I changed the log message a bit (not all changes were mentioned).
Other tweaks noted below.

Committed in r15948. Thanks!

>Index: subversion/include/svn_client.h
>===================================================================
>--- subversion/include/svn_client.h (Revision 15946)
>+++ subversion/include/svn_client.h (Arbeitskopie)
>@@ -40,6 +40,7 @@
> #include "svn_error.h"
> #include "svn_opt.h"
> #include "svn_version.h"
>+#include "svn_ra.h"
>
>
> #ifdef __cplusplus
>@@ -533,6 +534,14 @@
> /** callback baton for log_msg_func2
> * @since New in 1.3. */
> void *log_msg_baton2;
>+
>+ /** Notification callback for network progress information.
>+ * @since New in 1.3. */
>+ svn_ra_progress_notify_func_t progress_func;
>
>
In the docstring, i added "May be NULL if not used.", since that's an
important part of the API semantics. Same for svn_ra_callbacks2_t.

>Index: subversion/include/svn_ra.h
>===================================================================
>--- subversion/include/svn_ra.h (Revision 15946)
>+++ subversion/include/svn_ra.h (Arbeitskopie)
>@@ -169,6 +169,22 @@
> svn_error_t *ra_err,
> apr_pool_t *pool);
>
>+/**
>+ * Callback function type for progress notification.
>+ *
>+ * @a progress is the amount of bytes already transferred.
>+ *
>+ * @a total is the total amount of bytes to transfer or -1 if it's not
>+ * known.
>+ *
>+ * @a baton is the callback baton. If not used, must be NULL.
>+ *
>+ * @since New in 1.3.
>+ */
>+typedef void (*svn_ra_progress_notify_func_t) (apr_off_t progress,
>+ apr_off_t total,
>+ void * baton);
>
>
I tweaked this docstring a bit, but most imporantly, I removed the part
about BATON having to be NULL if it's not used. You can't impose
constraints on how a particular client will implement its callback
functions. Since BATON isn't interpreted by Subversion's code but only
passed back to the client, its value is irrelevant as far as our API is
concerned.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Aug 28 15:25:09 2005

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.