File indexing completed on 2025-01-18 10:13:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef UPB_MESSAGE_MESSAGE_H_
0013 #define UPB_MESSAGE_MESSAGE_H_
0014
0015 #include <stddef.h>
0016
0017 #include "upb/mem/arena.h"
0018 #include "upb/message/internal/message.h"
0019 #include "upb/message/internal/types.h"
0020 #include "upb/mini_table/message.h"
0021
0022
0023 #include "upb/port/def.inc"
0024
0025 typedef struct upb_Message upb_Message;
0026
0027 #ifdef __cplusplus
0028 extern "C" {
0029 #endif
0030
0031
0032 UPB_API upb_Message* upb_Message_New(const upb_MiniTable* m, upb_Arena* arena);
0033
0034
0035 const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len);
0036
0037
0038 void upb_Message_DeleteUnknown(upb_Message* msg, const char* data, size_t len);
0039
0040
0041 size_t upb_Message_ExtensionCount(const upb_Message* msg);
0042
0043
0044 UPB_API void upb_Message_Freeze(upb_Message* msg, const upb_MiniTable* m);
0045
0046
0047 UPB_API_INLINE bool upb_Message_IsFrozen(const upb_Message* msg);
0048
0049 #ifdef UPB_TRACING_ENABLED
0050 UPB_API void upb_Message_LogNewMessage(const upb_MiniTable* m,
0051 const upb_Arena* arena);
0052
0053 UPB_API void upb_Message_SetNewMessageTraceHandler(
0054 void (*handler)(const upb_MiniTable* m, const upb_Arena* arena));
0055 #endif
0056
0057 #ifdef __cplusplus
0058 }
0059 #endif
0060
0061 #include "upb/port/undef.inc"
0062
0063 #endif