2 * Copyright (C) 2009,2010 Toni Gundogdu.
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #define makelong(low,high) \
27 ((long) (((quvi_word)((uint64_t)(low) & 0xffff)) | \
28 ((uint64_t)((quvi_word)((uint64_t)(high) & 0xffff))) << 16))
30 #define makeword(low,high) \
31 ((quvi_word)(((quvi_byte)((uint64_t)(low) & 0xff)) | \
32 ((quvi_word)((quvi_byte) ((uint64_t)(high) & 0xff))) << 8))
36 if (p) { free(p); p=0; } \
39 #define seterr(args...) \
41 _free(quvi->errmsg); \
42 asprintf(&quvi->errmsg, args); \
45 #define setvid(prop,args...) \
48 asprintf(&prop, args); \
51 #define csetopt(opt,param) \
52 curl_easy_setopt(quvi->curl,opt,param)
58 quvi_callback_status status_func
;
59 quvi_callback_write write_func
;
64 llst_node_t util_scripts
;
65 llst_node_t website_scripts
;
66 llst_node_t curr_next_host
;
70 typedef struct _quvi_s
*_quvi_t
;
72 struct _quvi_video_link_s
{
79 typedef struct _quvi_video_link_s
*_quvi_video_link_t
;
81 struct _quvi_video_s
{
88 llst_node_t link
; /* holds all essential to video links */
89 llst_node_t curr
; /* current (link) node */
94 typedef struct _quvi_video_s
*_quvi_video_t
;
96 struct _quvi_lua_script_s
{
101 typedef struct _quvi_lua_script_s
*_quvi_lua_script_t
;