/* Module load initialization. This is called when the module is first loaded. */ int maSimpleModuleInit(Http *http, MprModule *mp) { HttpStage *stage; MaAppweb *appweb; /* Create a stage so we can process configuration file data */ if ((stage = httpCreateStage(http, "simpleModule", HTTP_STAGE_MODULE, mp)) == 0) { return MPR_ERR_CANT_CREATE; } appweb = httpGetContext(http); maAddDirective(appweb, "CustomConfigKey", customConfigKey); return 0; }
/* Module load initialization. This is called when the module is first loaded. */ int maSimpleModuleInit(Http *http, MprModule *mp) { HttpStage *stage; /* Create a stage so we can process configuration file data */ if ((stage = httpCreateStage("simpleModule", HTTP_STAGE_MODULE, mp)) == 0) { return MPR_ERR_CANT_CREATE; } /* Create an appweb.conf custom directive */ maAddDirective("CustomConfig", customConfig); return 0; }
PUBLIC HttpStage *httpCreateConnector(cchar *name, MprModule *module) { return httpCreateStage(name, HTTP_STAGE_CONNECTOR, module); }
PUBLIC HttpStage *httpCreateFilter(cchar *name, MprModule *module) { return httpCreateStage(name, HTTP_STAGE_FILTER, module); }
PUBLIC HttpStage *httpCreateHandler(cchar *name, MprModule *module) { return httpCreateStage(name, HTTP_STAGE_HANDLER, module); }