diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-03-03 15:44:52 -0800 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-03-04 12:48:04 -0800 |
commit | fa1c063febb8726f7b629ba04c083edf33b87789 (patch) | |
tree | d25b7189b7e055bdcca002cec81256b8200d46ee /include | |
parent | 8ee42f9c50086830edb2cdf035ad5bedcf0fa6f1 (diff) | |
download | system_core-fa1c063febb8726f7b629ba04c083edf33b87789.zip system_core-fa1c063febb8726f7b629ba04c083edf33b87789.tar.gz system_core-fa1c063febb8726f7b629ba04c083edf33b87789.tar.bz2 |
private: Add event payload structures to android_logger.h
- common android_event_header_t
- android_event_int_t ANDROID_TYPE_INT payload
- android_log_event_int_t single ANDROID_TYPE_INT event
- android_event_long_t ANDROID_TYPE_LONG payload
- android_log_event_long_t single ANDROID_TYPE_LONG event
- android_event_string_t ANDROID_TYPE_STRING payload
- android_log_event_string_t single ANDROID_TYPE_STRING event
Change-Id: I9e5fccba38e3f230c2c4ec7dec51ed110c460f95
Diffstat (limited to 'include')
-rw-r--r-- | include/private/android_logger.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/private/android_logger.h b/include/private/android_logger.h index cc7ba30..724ca51 100644 --- a/include/private/android_logger.h +++ b/include/private/android_logger.h @@ -41,4 +41,46 @@ typedef struct __attribute__((__packed__)) { log_time realtime; } android_log_header_t; +/* Event Header Structure to logd */ +typedef struct __attribute__((__packed__)) { + int32_t tag; // Little Endian Order +} android_event_header_t; + +/* Event payload EVENT_TYPE_INT */ +typedef struct __attribute__((__packed__)) { + int8_t type; // EVENT_TYPE_INT + int32_t data; // Little Endian Order +} android_event_int_t; + +/* Event with single EVENT_TYPE_INT */ +typedef struct __attribute__((__packed__)) { + android_event_header_t header; + android_event_int_t payload; +} android_log_event_int_t; + +/* Event payload EVENT_TYPE_LONG */ +typedef struct __attribute__((__packed__)) { + int8_t type; // EVENT_TYPE_LONG + int64_t data; // Little Endian Order +} android_event_long_t; + +/* Event with single EVENT_TYPE_LONG */ +typedef struct __attribute__((__packed__)) { + android_event_header_t header; + android_event_long_t payload; +} android_log_event_long_t; + +/* Event payload EVENT_TYPE_STRING */ +typedef struct __attribute__((__packed__)) { + int8_t type; // EVENT_TYPE_STRING; + int32_t length; // Little Endian Order + char data[]; +} android_event_string_t; + +/* Event with single EVENT_TYPE_STRING */ +typedef struct __attribute__((__packed__)) { + android_event_header_t header; + android_event_string_t payload; +} android_log_event_string_t; + #endif |