indexing description: "API interface to wiki services" author: "Dennis Rietmann " date: "$Date$" revision: "$Revision$" class WIKI_SERVICE inherit API_SERVICE create make feature -- Basic operations wiki_render_html (a_session: STRING; a_project_id: INTEGER_REF; a_wiki_text: STRING) : STRING is -- Parses wiki text and renders it as html local l_msg: O_WIKI_RENDER_HTML_MESSAGE l_reply_msg:O_GENERAL_STRING_MESSAGE do -- argument validiation check_anonymous_session (a_session) if not is_valid_session (a_session) then last_fault := err_invalid_session elseif a_project_id <= 0 then last_fault := err_invalid_project else -- generate and send message create l_msg.make (a_session, a_wiki_text, a_project_id) send_and_wait_for_reply (l_msg) if is_ok then l_reply_msg ?= last_reply check l_reply_msg_ok: l_reply_msg /= Void end Result := l_reply_msg.string end end end feature -- Creation new_tuple (a_name: STRING): TUPLE is -- Tuple of default-valued arguments to pass to call `a_name'. do if a_name.is_equal (wiki_render_html_name) then create {TUPLE [STRING, INTEGER_REF, STRING]}Result end end feature -- Initialisation self_register is -- Register all actions for this service do register_with_help (agent wiki_render_html, wiki_render_html_name, "renders wiki text as html.") end feature {NONE} -- Implementation wiki_render_html_name: STRING is "render_html" end