-module(ephraim). -behaviour(application). -behaviour(supervisor). -export([start/2, stop/1]). -export([init/1]). -export([notify/1]). %-spec start() -> ok. start(_Type, _Args) -> Result = supervisor:start_link(?MODULE, []), ephraim_gui:start(), Result. %-spec stop() -> ok. stop(_State) -> ok. -spec init(term()) -> ok. init(_Args) -> {ok, {{rest_for_one, 1, 60}, [{event_man, {gen_event, start_link, [{local, ephraim_event_man}]}, permanent, 1000, worker, [gen_event]}, {config, {ephraim_config, start_link, []}, permanent, 1000, worker, [ephraim_config]}, {accounts, {ephraim_accounts, start_link, []}, permanent, infinity, supervisor, [ephraim_accounts]}]}}. -spec notify(term()) -> ok. notify(Event) -> gen_event:notify(ephraim_event_man, Event).