2 * Copyright (C) 2012 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
30 static QuviError
_set(_quvi_t q
, QuviOption o
, va_list arg
)
34 case QUVI_OPTION_MEDIA_SCRIPT_PROTOCOL_CATEGORY
:
35 q
->opt
.scripts
.category
= va_arg(arg
, glong
);
37 case QUVI_OPTION_AUTOPROXY
:
38 q
->opt
.autoproxy
= (gboolean
) va_arg(arg
, glong
) >0;
43 case QUVI_OPTION_CALLBACK_STATUS
:
44 q
->cb
.status
= va_arg(arg
, quvi_callback_status
);
50 return (QUVI_ERROR_INVALID_ARG
);
56 /** @brief Set library handle option
57 @sa @ref getting_started
60 void quvi_set(quvi_t handle
, QuviOption option
, ...)
65 /* If G_DISABLE_CHECKS is defined then the check is not performed. */
66 g_return_if_fail(handle
!= NULL
);
70 va_start(arg
, option
);
71 q
->status
.rc
= _set(handle
, option
, arg
);
75 /* vim: set ts=2 sw=2 tw=72 expandtab: */