3 * oFono - Open Telephony stack for Linux
5 * Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program 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 General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef __OFONO_CALL_BARRING_H
23 #define __OFONO_CALL_BARRING_H
29 #include <ofono/types.h>
31 struct ofono_call_barring;
33 typedef void (*ofono_call_barring_set_cb_t)(const struct ofono_error *error,
35 typedef void (*ofono_call_barring_query_cb_t)(const struct ofono_error *error,
36 int status, void *data);
38 struct ofono_call_barring_driver {
40 int (*probe)(struct ofono_call_barring *cb, unsigned int vendor,
42 void (*remove)(struct ofono_call_barring *cb);
43 void (*set)(struct ofono_call_barring *barr, const char *lock,
44 int enable, const char *passwd, int cls,
45 ofono_call_barring_set_cb_t cb, void *data);
46 void (*query)(struct ofono_call_barring *barr, const char *lock,
47 int cls, ofono_call_barring_query_cb_t cb, void *data);
48 void (*set_passwd)(struct ofono_call_barring *barr, const char *lock,
49 const char *old_passwd, const char *new_passwd,
50 ofono_call_barring_set_cb_t cb, void *data);
53 int ofono_call_barring_driver_register(
54 const struct ofono_call_barring_driver *d);
55 void ofono_call_barring_driver_unregister(
56 const struct ofono_call_barring_driver *d);
58 struct ofono_call_barring *ofono_call_barring_create(struct ofono_modem *modem,
63 void ofono_call_barring_register(struct ofono_call_barring *cb);
64 void ofono_call_barring_remove(struct ofono_call_barring *cb);
66 void ofono_call_barring_set_data(struct ofono_call_barring *cb, void *data);
67 void *ofono_call_barring_get_data(struct ofono_call_barring *cb);
73 #endif /* __OFONO_CALL_BARRING_H */