X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hreq.h;h=9ccf6c9b836f0b27bf9d211db59ea791a49e004c;hb=98a5bca16007a7c4740c4326ef83768d034aed3e;hp=772cd677b3b9948b26b04e426c37d3eb001be5c6;hpb=7e0abe76db7b90369429bf387d7aad0fb5a42328;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hreq.h b/src/afb-hreq.h index 772cd677..9ccf6c9b 100644 --- a/src/afb-hreq.h +++ b/src/afb-hreq.h @@ -22,6 +22,7 @@ struct json_object; struct hreq_data; struct afb_hsrv; struct afb_req_itf; +struct locale_search; extern const struct afb_req_itf afb_hreq_req_itf; @@ -41,6 +42,7 @@ struct afb_hreq { int suspended; int replied; const char *version; + const char *lang; const char *url; size_t lenurl; const char *tail; @@ -61,7 +63,13 @@ extern int afb_hreq_reply_file_if_exist(struct afb_hreq *request, int dirfd, con extern int afb_hreq_reply_file(struct afb_hreq *request, int dirfd, const char *filename); -extern int afb_hreq_redirect_to(struct afb_hreq *request, const char *url, int add_query_part); +extern int afb_hreq_reply_locale_file_if_exist(struct afb_hreq *hreq, struct locale_search *search, const char *filename); + +extern int afb_hreq_reply_locale_file(struct afb_hreq *hreq, struct locale_search *search, const char *filename); + +extern void afb_hreq_redirect_to(struct afb_hreq *request, const char *url, int add_query_part); + +extern int afb_hreq_redirect_to_ending_slash_if_needed(struct afb_hreq *hreq); extern const char *afb_hreq_get_cookie(struct afb_hreq *hreq, const char *name);