X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain.c;h=f81bfef843a65f9282c8847301f0ac3e2415c18c;hb=5d088cbac7130e9ec8655218acb15dd22b20a7f8;hp=b0261a4400817e4e623152188b6f89dbaaf511ee;hpb=94014f46d4751492133f65b12f1dea1cfa36d021;p=src%2Fapp-framework-binder.git diff --git a/src/main.c b/src/main.c index b0261a44..f81bfef8 100644 --- a/src/main.c +++ b/src/main.c @@ -30,9 +30,9 @@ #include "afb-plugin.h" #include "local-def.h" -#include "afb-apis.h" +#include "afb-hswitch.h" +#include "afb-api-so.h" #include "afb-hsrv.h" -#include "afb-hreq.h" #include "session.h" #include "verbose.h" #include "utils-upoll.h" @@ -513,9 +513,9 @@ int main(int argc, char *argv[]) { } if (session->config->ldpaths) - afb_apis_add_pathset(session->config->ldpaths); + afb_api_so_add_pathset(session->config->ldpaths); - ctxStoreInit(CTX_NBCLIENTS, session->config->cntxTimeout, afb_apis_count(), session->config->token); + ctxStoreInit(CTX_NBCLIENTS, session->config->cntxTimeout, session->config->token); install_error_handlers(); @@ -569,10 +569,10 @@ static int init(struct afb_hsrv *hsrv, AFB_config * config) { int idx; - if (!afb_hsrv_add_handler(hsrv, config->rootapi, afb_hreq_websocket_switch, NULL, 20)) + if (!afb_hsrv_add_handler(hsrv, config->rootapi, afb_hswitch_websocket_switch, NULL, 20)) return 0; - if (!afb_hsrv_add_handler(hsrv, config->rootapi, afb_hreq_rest_api, NULL, 10)) + if (!afb_hsrv_add_handler(hsrv, config->rootapi, afb_hswitch_apis, NULL, 10)) return 0; for (idx = 0; config->aliasdir[idx].url != NULL; idx++) @@ -582,7 +582,7 @@ static int init(struct afb_hsrv *hsrv, AFB_config * config) if (!afb_hsrv_add_alias(hsrv, "", config->rootdir, -10)) return 0; - if (!afb_hsrv_add_handler(hsrv, config->rootbase, afb_hreq_one_page_api_redirect, NULL, -20)) + if (!afb_hsrv_add_handler(hsrv, config->rootbase, afb_hswitch_one_page_api_redirect, NULL, -20)) return 0; return 1;