//..............................................................................
//
// $(pluginName) log record declarations and representer
//

//..............................................................................

enum $(logRecordCodeEnum)
{
	Connected,
	Disconnected,
}

//..............................................................................

bool $(logRepresenterFunc) (
	log.RepresenterTarget* target,
	uint64_t recordCode,
	void const* p,
	size_t size,
	uint_t foldFlags
	)
{
	switch (recordCode)
	{
	case $(logRecordCodeEnum).Connected:
		target.m_lineAttr.m_iconIdx = log.StdLogIcon.Play;
		target.m_lineAttr.m_backColor = log.StdLogColor.Connect;
		target.addHyperText ($"Connected to \e[34m$((char const*) p)");
		break;

	case $(logRecordCodeEnum).Disconnected:
		target.m_lineAttr.m_iconIdx = log.StdLogIcon.Pause;
		target.m_lineAttr.m_backColor = log.StdLogColor.Disconnect;
		target.addHyperText ($"Disconnected from \e[34m$((char const*) p)");
		break;

	default:
		return false;
	}

	return true;
}

//..............................................................................
