summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Grafov2018-02-08 13:20:56 -0600
committerPavel Grafov2018-02-13 13:21:43 -0600
commit446d01c2c71c1b3cd1ab5000a61ff3abe2676cf6 (patch)
treec79b7d298777ea05e35ff70fe93a150e9ec4f118 /liblog/include_vndk
parent1cb765c86737f67e953375a70e2de9339b4023f6 (diff)
downloadplatform-system-core-446d01c2c71c1b3cd1ab5000a61ff3abe2676cf6.tar.gz
platform-system-core-446d01c2c71c1b3cd1ab5000a61ff3abe2676cf6.tar.xz
platform-system-core-446d01c2c71c1b3cd1ab5000a61ff3abe2676cf6.zip
Make log_event_list.h available to vendor code.
This is required in order to be able to log audit events from wpa_supplicant. Only log writing functions from log_event_list.h are made available. Test: manually Bug: 70886042 Change-Id: I097d4ad1de573662658678e6a9f1fc8f17820542
Diffstat (limited to 'liblog/include_vndk')
-rw-r--r--liblog/include_vndk/log/log_event_list.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/liblog/include_vndk/log/log_event_list.h b/liblog/include_vndk/log/log_event_list.h
new file mode 100644
index 000000000..cbd309174
--- /dev/null
+++ b/liblog/include_vndk/log/log_event_list.h
@@ -0,0 +1,73 @@
1/*
2 * Copyright (C) 2005-2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/* Special log_event_list.h file for VNDK linking modules */
18
19#ifndef _LIBS_LOG_EVENT_LIST_H
20#define _LIBS_LOG_EVENT_LIST_H
21
22#include <stdint.h>
23
24#include <log/log_id.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#define __ANDROID_USE_LIBLOG_EVENT_INTERFACE 1
31
32/*
33 * The opaque context used to manipulate lists of events.
34 */
35#ifndef __android_log_context_defined
36#define __android_log_context_defined
37typedef struct android_log_context_internal* android_log_context;
38#endif
39
40/*
41 * Creates a context associated with an event tag to write elements to
42 * the list of events.
43 */
44android_log_context create_android_logger(uint32_t tag);
45
46/* All lists must be braced by a begin and end call */
47/*
48 * NB: If the first level braces are missing when specifying multiple
49 * elements, we will manufacturer a list to embrace it for your API
50 * convenience. For a single element, it will remain solitary.
51 */
52int android_log_write_list_begin(android_log_context ctx);
53int android_log_write_list_end(android_log_context ctx);
54
55int android_log_write_int32(android_log_context ctx, int32_t value);
56int android_log_write_int64(android_log_context ctx, int64_t value);
57int android_log_write_string8(android_log_context ctx, const char* value);
58int android_log_write_string8_len(android_log_context ctx, const char* value,
59 size_t maxlen);
60int android_log_write_float32(android_log_context ctx, float value);
61
62/* Submit the composed list context to the specified logger id */
63/* NB: LOG_ID_EVENTS and LOG_ID_SECURITY only valid binary buffers */
64int android_log_write_list(android_log_context ctx, log_id_t id);
65
66/* Finished with reader or writer context */
67int android_log_destroy(android_log_context* ctx);
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* _LIBS_LOG_EVENT_LIST_H */