Home | History | Annotate | Download | only in nanoapp
      1 /*
      2  * Copyright (C) 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 #include "chre/platform/shared/nanoapp_support_lib_dso.h"
     18 
     19 #include <chre.h>
     20 
     21 /**
     22  * @file
     23  * The Nanoapp Support Library (NSL) that gets built with nanoapps to act as an
     24  * intermediary to the reference CHRE implementation. It provides hooks so the
     25  * app can be registered with the system, and also provides a layer where we can
     26  * implement cross-version compatibility features as needed.
     27  */
     28 
     29 __attribute__((used)) __attribute__((visibility("default")))
     30 const struct chreNslNanoappInfo _chreNslDsoNanoappInfo = {
     31   .magic = CHRE_NSL_NANOAPP_INFO_MAGIC,
     32   .structMinorVersion = CHRE_NSL_NANOAPP_INFO_STRUCT_MINOR_VERSION,
     33   .targetApiVersion = CHRE_API_VERSION,
     34 
     35   // These values are supplied by the build environment
     36   .vendor = NANOAPP_VENDOR_STRING,
     37   .name = NANOAPP_NAME_STRING,
     38   .isSystemNanoapp = NANOAPP_IS_SYSTEM_NANOAPP,
     39   .appId = NANOAPP_ID,
     40   .appVersion = NANOAPP_VERSION,
     41 
     42   .entryPoints = {
     43     .start = nanoappStart,
     44     .handleEvent = nanoappHandleEvent,
     45     .end = nanoappEnd,
     46   },
     47 };
     48 
     49