1 /* Copyright 2015-present Samsung Electronics Co., Ltd. and other contributors
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
36 // Number of application arguments including 'iotjs' and app name.
39 // Application arguments list including 'iotjs' and app name.
50 } IOTJS_VALIDATED_STRUCT(iotjs_environment_t);
53 const iotjs_environment_t* iotjs_environment_get();
54 void iotjs_environment_release();
56 bool iotjs_environment_parse_command_line_arguments(iotjs_environment_t* env,
57 int argc, char** argv);
59 int iotjs_environment_argc(const iotjs_environment_t* env);
60 const char* iotjs_environment_argv(const iotjs_environment_t* env, int idx);
62 uv_loop_t* iotjs_environment_loop(const iotjs_environment_t* env);
63 void iotjs_environment_set_loop(iotjs_environment_t* env, uv_loop_t* loop);
65 const Config* iotjs_environment_config(const iotjs_environment_t* env);
67 void iotjs_environment_go_state_running_main(iotjs_environment_t* env);
68 void iotjs_environment_go_state_running_loop(iotjs_environment_t* env);
69 void iotjs_environment_go_state_exiting(iotjs_environment_t* env);
72 #endif /* IOTJS_ENV_H */