2009-03-04 04:32:55 +01: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
|
|
|
|
|
2015-06-13 03:02:20 +02:00
|
|
|
#include <string>
|
2017-08-10 21:22:44 +02:00
|
|
|
#include <vector>
|
2017-06-22 21:53:17 +02:00
|
|
|
|
2017-07-27 21:54:48 +02:00
|
|
|
#include "action.h"
|
|
|
|
#include "parser.h"
|
|
|
|
#include "service.h"
|
|
|
|
|
2017-06-22 21:53:17 +02:00
|
|
|
namespace android {
|
|
|
|
namespace init {
|
|
|
|
|
2017-05-02 02:10:09 +02:00
|
|
|
// Note: These globals are *only* valid in init, so they should not be used in ueventd,
|
|
|
|
// watchdogd, or any files that may be included in those, such as devices.cpp and util.cpp.
|
|
|
|
// TODO: Have an Init class and remove all globals.
|
2016-03-21 09:08:07 +01:00
|
|
|
extern std::string default_console;
|
2017-07-27 21:54:48 +02:00
|
|
|
extern std::vector<std::string> late_import_paths;
|
|
|
|
|
2017-07-28 01:20:58 +02:00
|
|
|
Parser CreateParser(ActionManager& action_manager, ServiceList& service_list);
|
2017-07-27 21:54:48 +02:00
|
|
|
|
2015-07-31 21:45:25 +02:00
|
|
|
void handle_control_message(const std::string& msg, const std::string& arg);
|
2010-04-14 04:48:59 +02:00
|
|
|
|
2017-04-18 01:34:20 +02:00
|
|
|
void property_changed(const std::string& name, const std::string& value);
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2015-04-25 06:13:44 +02:00
|
|
|
void register_epoll_handler(int fd, void (*fn)());
|
|
|
|
|
2017-02-02 19:52:39 +01:00
|
|
|
bool start_waiting_for_property(const char *name, const char *value);
|
2017-01-26 01:27:03 +01:00
|
|
|
|
2017-04-20 00:31:58 +02:00
|
|
|
void DumpState();
|
|
|
|
|
2017-06-28 07:08:45 +02:00
|
|
|
void ResetWaitForProp();
|
|
|
|
|
2018-01-19 23:25:48 +01:00
|
|
|
int main(int argc, char** argv);
|
|
|
|
|
2017-06-22 21:53:17 +02:00
|
|
|
} // namespace init
|
|
|
|
} // namespace android
|
|
|
|
|
2015-07-24 02:53:11 +02:00
|
|
|
#endif /* _INIT_INIT_H */
|