1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*-*- Mode: C; c-basic-offset: 8 -*-*/

/***
  This file is part of libkanberra.

  Copyright 2008 Lennart Poettering

  libkanberra is free software; you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as
  published by the Free Software Foundation, either version 2.1 of the
  License, or (at your option) any later version.

  libkanberra is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with libkanberra. If not, see
  <http://www.gnu.org/licenses/>.
***/

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <string.h>

#include "kanberra.h"
#include "common.h"
#include "driver.h"

int driver_open(ka_context *c) {<--- Parameter 'c' can be declared as pointer to const
        ka_return_val_if_fail(c, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.
        ka_return_val_if_fail(!c->driver || ka_streq(c->driver, "null"), KA_ERROR_NODRIVER);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

        return KA_SUCCESS;
}

int driver_destroy(ka_context *c) {<--- Parameter 'c' can be declared as pointer to const
        ka_return_val_if_fail(c, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

        return KA_SUCCESS;
}

int driver_change_device(ka_context *c, const char *device) {<--- Parameter 'c' can be declared as pointer to const
        ka_return_val_if_fail(c, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

        return KA_SUCCESS;
}

int driver_change_props(ka_context *c, ka_proplist *changed, ka_proplist *merged) {<--- Parameter 'c' can be declared as pointer to const<--- Parameter 'changed' can be declared as pointer to const<--- Parameter 'merged' can be declared as pointer to const
        ka_return_val_if_fail(c, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.
        ka_return_val_if_fail(changed, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.
        ka_return_val_if_fail(merged, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

        return KA_SUCCESS;
}

int driver_play(ka_context *c, uint32_t id, ka_proplist *proplist, ka_finish_callback_t cb, void *userdata) {<--- Parameter 'proplist' can be declared as pointer to const
        ka_return_val_if_fail(c, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.
        ka_return_val_if_fail(proplist, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.
        ka_return_val_if_fail(!userdata || cb, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

        if (cb)
                cb(c, id, KA_SUCCESS, userdata);

        return KA_SUCCESS;
}

int driver_cancel(ka_context *c, uint32_t id) {<--- Parameter 'c' can be declared as pointer to const
        ka_return_val_if_fail(c, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

        return KA_SUCCESS;
}

int driver_cache(ka_context *c, ka_proplist *proplist) {<--- Parameter 'c' can be declared as pointer to const<--- Parameter 'proplist' can be declared as pointer to const
        ka_return_val_if_fail(c, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.
        ka_return_val_if_fail(proplist, KA_ERROR_INVALID);<--- %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

        return KA_ERROR_NOTSUPPORTED;
}