//
// See the file LICENSE for redistribution information.
//
// Copyright (c) 2002-2003
//	Sleepycat Software.  All rights reserved.
//
// $Id: XmlResolver.hpp,v 1.2 2003/09/19 14:21:13 merrells Exp $
//

#ifndef __XMLRESOLVER_HPP
#define	__XMLRESOLVER_HPP

#include "XmlPortability.hpp"
#include "DbXmlFwd.hpp"

namespace DbXml
{

//
// WARNING: This class is experimental and undocumented!
//
class DBXML_EXPORT XmlResolver
{
public:
	XmlResolver() {};
	virtual ~XmlResolver() {};
	//
	// WARNING: This method is experimental and undocumented!
	//
	// getDocument resolves a document id into a document. The resolver should return
	// zero (0) on success, DB_NOTFOUND if the document does not exist, or any other
	// Berkeley DB error code. It's OK to throw an exception from this method. DBXML
	// will catch it, clean up, and rethrow it.
	//
	virtual int getDocument(DbTxn *txn, u_int32_t id, XmlDocument &document) const = 0; 
};

}

#endif
