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
20 /** @file resolve_new.c */
29 #include "_quvi_net_resolve_s.h"
31 #include "misc/resolve.h"
32 #include "net/resolve.h"
33 #include "net/handle.h"
35 /** @brief Resolve URL redirection
36 @return New handle, @ref quvi_resolve_free it when done using it
37 @note Use @ref quvi_ok for checking if an error occurred
40 quvi_resolve_t
quvi_resolve_new(quvi_t handle
, const char *url
)
42 _quvi_net_resolve_t r
;
45 /* If G_DISABLE_CHECKS is defined then the check is not performed. */
46 g_return_val_if_fail(handle
!= NULL
, NULL
);
47 g_return_val_if_fail(url
!= NULL
, NULL
);
50 r
= n_resolve_new(q
, url
);
52 m_resolve(q
, url
, r
->url
.dst
);
57 /* vim: set ts=2 sw=2 tw=72 expandtab: */