Minor interface improvement
This commit is contained in:
parent
1ac16f73c9
commit
fa3eda079f
BIN
otpr-zx-0.9.2.zsp
Normal file
BIN
otpr-zx-0.9.2.zsp
Normal file
Binary file not shown.
@ -33,6 +33,7 @@
|
||||
|
||||
-export([do/0]).
|
||||
-export([run/2, not_done/1, done/1,
|
||||
get_home/0,
|
||||
subscribe/1, unsubscribe/0,
|
||||
list/0, list/1, list/2, list/3, latest/1,
|
||||
list_type/2, list_type_ar/1, describe/1, describe_plural/1, integrate/1,
|
||||
@ -490,6 +491,17 @@ stop(_) ->
|
||||
|
||||
%%% Daemon Controls
|
||||
|
||||
-spec get_home() -> file:filename().
|
||||
%% @doc
|
||||
%% A program launched by ZX can call this function to query the zx_daemon for its
|
||||
%% current code home. This is necessary for programs that have extra static data
|
||||
%% included in their project (translation files, icons, images, texture maps, etc.)
|
||||
%% and need to be able to locate it relative to the project root directory.
|
||||
|
||||
get_home() ->
|
||||
zx_daemon:get_home().
|
||||
|
||||
|
||||
-spec subscribe(package()) -> ok | {error, Reason :: term()}.
|
||||
%% @doc
|
||||
%% Initiates the zx_daemon and instructs it to subscribe to a package.
|
||||
|
||||
@ -327,6 +327,9 @@
|
||||
|
||||
%%% Public Interface
|
||||
|
||||
|
||||
-spec get_home() -> file:filename().
|
||||
|
||||
get_home() ->
|
||||
gen_server:call(?MODULE, get_home).
|
||||
|
||||
@ -1922,7 +1925,6 @@ do_abdicate(Realm, State = #s{conf = C = #conf{managed = Managed}}) ->
|
||||
ok = log(info, "No longer managing realm: ~160tp", [Realm]),
|
||||
State#s{conf = NewC};
|
||||
false ->
|
||||
ok = tell(error, "Cannot abdicate an unmanaged realm."),
|
||||
State
|
||||
end.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user