Daniel Shahaf wrote:
> Greg Stein wrote on Thu, Jul 14, 2011 at 00:50:21 -0400:
> > On Wed, Jul 13, 2011 at 22:39, <danielsh_at_apache.org> wrote:
> > > /**
> > > + * Callback function type for progress notification.
> > > + *
> > > + * @a progress is the number of steps already completed, @a total is
> > > + * the total number of steps in this stage, @a stage is the number of
> > > + * stages (for extensibility), @a baton is the callback baton.
> > > + *
> > > + * @note The number of stages may vary depending on the backend, library
> > > + * version, and so on. @a total may be a best-effort estimate.
> > > + *
> > > + * @since New in 1.8.
> > > + */
> > > +typedef void (*svn_fs_progress_notify_func_t)(apr_off_t progress,
> > > + apr_off_t total,
> > > + int stage,
> > > + void *baton,
> > > + apr_pool_t *scratch_pool);
Isn't progress notification pretty much standard in GUI environments -
are there not standard notification paradigms which you could use, which
have a notion of "how much out of how much in total" and have some
string parameter to convey "the thing I'm currently processing" and even
have the notion of stages?
I would expect to see us move towards using a single progress callback
type throughout Subversion instead of an FS-specific thing.
> > > @@ -315,6 +327,12 @@ typedef struct svn_repos_notify_t
> > >
> > > + /** For #svn_repos_notify_verify_aux_progress;
> > > + see svn_fs_progress_notify_func_t. */
> > > + apr_off_t progress_progress;
> > > + apr_off_t progress_total;
> > > + int progress_stage;
> > See above re: apr_off_t. And should "stage" be an integer, or is that
> > an enumerated constant?
> Dunno. The idea was to not have to revv the API if we ever decide to
> add some other checks besides rep-cache.db.
> Perhaps even a C string instead of either an int (counter) or an
> enum type (which would be backend and library-version specific).
> Ideas welcome.
Received on 2011-07-14 15:09:50 CEST