mirror of
https://github.com/sailfishos/ofono
synced 2025-11-26 20:31:06 +08:00
Compare commits
5 Commits
mer/1.20+g
...
mer/1.20+g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e267487f4 | ||
|
|
c8a774dfee | ||
|
|
b88518d0f3 | ||
|
|
b223ccc675 | ||
|
|
947a41a5fc |
@@ -24,7 +24,9 @@ pkginclude_HEADERS = include/log.h include/plugin.h include/history.h \
|
|||||||
include/sim-mnclength.h \
|
include/sim-mnclength.h \
|
||||||
include/handsfree-audio.h include/siri.h \
|
include/handsfree-audio.h include/siri.h \
|
||||||
include/sms-filter.h \
|
include/sms-filter.h \
|
||||||
include/netmon.h include/lte.h
|
include/netmon.h include/lte.h \
|
||||||
|
include/storage.h \
|
||||||
|
gdbus/gdbus.h
|
||||||
|
|
||||||
nodist_pkginclude_HEADERS = include/version.h
|
nodist_pkginclude_HEADERS = include/version.h
|
||||||
|
|
||||||
@@ -1163,6 +1165,10 @@ include/ofono/version.h: include/version.h
|
|||||||
$(AM_V_at)$(MKDIR_P) include/ofono
|
$(AM_V_at)$(MKDIR_P) include/ofono
|
||||||
$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
|
$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
|
||||||
|
|
||||||
|
include/ofono/gdbus.h: $(abs_top_srcdir)/gdbus/gdbus.h
|
||||||
|
$(AM_V_at)$(MKDIR_P) include/ofono
|
||||||
|
$(AM_V_GEN)$(LN_S) $< $@
|
||||||
|
|
||||||
include/ofono/%.h: $(abs_top_srcdir)/include/%.h
|
include/ofono/%.h: $(abs_top_srcdir)/include/%.h
|
||||||
$(AM_V_at)$(MKDIR_P) include/ofono
|
$(AM_V_at)$(MKDIR_P) include/ofono
|
||||||
$(AM_V_GEN)$(LN_S) $< $@
|
$(AM_V_GEN)$(LN_S) $< $@
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
#define OFONO_API_SUBJECT_TO_CHANGE
|
#define OFONO_API_SUBJECT_TO_CHANGE
|
||||||
#include <ofono/plugin.h>
|
#include <ofono/plugin.h>
|
||||||
#include "storage.h"
|
#include <ofono/storage.h>
|
||||||
|
|
||||||
#define OFONO_RADIO_ACCESS_MODE_ALL (OFONO_RADIO_ACCESS_MODE_GSM |\
|
#define OFONO_RADIO_ACCESS_MODE_ALL (OFONO_RADIO_ACCESS_MODE_GSM |\
|
||||||
OFONO_RADIO_ACCESS_MODE_UMTS |\
|
OFONO_RADIO_ACCESS_MODE_UMTS |\
|
||||||
@@ -1664,7 +1664,7 @@ static void ril_plugin_set_storage_perm(const char *path,
|
|||||||
|
|
||||||
static void ril_plugin_switch_identity(const struct ril_plugin_identity *id)
|
static void ril_plugin_switch_identity(const struct ril_plugin_identity *id)
|
||||||
{
|
{
|
||||||
ril_plugin_set_storage_perm(STORAGEDIR, id);
|
ril_plugin_set_storage_perm(ofono_storage_dir(), id);
|
||||||
if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) {
|
if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) {
|
||||||
ofono_error("prctl(PR_SET_KEEPCAPS) failed: %s",
|
ofono_error("prctl(PR_SET_KEEPCAPS) failed: %s",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|||||||
32
ofono/include/storage.h
Normal file
32
ofono/include/storage.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* oFono - Open Telephony stack for Linux
|
||||||
|
*
|
||||||
|
* Copyright (C) 2017 Jolla Ltd. 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __OFONO_STORAGE_H
|
||||||
|
#define __OFONO_STORAGE_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *ofono_config_dir(void);
|
||||||
|
const char *ofono_storage_dir(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __OFONO_STORAGE_H */
|
||||||
@@ -22,9 +22,8 @@
|
|||||||
#include <gutil_macros.h>
|
#include <gutil_macros.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define OFONO_API_SUBJECT_TO_CHANGE
|
#include "src/ofono.h"
|
||||||
#include "ofono.h"
|
#include "src/storage.h"
|
||||||
#include "storage.h"
|
|
||||||
|
|
||||||
#include <sailfish_manager.h>
|
#include <sailfish_manager.h>
|
||||||
#include <sailfish_cell_info.h>
|
#include <sailfish_cell_info.h>
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
#include <gutil_misc.h>
|
#include <gutil_misc.h>
|
||||||
#include <gutil_log.h>
|
#include <gutil_log.h>
|
||||||
|
|
||||||
#include "ofono.h"
|
#include "src/ofono.h"
|
||||||
#include "common.h"
|
#include "src/common.h"
|
||||||
#include "storage.h"
|
#include "src/storage.h"
|
||||||
|
|
||||||
#define SAILFISH_SIM_INFO_STORE "cache"
|
#define SAILFISH_SIM_INFO_STORE "cache"
|
||||||
#define SAILFISH_SIM_INFO_STORE_GROUP "sim"
|
#define SAILFISH_SIM_INFO_STORE_GROUP "sim"
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <ofono/storage.h>
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@@ -35,6 +37,16 @@
|
|||||||
|
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
|
|
||||||
|
const char *ofono_config_dir(void)
|
||||||
|
{
|
||||||
|
return CONFIGDIR;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *ofono_storage_dir(void)
|
||||||
|
{
|
||||||
|
return STORAGEDIR;
|
||||||
|
}
|
||||||
|
|
||||||
int create_dirs(const char *filename, const mode_t mode)
|
int create_dirs(const char *filename, const mode_t mode)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|||||||
Reference in New Issue
Block a user