112
-spec(start_boot/1 :: (Application :: atom()) -> 'ok' | {'error', any()}).
112
-spec start_boot(Application :: atom()) -> 'ok' | {'error', any()}.
114
114
start_boot(Application) ->
115
115
start_boot(Application, temporary).
117
-spec(start_boot/2 :: (Application :: atom(), RestartType :: restart_type()) ->
118
'ok' | {'error', any()}).
117
-spec start_boot(Application :: atom(), RestartType :: restart_type()) ->
118
'ok' | {'error', any()}.
120
120
start_boot(Application, RestartType) ->
121
121
application_controller:start_boot_application(Application, RestartType).
123
-spec(takeover/2 :: (Application :: atom(), RestartType :: restart_type()) ->
123
-spec takeover(Application :: atom(), RestartType :: restart_type()) -> any().
126
125
takeover(Application, RestartType) ->
127
126
dist_ac:takeover_application(Application, RestartType).
129
-spec(permit/2 :: (Application :: atom(), Bool :: bool()) ->
130
'ok' | {'error', any()}).
128
-spec permit(Application :: atom(), Bool :: bool()) -> 'ok' | {'error', any()}.
132
130
permit(Application, Bool) ->
147
-spec(stop/1 :: (Application :: atom()) -> 'ok' | {'error', any()}).
145
-spec stop(Application :: atom()) -> 'ok' | {'error', any()}.
149
147
stop(Application) ->
150
148
application_controller:stop_application(Application).
152
-spec(which_applications/0 :: () -> [{atom(), string(), string()}]).
150
-spec which_applications() -> [{atom(), string(), string()}].
154
152
which_applications() ->
155
153
application_controller:which_applications().
157
-spec(which_applications/1 :: (timeout()) -> [{atom(), string(), string()}]).
155
-spec which_applications(timeout()) -> [{atom(), string(), string()}].
159
157
which_applications(infinity) ->
160
158
application_controller:which_applications(infinity);
161
159
which_applications(Timeout) when is_integer(Timeout), Timeout>=0 ->
162
160
application_controller:which_applications(Timeout).
164
-spec(loaded_applications/0 :: () -> [{atom(), string(), string()}]).
162
-spec loaded_applications() -> [{atom(), string(), string()}].
166
164
loaded_applications() ->
167
165
application_controller:loaded_applications().
169
-spec(info/0 :: () -> any()).
167
-spec info() -> any().
172
170
application_controller:info().
174
-spec(set_env/3 :: (Application :: atom(), Key :: atom(),
175
Value :: any()) -> 'ok').
172
-spec set_env(Application :: atom(), Key :: atom(), Value :: any()) -> 'ok'.
177
174
set_env(Application, Key, Val) ->
178
175
application_controller:set_env(Application, Key, Val).
180
-spec(set_env/4 :: (Application :: atom(), Key :: atom(),
181
Value :: any(), Timeout :: timeout()) -> 'ok').
177
-spec set_env(Application :: atom(), Key :: atom(),
178
Value :: any(), Timeout :: timeout()) -> 'ok'.
183
180
set_env(Application, Key, Val, infinity) ->
184
181
application_controller:set_env(Application, Key, Val, infinity);
185
182
set_env(Application, Key, Val, Timeout) when is_integer(Timeout), Timeout>=0 ->
186
183
application_controller:set_env(Application, Key, Val, Timeout).
188
-spec(unset_env/2 :: (Application :: atom(), Key :: atom()) -> 'ok').
185
-spec unset_env(atom(), atom()) -> 'ok'.
190
187
unset_env(Application, Key) ->
191
188
application_controller:unset_env(Application, Key).
193
-spec(unset_env/3 :: (Application :: atom(), Key :: atom(),
194
Timeout :: timeout()) -> 'ok').
190
-spec unset_env(atom(), atom(), timeout()) -> 'ok'.
196
192
unset_env(Application, Key, infinity) ->
197
193
application_controller:unset_env(Application, Key, infinity);
198
194
unset_env(Application, Key, Timeout) when is_integer(Timeout), Timeout>=0 ->
199
195
application_controller:unset_env(Application, Key, Timeout).
201
-spec(get_env/1 :: (Key :: atom()) -> 'undefined' | {'ok', any()}).
197
-spec get_env(atom()) -> 'undefined' | {'ok', any()}.
204
200
application_controller:get_pid_env(group_leader(), Key).
206
-spec(get_env/2 :: (Application :: atom(), Key :: atom()) ->
207
'undefined' | {'ok', any()}).
202
-spec get_env(atom(), atom()) -> 'undefined' | {'ok', any()}.
209
204
get_env(Application, Key) ->
210
205
application_controller:get_env(Application, Key).
212
-spec(get_all_env/0 :: () -> [] | [{atom(), any()}]).
207
-spec get_all_env() -> [] | [{atom(), any()}].
215
210
application_controller:get_pid_all_env(group_leader()).
217
-spec(get_all_env/1 :: (Application :: atom()) -> [] | [{atom(),any()}]).
212
-spec get_all_env(atom()) -> [] | [{atom(),any()}].
219
214
get_all_env(Application) ->
220
215
application_controller:get_all_env(Application).
222
-spec(get_key/1 :: (Key :: atom()) -> 'undefined' | {'ok', any()}).
217
-spec get_key(atom()) -> 'undefined' | {'ok', any()}.
225
220
application_controller:get_pid_key(group_leader(), Key).
227
-spec(get_key/2 :: (Application :: atom(), Key :: atom()) ->
228
'undefined' | {'ok', any()}).
222
-spec get_key(atom(), atom()) -> 'undefined' | {'ok', any()}.
230
224
get_key(Application, Key) ->
231
225
application_controller:get_key(Application, Key).
233
-spec(get_all_key/0 :: () -> 'undefined' | [] | {'ok', [{atom(),any()},...]}).
227
-spec get_all_key() -> 'undefined' | [] | {'ok', [{atom(),any()},...]}.
236
230
application_controller:get_pid_all_key(group_leader()).
238
-spec(get_all_key/1 :: (Application :: atom()) ->
239
'undefined' | [] | {'ok', [{atom(),any()}]}).
232
-spec get_all_key(atom()) -> 'undefined' | [] | {'ok', [{atom(),any()}]}.
241
234
get_all_key(Application) ->
242
235
application_controller:get_all_key(Application).
244
-spec(get_application/0 :: () -> 'undefined' | {'ok', atom()}).
237
-spec get_application() -> 'undefined' | {'ok', atom()}.
246
239
get_application() ->
247
240
application_controller:get_application(group_leader()).
249
-spec(get_application/1 :: (Pid :: pid()) -> 'undefined' | {'ok', atom()}
250
; (Module :: atom()) -> 'undefined' | {'ok', atom()}).
242
-spec get_application(Pid :: pid()) -> 'undefined' | {'ok', atom()}
243
; (Module :: atom()) -> 'undefined' | {'ok', atom()}.
252
245
get_application(Pid) when is_pid(Pid) ->
253
246
case process_info(Pid, group_leader) of