blob: cfc28f1bee321d0d9183b0a51d3708fd44c6c190 [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001/*
2 * Copyright (C) 2007 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
Tom Cherry172c83f2019-06-26 14:44:37 -070017#pragma once
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080018
Tom Cherry6f2d56d2018-02-21 10:37:44 -080019#include <sys/types.h>
20
Elliott Hughesd62f0602015-06-12 18:02:20 -070021#include <string>
Tom Cherry81f5d3e2017-06-22 12:53:17 -070022
Tom Cherry67dee622017-07-27 12:54:48 -070023#include "action.h"
Tom Cherry7fd3bc22018-02-13 15:36:14 -080024#include "action_manager.h"
Tom Cherry67dee622017-07-27 12:54:48 -070025#include "parser.h"
Tom Cherry2aeb1ad2019-06-26 10:46:20 -070026#include "service_list.h"
Tom Cherry67dee622017-07-27 12:54:48 -070027
Tom Cherry81f5d3e2017-06-22 12:53:17 -070028namespace android {
29namespace init {
30
Tom Cherry911b9b12017-07-27 16:20:58 -070031Parser CreateParser(ActionManager& action_manager, ServiceList& service_list);
Jiyong Parkc2404402018-11-08 17:14:35 +090032Parser CreateServiceOnlyParser(ServiceList& service_list);
Tom Cherry67dee622017-07-27 12:54:48 -070033
Wei Wang5f01d3a2019-05-23 12:13:29 -070034bool HandleControlMessage(const std::string& msg, const std::string& arg, pid_t pid);
Colin Cross9c5366b2010-04-13 19:48:59 -070035
Tom Cherry98ad32a2017-04-17 16:34:20 -070036void property_changed(const std::string& name, const std::string& value);
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080037
Wei Wang2d0fdaa2017-02-02 10:52:39 -080038bool start_waiting_for_property(const char *name, const char *value);
Wei Wang132ac312017-01-25 16:27:03 -080039
Tom Cherry30a6f272017-04-19 15:31:58 -070040void DumpState();
41
Wei Wangeeab4912017-06-27 22:08:45 -070042void ResetWaitForProp();
43
Tom Cherry7bfea3d2018-11-06 14:12:05 -080044int SecondStageMain(int argc, char** argv);
Tom Cherry618d3102018-01-19 14:25:48 -080045
Tom Cherry81f5d3e2017-06-22 12:53:17 -070046} // namespace init
47} // namespace android