Add more ExtUtils::MakeMaker fields
[www-quvi.git] / i / Quvi.h
blobff599a5a57755776f1e649513b0767f73d911ef4
1 /* WWW::Quvi
2 * Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library 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 GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA
20 #ifndef Quvi_h
21 #define Quvi_h
23 #include <quvi/quvi.h>
25 class Options;
26 class Query;
27 class Media;
29 class Options
31 public:
32 Options();
33 Options(const Options&);
34 Options& operator=(const Options&);
35 virtual ~Options();
36 private:
37 void _swap(const Options&);
38 public:
39 std::string user_agent;
40 std::string http_proxy;
41 int verbose_libcurl;
42 std::string format;
43 long category;
44 int resolve;
45 int verify;
48 class Media
50 public:
51 Media();
52 Media(quvi_media_t);
53 Media(const Media&);
54 Media& operator=(const Media&);
55 virtual ~Media();
56 private:
57 void _swap(const Media&);
58 public:
59 std::string thumbnail_url;
60 std::string content_type;
61 std::string file_suffix;
62 std::string page_title;
63 std::string start_time;
64 double content_length;
65 std::string page_url;
66 std::string host;
67 std::string url;
68 double duration;
69 std::string id;
72 class Query
74 public:
75 Query();
76 Query(const Query&);
77 Query& operator=(const Query&);
78 virtual ~Query();
79 public:
80 void next_website(std::string&, std::string&);
81 std::string formats(const std::string&);
82 int supported(const std::string&);
83 Media parse(const std::string&);
84 void set_opts(const Options&);
85 private:
86 void _format_error();
87 void _close();
88 void _init();
89 private:
90 Options _opts;
91 quvi_t _quvi;
92 void *_curl;
93 public:
94 std::string errmsg;
95 long quvi_code;
96 long resp_code;
97 int ok;
100 #endif
102 // vim: set ts=2 sw=2 tw=72 expandtab: