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_FORWARDING_H
23 #define __OFONO_CALL_FORWARDING_H
29 #include <ofono/types.h>
31 struct ofono_call_forwarding;
33 /* 27.007 Section 7.11 Call Forwarding */
34 struct ofono_call_forwarding_condition {
37 struct ofono_phone_number phone_number;
41 typedef void (*ofono_call_forwarding_set_cb_t)(const struct ofono_error *error,
43 typedef void (*ofono_call_forwarding_query_cb_t)(
44 const struct ofono_error *error, int total,
45 const struct ofono_call_forwarding_condition *list,
48 struct ofono_call_forwarding_driver {
50 int (*probe)(struct ofono_call_forwarding *cf, unsigned int vendor,
52 void (*remove)(struct ofono_call_forwarding *cf);
53 void (*activation)(struct ofono_call_forwarding *cf,
55 ofono_call_forwarding_set_cb_t cb, void *data);
56 void (*registration)(struct ofono_call_forwarding *cf,
58 const struct ofono_phone_number *number,
60 ofono_call_forwarding_set_cb_t cb, void *data);
61 void (*deactivation)(struct ofono_call_forwarding *cf,
63 ofono_call_forwarding_set_cb_t cb, void *data);
64 void (*erasure)(struct ofono_call_forwarding *cf, int type, int cls,
65 ofono_call_forwarding_set_cb_t cb, void *data);
66 void (*query)(struct ofono_call_forwarding *cf, int type, int cls,
67 ofono_call_forwarding_query_cb_t cb,
71 int ofono_call_forwarding_driver_register(
72 const struct ofono_call_forwarding_driver *d);
73 void ofono_call_forwarding_driver_unregister(
74 const struct ofono_call_forwarding_driver *d);
76 struct ofono_call_forwarding *ofono_call_forwarding_create(
77 struct ofono_modem *modem,
79 const char *driver, void *data);
81 void ofono_call_forwarding_register(struct ofono_call_forwarding *cf);
82 void ofono_call_forwarding_remove(struct ofono_call_forwarding *cf);
84 void ofono_call_forwarding_set_data(struct ofono_call_forwarding *cf,
86 void *ofono_call_forwarding_get_data(struct ofono_call_forwarding *cf);
92 #endif /* __OFONO_CALL_FORWARDING_H */