libs/uci: Updated API-Docs

This commit is contained in:
Steven Barth 2008-08-28 10:18:10 +00:00
parent 11368a364a
commit b5b0914ae3

View file

@ -36,16 +36,24 @@ local require, getmetatable = require, getmetatable
--- LuCI UCI model library. --- LuCI UCI model library.
module("luci.model.uci") module("luci.model.uci")
--- Create a new UCI-Cursor.
-- @class function
-- @name cursor
-- @return UCI-Cursor
cursor = uci.cursor cursor = uci.cursor
APIVERSION = uci.APIVERSION APIVERSION = uci.APIVERSION
--- Creates a new statevalue cursor --- Create a new Cursor initialized to the state directory.
-- @return UCI cursor -- @return UCI cursor
function cursor_state() function cursor_state()
return cursor(nil, "/var/state") return cursor(nil, "/var/state")
end end
--- UCI-Cursor --- UCI-Cursor
-- @class module
-- @cstyle instance
-- @name luci.model.uci.Cursor
local Cursor = getmetatable(cursor()) local Cursor = getmetatable(cursor())
--- Applies the new config --- Applies the new config
@ -159,7 +167,7 @@ end
-- @name Cursor.commit -- @name Cursor.commit
-- @param config UCI config -- @param config UCI config
-- @return Boolean whether operation succeeded -- @return Boolean whether operation succeeded
-- @see revert -- @see Cursor.revert
--- Deletes a section or an option. --- Deletes a section or an option.
-- @class function -- @class function
@ -193,30 +201,27 @@ end
-- @return Table of UCI sections or table of UCI values -- @return Table of UCI sections or table of UCI values
--- Manually load a config. --- Manually load a config.
-- Warning: This function is unsave! You should use load_config or load_state if possible.
-- @class function -- @class function
-- @name Cursor.load -- @name Cursor.load
-- @param config UCI config -- @param config UCI config
-- @return Boolean whether operation succeeded -- @return Boolean whether operation succeeded
-- @see load_config -- @see Cursor.save
-- @see load_state -- @see Cursor.unload
-- @see save
-- @see unload
--- Revert unsaved changes. --- Revert unsaved changes.
-- @class function -- @class function
-- @name Cursor.revert -- @name Cursor.revert
-- @param config UCI config -- @param config UCI config
-- @return Boolean whether operation succeeded -- @return Boolean whether operation succeeded
-- @see commit -- @see Cursor.commit
--- Saves changes made to a config to make them committable. --- Saves changes made to a config to make them committable.
-- @class function -- @class function
-- @name Cursor.save -- @name Cursor.save
-- @param config UCI config -- @param config UCI config
-- @return Boolean whether operation succeeded -- @return Boolean whether operation succeeded
-- @see load -- @see Cursor.load
-- @see unload -- @see Cursor.unload
--- Set a value or create a named section. --- Set a value or create a named section.
-- @class function -- @class function
@ -254,5 +259,5 @@ end
-- @name Cursor.unload -- @name Cursor.unload
-- @param config UCI config -- @param config UCI config
-- @return Boolean whether operation succeeded -- @return Boolean whether operation succeeded
-- @see load -- @see Cursor.load
-- @see save -- @see Cursor.save