2 * ctx.c: intialization function for client context
4 * ====================================================================
5 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
7 * This software is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at http://subversion.tigris.org/license-1.html.
10 * If newer versions of this license are posted there, you may use a
11 * newer version instead, at your option.
13 * This software consists of voluntary contributions made by many
14 * individuals. For exact contribution history, see the revision
15 * history and logs, available at http://subversion.tigris.org/.
16 * ====================================================================
19 /* ==================================================================== */
25 #include <apr_pools.h>
26 #include "svn_client.h"
27 #include "svn_error.h"
32 /* Call the notify_func of the context provided by BATON, if non-NULL. */
34 call_notify_func(void *baton
, const svn_wc_notify_t
*n
, apr_pool_t
*pool
)
36 const svn_client_ctx_t
*ctx
= baton
;
39 ctx
->notify_func(ctx
->notify_baton
, n
->path
, n
->action
, n
->kind
,
40 n
->mime_type
, n
->content_state
, n
->prop_state
,
45 svn_client_create_context(svn_client_ctx_t
**ctx
,
48 *ctx
= apr_pcalloc(pool
, sizeof(svn_client_ctx_t
));
49 (*ctx
)->notify_func2
= call_notify_func
;
50 (*ctx
)->notify_baton2
= *ctx
;