mirror of git://git.sysmocom.de/ofono
Evolve call settings driver
This commit is contained in:
parent
6342e1b2dc
commit
04926379e5
|
@ -3,7 +3,7 @@ includedir = @includedir@/ofono
|
|||
|
||||
include_HEADERS = log.h plugin.h history.h dbus.h modem.h \
|
||||
types.h call-barring.h call-forwarding.h \
|
||||
call-meter.h
|
||||
call-meter.h call-settings.h
|
||||
|
||||
nodist_include_HEADERS = version.h
|
||||
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
*
|
||||
* oFono - Open Telephony stack for Linux
|
||||
*
|
||||
* Copyright (C) 2008-2009 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __OFONO_CALL_SETTINGS_H
|
||||
#define __OFONO_CALL_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <ofono/types.h>
|
||||
|
||||
struct ofono_call_settings;
|
||||
|
||||
typedef void (*ofono_call_settings_status_cb_t)(const struct ofono_error *error,
|
||||
int status, void *data);
|
||||
|
||||
typedef void (*ofono_call_settings_set_cb_t)(const struct ofono_error *error,
|
||||
void *data);
|
||||
|
||||
typedef void (*ofono_call_settings_clir_cb_t)(const struct ofono_error *error,
|
||||
int override, int network, void *data);
|
||||
|
||||
struct ofono_call_settings_driver {
|
||||
const char *name;
|
||||
int (*probe)(struct ofono_call_settings *cs);
|
||||
int (*remove)(struct ofono_call_settings *cs);
|
||||
void (*clip_query)(struct ofono_call_settings *cs,
|
||||
ofono_call_settings_status_cb_t cb, void *data);
|
||||
void (*colp_query)(struct ofono_call_settings *cs,
|
||||
ofono_call_settings_status_cb_t cb, void *data);
|
||||
void (*clir_query)(struct ofono_call_settings *cs,
|
||||
ofono_call_settings_clir_cb_t cb, void *data);
|
||||
void (*colr_query)(struct ofono_call_settings *cs,
|
||||
ofono_call_settings_status_cb_t cb, void *data);
|
||||
void (*clir_set)(struct ofono_call_settings *cs, int mode,
|
||||
ofono_call_settings_set_cb_t cb, void *data);
|
||||
void (*cw_query)(struct ofono_call_settings *cs, int cls,
|
||||
ofono_call_settings_status_cb_t cb, void *data);
|
||||
void (*cw_set)(struct ofono_call_settings *cs, int mode, int cls,
|
||||
ofono_call_settings_set_cb_t cb, void *data);
|
||||
};
|
||||
|
||||
int ofono_call_settings_driver_register(const struct ofono_call_settings_driver *d);
|
||||
void ofono_call_settings_driver_unregister(const struct ofono_call_settings_driver *d);
|
||||
|
||||
struct ofono_call_settings *ofono_call_settings_create(struct ofono_modem *modem,
|
||||
const char *driver,
|
||||
void *data);
|
||||
|
||||
void ofono_call_settings_register(struct ofono_call_settings *cs);
|
||||
void ofono_call_settings_remove(struct ofono_call_settings *cs);
|
||||
|
||||
void ofono_call_settings_set_data(struct ofono_call_settings *cs, void *data);
|
||||
void *ofono_call_settings_get_data(struct ofono_call_settings *cs);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OFONO_CALL_SETTINGS_H */
|
File diff suppressed because it is too large
Load Diff
30
src/driver.h
30
src/driver.h
|
@ -97,15 +97,6 @@ typedef void (*ofono_signal_strength_cb_t)(const struct ofono_error *error,
|
|||
typedef void (*ofono_modem_attribute_query_cb_t)(const struct ofono_error *error,
|
||||
const char *attribute, void *data);
|
||||
|
||||
typedef void (*ofono_call_setting_status_cb_t)(const struct ofono_error *error,
|
||||
int status, void *data);
|
||||
|
||||
typedef void (*ofono_clir_setting_cb_t)(const struct ofono_error *error,
|
||||
int override, int network, void *data);
|
||||
|
||||
typedef void (*ofono_call_waiting_status_cb_t)(const struct ofono_error *error,
|
||||
int status, void *data);
|
||||
|
||||
typedef void (*ofono_sim_file_info_cb_t)(const struct ofono_error *error,
|
||||
int filelength,
|
||||
enum ofono_sim_file_structure structure,
|
||||
|
@ -237,27 +228,6 @@ void ofono_ussd_notify(struct ofono_modem *modem, int status, const char *str);
|
|||
int ofono_ussd_register(struct ofono_modem *modem, struct ofono_ussd_ops *ops);
|
||||
void ofono_ussd_unregister(struct ofono_modem *modem);
|
||||
|
||||
struct ofono_call_settings_ops {
|
||||
void (*clip_query)(struct ofono_modem *modem,
|
||||
ofono_call_setting_status_cb_t cb, void *data);
|
||||
void (*colp_query)(struct ofono_modem *modem,
|
||||
ofono_call_setting_status_cb_t cb, void *data);
|
||||
void (*clir_query)(struct ofono_modem *modem, ofono_clir_setting_cb_t cb,
|
||||
void *data);
|
||||
void (*colr_query)(struct ofono_modem *modem,
|
||||
ofono_call_setting_status_cb_t cb, void *data);
|
||||
void (*clir_set)(struct ofono_modem *modem, int mode, ofono_generic_cb_t cb,
|
||||
void *data);
|
||||
void (*cw_query)(struct ofono_modem *modem, int cls,
|
||||
ofono_call_waiting_status_cb_t cb, void *data);
|
||||
void (*cw_set)(struct ofono_modem *modem, int mode, int cls,
|
||||
ofono_generic_cb_t cb, void *data);
|
||||
};
|
||||
|
||||
int ofono_call_settings_register(struct ofono_modem *modem,
|
||||
struct ofono_call_settings_ops *ops);
|
||||
void ofono_call_settings_unregister(struct ofono_modem *modem);
|
||||
|
||||
struct ofono_sim_ops {
|
||||
void (*read_file_info)(struct ofono_modem *modem, int fileid,
|
||||
ofono_sim_file_info_cb_t cb, void *data);
|
||||
|
|
|
@ -75,7 +75,7 @@ struct ofono_modem {
|
|||
struct voicecalls_data *voicecalls;
|
||||
struct ofono_call_forwarding *call_forwarding;
|
||||
struct ussd_data *ussd;
|
||||
struct call_settings_data *call_settings;
|
||||
struct ofono_call_settings *call_settings;
|
||||
struct call_waiting_data *call_waiting;
|
||||
struct ofono_call_barring *call_barring;
|
||||
struct cssn_data *cssn;
|
||||
|
@ -129,6 +129,7 @@ void __ofono_modem_remove_atom(struct ofono_modem *modem,
|
|||
#include <ofono/call-barring.h>
|
||||
#include <ofono/call-forwarding.h>
|
||||
#include <ofono/call-meter.h>
|
||||
#include <ofono/call-settings.h>
|
||||
|
||||
#include <ofono/history.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue