/* * Copyright 2019 Google LLC. All Rights Reserved. This file and proprietary * source code may only be used and distributed under the Widevine * License Agreement. */ #ifndef WIDEVINE_ODK_INCLUDE_ODK_MESSAGE_PRIV_H_ #define WIDEVINE_ODK_INCLUDE_ODK_MESSAGE_PRIV_H_ #ifdef __cplusplus extern "C" { #endif /* * This file must only be included by odk_message.c and serialization_base.c. */ #include #include /* * This is the implementation of a message. This structure is private, i.e. it * should only be included by files that are allowed to modify the internals of * a message, that being odk_message.c and serialization_base.c. To ensure * proper alignment and message size, an ODK_Message_Impl should never be * allocated directly, instead allocate ODK_Message and cast to ODK_Message_Impl * because ODK_Message_Impl may be smaller than ODK_Message. */ typedef struct { uint8_t* base; size_t capacity; size_t size; size_t read_offset; ODK_MessageStatus status; } ODK_Message_Impl; #ifdef __cplusplus } // extern "C" #endif #endif // WIDEVINE_ODK_INCLUDE_ODK_MESSAGE_PRIV_H_