X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=blobdiff_plain;f=include%2Fcectypes.h;h=95194f61ecfb8f6ed0eb53924faa212513477b6b;hp=e8670f8e7df2fa1c900e8f378f929b68533076a2;hb=6b4d1b3a3a5d4c4790234e3f8fa8a8da5a3221d7;hpb=8b99ad0fc19add184e383e9390d53501974651bf diff --git a/include/cectypes.h b/include/cectypes.h index e8670f8..95194f6 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -915,6 +915,16 @@ typedef struct cec_datapacket return *this; } + bool operator ==(const struct cec_datapacket& packet) const + { + if (size != packet.size) + return false; + for (uint8_t iPtr = 0; iPtr < size; iPtr++) + if (packet.data[iPtr] != data[iPtr]) + return false; + return true; + } + bool IsEmpty(void) const { return size == 0; } /**< @return True when this packet is empty, false otherwise. */ bool IsFull(void) const { return size == 100; } /**< @return True when this packet is false, false otherwise. */