#pragma once
class DataListener: public six::sixp::client::irequest_events
{
public:
	DataListener(void);
	~DataListener(void);

	void on_destroyed(const six::sixp::client::irequest *req);
	void on_error(const six::sixp::client::irequest *req,sixp_int32_t error_code,const char *error_message);
	void on_init_table(const six::sixp::client::irequest *req,sixp_uint64_t num_records,bool changes);
	void on_table_filled(const six::sixp::client::irequest *req);
	void on_clear_table(const six::sixp::client::irequest *req);
	void on_fieldset_received(const six::sixp::client::irequest *req,const six::sixp::client::field_set_definition *field_set);
	void on_record_update(const six::sixp::client::irequest *req,sixp_uint64_t record_id,const char *key,const six::sixp::client::field_update *fields,size_t num_fields,six::sixp::client::record_update_type update_type);
	void on_text(const six::sixp::client::irequest *req,const char *text);

	inline void setRequest(six::sixp::client::irequest *request) {m_request=request;};
	inline six::sixp::client::irequest* getRequest(void) {return m_request;};

	inline void Reset() { m_initDataDone = false;};
	inline void setLoggaData(bool b) { m_loggaData = b;};
	inline bool getLoggaData() { return m_loggaData;};

private:
        bool m_initDataDone;
        six::sixp::client::irequest *m_request;
        bool m_loggaData;
};

