MaAppweb | Singleton Appweb service for the application. |
MaServer | Appweb server object. |
MaState | Current configuration parse state. |
void | maAddDirective(MaAppweb *appweb, cchar *directive, MaDirective proc) |
Define a new appweb configuration file directive. | |
void | maAddEndpoint(MaServer *server, HttpEndpoint *endpoint) |
Add a listening endpoint. | |
void | maAddServer(MaAppweb *appweb, struct MaServer *server) |
Add a server. | |
int | maApplyChangedGroup(MaAppweb *appweb) |
Apply the changed Appweb group ID. | |
int | maApplyChangedUser(MaAppweb *appweb) |
Apply the changed Appweb user ID. | |
int | maArchiveLog(cchar *path, int count, int maxSize) |
Archive a log file. | |
int | maConfigureServer(MaServer *server, cchar *configFile, cchar *home, cchar *documents, cchar *ip, int port) |
Configure a web server. | |
MaAppweb* | maCreateAppweb() |
Create the Appweb object. | |
MaServer* | maCreateServer(MaAppweb *appweb, cchar *name) |
Create a MaServer object. | |
HttpAuth* | maGetDefaultAuth(MaServer *server) |
Get the default authentication object for the server. | |
void | maGetUserGroup(MaAppweb *appweb) |
Get the user group. | |
int | maLoadModule(MaAppweb *appweb, cchar *name, cchar *libname) |
Load an appweb module. | |
struct MaServer* | maLookupServer(MaAppweb *appweb, cchar *name) |
Lookup a server. | |
int | maParseConfig(MaServer *server, cchar *path, int flags) |
Parse an Appweb configuration file. | |
int | maParseInit(MaAppweb *appweb) |
Initialize the config file parser. | |
int | maParsePlatform(cchar *platform, cchar **os, cchar **arch, cchar **profile) |
Parse a platform string. | |
MaState* | maPopState(MaState *state) |
Pop the state. | |
MaState* | maPushState(MaState *state) |
Push the state. | |
bool | maRenderDirListing(HttpConn *conn) |
Test if a directory listing should be rendered for the request. | |
int | maRunSimpleWebServer(cchar *ip, int port, cchar *home, cchar *documents) |
Create and run a simple web server listening on a single IP address. | |
int | maRunWebClient(cchar *method, cchar *uri, char **response) |
Run a web client request. | |
int | maRunWebServer(cchar *configFile) |
Create and run a web server based on a configuration file. | |
void | maSetAccessLog(HttpRoute *route, cchar *path, cchar *format) |
Define the access log. | |
void | maSetDefaultServer(MaAppweb *appweb, struct MaServer *server) |
Set the default server. | |
int | maSetHttpGroup(MaAppweb *appweb, cchar *group) |
Set the Http Group. | |
int | maSetHttpUser(MaAppweb *appweb, cchar *user) |
Set the Http User. | |
void | maSetServerAddress(MaServer *server, cchar *ip, int port) |
Set the server listen address. | |
int | maStartAccessLogging(HttpRoute *route) |
Start access logging. | |
int | maStartAppweb(MaAppweb *appweb) |
Start Appweb services. | |
int | maStartServer(MaServer *server) |
Start a server. | |
void | maStopAccessLogging(HttpRoute *route) |
Stop access logging. | |
int | maStopAppweb(MaAppweb *appweb) |
Stop Appweb services. | |
void | maStopServer(MaServer *server) |
Stop a server. | |
bool | maTokenize(MaState *state, cchar *str, cchar *fmt, ...) |
Tokenize a string based on route data. | |
bool | maValidateServer(MaServer *server) |
Validate the configuration of a server. |
MaDirective | Appweb configuration file directive parsing callback function. |
#define | MA_PARSE_NON_SERVER 0x1 |
Command file being parsed by a utility program. | |
#define | MA_UNLOAD_TIMEOUT "5mins" |
Default module inactivity unload timeout. |
Singleton Appweb service for the application.
struct MaServer * | defaultServer | Default server object. | |
MprHash * | directives | Config file directives. | |
int | gid | Group Id. | |
cchar * | group | O/S application group name. | |
int | groupChanged | Group name changed. | |
Http * | http | Http service object. | |
cchar * | localPlatform | Local (dev) platform os-arch-profile (lower case). | |
cchar * | platform | Target platform os-arch-profile (lower case). | |
cchar * | platformDir | Path to platform. | |
MprList * | servers | List of server objects. | |
int | skipModules | Don't load modules. | |
int | staticLink | Target platform is using a static linking. | |
int | uid | User Id. | |
cchar * | user | O/S application user name. | |
int | userChanged | User name changed. |
Define a new appweb configuration file directive.
appweb | Appweb object created via maCreateAppweb |
directive | Directive name. |
proc | Directive callback procedure of the type MaDirective |
Add a listening endpoint.
server | Server object to modify. |
endpoint | Listening endpoint to add to the server. |
Add a server.
appweb | Appweb object created via maCreateAppweb |
server | MaServer object. |
Apply the changed Appweb group ID.
appweb | Appweb object created via maCreateAppweb |
Apply the changed Appweb user ID.
appweb | Appweb object created via maCreateAppweb |
Archive a log file.
path | Current log file name. |
count | Number of archived log files to preserve. |
maxSize | Reserved. |
Create the Appweb object.
Get the user group.
appweb | Appweb object created via maCreateAppweb |
Load an appweb module.
appweb | Appweb object created via maCreateAppweb |
name | User name. Must be defined in the system password file. |
libname | Library path name. |
Lookup a server.
appweb | Appweb object created via maCreateAppweb |
name | Server name. |
Parse an Appweb configuration file.
server | MaServer object created via maCreateServer |
path | Configuration file pathname. |
flags | Parse control flags. Reserved. Set to zero. |
Initialize the config file parser.
appweb | Appweb object created via maCreateAppweb |
Parse a platform string.
platform | The platform string. Must be of the form: os-arch-profile. |
os | Parsed O/S portion. |
arch | Parsed architecture portion. |
profile | Parsed profile portion. |
Pop the state.
state | Current state. |
Push the state.
state | Current state. |
Test if a directory listing should be rendered for the request.
conn | Connection object. |
Define the access log.
route | HttpRoute object for which to define the logging characteristics. |
path | Pathname for the log file. |
format | 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:
|
Set the default server.
appweb | Appweb object created via maCreateAppweb |
server | MaServer object. |
Set the Http Group.
appweb | Appweb object created via maCreateAppweb |
group | Group name. Must be defined in the system group file. |
Set the Http User.
appweb | Appweb object created via maCreateAppweb |
user | User name. Must be defined in the system password file. |
Set the server listen address.
server | MaServer object created via maCreateServer |
ip | IP address to set for the server. |
port | Port number to use for the server. |
Start access logging.
route | HttpRoute object. |
Start Appweb services.
appweb | Appweb object created via maCreateAppweb |
Start a server.
server | Object created via maCreateServer |
Stop access logging.
route | HttpRoute object. |
Stop Appweb services.
appweb | Appweb object created via maCreateAppweb |
Tokenize a string based on route data.
state | Current config parsing state. |
str | String to expand. |
fmt | Format string specifier Supported tokens:
|
Validate the configuration of a server.
server | Server object to validate. |
Appweb server object.
MaAppweb * | appweb | Appweb control object. | |
HttpHost * | defaultHost | Default host for this server. | |
MprList * | endpoints | List of HttpEndpoints. | |
Http * | http | Http service object (copy of appweb->http). | |
HttpLimits * | limits | Limits for this server. | |
char * | name | Unique name for this server. |
Configure a web server.
server | MaServer object created via maCreateServer |
configFile | File name of the Appweb configuration file (appweb.conf) that defines the web server configuration. |
home | Admin directory for the server. This overrides the value in the config file. |
documents | Default directory for web documents to serve. This overrides the value in the config file. |
ip | IP address to listen on. This overrides the value specified in the config file. |
port | Port address to listen on. This overrides the value specified in the config file. |
Create a MaServer object.
appweb | Http object returned from maCreateAppweb |
name | Name of the web server. This name is used as the initial server name. |
Get the default authentication object for the server.
server | MaServer object. |
Create and run a simple web server listening on a single IP address.
ip | IP address on which to listen. Set to "0.0.0.0" to listen on all interfaces. |
port | Port number to listen to. |
home | Home directory for the web server. |
documents | Directory containing the documents to serve. |
Run a web client request.
method | HTTP method to use. GET, POST, PUT, DELETE etc. |
uri | HTTP URI to request. |
response | String reference to receive the response body. |
Create and run a web server based on a configuration file.
configFile | File name of the Appweb configuration file (appweb.conf) that defines the web server configuration. |
Current configuration parse state.
HttpAuth * | auth | Quick alias for route->auth. | |
char * | configDir | Directory containing config file. | |
struct MaState * | current | Current state. | |
int | enabled | True if the current block is enabled. | |
MprFile * | file | Config file handle. | |
char * | filename | Config file name. | |
int | flags | Parsing flags. | |
HttpHost * | host | Current host. | |
char * | key | Current directive being parsed. | |
HttpLimits * | limits | Current limits (host->limits). | |
int | lineNumber | Current line number. | |
struct MaState * | prev | Previous (inherited) state. | |
HttpRoute * | route | Current route. | |
MaServer * | server | Current server. | |
struct MaState * | top | Top level state. |
Appweb configuration file directive parsing callback function.
state | Current config parse state. |
key | Directive key name. |
value | Directive key value. |