diff options
Diffstat (limited to 'plugins/bootstrap.mk')
-rw-r--r-- | plugins/bootstrap.mk | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/plugins/bootstrap.mk b/plugins/bootstrap.mk index 6fba54c..0829de3 100644 --- a/plugins/bootstrap.mk +++ b/plugins/bootstrap.mk @@ -125,7 +125,9 @@ tpl_gen_fsm = "-module($(n))." \ "" \ "%% gen_fsm." \ "-export([init/1])." \ + "-export([state_name/2])." \ "-export([handle_event/3])." \ + "-export([state_name/3])." \ "-export([handle_sync_event/4])." \ "-export([handle_info/3])." \ "-export([terminate/3])." \ @@ -143,22 +145,28 @@ tpl_gen_fsm = "-module($(n))." \ "%% gen_fsm." \ "" \ "init([]) ->" \ - " {ok, initial_state, \#state{}}." \ + " {ok, state_name, \#state{}}." \ "" \ - "handle_event(_Event, StateName, State) ->" \ - " {next_state, StateName, State}." \ + "state_name(_Event, StateData) ->" \ + " {next_state, state_name, StateData}." \ "" \ - "handle_sync_event(_Event, _From, StateName, State) ->" \ - " {reply, ignored, StateName, State}." \ + "handle_event(_Event, StateName, StateData) ->" \ + " {next_state, StateName, StateData}." \ "" \ - "handle_info(_Info, StateName, State) ->" \ - " {next_state, StateName, State}." \ + "state_name(_Event, _From, StateData) ->" \ + " {reply, ignored, state_name, StateData}." \ "" \ - "terminate(_Reason, _StateName, _State) ->" \ + "handle_sync_event(_Event, _From, StateName, StateData) ->" \ + " {reply, ignored, StateName, StateData}." \ + "" \ + "handle_info(_Info, StateName, StateData) ->" \ + " {next_state, StateName, StateData}." \ + "" \ + "terminate(_Reason, _StateName, _StateData) ->" \ " ok." \ "" \ - "code_change(_OldVsn, StateName, State, _Extra) ->" \ - " {ok, StateName, State}." + "code_change(_OldVsn, StateName, StateData, _Extra) ->" \ + " {ok, StateName, StateData}." tpl_cowboy_http = "-module($(n))." \ "-behaviour(cowboy_http_handler)." \ "" \ |