Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/subversion/libsvn_ra/deprecated.c  view on Meta::CPAN

/*
 * deprecated.c:  holding file for all deprecated APIs.
 *                "we can't lose 'em, but we can shun 'em!"
 *
 * ====================================================================
 *    Licensed to the Apache Software Foundation (ASF) under one
 *    or more contributor license agreements.  See the NOTICE file
 *    distributed with this work for additional information
 *    regarding copyright ownership.  The ASF licenses this file
 *    to you under the Apache License, Version 2.0 (the
 *    "License"); you may not use this file except in compliance
 *    with the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing,
 *    software distributed under the License is distributed on an
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *    KIND, either express or implied.  See the License for the
 *    specific language governing permissions and limitations
 *    under the License.
 * ====================================================================
 */

/* We define this here to remove any further warnings about the usage of
   deprecated functions in this file. */
#define SVN_DEPRECATED

#include "svn_hash.h"
#include "svn_ra.h"
#include "svn_path.h"
#include "svn_compat.h"
#include "svn_props.h"
#include "svn_pools.h"

#include "ra_loader.h"
#include "deprecated.h"

#include "svn_private_config.h"




/*** From ra_loader.c ***/
/*** Compatibility Wrappers ***/

/* Wrap @c svn_ra_reporter3_t in an interface that looks like
   @c svn_ra_reporter2_t, for compatibility with functions that take
   the latter.  This shields the ra-specific implementations from
   worrying about what kind of reporter they're dealing with.

   This code does not live in wrapper_template.h because that file is
   about the big changeover from a vtable-style to function-style
   interface, and does not contain the post-changeover interfaces
   that we are compatiblizing here.

   This code looks like it duplicates code in libsvn_wc/adm_crawler.c,
   but in fact it does not.  That code makes old things look like new
   things; this code makes a new thing look like an old thing. */

/* Baton for abovementioned wrapping. */
struct reporter_3in2_baton {
  const svn_ra_reporter3_t *reporter3;
  void *reporter3_baton;
};

/* Wrap the corresponding svn_ra_reporter3_t field in an
   svn_ra_reporter2_t interface.  @a report_baton is a
   @c reporter_3in2_baton_t *. */
static svn_error_t *
set_path(void *report_baton,
         const char *path,
         svn_revnum_t revision,
         svn_boolean_t start_empty,
         const char *lock_token,
         apr_pool_t *pool)
{
  struct reporter_3in2_baton *b = report_baton;
  return b->reporter3->set_path(b->reporter3_baton,
                                path, revision, svn_depth_infinity,
                                start_empty, lock_token, pool);
}

/* Wrap the corresponding svn_ra_reporter3_t field in an
   svn_ra_reporter2_t interface.  @a report_baton is a
   @c reporter_3in2_baton_t *. */
static svn_error_t *
delete_path(void *report_baton,
            const char *path,
            apr_pool_t *pool)
{
  struct reporter_3in2_baton *b = report_baton;
  return b->reporter3->delete_path(b->reporter3_baton, path, pool);
}

/* Wrap the corresponding svn_ra_reporter3_t field in an
   svn_ra_reporter2_t interface.  @a report_baton is a
   @c reporter_3in2_baton_t *. */
static svn_error_t *
link_path(void *report_baton,
          const char *path,
          const char *url,
          svn_revnum_t revision,
          svn_boolean_t start_empty,
          const char *lock_token,
          apr_pool_t *pool)
{
  struct reporter_3in2_baton *b = report_baton;
  return b->reporter3->link_path(b->reporter3_baton,
                                 path, url, revision, svn_depth_infinity,
                                 start_empty, lock_token, pool);

}

/* Wrap the corresponding svn_ra_reporter3_t field in an
   svn_ra_reporter2_t interface.  @a report_baton is a
   @c reporter_3in2_baton_t *. */



( run in 0.659 second using v1.01-cache-2.11-cpan-d7f47b0818f )