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/>.
25 #include <glib/gi18n-lib.h>
32 static const gchar
*msg
[] =
35 N_("Operation aborted by a callback"),
36 N_("Could not find any subtitle export scripts in the path"),
37 N_("Could not find any subtitle scripts in the path"),
38 N_("Could not find any playlist scripts in the path"),
39 N_("Could not find any media scripts in the path"),
40 N_("Could not find any scan scripts in the path"),
41 N_("Could not find any the utility scripts in the path"),
42 N_("Operation aborted by the \"croak\" keyword"),
43 N_("An invalid argument to the function"),
44 N_("libgcrypt version mismatch"),
45 N_("Initialization of libproxy failed"),
46 N_("Initialization of libcurl failed"),
47 N_("Initialization of liblua failed")
50 static const gchar
*inv_code_msg
= N_("An invalid error code");
52 /** @return NULL-terminated error string
53 @note Do not attempt to free the returned string
54 @sa @ref getting_started
57 const char *quvi_errmsg(quvi_t handle
)
65 return (g_dgettext(GETTEXT_PACKAGE
, msg
[QUVI_ERROR_INVALID_ARG
]));
70 for (i
=1; msg
[i
] != NULL
; ++i
);
74 if ( (gint
) c
<0 || c
>i
)
76 if (q
->status
.errmsg
->len
>0)
77 s
= q
->status
.errmsg
->str
;
84 return (g_dgettext(GETTEXT_PACKAGE
, s
));
87 /* vim: set ts=2 sw=2 tw=72 expandtab: */