Files
ofono/ofono/include/gprs-provision.h
Slava Monich bc4c860a86 [ofono] Make more APIs available to external plugins. JB#55027
This allows to build Jolla ril driver as an external dynamically
loadable plugin.
2021-09-13 16:32:33 +03:00

72 lines
2.0 KiB
C

/*
*
* oFono - Open Telephony stack for Linux
*
* Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
* Copyright (C) 2015-2021 Jolla Ltd.
*
* 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_GPRS_PROVISION_H
#define __OFONO_GPRS_PROVISION_H
#ifdef __cplusplus
extern "C" {
#endif
#include "gprs-context.h"
struct ofono_gprs_provision_data {
enum ofono_gprs_context_type type;
enum ofono_gprs_proto proto;
char *provider_name;
ofono_bool_t provider_primary;
char *name;
char *apn;
char *username;
char *password;
enum ofono_gprs_auth_method auth_method;
char *message_proxy;
char *message_center;
};
struct ofono_gprs_provision_driver {
const char *name;
int priority;
int (*get_settings)(const char *mcc, const char *mnc, const char *spn,
struct ofono_gprs_provision_data **settings,
int *count);
};
int ofono_gprs_provision_driver_register(
const struct ofono_gprs_provision_driver *driver);
void ofono_gprs_provision_driver_unregister(
const struct ofono_gprs_provision_driver *driver);
/* Since mer/1.24+git2 */
ofono_bool_t ofono_gprs_provision_get_settings(const char *mcc,
const char *mnc, const char *spn,
struct ofono_gprs_provision_data **settings,
int *count);
void ofono_gprs_provision_free_settings(
struct ofono_gprs_provision_data *settings,
int count);
#ifdef __cplusplus
}
#endif
#endif /* __OFONO_GPRS_PROVISION_H */