forked from kaltura/nginx-vod-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ngx_http_vod_utils.h
41 lines (32 loc) · 1.03 KB
/
ngx_http_vod_utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef _NGX_HTTP_VOD_UTILS_H_INCLUDED_
#define _NGX_HTTP_VOD_UTILS_H_INCLUDED_
// includes
#include <ngx_http.h>
#include "ngx_http_vod_request_parse.h"
#include "ngx_http_vod_conf.h"
#include "vod/common.h"
// functions
ngx_int_t ngx_http_vod_send_response(ngx_http_request_t *r, ngx_str_t *response, ngx_str_t* content_type);
ngx_int_t ngx_http_vod_status_to_ngx_error(vod_status_t rc);
ngx_flag_t ngx_http_vod_header_exists(ngx_http_request_t* r, ngx_str_t* searched_header);
void ngx_http_vod_get_base_url(
ngx_http_request_t* r,
ngx_str_t* https_header_name,
ngx_str_t* conf_base_url,
ngx_flag_t conf_base_url_has_schema,
ngx_str_t* file_uri,
ngx_str_t* base_url);
ngx_int_t ngx_http_vod_merge_string_parts(
ngx_http_request_t* r,
ngx_str_t* parts,
uint32_t part_count,
ngx_str_t* result);
ngx_int_t ngx_http_vod_range_parse(
ngx_str_t* range,
off_t content_length,
off_t* out_start,
off_t* out_end);
ngx_int_t ngx_http_vod_set_expires(
ngx_http_request_t *r,
time_t expires_time);
#endif // _NGX_HTTP_VOD_UTILS_H_INCLUDED_