diff options
author | Steven Barth <steven@midlink.org> | 2008-08-28 10:18:10 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-28 10:18:10 +0000 |
commit | b5b0914ae3d05010f8c67766af799285cb888635 (patch) | |
tree | d0e19727c88841a418773622c009870dbf7df200 /libs/uci | |
parent | 11368a364ad57bf050b1961ae5994fbfac350e4f (diff) |
libs/uci: Updated API-Docs
Diffstat (limited to 'libs/uci')
-rw-r--r-- | libs/uci/luasrc/model/uci.lua | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/libs/uci/luasrc/model/uci.lua b/libs/uci/luasrc/model/uci.lua index 91608e379..7fc0c79fd 100644 --- a/libs/uci/luasrc/model/uci.lua +++ b/libs/uci/luasrc/model/uci.lua @@ -36,16 +36,24 @@ local require, getmetatable = require, getmetatable --- LuCI UCI model library. module("luci.model.uci") +--- Create a new UCI-Cursor. +-- @class function +-- @name cursor +-- @return UCI-Cursor cursor = uci.cursor + APIVERSION = uci.APIVERSION ---- Creates a new statevalue cursor +--- Create a new Cursor initialized to the state directory. -- @return UCI cursor function cursor_state() return cursor(nil, "/var/state") end --- UCI-Cursor +-- @class module +-- @cstyle instance +-- @name luci.model.uci.Cursor local Cursor = getmetatable(cursor()) --- Applies the new config @@ -159,7 +167,7 @@ end -- @name Cursor.commit -- @param config UCI config -- @return Boolean whether operation succeeded --- @see revert +-- @see Cursor.revert --- Deletes a section or an option. -- @class function @@ -193,30 +201,27 @@ end -- @return Table of UCI sections or table of UCI values --- Manually load a config. --- Warning: This function is unsave! You should use load_config or load_state if possible. -- @class function -- @name Cursor.load -- @param config UCI config -- @return Boolean whether operation succeeded --- @see load_config --- @see load_state --- @see save --- @see unload +-- @see Cursor.save +-- @see Cursor.unload --- Revert unsaved changes. -- @class function -- @name Cursor.revert -- @param config UCI config -- @return Boolean whether operation succeeded --- @see commit +-- @see Cursor.commit --- Saves changes made to a config to make them committable. -- @class function -- @name Cursor.save -- @param config UCI config -- @return Boolean whether operation succeeded --- @see load --- @see unload +-- @see Cursor.load +-- @see Cursor.unload --- Set a value or create a named section. -- @class function @@ -254,5 +259,5 @@ end -- @name Cursor.unload -- @param config UCI config -- @return Boolean whether operation succeeded --- @see load --- @see save +-- @see Cursor.load +-- @see Cursor.save |