Merge "Make log_event_list.h available to vendor code." am: fd01164a8d
am: ab30115581
am: c0ee1144e9
Change-Id: I0886e6d4e9428cff33940e8501e12eb0ab14c6b7
This commit is contained in:
commit
ede3ccac69
2 changed files with 84 additions and 0 deletions
73
liblog/include_vndk/log/log_event_list.h
Normal file
73
liblog/include_vndk/log/log_event_list.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright (C) 2005-2016 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* Special log_event_list.h file for VNDK linking modules */
|
||||
|
||||
#ifndef _LIBS_LOG_EVENT_LIST_H
|
||||
#define _LIBS_LOG_EVENT_LIST_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <log/log_id.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __ANDROID_USE_LIBLOG_EVENT_INTERFACE 1
|
||||
|
||||
/*
|
||||
* The opaque context used to manipulate lists of events.
|
||||
*/
|
||||
#ifndef __android_log_context_defined
|
||||
#define __android_log_context_defined
|
||||
typedef struct android_log_context_internal* android_log_context;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Creates a context associated with an event tag to write elements to
|
||||
* the list of events.
|
||||
*/
|
||||
android_log_context create_android_logger(uint32_t tag);
|
||||
|
||||
/* All lists must be braced by a begin and end call */
|
||||
/*
|
||||
* NB: If the first level braces are missing when specifying multiple
|
||||
* elements, we will manufacturer a list to embrace it for your API
|
||||
* convenience. For a single element, it will remain solitary.
|
||||
*/
|
||||
int android_log_write_list_begin(android_log_context ctx);
|
||||
int android_log_write_list_end(android_log_context ctx);
|
||||
|
||||
int android_log_write_int32(android_log_context ctx, int32_t value);
|
||||
int android_log_write_int64(android_log_context ctx, int64_t value);
|
||||
int android_log_write_string8(android_log_context ctx, const char* value);
|
||||
int android_log_write_string8_len(android_log_context ctx, const char* value,
|
||||
size_t maxlen);
|
||||
int android_log_write_float32(android_log_context ctx, float value);
|
||||
|
||||
/* Submit the composed list context to the specified logger id */
|
||||
/* NB: LOG_ID_EVENTS and LOG_ID_SECURITY only valid binary buffers */
|
||||
int android_log_write_list(android_log_context ctx, log_id_t id);
|
||||
|
||||
/* Finished with reader or writer context */
|
||||
int android_log_destroy(android_log_context* ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LIBS_LOG_EVENT_LIST_H */
|
|
@ -35,6 +35,17 @@ LIBLOG_M {
|
|||
android_logger_get_statistics; # vndk
|
||||
__android_log_error_write; # vndk
|
||||
__android_log_is_loggable;
|
||||
create_android_logger; #vndk
|
||||
android_log_destroy; #vndk
|
||||
android_log_write_list_begin; #vndk
|
||||
android_log_write_list_end; #vndk
|
||||
android_log_write_int32; #vndk
|
||||
android_log_write_int64; #vndk
|
||||
android_log_write_string8; #vndk
|
||||
android_log_write_string8_len; #vndk
|
||||
android_log_write_float32; #vndk
|
||||
android_log_write_list; #vndk
|
||||
|
||||
};
|
||||
|
||||
LIBLOG_O {
|
||||
|
|
Loading…
Reference in a new issue