z_mediaclass (zotonic_core v1.0.0-rc.10)
Link to this section Summary
Functions
Convert process state when code is changed
Expand the optional mediaclass for tag generation
Expand the mediaclass, use the checksum when available
Fetch the mediaclass definition for the current context.
Check every RESCAN_PERIOD msecs if there are changes.
Initiates the server.
Observer, triggered when there are new module files indexed
Call this to force a re-index and parse of all moduleclass definitions.
Starts the server
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.
Link to this section Functions
Link to this function
code_change(OldVsn, State, Extra)
Link to this function
expand_mediaclass(Props, Context)
-spec expand_mediaclass(list(), #context{}) -> {ok, list()}.
Link to this function
expand_mediaclass_checksum(Checksum)
-spec expand_mediaclass_checksum(list() | binary()) -> {ok, list()} | {error, term()}.
Link to this function
expand_mediaclass_checksum(Checksum, Props)
-spec expand_mediaclass_checksum(Checksum :: binary(), Props :: list()) ->
{ok, list()} | {error, checksum}.
Link to this function
get(MediaClass, Context)
-spec get(MediaClass :: list() | binary(), #context{}) ->
{ok, PreviewProps :: list(), Checksum :: binary()}.
Link to this function
handle_call(Message, From, State)
Link to this function
handle_cast(Message, State)
Link to this function
handle_info(Info, State)
Link to this function
init(Site)
Link to this function
module_reindexed(_, Context)
-spec module_reindexed(module_reindexed, #context{}) -> ok.
Link to this function
new_ets()
-spec new_ets() -> ets:tid() | atom().
Link to this function
reset(Context)
-spec reset(#context{}) -> ok.
Link to this function
start_link(Site)
Link to this function