mirror of https://gitee.com/bigwinds/arangodb
446 lines
14 KiB
C
446 lines
14 KiB
C
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief JavaScript server functions
|
|
///
|
|
/// @file
|
|
///
|
|
/// DISCLAIMER
|
|
///
|
|
/// Copyright 2010-2011 triagens GmbH, Cologne, Germany
|
|
///
|
|
/// Licensed under the Apache License, Version 2.0 (the "License");
|
|
/// you may not use this file except in compliance with the License.
|
|
/// You may obtain a copy of the License at
|
|
///
|
|
/// http://www.apache.org/licenses/LICENSE-2.0
|
|
///
|
|
/// Unless required by applicable law or agreed to in writing, software
|
|
/// distributed under the License is distributed on an "AS IS" BASIS,
|
|
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
/// See the License for the specific language governing permissions and
|
|
/// limitations under the License.
|
|
///
|
|
/// Copyright holder is triAGENS GmbH, Cologne, Germany
|
|
///
|
|
/// @author Dr. Frank Celler
|
|
/// @author Copyright 2011, triAGENS GmbH, Cologne, Germany
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_28 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page JSModulesTOC
|
|
///
|
|
/// <ol>
|
|
/// <li>@ref JSModulesRequire "require"</li>
|
|
/// </ol>
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_36 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page JSModules JavaScript Modules
|
|
///
|
|
/// The AvocadoDB uses a <a
|
|
/// href="http://wiki.commonjs.org/wiki/Modules">CommonJS</a> compatible module
|
|
/// concept. You can use the function @FN{require} in order to load a
|
|
/// module. @FN{require} returns the exported variables and functions of the
|
|
/// module. You can use the option @CO{startup.modules-path} to specify the
|
|
/// location of the JavaScript files.
|
|
///
|
|
/// <hr>
|
|
/// @copydoc JSModulesTOC
|
|
/// <hr>
|
|
///
|
|
/// @anchor JSModulesRequire
|
|
/// @copydetails JSF_require
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_54 ();
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// --SECTION-- Module
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void dummy_58 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @addtogroup V8Module
|
|
/// @{
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_63 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief module cache
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
void dummy_69 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief module constructor
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_Module (int id) {}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief loads a file and creates a new module descriptor
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_Module_prototype_require (int path) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief normalises a path
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_Module_prototype_normalise (int path) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief top-level module
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
void dummy_173 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief global require function
|
|
///
|
|
/// @FUN{require(@FA{path})}
|
|
///
|
|
/// @FN{require} checks if the file specified by @FA{path} has already been
|
|
/// loaded. If not, the content of the file is executed in a new
|
|
/// context. Within the context you can use the global variable @CODE{exports}
|
|
/// in order to export variables and functions. This variable is returned by
|
|
/// @FN{require}.
|
|
///
|
|
/// Assume that your module file is @CODE{test1.js} and contains
|
|
///
|
|
/// @verbinclude modules1
|
|
///
|
|
/// Then you can use require to load the file and access the exports.
|
|
///
|
|
/// @verbinclude modules2
|
|
///
|
|
/// @FN{require} follows the specification
|
|
/// <a href="http://wiki.commonjs.org/wiki/Modules/1.1.1">Modules/1.1.1</a>.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_require (int path) {}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_204 ();
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// --SECTION-- Module "fs"
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void dummy_208 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page JSModuleFsTOC
|
|
///
|
|
/// <ol>
|
|
/// <li>@ref JSModuleFsExists "fs.exists"</li>
|
|
/// </ol>
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_216 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page JSModuleFs Module "fs"
|
|
///
|
|
/// The implementation follows the CommonJS specification
|
|
/// <a href="http://wiki.commonjs.org/wiki/Filesystem/A/0">Filesystem/A/0</a>.
|
|
///
|
|
/// <hr>
|
|
/// @copydoc JSModuleFsTOC
|
|
/// <hr>
|
|
///
|
|
/// @anchor JSModuleFsExists
|
|
/// @copydetails JS_Exists
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_230 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @addtogroup V8ModuleFS
|
|
/// @{
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_235 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief fs module
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
void dummy_243 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_247 ();
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// --SECTION-- Module "internal"
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void dummy_251 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page JSModuleInternalTOC
|
|
///
|
|
/// <ol>
|
|
/// <li>@ref JSModuleInternalExecute "internal.execute"</li>
|
|
/// <li>@ref JSModuleInternalLoad "internal.load"</li>
|
|
/// <li>@ref JSModuleInternalLogLevel "internal.log"</li>
|
|
/// <li>@ref JSModuleInternalLogLevel "internal.logLevel"</li>
|
|
/// <li>@ref JSModuleInternalOutput "internal.output"</li>
|
|
/// <li>@ref JSModuleInternalProcessStat "internal.processStat"</li>
|
|
/// <li>@ref JSModuleInternalRead "internal.read"</li>
|
|
/// <li>@ref JSModuleInternalSPrintF "internal.sprintf"</li>
|
|
/// <li>@ref JSModuleInternalTime "internal.time"</li>
|
|
/// </ol>
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_267 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page JSModuleInternal Module "internal"
|
|
///
|
|
/// The following functions are used internally.
|
|
///
|
|
/// <hr>
|
|
/// @copydoc JSModuleInternalTOC
|
|
/// <hr>
|
|
///
|
|
/// @anchor JSModuleInternalExecute
|
|
/// @copydetails JS_Execute
|
|
///
|
|
/// @anchor JSModuleInternalLoad
|
|
/// @copydetails JS_Load
|
|
///
|
|
/// @anchor JSModuleInternalLog
|
|
/// @copydetails JS_Log
|
|
///
|
|
/// @anchor JSModuleInternalLogLevel
|
|
/// @copydetails JS_LogLevel
|
|
///
|
|
/// @anchor JSModuleInternalOutput
|
|
/// @copydetails JS_Output
|
|
///
|
|
/// @anchor JSModuleInternalRead
|
|
/// @copydetails JS_Read
|
|
///
|
|
/// @anchor JSModuleInternalSPrintF
|
|
/// @copydetails JS_SPrintF
|
|
///
|
|
/// @anchor JSModuleInternalTime
|
|
/// @copydetails JS_Time
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_301 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @addtogroup V8ModuleInternal
|
|
/// @{
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_306 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief internal module
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
void dummy_322 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief reads a file
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_internal_readFile (int path) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief loads a file
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_internal_loadFile (int path) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_382 ();
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// --SECTION-- Module "console"
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void dummy_386 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page JSModuleConsoleTOC
|
|
///
|
|
/// <ol>
|
|
/// <li>@ref JSModuleConsoleDebug "console.debug"</li>
|
|
/// <li>@ref JSModuleConsoleError "console.error"</li>
|
|
/// <li>@ref JSModuleConsoleInfo "console.info"</li>
|
|
/// <li>@ref JSModuleConsoleLog "console.log"</li>
|
|
/// <li>@ref JSModuleConsoleWarn "console.warn"</li>
|
|
/// </ol>
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_398 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page JSModuleConsole Module "console"
|
|
///
|
|
/// The implementation follows the CommonJS specification
|
|
/// <a href="http://wiki.commonjs.org/wiki/Console">Console</a>.
|
|
///
|
|
/// <hr>
|
|
/// @copydoc JSModuleConsoleTOC
|
|
/// <hr>
|
|
///
|
|
/// @anchor JSModuleConsoleDebug
|
|
/// @copydetails JSF_CONSOLE_DEBUG
|
|
///
|
|
/// @anchor JSModuleConsoleError
|
|
/// @copydetails JSF_CONSOLE_ERROR
|
|
///
|
|
/// @anchor JSModuleConsoleInfo
|
|
/// @copydetails JSF_CONSOLE_INFO
|
|
///
|
|
/// @anchor JSModuleConsoleLog
|
|
/// @copydetails JSF_CONSOLE_LOG
|
|
///
|
|
/// @anchor JSModuleConsoleWarn
|
|
/// @copydetails JSF_CONSOLE_WARN
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_424 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @addtogroup V8ModuleConsole
|
|
/// @{
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_429 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief logs debug message
|
|
///
|
|
/// @FUN{console.debug(@FA{format}, @FA{argument1}, ...)}
|
|
///
|
|
/// Formats the arguments according to @FA{format} and logs the result as
|
|
/// debug message.
|
|
///
|
|
/// String substitution patterns, which can be used in @FA{format}.
|
|
///
|
|
/// - @LIT{\%s} string
|
|
/// - @LIT{\%d}, @LIT{\%i} integer
|
|
/// - @LIT{\%f} floating point number
|
|
/// - @LIT{\%o} object hyperlink
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_CONSOLE_DEBUG () {}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief logs error message
|
|
///
|
|
/// @FUN{console.error(@FA{format}, @FA{argument1}, ...)}
|
|
///
|
|
/// Formats the arguments according to @FA{format} and logs the result as
|
|
/// error message.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_CONSOLE_ERROR () {}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief logs info message
|
|
///
|
|
/// @FUN{console.info(@FA{format}, @FA{argument1}, ...)}
|
|
///
|
|
/// Formats the arguments according to @FA{format} and logs the result as
|
|
/// info message.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_CONSOLE_INFO () {}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief logs log message
|
|
///
|
|
/// @FUN{console.log(@FA{format}, @FA{argument1}, ...)}
|
|
///
|
|
/// Formats the arguments according to @FA{format} and logs the result as
|
|
/// log message.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_CONSOLE_LOG () {}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief logs warn message
|
|
///
|
|
/// @FUN{console.warn(@FA{format}, @FA{argument1}, ...)}
|
|
///
|
|
/// Formats the arguments according to @FA{format} and logs the result as
|
|
/// warn message.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void JSF_CONSOLE_WARN () {}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief console module
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
void dummy_528 ();
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void dummy_532 ();
|
|
|
|
// Local Variables:
|
|
// mode: outline-minor
|
|
// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)"
|
|
// End:
|