/*
* ====================================================================
* Copyright (c) 2002-2005 The RapidSvn Group. All rights reserved.
*
* This software is licensed as described in the file LICENSE.txt,
* which you should have received as part of this distribution.
*
* This software consists of voluntary contributions made by many
* individuals. For exact contribution history, see the revision
* history and logs, available at http://rapidsvn.tigris.org/.
* ====================================================================
*/
#if defined( _MSC_VER) && _MSC_VER <= 1200
#pragma warning( disable: 4786 )// debug symbol truncated
#endif
// subcpp
#include "client.hpp"
namespace svn
{
Client::Client( Context * context )
:
m_context( NULL )
{
SetContext( context );
}
Client::~Client()
{
delete m_context;
}
const Context * Client::GetContext() const
{
return m_context;
}
void Client::SetContext( Context * context )
{
Context* oldContext = m_context;
m_context = context;
if( oldContext != NULL )
{
delete oldContext;
}
}
void Client::ReleaseWorkingCopyLock()
{
svn_error_t* error = m_context->ReleaseWorkingCopyLock();
if ( error != NULL )
{
throw ClientException( error );
}
}
}