~ubuntu-branches/ubuntu/wily/xmms2/wily

« back to all changes in this revision

Viewing changes to src/xmms/error.c

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2008-07-04 16:23:34 UTC
  • mfrom: (1.1.5 upstream) (6.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080704162334-b3esbkcapt8wbrk4
Tags: 0.5DrLecter-2ubuntu1
* Merge from debian unstable (LP: #241098), remaining changes:
  + debian/control:
    + Update Maintainer field
    + add lpia to xmms2-plugin-alsa supported architectures
    + Added liba52-0.7.4-dev to build depends
  + debian/rules: Added patch, patch-stamp and unpatch
  + changed 01_gcc4.3.patch:
    + src/include/xmmsclient/xmmsclient++/helpers.h: Added #include <climits>
* New upstream relase fixes LP: #212566, #222341

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  XMMS2 - X Music Multiplexer System
2
 
 *  Copyright (C) 2003-2007 XMMS2 Team
 
2
 *  Copyright (C) 2003-2008 XMMS2 Team
3
3
 *
4
4
 *  PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5
5
 *
30
30
  * @{
31
31
  */
32
32
 
33
 
static const gchar *typenames[XMMS_ERROR_COUNT] = {
34
 
        [XMMS_ERROR_NONE] = "org.xmms.Error.NoError",
35
 
        [XMMS_ERROR_GENERIC] = "org.xmms.Error.GenericError",
36
 
        [XMMS_ERROR_OOM] = "org.xmms.Error.OutofMemory",
37
 
        [XMMS_ERROR_PERMISSION] = "org.xmms.Error.PermissionProblem",
38
 
        [XMMS_ERROR_NOENT] = "org.xmms.Error.NoSuchEntry",
39
 
        [XMMS_ERROR_INVAL] = "org.xmms.Error.InvalidParameters",
40
 
        [XMMS_ERROR_EOS] = "org.xmms.Error.EndOfStream",
41
 
        [XMMS_ERROR_NO_SAUSAGE] = "org.xmms.Error.NoSausage",
42
 
};
43
 
 
44
 
 
45
 
/**
46
 
 * Get the current errortype as a string.
47
 
 */
48
 
const gchar *
49
 
xmms_error_type_get_str (xmms_error_t *err)
50
 
{
51
 
        g_return_val_if_fail (err, NULL);
52
 
        g_return_val_if_fail (XMMS_ERROR_NONE <= err->code && err->code < XMMS_ERROR_COUNT, NULL);
53
 
        return typenames[err->code];
54
 
}
55
33
 
56
34
/**
57
35
 * Get the human readable error