blob: 4f686cb5b7f0d716d89ca40b2311f771fa15d1e9 [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);
Nikita Ioffe091c4d12019-12-05 12:35:19 +000032Parser CreateServiceOnlyParser(ServiceList& service_list, bool from_apex);
Tom Cherry67dee622017-07-27 12:54:48 -070033
Wei Wang2d0fdaa2017-02-02 10:52:39 -080034bool start_waiting_for_property(const char *name, const char *value);
Wei Wang132ac312017-01-25 16:27:03 -080035
Tom Cherry30a6f272017-04-19 15:31:58 -070036void DumpState();
37
Wei Wangeeab4912017-06-27 22:08:45 -070038void ResetWaitForProp();
39
Tom Cherry1ab3dfc2019-04-22 17:46:37 -070040void SendLoadPersistentPropertiesMessage();
Tom Cherry802864c2020-03-12 14:29:25 -070041
42void PropertyChanged(const std::string& name, const std::string& value);
43bool QueueControlMessage(const std::string& message, const std::string& name, pid_t pid, int fd);
Tom Cherry1ab3dfc2019-04-22 17:46:37 -070044
Tom Cherry080fa982020-03-27 14:31:08 -070045void DebugRebootLogging();
46
Tom Cherry7bfea3d2018-11-06 14:12:05 -080047int SecondStageMain(int argc, char** argv);
Tom Cherry618d3102018-01-19 14:25:48 -080048
Tom Cherry81f5d3e2017-06-22 12:53:17 -070049} // namespace init
50} // namespace android