1#!/usr/bin/env bash
2
3# Simple helper for ease of development until this API is frozen.
4
5echo "LIBBINDER_NDK { # introduced=29"
6echo "  global:"
7{
8    grep -oP "AIBinder_[a-zA-Z0-9_]+(?=\()" include_ndk/android/binder_ibinder.h;
9    grep -oP "AIBinder_[a-zA-Z0-9_]+(?=\()" include_ndk/android/binder_ibinder_jni.h;
10    grep -oP "AParcel_[a-zA-Z0-9_]+(?=\()" include_ndk/android/binder_parcel.h;
11    grep -oP "AStatus_[a-zA-Z0-9_]+(?=\()" include_ndk/android/binder_status.h;
12} | sort | uniq | awk '{ print "    " $0 ";"; }'
13{
14    grep -oP "AServiceManager_[a-zA-Z0-9_]+(?=\()" include_apex/android/binder_manager.h;
15    grep -oP "ABinderProcess_[a-zA-Z0-9_]+(?=\()" include_apex/android/binder_process.h;
16} | sort | uniq | awk '{ print "    " $0 "; # apex"; }'
17echo "  local:"
18echo "    *;"
19echo "};"
20