#ifndef LIBPAVS__BACKSEL_H
#define LIBPAVS__BACKSEL_H

/*
 * PaVS - Pasky's Version System, advanced version control system
 * Copyright (C) 2003  Petr Baudis
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifdef __cplusplus
extern "C" {
#endif


#include <librev/inode.h>


/* This is interface to the backend selector. It is currently just a dummy
 * encapsulation of librcs-specific calls, so that other backends support and
 * backends multiplexing can be added easily in the future. */


/* The following enumeration contains all the known backends. */
enum pavs_backend {
	PBE_NONE,
	PBE_LIBRCS,

	PBE_MAX,
};


/* This function converts the given backend number to the appropriate name
 * string. */
/* Returns the string pointer or NULL upon error. */
char *pavs_backendstr (enum pavs_backend backend);


/* This function selects the appropriate backend for a given inode and
 * initializes that backend. */
/* Return value is the backend type, PBE_NONE if not enough information is
 * available and negative number upon error. */
enum pavs_backend rev_inode_attach_backend (struct rev_inode *inode,
						char *filename);


#ifdef __cplusplus
}
#endif

#endif
