#pragma once
/**
 *  @file level1_mock_api.h
 *  @date 07.03.2014
 *  @author mkoenig
 *  @brief 
 *
 *  $LastChangedDate: 2014-11-28 15:26:51 +0100 (Fr, 28 Nov 2014) $
 *  $LastChangedBy: mkoenig $
 *  $LastChangedRevision: 21210 $
 *
 */

#include "cpp_odbc/level1/api.h"

#include "gmock/gmock.h"

namespace cpp_odbc_test {


struct level1_mock_api : public cpp_odbc::level1::api {

	level1_mock_api();
	~level1_mock_api();

	MOCK_CONST_METHOD3(do_allocate_handle, SQLRETURN(SQLSMALLINT, SQLHANDLE, SQLHANDLE *));
	MOCK_CONST_METHOD2(do_free_handle, SQLRETURN(SQLSMALLINT, SQLHANDLE));
	MOCK_CONST_METHOD8(do_get_diagnostic_record, SQLRETURN(SQLSMALLINT, SQLHANDLE, SQLSMALLINT, SQLCHAR *, SQLINTEGER *, SQLCHAR *, SQLSMALLINT, SQLSMALLINT *));
	MOCK_CONST_METHOD4(do_set_environment_attribute, SQLRETURN(SQLHENV, SQLINTEGER, SQLPOINTER, SQLINTEGER));
	MOCK_CONST_METHOD4(do_set_connection_attribute, SQLRETURN(SQLHDBC, SQLINTEGER, SQLPOINTER, SQLINTEGER));
	MOCK_CONST_METHOD8(do_establish_connection, SQLRETURN(SQLHDBC, SQLHWND, SQLCHAR *, SQLSMALLINT, SQLCHAR *, SQLSMALLINT, SQLSMALLINT *, SQLUSMALLINT));
	MOCK_CONST_METHOD1(do_disconnect, SQLRETURN(SQLHDBC));
	MOCK_CONST_METHOD3(do_end_transaction, SQLRETURN(SQLSMALLINT, SQLHANDLE, SQLSMALLINT));
	MOCK_CONST_METHOD5(do_get_connection_info, SQLRETURN(SQLHDBC, SQLUSMALLINT, SQLPOINTER, SQLSMALLINT, SQLSMALLINT *));

	MOCK_CONST_METHOD6(do_bind_column, SQLRETURN(SQLHSTMT, SQLUSMALLINT, SQLSMALLINT, SQLPOINTER, SQLLEN, SQLLEN *));
	MOCK_CONST_METHOD10(do_bind_parameter, SQLRETURN(SQLHSTMT, SQLUSMALLINT, SQLSMALLINT, SQLSMALLINT, SQLSMALLINT, SQLULEN, SQLSMALLINT, SQLPOINTER, SQLLEN, SQLLEN *));
	MOCK_CONST_METHOD7(do_column_attribute, SQLRETURN(SQLHSTMT, SQLUSMALLINT, SQLUSMALLINT, SQLPOINTER, SQLSMALLINT, SQLSMALLINT *, SQLLEN *));
	MOCK_CONST_METHOD1(do_execute_prepared_statement, SQLRETURN(SQLHSTMT));
	MOCK_CONST_METHOD3(do_execute_statement, SQLRETURN(SQLHSTMT, SQLCHAR *, SQLINTEGER));
	MOCK_CONST_METHOD3(do_fetch_scroll, SQLRETURN(SQLHSTMT, SQLSMALLINT, SQLLEN));
	MOCK_CONST_METHOD2(do_free_statement, SQLRETURN(SQLHSTMT, SQLUSMALLINT));
	MOCK_CONST_METHOD5(do_get_statement_attribute, SQLRETURN(SQLHSTMT, SQLINTEGER, SQLPOINTER, SQLINTEGER, SQLINTEGER *));
	MOCK_CONST_METHOD2(do_number_of_result_columns, SQLRETURN(SQLHSTMT, SQLSMALLINT *));
	MOCK_CONST_METHOD2(do_number_of_parameters, SQLRETURN(SQLHSTMT, SQLSMALLINT *));
	MOCK_CONST_METHOD3(do_prepare_statement, SQLRETURN(SQLHSTMT, SQLCHAR *, SQLINTEGER));
	MOCK_CONST_METHOD3(do_prepare_statement, SQLRETURN(SQLHSTMT, SQLWCHAR *, SQLINTEGER));
	MOCK_CONST_METHOD4(do_set_statement_attribute, SQLRETURN(SQLHSTMT, SQLINTEGER, SQLPOINTER, SQLINTEGER));
	MOCK_CONST_METHOD2(do_row_count, SQLRETURN(SQLHSTMT, SQLLEN *));
	MOCK_CONST_METHOD9(do_describe_column, SQLRETURN(SQLHSTMT, SQLUSMALLINT, SQLCHAR *, SQLSMALLINT, SQLSMALLINT *, SQLSMALLINT *, SQLULEN *, SQLSMALLINT *, SQLSMALLINT *));
	MOCK_CONST_METHOD9(do_describe_column, SQLRETURN(SQLHSTMT, SQLUSMALLINT, SQLWCHAR *, SQLSMALLINT, SQLSMALLINT *, SQLSMALLINT *, SQLULEN *, SQLSMALLINT *, SQLSMALLINT *));
	MOCK_CONST_METHOD6(do_describe_parameter, SQLRETURN(SQLHSTMT, SQLUSMALLINT, SQLSMALLINT *, SQLULEN *, SQLSMALLINT *, SQLSMALLINT *));
	MOCK_CONST_METHOD1(do_more_results, SQLRETURN(SQLHSTMT));
	MOCK_CONST_METHOD3(do_get_functions, SQLRETURN(SQLHDBC, SQLUSMALLINT, SQLUSMALLINT *));

};


}
