Copyright © 2012-2013 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
code_change/3 | Convert process state when code is changed. |
expand_mediaclass/2 | Expand the optional mediaclass for tag generation. |
expand_mediaclass_checksum/1 | Expand the mediaclass, use the checksum when available. |
expand_mediaclass_checksum/2 | |
get/2 | Fetch the mediaclass definition for the current context. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | Check every RESCAN_PERIOD msecs if there are changes. |
init/1 | Initiates the server. |
module_reindexed/2 | Observer, triggered when there are new module files indexed. |
new_ets/0 | |
reset/1 | Call this to force a re-index and parse of all moduleclass definitions. |
start_link/1 | Starts the server. |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
expand_mediaclass(Props::list(), Context::#context{}) -> {ok, list()}
Expand the optional mediaclass for tag generation
expand_mediaclass_checksum(Checksum::list() | binary()) -> {ok, list()} | {error, term()}
Expand the mediaclass, use the checksum when available
expand_mediaclass_checksum(Checksum::binary(), Props::list()) -> {ok, list()} | {error, checksum}
get(MediaClass::list() | binary(), Context::#context{}) -> {ok, PreviewProps::list(), Checksum::binary()}
Fetch the mediaclass definition for the current context.
handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Check every RESCAN_PERIOD msecs if there are changes.
init(SiteProps) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
module_reindexed(X1::module_reindexed, Context::#context{}) -> ok
Observer, triggered when there are new module files indexed
new_ets() -> ets:tid() | atom()
reset(Context::#context{}) -> ok
Call this to force a re-index and parse of all moduleclass definitions.
start_link(SiteProps::Props) -> {ok, Pid} | ignore | {error, Error}
Starts the server
terminate(Reason, State) -> void()
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
Generated by EDoc