/* * Copyright (c) 2013 Remko Tronçon * Licensed under the GNU General Public License. * See the COPYING file for more information. */ #pragma once #include #include struct lua_State; namespace Swift { namespace Sluift { struct Response { Response(boost::shared_ptr result, boost::shared_ptr error) : result(result), error(error) {} ~Response(); static Response withResult(boost::shared_ptr response) { return Response(response, boost::shared_ptr()); } static Response withError(boost::shared_ptr error) { return Response(boost::shared_ptr(), error); } int convertToLuaResult(lua_State* L); boost::shared_ptr result; boost::shared_ptr error; }; } }