Expose offset of private member hidl_string::mBuffer.
Bug: 30575790
Change-Id: Id8ca6cc8a82cc0133732d10aa4fdc107694f7e00
diff --git a/include/hidl/HidlSupport.h b/include/hidl/HidlSupport.h
index c36b7ec..2689ab4 100644
--- a/include/hidl/HidlSupport.h
+++ b/include/hidl/HidlSupport.h
@@ -47,6 +47,9 @@
status_t writeEmbeddedToParcel(
Parcel *parcel, size_t parentHandle, size_t parentOffset) const;
+ // offsetof(hidl_string, mBuffer) exposed since mBuffer is private.
+ static const size_t kOffsetOfBuffer;
+
private:
char *mBuffer;
size_t mSize; // NOT including the terminating '\0'.