102d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe/* 202d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** 302d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** Copyright 2008, The Android Open Source Project 402d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** 502d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** Licensed under the Apache License, Version 2.0 (the "License"); 602d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** you may not use this file except in compliance with the License. 702d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** You may obtain a copy of the License at 802d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** 902d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** http://www.apache.org/licenses/LICENSE-2.0 1002d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** 1102d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** Unless required by applicable law or agreed to in writing, software 1202d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** distributed under the License is distributed on an "AS IS" BASIS, 1302d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1402d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** See the License for the specific language governing permissions and 1502d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe** limitations under the License. 1602d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe*/ 1702d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 1802d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe#ifndef GLOBALS_H_ 1902d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe#define GLOBALS_H_ 2002d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 2102d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe#include <inttypes.h> 2202d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 2302d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampenamespace android { 2402d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampenamespace installd { 2502d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 26d089ca1703769854356a263ca640d3e07ab8548dAndreas Gampe/* constants */ 27d089ca1703769854356a263ca640d3e07ab8548dAndreas Gampe 28d089ca1703769854356a263ca640d3e07ab8548dAndreas Gampe// Name of the environment variable that contains the asec mountpoint. 29d089ca1703769854356a263ca640d3e07ab8548dAndreas Gampestatic constexpr const char* ASEC_MOUNTPOINT_ENV_NAME = "ASEC_MOUNTPOINT"; 30d089ca1703769854356a263ca640d3e07ab8548dAndreas Gampe 3102d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe/* data structures */ 3202d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 3302d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampestruct dir_rec_t { 3402d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe char* path; 3502d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe size_t len; 3602d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe}; 3702d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 3802d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampestruct dir_rec_array_t { 3902d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe size_t count; 4002d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe dir_rec_t* dirs; 4102d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe}; 4202d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 4302d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_t android_app_dir; 4402d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_t android_app_ephemeral_dir; 4502d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_t android_app_lib_dir; 4602d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_t android_app_private_dir; 4702d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_t android_asec_dir; 4802d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_t android_data_dir; 4902d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_t android_media_dir; 5002d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_t android_mnt_expand_dir; 516a1648e2f161cb1d7c46aa9d27e8062521a9f314Calin Juravleextern dir_rec_t android_profiles_dir; 5202d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 5302d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeextern dir_rec_array_t android_system_dirs; 5402d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 5502d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampevoid free_globals(); 5602d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampebool init_globals_from_data_and_root(const char* data, const char* root); 5702d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 5802d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe} // namespace installd 5902d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe} // namespace android 6002d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe 6102d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe#endif // GLOBALS_H_ 62