• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 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 #ifndef CHRE_PLATFORM_SHARED_NANOAPP_TOKENIZED_LOG_H_
17 #define CHRE_PLATFORM_SHARED_NANOAPP_TOKENIZED_LOG_H_
18 
19 #include "chre_api/chre/re.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /**
26  * Platform implementation of chre pigweed tokenized log for nanoapps. The log
27  * message is sent via the pigweed tokenization format.
28  *
29  * This function must not be called directly from any nanoapp. It should only be
30  * used for the CHRE nanoapp LOG MACRO util.
31  *
32  * @param level  The CHRE log level for this message.
33  * @param token  The token representing the string log.
34  * @param types  A series of arguments to a compact format that replaces the
35  * format string literal.
36  * @param ... A variable number of arguments necessary for the given arg_types.
37  */
38 void platform_chrePwTokenizedLog(enum chreLogLevel level, uint32_t token,
39                                  uint64_t types, ...);
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif  // CHRE_PLATFORM_SHARED_NANOAPP_TOKENIZED_LOG_H_
46