/*
*	©Copyright 2002,2003, Microsoft Corporation
*	Microsoft Confidential.
*	Written by Sergey Vasilevskiy, 2002-2003.
*/
#pragma once

#include "stdafx.h"

class CMarketFeedDB : public CTxnHarnessDBBase, public TPCE::CMarketFeedDBInterface
{		
	SQLHSTMT				        m_hstmtFrame1;

	SQLHDESC						m_descFrame1Col1;
	SQLHDESC						m_descFrame1Col2;

	TPCE::TMarketFeedFrame1Input	Frame1Input;
	TPCE::TMarketFeedFrame1Output	Frame1Output;
	TPCE::TTradeRequest			    m_TriggeredOrder;
	int						        m_rows_ret;		//rows returned from the stored procedure
	int						        m_array_size;	//qty/price/symbol input array size
	SQLINTEGER				        m_ret_ind;		//indicator variable for the stored procedure return code
	SQLINTEGER						m_len;

public:
	CMarketFeedDB(CDBConnection *pDBConn);
	~CMarketFeedDB();

	void DoMarketFeedFrame1(const TPCE::TMarketFeedFrame1Input* pFrame1Input, 
							TPCE::PMarketFeedFrame1Output       pFrame1Output,
							TPCE::CSendToMarketInterface*	    pSendToMarket);

	// Function to pass any exception thrown inside
	// database class frame implementation
	// back into the database class
	void Cleanup(void* pException);

};
