Move type ids to stats_event.h
This allows the parsing code within statsd to access the type ids. Also, we move stats_event.h to the include directory for consistency. Test: m -j libstatssocket Change-Id: I1db7fc9e9d0efd2225612353a8fc49bb13220ff0
This commit is contained in:
parent
7d0697ed45
commit
85f73573d6
2 changed files with 14 additions and 14 deletions
|
@ -59,6 +59,19 @@ struct stats_event;
|
|||
#define ERROR_TOO_MANY_ANNOTATIONS 0x80
|
||||
#define ERROR_TOO_MANY_FIELDS 0x100
|
||||
|
||||
/* TYPE IDS */
|
||||
#define INT32_TYPE 0x00
|
||||
#define INT64_TYPE 0x01
|
||||
#define STRING_TYPE 0x02
|
||||
#define LIST_TYPE 0x03
|
||||
#define FLOAT_TYPE 0x04
|
||||
#define BOOL_TYPE 0x05
|
||||
#define BYTE_ARRAY_TYPE 0x06
|
||||
#define OBJECT_TYPE 0x07
|
||||
#define KEY_VALUE_PAIRS_TYPE 0x08
|
||||
#define ATTRIBUTION_CHAIN_TYPE 0x09
|
||||
#define ERROR_TYPE 0x0F
|
||||
|
||||
/* SYSTEM API */
|
||||
struct stats_event* stats_event_obtain();
|
||||
void stats_event_write(struct stats_event* event);
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "stats_event.h"
|
||||
#include "include/stats_event.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
@ -34,19 +34,6 @@
|
|||
#define POS_ATOM_ID (POS_TIMESTAMP + sizeof(byte) + sizeof(uint64_t))
|
||||
#define POS_FIRST_FIELD (POS_ATOM_ID + sizeof(byte) + sizeof(uint32_t))
|
||||
|
||||
/* TYPE IDS */
|
||||
#define INT32_TYPE 0x00
|
||||
#define INT64_TYPE 0x01
|
||||
#define STRING_TYPE 0x02
|
||||
#define LIST_TYPE 0x03
|
||||
#define FLOAT_TYPE 0x04
|
||||
#define BOOL_TYPE 0x05
|
||||
#define BYTE_ARRAY_TYPE 0x06
|
||||
#define OBJECT_TYPE 0x07
|
||||
#define KEY_VALUE_PAIR_TYPE 0x08
|
||||
#define ATTRIBUTION_CHAIN_TYPE 0x09
|
||||
#define ERROR_TYPE 0x0F
|
||||
|
||||
/* LIMITS */
|
||||
#define MAX_ANNOTATION_COUNT 15
|
||||
#define MAX_ANNOTATION_ID 127
|
||||
|
|
Loading…
Reference in a new issue