2009-03-04 03:32:55 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INIT_INIT_H
|
|
|
|
#define _INIT_INIT_H
|
|
|
|
|
2018-02-21 18:37:44 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
2018-05-01 20:39:52 +00:00
|
|
|
#include <functional>
|
2015-06-13 01:02:20 +00:00
|
|
|
#include <string>
|
2017-08-10 19:22:44 +00:00
|
|
|
#include <vector>
|
2017-06-22 19:53:17 +00:00
|
|
|
|
2017-07-27 19:54:48 +00:00
|
|
|
#include "action.h"
|
2018-02-13 23:36:14 +00:00
|
|
|
#include "action_manager.h"
|
2017-07-27 19:54:48 +00:00
|
|
|
#include "parser.h"
|
2019-06-26 17:46:20 +00:00
|
|
|
#include "service_list.h"
|
2017-07-27 19:54:48 +00:00
|
|
|
|
2017-06-22 19:53:17 +00:00
|
|
|
namespace android {
|
|
|
|
namespace init {
|
|
|
|
|
2018-08-01 20:41:12 +00:00
|
|
|
// Note: These globals are *only* valid in init, so they should not be used in ueventd
|
|
|
|
// or any files that may be included in ueventd, such as devices.cpp and util.cpp.
|
2017-05-02 00:10:09 +00:00
|
|
|
// TODO: Have an Init class and remove all globals.
|
2017-07-27 19:54:48 +00:00
|
|
|
extern std::vector<std::string> late_import_paths;
|
|
|
|
|
2017-07-27 23:20:58 +00:00
|
|
|
Parser CreateParser(ActionManager& action_manager, ServiceList& service_list);
|
2018-11-08 08:14:35 +00:00
|
|
|
Parser CreateServiceOnlyParser(ServiceList& service_list);
|
2017-07-27 19:54:48 +00:00
|
|
|
|
2019-05-23 19:13:29 +00:00
|
|
|
bool HandleControlMessage(const std::string& msg, const std::string& arg, pid_t pid);
|
2010-04-14 02:48:59 +00:00
|
|
|
|
2017-04-17 23:34:20 +00:00
|
|
|
void property_changed(const std::string& name, const std::string& value);
|
2009-03-04 03:32:55 +00:00
|
|
|
|
2017-02-02 18:52:39 +00:00
|
|
|
bool start_waiting_for_property(const char *name, const char *value);
|
2017-01-26 00:27:03 +00:00
|
|
|
|
2017-04-19 22:31:58 +00:00
|
|
|
void DumpState();
|
|
|
|
|
2017-06-28 05:08:45 +00:00
|
|
|
void ResetWaitForProp();
|
|
|
|
|
2018-11-06 22:12:05 +00:00
|
|
|
int SecondStageMain(int argc, char** argv);
|
2018-01-19 22:25:48 +00:00
|
|
|
|
2017-06-22 19:53:17 +00:00
|
|
|
} // namespace init
|
|
|
|
} // namespace android
|
|
|
|
|
2015-07-24 00:53:11 +00:00
|
|
|
#endif /* _INIT_INIT_H */
|