zhxy/http服务器/appweb-4.3.4-0/doc/api/appweb.html

1040 lines
118 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Embedthis Appweb 4.0.0 Documentation</title>
<meta name="keywords" content="embedded web server, web server software, embedded HTTP, application web server,
embedded server, small web server, HTTP server, library web server, library HTTP, HTTP library" />
<meta charset="utf-8"/>
<meta name="description" content="Embedthis Appweb - embedded web servers for devices and applications." />
<link href="../doc.css" rel="stylesheet" type="text/css" />
<link href="api.css" rel="stylesheet" type="text/css" />
<link href="../print.css" rel="stylesheet" type="text/css" media="print"/>
<!--[if IE]>
<link href="../iehacks.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="http://www.google.com/cse/style/look/default.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div class="top">
<a class="logo" href="http://appwebserver.org/">&nbsp;</a>
<div class="topRight">
<div class="search">
<div id="cse-search-form"></div>
<div class="version"><!--TITLE-->Embedthis Appweb 4.0.0</div>
</div>
</div>
<div class="crumbs">
<a href="../index.html">Home</a>
&gt; <a href="../ref/appweb/index.html">Programmers Reference</a>
&gt; <a href="native.html">Native APIs</a>
&gt; <b>Appweb</b>
</div>
</div>
<div class="content">
<div class="contentRight">
<!-- BeginDsi "dsi/see.html" -->
<h1>See Also</h1>
<ul class="nav">
<li><a href="../ref/appweb/index.html">Programmers Reference</a></li>
<li><a href="../api/native.html">Native APIs</a></li>
</ul>
<!-- EndDsi -->
<h2>Quick Nav</h2>
<ul>
<li><a href="#Components">Components</a></li>
<li><a href="#Typedefs">Typedefs</a></li>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Defines">Defines</a></li>
</ul>
</div>
<div class="contentLeft">
<h1>APPWEB - Appweb API Native API</h1>
<a name="Components"></a><h1>Components</h1>
<table class="apiIndex" title="Components">
<tr class="apiDef">
<td class="apiName"><a href="#group___ma_appweb" class="nameRef">MaAppweb</a></td>
<td class="apiBrief">Singleton Appweb service for the application.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___ma_server" class="nameRef">MaServer</a></td>
<td class="apiBrief">Appweb server object.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___ma_state" class="nameRef">MaState</a></td>
<td class="apiBrief">Current configuration parse state.</td></tr>
</table>
<a name="Functions"></a><h1>Functions</h1>
<table class="apiIndex" title="Functions">
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1ga2288c0f827a92c4f693c98072c37a1b8" class="nameRef">maAddDirective</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *directive, <a href="#group___ma_appweb_1ga6a437d214b5963248c0985eb1bc2a096" class="ref">MaDirective</a> proc)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a new appweb configuration file directive.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550" class="nameRef">maAddEndpoint</a>(<a href="#group___ma_server" class="ref">MaServer</a> *server, <a href="http.html#group___http_endpoint" class="ref">HttpEndpoint</a> *endpoint)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a listening endpoint.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="nameRef">maAddServer</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, struct MaServer *server)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a server.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="nameRef">maApplyChangedGroup</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Apply the changed Appweb group ID.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="nameRef">maApplyChangedUser</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Apply the changed Appweb user ID.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1ga454f6a859fd29e3c76e136420fdfc3c4" class="nameRef">maArchiveLog</a>(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int count, int maxSize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Archive a log file.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_server_1ga95cc0d8c3f161d0a9d4a2a4925e50158" class="nameRef">maConfigureServer</a>(<a href="#group___ma_server" class="ref">MaServer</a> *server, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *configFile, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *home, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Configure a web server.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___ma_appweb" class="ref">MaAppweb*</a></td><td><a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="nameRef">maCreateAppweb</a>()</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create the Appweb object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___ma_server" class="ref">MaServer*</a></td><td><a href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f" class="nameRef">maCreateServer</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a MaServer object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="http.html#group___http_auth" class="ref">HttpAuth*</a></td><td><a href="#group___ma_server_1gaa0bedf682051dbf71477308356bf8f06" class="nameRef">maGetDefaultAuth</a>(<a href="#group___ma_server" class="ref">MaServer</a> *server)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the default authentication object for the server.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="nameRef">maGetUserGroup</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the user group.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="nameRef">maLoadModule</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *libname)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Load an appweb module.</td></tr>
<tr class="apiDef"><td class="apiType">struct MaServer*</td><td><a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="nameRef">maLookupServer</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup a server.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8" class="nameRef">maParseConfig</a>(<a href="#group___ma_server" class="ref">MaServer</a> *server, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Parse an Appweb configuration file.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="nameRef">maParseInit</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize the config file parser.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="nameRef">maParsePlatform</a>(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *platform, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **os, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **arch, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **profile)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Parse a platform string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___ma_state" class="ref">MaState*</a></td><td><a href="#group___ma_appweb_1ga2ff0312d66ba2c173b2ff6882e1f4ce9" class="nameRef">maPopState</a>(<a href="#group___ma_state" class="ref">MaState</a> *state)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Pop the state.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___ma_state" class="ref">MaState*</a></td><td><a href="#group___ma_appweb_1gad960c7ab5089293e33a0cf221f41072d" class="nameRef">maPushState</a>(<a href="#group___ma_state" class="ref">MaState</a> *state)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Push the state.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="nameRef">maRenderDirListing</a>(<a href="http.html#group___http_conn" class="ref">HttpConn</a> *conn)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a directory listing should be rendered for the request.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7" class="nameRef">maRunSimpleWebServer</a>(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *home, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and run a simple web server listening on a single IP address.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_server_1gac4eeca2a263aa924aa89f50b9dc10914" class="nameRef">maRunWebClient</a>(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *method, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri, char **response)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Run a web client request.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4" class="nameRef">maRunWebServer</a>(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *configFile)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and run a web server based on a configuration file.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1ga9b68eb868e420bafc8b6fde4a5c3d15c" class="nameRef">maSetAccessLog</a>(<a href="http.html#group___http_route" class="ref">HttpRoute</a> *route, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define the access log.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="nameRef">maSetDefaultServer</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, struct MaServer *server)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the default server.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="nameRef">maSetHttpGroup</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *group)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the Http Group.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="nameRef">maSetHttpUser</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *user)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the Http User.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151" class="nameRef">maSetServerAddress</a>(<a href="#group___ma_server" class="ref">MaServer</a> *server, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the server listen address.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1ga4b758efae1918f0bd5704fdd79ca674a" class="nameRef">maStartAccessLogging</a>(<a href="http.html#group___http_route" class="ref">HttpRoute</a> *route)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start access logging.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="nameRef">maStartAppweb</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start Appweb services.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42" class="nameRef">maStartServer</a>(<a href="#group___ma_server" class="ref">MaServer</a> *server)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start a server.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1ga2a09e8fd4be12b6f3488e64afc09c3d6" class="nameRef">maStopAccessLogging</a>(<a href="http.html#group___http_route" class="ref">HttpRoute</a> *route)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop access logging.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="nameRef">maStopAppweb</a>(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop Appweb services.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de" class="nameRef">maStopServer</a>(<a href="#group___ma_server" class="ref">MaServer</a> *server)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop a server.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___ma_appweb_1gabb856e86d408307d5e31ad0ff2d2f69a" class="nameRef">maTokenize</a>(<a href="#group___ma_state" class="ref">MaState</a> *state, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Tokenize a string based on route data.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc" class="nameRef">maValidateServer</a>(<a href="#group___ma_server" class="ref">MaServer</a> *server)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Validate the configuration of a server.</td></tr>
</table>
<a name="Typedefs"></a><h1>Typedefs</h1>
<table class="apiIndex" title="typedefs">
<tr class="apiDef"><td class="apiName"><a href="#group___ma_appweb_1ga6a437d214b5963248c0985eb1bc2a096" class="nameRef">MaDirective</a></td><td class="apiBrief">Appweb configuration file directive parsing callback function.</td></tr>
</table>
<a name="Defines"></a><h1>Defines</h1>
<table class="apiIndex" title="Defines">
<tr class="apiDef">
<td>#define</td><td><a href="#appweb_8h_1a3b315098fc2d1fc56d9d2832902dacff" class="nameRef">MA_PARSE_NON_SERVER</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Command file being parsed by a utility program.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#appweb_8h_1aba0a3eb51d76651562bc5c0bb2c0f424" class="nameRef">MA_UNLOAD_TIMEOUT</a>&nbsp;&nbsp;&nbsp;&quot;5mins&quot;</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default module inactivity unload timeout.</td></tr>
</table>
<h1>MaAppweb</h1>
<a name="group___ma_appweb"></a>
<div class="api">
<div class="prototype">MaAppweb</div>
<div class="apiDetail">
<p>Singleton Appweb service for the application.</p>
<dl><dt><b>Description</b>:</dt><dd>There is one instance of MaAppweb per application. It manages a list of HTTP servers running in the application.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
<dl><dt>Fields:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">struct MaServer *</td><td><td>defaultServer</td><td>
Default server object.
</td>
<tr><td class="param"><a class="ref" href="#struct_mpr_hash" >MprHash</a> *</td><td><td>directives</td><td>
Config file directives.
</td>
<tr><td class="param">int</td><td><td>gid</td><td>
Group Id.
</td>
<tr><td class="param">cchar *</td><td><td>group</td><td>
O/S application group name.
</td>
<tr><td class="param">int</td><td><td>groupChanged</td><td>
Group name changed.
</td>
<tr><td class="param">Http *</td><td><td>http</td><td>
Http service object.
</td>
<tr><td class="param">cchar *</td><td><td>localPlatform</td><td>
Local (dev) platform os-arch-profile (lower case).
</td>
<tr><td class="param">cchar *</td><td><td>platform</td><td>
Target platform os-arch-profile (lower case).
</td>
<tr><td class="param">cchar *</td><td><td>platformDir</td><td>
Path to platform.
</td>
<tr><td class="param">MprList *</td><td><td>servers</td><td>
List of server objects.
</td>
<tr><td class="param">int</td><td><td>skipModules</td><td>
Don&apos;t load modules.
</td>
<tr><td class="param">int</td><td><td>staticLink</td><td>
Target platform is using a static linking.
</td>
<tr><td class="param">int</td><td><td>uid</td><td>
User Id.
</td>
<tr><td class="param">cchar *</td><td><td>user</td><td>
O/S application user name.
</td>
<tr><td class="param">int</td><td><td>userChanged</td><td>
User name changed.
</td>
</table></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga2288c0f827a92c4f693c98072c37a1b8"></a>
<div class="api">
<div class="prototype">
void
maAddDirective
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *directive, <a href="#group___ma_appweb_1ga6a437d214b5963248c0985eb1bc2a096" class="ref">MaDirective</a> proc)
</div>
<div class="apiDetail">
<p>Define a new appweb configuration file directive.</p>
<dl><dt><b>Description</b>:</dt><dd>The appweb configuration file parse is extensible. New directives can be registered by this call. When encountered in the config file, the given callback proc will be invoked to parse.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
<tr><td class="param">directive</td><td>Directive name.</td>
<tr><td class="param">proc</td><td>Directive callback procedure of the type <a class="ref" href="#group___ma_appweb_1ga6a437d214b5963248c0985eb1bc2a096">MaDirective</a></td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550"></a>
<div class="api">
<div class="prototype">
void
maAddEndpoint
(<a href="#group___ma_server" class="ref">MaServer</a> *server, <a href="http.html#group___http_endpoint" class="ref">HttpEndpoint</a> *endpoint)
</div>
<div class="apiDetail">
<p>Add a listening endpoint.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">server</td><td>Server object to modify.</td>
<tr><td class="param">endpoint</td><td>Listening endpoint to add to the server.</td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae"></a>
<div class="api">
<div class="prototype">
void
maAddServer
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, struct MaServer *server)
</div>
<div class="apiDetail">
<p>Add a server.</p>
<dl><dt><b>Description</b>:</dt><dd>Add a server to the list of appweb managed web servers.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
<tr><td class="param">server</td><td>MaServer object.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0"></a>
<div class="api">
<div class="prototype">
int
maApplyChangedGroup
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)
</div>
<div class="apiDetail">
<p>Apply the changed Appweb group ID.</p>
<dl><dt><b>Description</b>:</dt><dd>Apply configuration changes and actually change the Appweb group id.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024"></a>
<div class="api">
<div class="prototype">
int
maApplyChangedUser
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)
</div>
<div class="apiDetail">
<p>Apply the changed Appweb user ID.</p>
<dl><dt><b>Description</b>:</dt><dd>Apply configuration changes and actually change the Appweb user id.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga454f6a859fd29e3c76e136420fdfc3c4"></a>
<div class="api">
<div class="prototype">
int
maArchiveLog
(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int count, int maxSize)
</div>
<div class="apiDetail">
<p>Archive a log file.</p>
<dl><dt><b>Description</b>:</dt><dd>The current log file is archived by appending &quot;.1&quot; to the log path name. If a &quot;path.1&quot; exists, it will be renamed first to &quot;path.2&quot; and so on up to &quot;path.count&quot;.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">path</td><td>Current log file name.</td>
<tr><td class="param">count</td><td>Number of archived log files to preserve.</td>
<tr><td class="param">maxSize</td><td>Reserved.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee"></a>
<div class="api">
<div class="prototype">
<a href="#group___ma_appweb" class="ref">MaAppweb</a> *
maCreateAppweb
()
</div>
<div class="apiDetail">
<p>Create the Appweb object.</p>
<dl><dt><b>Description</b>:</dt><dd>Appweb uses a singleton Appweb object to manage multiple web servers instances.</dd></dl>
<dl><dt>Returns:</dt><dd>A Http object. Use mprFree to close and release.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570"></a>
<div class="api">
<div class="prototype">
void
maGetUserGroup
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)
</div>
<div class="apiDetail">
<p>Get the user group.</p>
<dl><dt><b>Description</b>:</dt><dd>Get the user name and ID for appweb and update the MaAppweb object.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89"></a>
<div class="api">
<div class="prototype">
int
maLoadModule
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *libname)
</div>
<div class="apiDetail">
<p>Load an appweb module.</p>
<dl><dt><b>Description</b>:</dt><dd>Load an appweb module. If the module is already loaded, this call will return successfully without reloading. Modules can be dynamically loaded or may also be pre-loaded using static linking.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
<tr><td class="param">name</td><td>User name. Must be defined in the system password file.</td>
<tr><td class="param">libname</td><td>Library path name.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b"></a>
<div class="api">
<div class="prototype">
struct MaServer *
MaServer* maLookupServer
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
</div>
<div class="apiDetail">
<p>Lookup a server.</p>
<dl><dt><b>Description</b>:</dt><dd>Lookup a server by name and return the MaServer object.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
<tr><td class="param">name</td><td>Server name.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>MaServer object.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8"></a>
<div class="api">
<div class="prototype">
int
maParseConfig
(<a href="#group___ma_server" class="ref">MaServer</a> *server, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags)
</div>
<div class="apiDetail">
<p>Parse an Appweb configuration file.</p>
<dl><dt><b>Description</b>:</dt><dd>Parse the configuration file and configure the server. This creates a default host and route and then configures the server based on config file directives.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">server</td><td>MaServer object created via <a class="ref" href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f">maCreateServer</a></td>
<tr><td class="param">path</td><td>Configuration file pathname.</td>
<tr><td class="param">flags</td><td>Parse control flags. Reserved. Set to zero.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b"></a>
<div class="api">
<div class="prototype">
int
maParseInit
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)
</div>
<div class="apiDetail">
<p>Initialize the config file parser.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30"></a>
<div class="api">
<div class="prototype">
int
maParsePlatform
(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *platform, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **os, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **arch, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **profile)
</div>
<div class="apiDetail">
<p>Parse a platform string.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">platform</td><td>The platform string. Must be of the form: os-arch-profile.</td>
<tr><td class="param">os</td><td>Parsed O/S portion.</td>
<tr><td class="param">arch</td><td>Parsed architecture portion.</td>
<tr><td class="param">profile</td><td>Parsed profile portion.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga2ff0312d66ba2c173b2ff6882e1f4ce9"></a>
<div class="api">
<div class="prototype">
<a href="#group___ma_state" class="ref">MaState</a> *
maPopState
(<a href="#group___ma_state" class="ref">MaState</a> *state)
</div>
<div class="apiDetail">
<p>Pop the state.</p>
<dl><dt><b>Description</b>:</dt><dd>This is used when parsing config files to handle nested include files and block level directives.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">state</td><td>Current state.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>The next lower level state object.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gad960c7ab5089293e33a0cf221f41072d"></a>
<div class="api">
<div class="prototype">
<a href="#group___ma_state" class="ref">MaState</a> *
maPushState
(<a href="#group___ma_state" class="ref">MaState</a> *state)
</div>
<div class="apiDetail">
<p>Push the state.</p>
<dl><dt><b>Description</b>:</dt><dd>This is used when parsing config files to handle nested include files and block level directives.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">state</td><td>Current state.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>The state passed as a parameter which becomes the new top level state.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc"></a>
<div class="api">
<div class="prototype">
<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
maRenderDirListing
(<a href="http.html#group___http_conn" class="ref">HttpConn</a> *conn)
</div>
<div class="apiDetail">
<p>Test if a directory listing should be rendered for the request.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">conn</td><td>Connection object.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>True if a directory listing is configured to be rendered for this request.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga9b68eb868e420bafc8b6fde4a5c3d15c"></a>
<div class="api">
<div class="prototype">
void
maSetAccessLog
(<a href="http.html#group___http_route" class="ref">HttpRoute</a> *route, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format)
</div>
<div class="apiDetail">
<p>Define the access log.</p>
<dl><dt><b>Description</b>:</dt><dd>The access log is used to log details about requests to the web server. Errors are logged in the error log.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">route</td><td>HttpRoute object for which to define the logging characteristics.</td>
<tr><td class="param">path</td><td>Pathname for the log file.</td>
<tr><td class="param">format</td><td>Log file format. The format string argument defines how Appweb will record HTTP accesses to the access log. The following log format specifiers are supported: <ul><li>%% - Percent sign </li><li>%a - Remote IP address </li><li>%b - Response bytes written to the client include headers. If zero, &quot;-&quot; is written. </li><li>%B - Response bytes written excluding headers </li><li>%h - Remote hostname </li><li>%O - Bytes written include headers. If zero bytes, &quot;0&quot; is written. </li><li>%r - First line of the request </li><li>%s - HTTP response status code </li><li>%t - Time the request was completed </li><li>%u - Authenticated username </li><li>%{header}i - HTTP header value </li></ul></td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga30109915ae5446c9299173528c2c880e"></a>
<div class="api">
<div class="prototype">
void
maSetDefaultServer
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, struct MaServer *server)
</div>
<div class="apiDetail">
<p>Set the default server.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
<tr><td class="param">server</td><td>MaServer object.</td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad"></a>
<div class="api">
<div class="prototype">
int
maSetHttpGroup
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *group)
</div>
<div class="apiDetail">
<p>Set the Http Group.</p>
<dl><dt><b>Description</b>:</dt><dd>Define the group name under which to run the Appweb service.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
<tr><td class="param">group</td><td>Group name. Must be defined in the system group file.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad"></a>
<div class="api">
<div class="prototype">
int
maSetHttpUser
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *user)
</div>
<div class="apiDetail">
<p>Set the Http User.</p>
<dl><dt><b>Description</b>:</dt><dd>Define the user name under which to run the Appweb service.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
<tr><td class="param">user</td><td>User name. Must be defined in the system password file.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151"></a>
<div class="api">
<div class="prototype">
void
maSetServerAddress
(<a href="#group___ma_server" class="ref">MaServer</a> *server, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port)
</div>
<div class="apiDetail">
<p>Set the server listen address.</p>
<dl><dt><b>Description</b>:</dt><dd>Set the internet addresses for all endpoints managed by the server.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">server</td><td>MaServer object created via <a class="ref" href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f">maCreateServer</a></td>
<tr><td class="param">ip</td><td>IP address to set for the server.</td>
<tr><td class="param">port</td><td>Port number to use for the server.</td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga4b758efae1918f0bd5704fdd79ca674a"></a>
<div class="api">
<div class="prototype">
int
maStartAccessLogging
(<a href="http.html#group___http_route" class="ref">HttpRoute</a> *route)
</div>
<div class="apiDetail">
<p>Start access logging.</p>
<dl><dt><b>Description</b>:</dt><dd>Start access logging for a host.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">route</td><td>HttpRoute object.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158"></a>
<div class="api">
<div class="prototype">
int
maStartAppweb
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)
</div>
<div class="apiDetail">
<p>Start Appweb services.</p>
<dl><dt><b>Description</b>:</dt><dd>This starts listening for requests on all configured servers.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42"></a>
<div class="api">
<div class="prototype">
int
maStartServer
(<a href="#group___ma_server" class="ref">MaServer</a> *server)
</div>
<div class="apiDetail">
<p>Start a server.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">server</td><td>Object created via <a class="ref" href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f">maCreateServer</a></td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga2a09e8fd4be12b6f3488e64afc09c3d6"></a>
<div class="api">
<div class="prototype">
void
maStopAccessLogging
(<a href="http.html#group___http_route" class="ref">HttpRoute</a> *route)
</div>
<div class="apiDetail">
<p>Stop access logging.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">route</td><td>HttpRoute object.</td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f"></a>
<div class="api">
<div class="prototype">
int
maStopAppweb
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb)
</div>
<div class="apiDetail">
<p>Stop Appweb services.</p>
<dl><dt><b>Description</b>:</dt><dd>This stops listening for requests on all configured servers. Shutdown is somewhat graceful.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Appweb object created via <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de"></a>
<div class="api">
<div class="prototype">
void
maStopServer
(<a href="#group___ma_server" class="ref">MaServer</a> *server)
</div>
<div class="apiDetail">
<p>Stop a server.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">server</td><td>Object created via <a class="ref" href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f">maCreateServer</a></td>
</table></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gabb856e86d408307d5e31ad0ff2d2f69a"></a>
<div class="api">
<div class="prototype">
<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
maTokenize
(<a href="#group___ma_state" class="ref">MaState</a> *state, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
</div>
<div class="apiDetail">
<p>Tokenize a string based on route data.</p>
<dl><dt><b>Description</b>:</dt><dd>This is a utility routine to parse a string into tokens given a format specifier. Mandatory tokens can be specified with &quot;%&quot; format specifier. Optional tokens are specified with &quot;?&quot; format. Values wrapped in quotes will have the outermost quotes trimmed.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">state</td><td>Current config parsing state.</td>
<tr><td class="param">str</td><td>String to expand.</td>
<tr><td class="param">fmt</td><td>Format string specifier Supported tokens: <ul><li>B - Boolean. Parses: on/off, true/false, yes/no. </li><li>N - Number. Parses numbers in base 10. </li><li>S - String. Removes quotes. </li><li>P - Path string. Removes quotes and expands ${PathVars}. Resolved relative to host-&gt;dir (ServerRoot). </li><li>W - Parse words into a list </li><li>%! - Optional negate. Set value to HTTP_ROUTE_NOT present, otherwise zero. </li></ul></td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>True if the string can be successfully parsed.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<a name="group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc"></a>
<div class="api">
<div class="prototype">
<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
maValidateServer
(<a href="#group___ma_server" class="ref">MaServer</a> *server)
</div>
<div class="apiDetail">
<p>Validate the configuration of a server.</p>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">server</td><td>Server object to validate.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>True if the configuration is valid.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
<h1>MaServer</h1>
<a name="group___ma_server"></a>
<div class="api">
<div class="prototype">MaServer</div>
<div class="apiDetail">
<p>Appweb server object.</p>
<dl><dt><b>Description</b>:</dt><dd>An application may have any number of HTTP servers, each managed by an MaServer instance.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550" class="ref">maAddEndpoint</a>, <a href="#group___ma_server_1ga95cc0d8c3f161d0a9d4a2a4925e50158" class="ref">maConfigureServer</a>, <a href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f" class="ref">maCreateServer</a>, <a href="#group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8" class="ref">maParseConfig</a>, <a href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7" class="ref">maRunSimpleWebServer</a>, <a href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4" class="ref">maRunWebServer</a>, <a href="#group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151" class="ref">maSetServerAddress</a>, <a href="#group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42" class="ref">maStartServer</a>, <a href="#group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de" class="ref">maStopServer</a>, <a href="#group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc" class="ref">maValidateServer</a></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
<dl><dt>Fields:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">MaAppweb *</td><td><td>appweb</td><td>
Appweb control object.
</td>
<tr><td class="param">HttpHost *</td><td><td>defaultHost</td><td>
Default host for this server.
</td>
<tr><td class="param">MprList *</td><td><td>endpoints</td><td>
List of HttpEndpoints.
</td>
<tr><td class="param">Http *</td><td><td>http</td><td>
Http service object (copy of appweb-&gt;http).
</td>
<tr><td class="param">HttpLimits *</td><td><td>limits</td><td>
Limits for this server.
</td>
<tr><td class="param">char *</td><td><td>name</td><td>
Unique name for this server.
</td>
</table></dd></dl>
</div>
</div>
<a name="group___ma_server_1ga95cc0d8c3f161d0a9d4a2a4925e50158"></a>
<div class="api">
<div class="prototype">
int
maConfigureServer
(<a href="#group___ma_server" class="ref">MaServer</a> *server, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *configFile, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *home, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port)
</div>
<div class="apiDetail">
<p>Configure a web server.</p>
<dl><dt><b>Description</b>:</dt><dd>This will configure a web server based on either a configuration file or using the supplied IP address and port.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">server</td><td>MaServer object created via <a class="ref" href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f">maCreateServer</a></td>
<tr><td class="param">configFile</td><td>File name of the Appweb configuration file (appweb.conf) that defines the web server configuration.</td>
<tr><td class="param">home</td><td>Admin directory for the server. This overrides the value in the config file.</td>
<tr><td class="param">documents</td><td>Default directory for web documents to serve. This overrides the value in the config file.</td>
<tr><td class="param">ip</td><td>IP address to listen on. This overrides the value specified in the config file.</td>
<tr><td class="param">port</td><td>Port address to listen on. This overrides the value specified in the config file.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___ma_server" class="ref">MaServer</a>, <a href="#group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550" class="ref">maAddEndpoint</a>, <a href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f" class="ref">maCreateServer</a>, <a href="#group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8" class="ref">maParseConfig</a>, <a href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7" class="ref">maRunSimpleWebServer</a>, <a href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4" class="ref">maRunWebServer</a>, <a href="#group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151" class="ref">maSetServerAddress</a>, <a href="#group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42" class="ref">maStartServer</a>, <a href="#group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de" class="ref">maStopServer</a>, <a href="#group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc" class="ref">maValidateServer</a></dd></dl>
</div>
</div>
<a name="group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f"></a>
<div class="api">
<div class="prototype">
<a href="#group___ma_server" class="ref">MaServer</a> *
maCreateServer
(<a href="#group___ma_appweb" class="ref">MaAppweb</a> *appweb, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
</div>
<div class="apiDetail">
<p>Create a MaServer object.</p>
<dl><dt><b>Description</b>:</dt><dd>Create new MaServer object. This routine creates a bare MaServer object, loads any required static modules and performs minimal configuration. To use the server object created, more configuration will be required before starting Http services. If you want a one-line embedding of Appweb, use <a class="ref" href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4">maRunWebServer</a> or <a class="ref" href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7">maRunSimpleWebServer</a></dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">appweb</td><td>Http object returned from <a class="ref" href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee">maCreateAppweb</a></td>
<tr><td class="param">name</td><td>Name of the web server. This name is used as the initial server name.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>MaServer A newly created MaServer object. Use mprFree to free and release.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___ma_server" class="ref">MaServer</a>, <a href="#group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550" class="ref">maAddEndpoint</a>, <a href="#group___ma_server_1ga95cc0d8c3f161d0a9d4a2a4925e50158" class="ref">maConfigureServer</a>, <a href="#group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8" class="ref">maParseConfig</a>, <a href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7" class="ref">maRunSimpleWebServer</a>, <a href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4" class="ref">maRunWebServer</a>, <a href="#group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151" class="ref">maSetServerAddress</a>, <a href="#group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42" class="ref">maStartServer</a>, <a href="#group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de" class="ref">maStopServer</a>, <a href="#group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc" class="ref">maValidateServer</a></dd></dl>
</div>
</div>
<a name="group___ma_server_1gaa0bedf682051dbf71477308356bf8f06"></a>
<div class="api">
<div class="prototype">
<a href="http.html#group___http_auth" class="ref">HttpAuth</a> *
maGetDefaultAuth
(<a href="#group___ma_server" class="ref">MaServer</a> *server)
</div>
<div class="apiDetail">
<p>Get the default authentication object for the server.</p>
<dl><dt><b>Description</b>:</dt><dd>The server has a default host, which in turn has a default route. Each route has an authentication object to control access to server resources. This call retrieves that authentication object for use with the HttpAuth APIs.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">server</td><td>MaServer object.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>HttpAuth object.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___ma_server" class="ref">MaServer</a>, <a href="#group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550" class="ref">maAddEndpoint</a>, <a href="#group___ma_server_1ga95cc0d8c3f161d0a9d4a2a4925e50158" class="ref">maConfigureServer</a>, <a href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f" class="ref">maCreateServer</a>, <a href="#group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8" class="ref">maParseConfig</a>, <a href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7" class="ref">maRunSimpleWebServer</a>, <a href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4" class="ref">maRunWebServer</a>, <a href="#group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151" class="ref">maSetServerAddress</a>, <a href="#group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42" class="ref">maStartServer</a>, <a href="#group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de" class="ref">maStopServer</a>, <a href="#group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc" class="ref">maValidateServer</a></dd></dl>
</div>
</div>
<a name="group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7"></a>
<div class="api">
<div class="prototype">
int
maRunSimpleWebServer
(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *home, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents)
</div>
<div class="apiDetail">
<p>Create and run a simple web server listening on a single IP address.</p>
<dl><dt><b>Description</b>:</dt><dd>Create a simple web server without using a configuration file. The server is created to listen on the specified IP address and port. This routine provides a one-line embedding of Appweb. If you want to use a config file, try the <a class="ref" href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4">maRunWebServer</a> instead.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">ip</td><td>IP address on which to listen. Set to &quot;0.0.0.0&quot; to listen on all interfaces.</td>
<tr><td class="param">port</td><td>Port number to listen to.</td>
<tr><td class="param">home</td><td>Home directory for the web server.</td>
<tr><td class="param">documents</td><td>Directory containing the documents to serve.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___ma_server" class="ref">MaServer</a>, <a href="#group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550" class="ref">maAddEndpoint</a>, <a href="#group___ma_server_1ga95cc0d8c3f161d0a9d4a2a4925e50158" class="ref">maConfigureServer</a>, <a href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f" class="ref">maCreateServer</a>, <a href="#group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8" class="ref">maParseConfig</a>, <a href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4" class="ref">maRunWebServer</a>, <a href="#group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151" class="ref">maSetServerAddress</a>, <a href="#group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42" class="ref">maStartServer</a>, <a href="#group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de" class="ref">maStopServer</a>, <a href="#group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc" class="ref">maValidateServer</a></dd></dl>
</div>
</div>
<a name="group___ma_server_1gac4eeca2a263aa924aa89f50b9dc10914"></a>
<div class="api">
<div class="prototype">
int
maRunWebClient
(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *method, <a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri, char **response)
</div>
<div class="apiDetail">
<p>Run a web client request.</p>
<dl><dt><b>Description</b>:</dt><dd>Create a web server configuration based on the supplied config file. This routine provides a one-line embedding of Appweb. If you don&apos;t want to use a config file, try the <a class="ref" href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7">maRunSimpleWebServer</a> instead.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">method</td><td>HTTP method to use. GET, POST, PUT, DELETE etc.</td>
<tr><td class="param">uri</td><td>HTTP URI to request.</td>
<tr><td class="param">response</td><td>String reference to receive the response body.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Positive HTTP response code if the request completes. Otherwise a negative MPR error code.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___ma_server" class="ref">MaServer</a>, <a href="#group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550" class="ref">maAddEndpoint</a>, <a href="#group___ma_server_1ga95cc0d8c3f161d0a9d4a2a4925e50158" class="ref">maConfigureServer</a>, <a href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f" class="ref">maCreateServer</a>, <a href="#group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8" class="ref">maParseConfig</a>, <a href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7" class="ref">maRunSimpleWebServer</a>, <a href="#group___ma_server_1ga4994c273e87409b094418dd7bd370ee4" class="ref">maRunWebServer</a>, <a href="#group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151" class="ref">maSetServerAddress</a>, <a href="#group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42" class="ref">maStartServer</a>, <a href="#group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de" class="ref">maStopServer</a>, <a href="#group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc" class="ref">maValidateServer</a></dd></dl>
</div>
</div>
<a name="group___ma_server_1ga4994c273e87409b094418dd7bd370ee4"></a>
<div class="api">
<div class="prototype">
int
maRunWebServer
(<a href="mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *configFile)
</div>
<div class="apiDetail">
<p>Create and run a web server based on a configuration file.</p>
<dl><dt><b>Description</b>:</dt><dd>Create a web server configuration based on the supplied config file. This routine provides a one-line embedding of Appweb. If you don&apos;t want to use a config file, try the <a class="ref" href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7">maRunSimpleWebServer</a> instead.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">configFile</td><td>File name of the Appweb configuration file (appweb.conf) that defines the web server configuration.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___ma_server" class="ref">MaServer</a>, <a href="#group___ma_appweb_1ga4f98dc51b9f96f3636ba16d4075d2550" class="ref">maAddEndpoint</a>, <a href="#group___ma_server_1ga95cc0d8c3f161d0a9d4a2a4925e50158" class="ref">maConfigureServer</a>, <a href="#group___ma_server_1gad21a5a81aa006217ecc220da1198ff7f" class="ref">maCreateServer</a>, <a href="#group___ma_appweb_1gaaee49b7b7de456a272e476b9a1228bc8" class="ref">maParseConfig</a>, <a href="#group___ma_server_1ga88a2bd1d0f26f024e6cb2d693c13e4f7" class="ref">maRunSimpleWebServer</a>, <a href="#group___ma_appweb_1ga8c95d4a11a227962df2feaddf98c4151" class="ref">maSetServerAddress</a>, <a href="#group___ma_appweb_1ga3df448d06702386f01bdf34fa9e2df42" class="ref">maStartServer</a>, <a href="#group___ma_appweb_1ga18b14ec844e122a098d89abebde6d7de" class="ref">maStopServer</a>, <a href="#group___ma_appweb_1gabd0d6aff18d184020e8ed1f0a388c3fc" class="ref">maValidateServer</a></dd></dl>
</div>
</div>
<h1>MaState</h1>
<a name="group___ma_state"></a>
<div class="api">
<div class="prototype">MaState</div>
<div class="apiDetail">
<p>Current configuration parse state.</p>
<dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___ma_appweb_1ga6a437d214b5963248c0985eb1bc2a096" class="ref">MaDirective</a>, <a href="#group___ma_appweb_1ga2288c0f827a92c4f693c98072c37a1b8" class="ref">maAddDirective</a>, <a href="#group___ma_appweb_1ga454f6a859fd29e3c76e136420fdfc3c4" class="ref">maArchiveLog</a>, <a href="#group___ma_appweb_1ga2ff0312d66ba2c173b2ff6882e1f4ce9" class="ref">maPopState</a>, <a href="#group___ma_appweb_1gad960c7ab5089293e33a0cf221f41072d" class="ref">maPushState</a>, <a href="#group___ma_appweb_1ga9b68eb868e420bafc8b6fde4a5c3d15c" class="ref">maSetAccessLog</a>, <a href="#group___ma_appweb_1ga4b758efae1918f0bd5704fdd79ca674a" class="ref">maStartAccessLogging</a>, <a href="#group___ma_appweb_1ga2a09e8fd4be12b6f3488e64afc09c3d6" class="ref">maStopAccessLogging</a>, <a href="#group___ma_appweb_1gabb856e86d408307d5e31ad0ff2d2f69a" class="ref">maTokenize</a></dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
<dl><dt>Fields:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">HttpAuth *</td><td><td>auth</td><td>
Quick alias for route-&gt;auth.
</td>
<tr><td class="param">char *</td><td><td>configDir</td><td>
Directory containing config file.
</td>
<tr><td class="param">struct MaState *</td><td><td>current</td><td>
Current state.
</td>
<tr><td class="param">int</td><td><td>enabled</td><td>
True if the current block is enabled.
</td>
<tr><td class="param">MprFile *</td><td><td>file</td><td>
Config file handle.
</td>
<tr><td class="param">char *</td><td><td>filename</td><td>
Config file name.
</td>
<tr><td class="param">int</td><td><td>flags</td><td>
Parsing flags.
</td>
<tr><td class="param">HttpHost *</td><td><td>host</td><td>
Current host.
</td>
<tr><td class="param">char *</td><td><td>key</td><td>
Current directive being parsed.
</td>
<tr><td class="param">HttpLimits *</td><td><td>limits</td><td>
Current limits (host-&gt;limits).
</td>
<tr><td class="param">int</td><td><td>lineNumber</td><td>
Current line number.
</td>
<tr><td class="param">struct MaState *</td><td><td>prev</td><td>
Previous (inherited) state.
</td>
<tr><td class="param">HttpRoute *</td><td><td>route</td><td>
Current route.
</td>
<tr><td class="param">MaServer *</td><td><td>server</td><td>
Current server.
</td>
<tr><td class="param">struct MaState *</td><td><td>top</td><td>
Top level state.
</td>
</table></dd></dl>
</div>
</div>
<h2>Functions</h2>
<h2>Typedefs</h2>
<a name="group___ma_appweb_1ga6a437d214b5963248c0985eb1bc2a096"></a>
<div class="api">
<div class="prototype">
typedef int( MaDirective)(MaState *state, cchar *key, cchar *value).
</div>
<div class="apiDetail">
<p>Appweb configuration file directive parsing callback function.</p>
<dl><dt><b>Description</b>:</dt><dd>Directive callbacks are invoked to parse a directive. Directive callbacks are registered using <a class="ref" href="#group___ma_appweb_1ga2288c0f827a92c4f693c98072c37a1b8">maAddDirective</a></dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">state</td><td>Current config parse state.</td>
<tr><td class="param">key</td><td>Directive key name.</td>
<tr><td class="param">value</td><td>Directive key value.</td>
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="http.html#group___http" class="ref">Http</a>, <a href="#group___ma_appweb_1ga6dddb0f76c4bb135ee006f2fb48f38ae" class="ref">maAddServer</a>, <a href="#group___ma_appweb_1gaf558e80479e238939e4c4edf16a16ec0" class="ref">maApplyChangedGroup</a>, <a href="#group___ma_appweb_1ga04b040307aaccc46eaf6fef1dd61d024" class="ref">maApplyChangedUser</a>, <a href="#group___ma_appweb_1ga3c5d11ffcda01cb1d75ae24faa39cdee" class="ref">maCreateAppweb</a>, <a href="#group___ma_appweb_1gaeea4a201c9a8cca9521cd006436b8570" class="ref">maGetUserGroup</a>, <a href="#group___ma_appweb_1gaba2d0d4cfa73dbc028719098908eaa89" class="ref">maLoadModule</a>, <a href="#group___ma_appweb_1gaf5f955fddd686c69147a13fe34f57a9b" class="ref">maLookupServer</a>, <a href="#group___ma_appweb_1gaf72ae42c5d6c767a221d6d84f4f0b83b" class="ref">maParseInit</a>, <a href="#group___ma_appweb_1gaeeb83f9f10a5e54bcf16836f198f9f30" class="ref">maParsePlatform</a>, <a href="#group___ma_appweb_1ga16d04b99389aac28bc4c210f49ff52dc" class="ref">maRenderDirListing</a>, <a href="#group___ma_appweb_1ga30109915ae5446c9299173528c2c880e" class="ref">maSetDefaultServer</a>, <a href="#group___ma_appweb_1ga29500f7d8b117921cf5c68beb7ef40ad" class="ref">maSetHttpGroup</a>, <a href="#group___ma_appweb_1gaf824d096f9596ebf8840d7e8d005baad" class="ref">maSetHttpUser</a>, <a href="#group___ma_appweb_1gaad2b501a1eef1b0210189ef055c4f158" class="ref">maStartAppweb</a>, <a href="#group___ma_appweb_1gae98b753968134ec1c2bc50d5d63b2a1f" class="ref">maStopAppweb</a></dd></dl>
</div>
</div>
</div>
</div>
<!-- BeginDsi "dsi/bottom.html" -->
<div class="bottom">
<p class="footnote">
<a href="../product/copyright.html" >&copy; Embedthis Software LLC, 2003-2013.
All rights reserved. Embedthis, Appweb, ESP, Ejscript and Embedthis GoAhead are trademarks of Embedthis Software LLC.</a>
</p>
</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl(
'000262706376373952077:1hs0lhenihk');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.enableSearchboxOnly("http://appwebserver.org/search.html");
customSearchControl.draw('cse-search-form', options);
}, true);
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-179169-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>