

#ifndef ACC_SCAN_H_
#define ACC_SCAN_H_

#include <object.h>

class cObjectAccess : public cObject
{
public:
	cObjectAccess();
    cObjectAccess(cObjectAccess *obj);
	~cObjectAccess();

	cTagList * getTags();
	bool parse(KourierObject *, std::vector<KTag*>* ct = NULL);
	bool parse(json_t *data); //JSON

	//uses the append_new function for return arrays so that the json ref stays at 1
	//returns an array of all the values
	json_t * getJSONObj(); //for JSON

	bool compIndex(cObject *obj);
	bool operator <(cObject &rhs);
	char * printKey();
	cObject * clone();


	uint32_t getDeviceSerial() const;
	void setDeviceSerial(uint32_t deviceSerial);
	const char* getLabel() const;
	void setLabel(const char* label);
	uint32_t getPortNum() const;
	void setPortNum(uint32_t portNum);
	char* getScanCode() const;
	void setScanCode(const char* scanCode);

private:
   void populate_tags(KTag *);


	uint32_t mDeviceSerial;
	uint32_t mPortNum;
	char * mLabel;
	char * mScanCode;
};


#endif
