Update NEWS for v0.9.4
[libquvi.git] / src / lua / def.h
blobdd81ef0b85594df3d8e786a49ccfe658cf54d1fc
1 /* libquvi
2 * Copyright (C) 2012-2013 Toni Gundogdu <legatvs@gmail.com>
4 * This file is part of libquvi <http://quvi.sourceforge.net/>.
6 * This library is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU Affero General Public
8 * License as published by the Free Software Foundation, either
9 * version 3 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General
17 * Public License along with this library. If not, see
18 * <http://www.gnu.org/licenses/>.
21 #ifndef l_def_h
22 #define l_def_h
24 #define USERDATA_QUVI_T "_quvi_t"
25 #define GS_EMPTY_S ""
27 /* Media script: Media properties */
29 #define MS_CAN_PARSE_URL "can_parse_url" /* Script can parse URL */
30 #define MS_START_TIME_MS "start_time_ms" /* Start streaming at */
31 #define MS_DURATION_MS "duration_ms" /* Media duration in ms */
32 #define MS_INPUT_URL "input_url" /* App req. URL */
33 #define MS_THUMB_URL "thumb_url" /* Image thumbnail URL */
34 #define MS_GOTO_URL "goto_url" /* Redirect to URL */
35 #define MS_DOMAINS "domains" /* Accepted domains */
36 #define MS_TITLE "title" /* Media title */
37 #define MS_ID "id" /* Media ID */
38 #define MS_STREAMS "streams" /* Media streams */
40 /* Media script: stream properties */
42 #define MSS_VIDEO "video"
43 #define MSS_VIDEO_BITRATE_KBIT_S "bitrate_kbit_s"
44 #define MSS_VIDEO_ENCODING "encoding"
45 #define MSS_VIDEO_HEIGHT "height"
46 #define MSS_VIDEO_WIDTH "width"
48 #define MSS_AUDIO "audio"
49 #define MSS_AUDIO_BITRATE_KBIT_S MSS_VIDEO_BITRATE_KBIT_S
50 #define MSS_AUDIO_ENCODING MSS_VIDEO_ENCODING
52 #define MSS_FLAGS "flags"
53 #define MSS_FLAGS_BEST "best"
55 #define MSS_CONTAINER "container"
56 #define MSS_URL "url"
57 #define MSS_ID "id"
59 /* Subtitle export script */
61 #define SUES_CAN_EXPORT_DATA "can_export_data" /* Script can export data */
62 #define SUES_EXPORT_FORMAT "export_format" /* Script generates this format */
63 #define SUES_FROM_FORMAT "from_format" /* Export from this format */
64 #define SUES_INPUT_URL "input_url" /* Subtitle language URL */
65 #define SUES_TO_FORMAT "to_format" /* Export to this format */
66 #define SUES_DATA "data" /* Exported data */
68 /* Subtitle script */
70 #define SUS_CAN_PARSE_URL "can_parse_url" /* Script can parse URL */
71 #define SUS_INPUT_URL "input_url" /* App req. URL */
72 #define SUS_DOMAINS "domains" /* Domains */
73 #define SUS_SUBTITLES "subtitles" /* Subtitles */
75 /* Subtitles - qargs.subtitles */
77 #define SUSS_FORMAT "format" /* Internal subtitle format */
78 #define SUSS_TYPE "type" /* Subtitle type {cc,tts,...} */
79 #define SUSS_LANG "lang" /* Subtitles: Language */
81 /* Subtitles - qargs.subtitles[n].lang */
83 #define SUSSL_TRANSLATED "translated" /* Translated (English) language */
84 #define SUSSL_ORIGINAL "original" /* Original language */
85 #define SUSSL_CODE "code" /* Code {en,fi,...} */
86 #define SUSSL_URL "url" /* URL */
87 #define SUSSL_ID "id" /* ID {cc_en,tts_fi,...} */
89 /* Playlist script */
91 #define PS_CAN_PARSE_URL "can_parse_url" /* Script can parse URL */
92 #define PS_INPUT_URL "input_url" /* App req. URL */
93 #define PS_THUMB_URL "thumb_url" /* Playlist thumbnail URL */
94 #define PS_DOMAINS "domains" /* Domains */
95 #define PS_TITLE "title" /* Title */
96 #define PS_MEDIA "media" /* Found media */
97 #define PS_ID "id" /* Playlist ID */
99 /* Playlist script: Media properties */
101 #define PSM_DURATION_MS "duration_ms" /* Duration in ms */
102 #define PSM_TITLE "title" /* Title */
103 #define PSM_URL "url" /* URL */
105 /* Scan script */
107 #define SS_INPUT_URL "input_url" /* App req. URL */
108 #define SS_MEDIA_URL "media_url" /* Array of found media URLs */
109 #define SS_CONTENT "content" /* Content to scan */
111 /* Utility script */
113 #define US_INPUT_URL "input_url" /* App req. URL */
115 /* quvi object */
117 /* http */
118 #define QO_CONTENT_LENGTH "content_length"
119 #define QO_RESPONSE_CODE "response_code"
120 #define QO_CONTENT_TYPE "content_type"
121 #define QO_RESOLVED_URL "resolved_url"
122 #define QO_DATA "data"
123 /* crypto */
124 #define QO_CIPHERTEXT "ciphertext"
125 #define QO_PLAINTEXT "plaintext"
126 #define QO_DIGEST "digest"
127 /* base64 */
128 #define QO_BASE64 "base64"
129 /* common */
130 #define QO_ERROR_MESSAGE "error_message"
131 #define QO_QUVI_CODE "quvi_code"
133 /* Human-readable quvi object crypto option names */
134 #define HRE_CIPHER_FLAGS "cipher flags"
135 #define HRE_CIPHER_MODE "cipher mode"
136 #define HRE_CIPHER_KEY "cipher key"
137 #define HRE_ALGORITHM "algorithm"
138 /* Human-readable quvi object HTTP cookie option names */
139 #define HRE_COOKIE_MODE "cookie mode"
141 /* Lua indexes.
143 * Used as 'key' (at index -2) and 'value' (at index -1). Many of
144 * the libquvi functions that call lua_next use these indexes. This is
145 * similar to (in Lua):
146 * for k,v in pairs(t) do ... end
149 enum {LI_VALUE = -1, LI_KEY = -2};
151 #endif /* l_def_h */
153 /* vim: set ts=2 sw=2 tw=72 expandtab: */