Compare commits
18 Commits
1.1.20
...
ubports/fo
| Author | SHA1 | Date | |
|---|---|---|---|
| b562696120 | |||
| ed3d502783 | |||
| 11399e8942 | |||
| 1e2c04e0bb | |||
| 100d9873c8 | |||
| aeeb20499f | |||
| b8991bde50 | |||
| 01a7c0fe71 | |||
|
|
0686f965fb | ||
| e29eaa45e8 | |||
|
|
cd40ce7466 | ||
|
|
f1bc06ee38 | ||
|
|
3aff488691 | ||
|
|
40c9293493 | ||
|
|
b00ecc5417 | ||
|
|
7dd348cb90 | ||
|
|
20f286f2a2 | ||
|
|
33f5a70553 |
12
Makefile
12
Makefile
@@ -5,6 +5,9 @@
|
||||
.PHONY: print_debug_lib print_release_lib print_coverage_lib
|
||||
.PHONY: debug_ext_so release_ext_so
|
||||
|
||||
# Allow building against an oFono variant.
|
||||
OFONO_PKG ?= ofono
|
||||
|
||||
#
|
||||
# Required packages
|
||||
#
|
||||
@@ -13,7 +16,7 @@
|
||||
#
|
||||
|
||||
LDPKGS = libgbinder-radio libgbinder libmce-glib libglibutil gobject-2.0 glib-2.0
|
||||
PKGS = ofono $(LDPKGS)
|
||||
PKGS = $(OFONO_PKG) $(LDPKGS)
|
||||
|
||||
#
|
||||
# Default target
|
||||
@@ -178,10 +181,7 @@ release_ext_so:
|
||||
clean:
|
||||
make -C unit clean
|
||||
make -C $(EXTLIB_DIR) clean
|
||||
rm -fr debian/*.install debian/.debhelper debian/tmp
|
||||
rm -fr debian/libofonobinderpluginext debian/libofonobinderpluginext-dev
|
||||
rm -f documentation.list debian/files debian/*.substvars
|
||||
rm -f debian/*.debhelper.log debian/*.debhelper debian/*~
|
||||
rm -f documentation.list
|
||||
rm -f *~ $(SRC_DIR)/*~ rpm/*~
|
||||
rm -fr $(BUILD_DIR)
|
||||
|
||||
@@ -231,7 +231,7 @@ $(COVERAGE_LIB): $(COVERAGE_OBJS)
|
||||
# Install
|
||||
#
|
||||
|
||||
PLUGINDIR ?= $$(pkg-config ofono --variable=plugindir)
|
||||
PLUGINDIR ?= $$(pkg-config $(OFONO_PKG) --variable=plugindir)
|
||||
ABS_PLUGINDIR := $(shell echo /$(PLUGINDIR) | sed -r 's|/+|/|g')
|
||||
|
||||
INSTALL = install
|
||||
|
||||
10
debian/Jenkinsfile
vendored
Normal file
10
debian/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
@Library('ubports-build-tools') _
|
||||
|
||||
buildAndProvideDebianPackage()
|
||||
|
||||
// Or if the package consists entirely of arch-independent packages:
|
||||
// (optional optimization, will confuse BlueOcean's live view at build stage)
|
||||
// buildAndProvideDebianPackage(/* isArchIndependent */ true)
|
||||
|
||||
// Optionally, to skip building on some architectures (amd64 is always built):
|
||||
// buildAndProvideDebianPackage(false, /* ignoredArchs */ ['arm64'])
|
||||
32
debian/changelog
vendored
32
debian/changelog
vendored
@@ -1,3 +1,35 @@
|
||||
ofono-binder-plugin (1.1.21-0ubports1) noble; urgency=medium
|
||||
|
||||
* New upstream release v1.1.21
|
||||
|
||||
-- TheKit <thekit@disroot.org> Mon, 03 Mar 2025 22:30:54 +0300
|
||||
|
||||
ofono-binder-plugin (1.1.20-0ubports1) noble; urgency=medium
|
||||
|
||||
* New upstream release v1.1.20
|
||||
|
||||
-- TheKit <thekit@disroot.org> Mon, 03 Feb 2025 00:26:23 +0300
|
||||
|
||||
ofono-binder-plugin (1.1.18-0ubports1) UNRELEASED; urgency=unknown
|
||||
|
||||
* New upstream release v1.1.18
|
||||
|
||||
-- UBports package upgrader bot <dev@ubports.com> Sun, 22 Dec 2024 18:20:07 +0000
|
||||
|
||||
ofono-binder-plugin (1.1.15-0ubports1) noble; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* debian/patches: import Fallback to IRadio in
|
||||
binder_voicecall_answer and merge calls lists from upstream PR 31
|
||||
|
||||
-- TheKit <thekit@disroot.org> Thu, 15 Aug 2024 15:32:13 +0300
|
||||
|
||||
ofono-binder-plugin (1.1.11-0ubports1) focal; urgency=low
|
||||
|
||||
* Add initial packaging for Ubuntu Touch.
|
||||
|
||||
-- TheKit <thekit@disroot.org> Mon, 26 Apr 2023 21:44:17 +0300
|
||||
|
||||
libofonobinderpluginext (1.1.0) unstable; urgency=low
|
||||
|
||||
* Stable release of the extension API
|
||||
|
||||
1
debian/compat
vendored
1
debian/compat
vendored
@@ -1 +0,0 @@
|
||||
7
|
||||
21
debian/control
vendored
21
debian/control
vendored
@@ -1,10 +1,25 @@
|
||||
Source: libofonobinderpluginext
|
||||
Source: ofono-binder-plugin
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Slava Monich <slava@monich.com>
|
||||
Build-Depends: debhelper (>= 8.1.3), libglib2.0-dev (>= 2.0)
|
||||
Maintainer: UBports developers <devs@ubports.com>
|
||||
Build-Depends: debhelper-compat (= 12),
|
||||
libglib2.0-dev (>= 2.0),
|
||||
libmce-glib-dev,
|
||||
libglibutil-dev,
|
||||
libgbinder-dev,
|
||||
libgbinder-radio1-dev,
|
||||
ofono-sailfish-dev (>= 1.29+git8-0ubports1~),
|
||||
Standards-Version: 3.8.4
|
||||
|
||||
Package: ofono-binder-plugin
|
||||
Section: libs
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: oFono binder-based IRadio plugin
|
||||
Integrates Sailfish OS fork of ofono with Android adaptations
|
||||
which support IRadio family of binder interfaces.
|
||||
|
||||
Package: libofonobinderpluginext
|
||||
Section: libs
|
||||
Architecture: any
|
||||
|
||||
3
debian/libofonobinderpluginext-dev.install
vendored
Normal file
3
debian/libofonobinderpluginext-dev.install
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
usr/lib/*/libofonobinderpluginext.so
|
||||
usr/lib/*/pkgconfig/libofonobinderpluginext.pc
|
||||
usr/include/*
|
||||
1
debian/libofonobinderpluginext.install
vendored
Normal file
1
debian/libofonobinderpluginext.install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
usr/lib/*/libofonobinderpluginext.so.*
|
||||
1
debian/ofono-binder-plugin.install
vendored
Normal file
1
debian/ofono-binder-plugin.install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
usr/lib/*/ofono-sailfish/plugins/binderplugin.so
|
||||
9
debian/rules
vendored
9
debian/rules
vendored
@@ -3,14 +3,19 @@
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
export DEB_BUILD_OPTIONS='nostrip debug'
|
||||
|
||||
export OFONO_PKG = ofono-sailfish
|
||||
|
||||
LIBDIR=usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build -- -C lib LIBDIR=$(LIBDIR) release pkgconfig ../debian/libofonobinderpluginext.install ../debian/libofonobinderpluginext-dev.install
|
||||
dh_auto_build -- LIBDIR=$(LIBDIR) CFLAGS="-g -O0"
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install -- -C lib LIBDIR=$(LIBDIR) install-dev
|
||||
dh_auto_install
|
||||
make -C lib LIBDIR=$(LIBDIR) pkgconfig
|
||||
make -C lib LIBDIR=$(LIBDIR) DESTDIR=../debian/tmp install-dev
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
@@ -6,12 +6,15 @@
|
||||
.PHONY: print_debug_lib print_release_lib print_coverage_lib
|
||||
.PHONY: pkgconfig install install-dev
|
||||
|
||||
# Allow building against an oFono variant.
|
||||
OFONO_PKG ?= ofono
|
||||
|
||||
#
|
||||
# Required packages
|
||||
#
|
||||
|
||||
PKGS = libgbinder-radio libglibutil glib-2.0 gobject-2.0
|
||||
LDPKGS = libgbinder-radio libglibutil glib-2.0 gobject-2.0
|
||||
PKGS = $(OFONO_PKG) $(LDPKGS)
|
||||
|
||||
#
|
||||
# Default target
|
||||
@@ -25,7 +28,7 @@ all: debug release pkgconfig
|
||||
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 1
|
||||
VERSION_RELEASE = 20
|
||||
VERSION_RELEASE = 21
|
||||
|
||||
# Version for pkg-config
|
||||
PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
|
||||
@@ -78,7 +81,7 @@ BASE_FLAGS = -fPIC
|
||||
FULL_CFLAGS = $(BASE_FLAGS) $(CFLAGS) $(DEFINES) $(WARNINGS) $(INCLUDES) \
|
||||
-MMD -MP $(shell pkg-config --cflags $(PKGS))
|
||||
FULL_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LIB_SONAME) \
|
||||
$(shell pkg-config --libs $(PKGS)) -lpthread
|
||||
$(shell pkg-config --libs $(LDPKGS)) -lpthread
|
||||
DEBUG_FLAGS = -g
|
||||
RELEASE_FLAGS =
|
||||
COVERAGE_FLAGS = -g
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
*/
|
||||
|
||||
#include "binder_ext_call_impl.h"
|
||||
#include <gutil_log.h>
|
||||
#define DBG(fmt, ...) \
|
||||
gutil_log(GLOG_MODULE_CURRENT, GLOG_LEVEL_ALWAYS, "ext:"fmt, ##__VA_ARGS__)
|
||||
|
||||
G_DEFINE_INTERFACE(BinderExtCall, binder_ext_call, G_TYPE_OBJECT)
|
||||
#define GET_IFACE(obj) BINDER_EXT_CALL_GET_IFACE(obj)
|
||||
@@ -26,6 +29,7 @@ BinderExtCall*
|
||||
binder_ext_call_ref(
|
||||
BinderExtCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_ref(self);
|
||||
}
|
||||
@@ -36,6 +40,7 @@ void
|
||||
binder_ext_call_unref(
|
||||
BinderExtCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_unref(self);
|
||||
}
|
||||
@@ -45,6 +50,7 @@ BINDER_EXT_CALL_INTERFACE_FLAGS
|
||||
binder_ext_call_get_interface_flags(
|
||||
BinderExtCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return G_LIKELY(self) ? GET_IFACE(self)->flags :
|
||||
BINDER_EXT_CALL_INTERFACE_NO_FLAGS;
|
||||
}
|
||||
@@ -53,6 +59,7 @@ const BinderExtCallInfo* const*
|
||||
binder_ext_call_get_calls(
|
||||
BinderExtCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
static const BinderExtCallInfo* none = NULL;
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -82,6 +89,7 @@ binder_ext_call_dial(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(number)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -103,6 +111,7 @@ binder_ext_call_deflect(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(number)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -122,6 +131,7 @@ binder_ext_call_answer(
|
||||
GDestroyNotify destroy,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -141,6 +151,7 @@ binder_ext_call_swap(
|
||||
GDestroyNotify destroy,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -160,6 +171,7 @@ binder_ext_call_transfer(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -178,6 +190,7 @@ binder_ext_call_conference(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -196,6 +209,7 @@ binder_ext_call_send_dtmf(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(tones)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -216,6 +230,7 @@ binder_ext_call_hangup(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -232,6 +247,7 @@ binder_ext_call_cancel(
|
||||
BinderExtCall* self,
|
||||
guint id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -247,6 +263,7 @@ binder_ext_call_add_calls_changed_handler(
|
||||
BinderExtCallFunc handler,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -263,6 +280,7 @@ binder_ext_call_add_disconnect_handler(
|
||||
BinderExtCallDisconnectFunc handler,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -279,6 +297,7 @@ binder_ext_call_add_ring_handler(
|
||||
BinderExtCallFunc handler,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -295,6 +314,7 @@ binder_ext_call_add_ssn_handler(
|
||||
BinderExtCallSuppSvcNotifyFunc handler,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -310,6 +330,7 @@ binder_ext_call_remove_handler(
|
||||
BinderExtCall* self,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
/*
|
||||
* Since we provide the default callback, we can safely assume
|
||||
@@ -325,6 +346,7 @@ binder_ext_call_remove_handlers(
|
||||
gulong* ids,
|
||||
guint count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(ids) && G_LIKELY(count)) {
|
||||
BinderExtCallInterface* iface = GET_IFACE(self);
|
||||
int i;
|
||||
@@ -352,6 +374,7 @@ binder_ext_call_default_remove_handler(
|
||||
BinderExtCall* self,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (id) {
|
||||
g_signal_handler_disconnect(self, id);
|
||||
}
|
||||
@@ -362,6 +385,7 @@ void
|
||||
binder_ext_call_default_init(
|
||||
BinderExtCallInterface* iface)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* Assume the smallest interface version. Implementation must overwrite
|
||||
* iface->version with BINDER_EXT_CALL_INTERFACE_VERSION known to it at
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
*/
|
||||
|
||||
#include "binder_ext_ims_impl.h"
|
||||
#include <gutil_log.h>
|
||||
#define DBG(fmt, ...) \
|
||||
gutil_log(GLOG_MODULE_CURRENT, GLOG_LEVEL_ALWAYS, "ext:"fmt, ##__VA_ARGS__)
|
||||
|
||||
G_DEFINE_INTERFACE(BinderExtIms, binder_ext_ims, G_TYPE_OBJECT)
|
||||
#define GET_IFACE(obj) BINDER_EXT_IMS_GET_IFACE(obj)
|
||||
@@ -26,6 +29,7 @@ BinderExtIms*
|
||||
binder_ext_ims_ref(
|
||||
BinderExtIms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_ref(self);
|
||||
}
|
||||
@@ -36,6 +40,7 @@ void
|
||||
binder_ext_ims_unref(
|
||||
BinderExtIms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_unref(self);
|
||||
}
|
||||
@@ -45,6 +50,7 @@ BINDER_EXT_IMS_INTERFACE_FLAGS
|
||||
binder_ext_ims_get_interface_flags(
|
||||
BinderExtIms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return G_LIKELY(self) ? GET_IFACE(self)->flags :
|
||||
BINDER_EXT_IMS_INTERFACE_NO_FLAGS;
|
||||
}
|
||||
@@ -53,6 +59,7 @@ BINDER_EXT_IMS_STATE
|
||||
binder_ext_ims_get_state(
|
||||
BinderExtIms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtImsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -71,6 +78,7 @@ binder_ext_ims_set_registration(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtImsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -87,6 +95,7 @@ binder_ext_ims_cancel(
|
||||
BinderExtIms* self,
|
||||
guint id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
BinderExtImsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -102,6 +111,7 @@ binder_ext_ims_add_state_handler(
|
||||
BinderExtImsFunc handler,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(handler)) {
|
||||
BinderExtImsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -117,6 +127,7 @@ binder_ext_ims_remove_handler(
|
||||
BinderExtIms* self,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
/*
|
||||
* Since we provide the default callback, we can safely assume
|
||||
@@ -132,6 +143,7 @@ binder_ext_ims_remove_handlers(
|
||||
gulong* ids,
|
||||
guint count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(ids) && G_LIKELY(count)) {
|
||||
BinderExtImsInterface* iface = GET_IFACE(self);
|
||||
int i;
|
||||
@@ -159,6 +171,7 @@ binder_ext_ims_default_remove_handler(
|
||||
BinderExtIms* self,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (id) {
|
||||
g_signal_handler_disconnect(self, id);
|
||||
}
|
||||
@@ -169,6 +182,7 @@ void
|
||||
binder_ext_ims_default_init(
|
||||
BinderExtImsInterface* iface)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* Assume the smallest interface version. Implementation must overwrite
|
||||
* iface->version with BINDER_EXT_IMS_INTERFACE_VERSION known to it at
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
*/
|
||||
|
||||
#include "binder_ext_plugin_impl.h"
|
||||
#include <gutil_log.h>
|
||||
#define DBG(fmt, ...) \
|
||||
gutil_log(GLOG_MODULE_CURRENT, GLOG_LEVEL_ALWAYS, "ext:"fmt, ##__VA_ARGS__)
|
||||
|
||||
#define THIS(obj) BINDER_EXT_PLUGIN(obj)
|
||||
#define THIS_TYPE BINDER_EXT_TYPE_PLUGIN
|
||||
@@ -36,6 +39,7 @@ binder_ext_slot_new(
|
||||
RadioInstance* radio,
|
||||
GHashTable* params)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Well, this is kind of BinderExtSlot API but let it be here. */
|
||||
return plugin ? GET_CLASS(plugin)->new_slot(plugin, radio, params) : NULL;
|
||||
}
|
||||
@@ -44,6 +48,7 @@ BinderExtPlugin*
|
||||
binder_ext_plugin_ref(
|
||||
BinderExtPlugin* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_ref(THIS(self));
|
||||
}
|
||||
@@ -54,6 +59,7 @@ void
|
||||
binder_ext_plugin_unref(
|
||||
BinderExtPlugin* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_unref(THIS(self));
|
||||
}
|
||||
@@ -63,6 +69,7 @@ const char*
|
||||
binder_ext_plugin_name(
|
||||
BinderExtPlugin* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return G_LIKELY(self) ? GET_CLASS(self)->plugin_name : NULL;
|
||||
}
|
||||
|
||||
@@ -70,6 +77,7 @@ BinderExtPlugin*
|
||||
binder_ext_plugin_get(
|
||||
const char* name)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (binder_ext_plugin_table && G_LIKELY(name)) ?
|
||||
g_hash_table_lookup(binder_ext_plugin_table, name) :
|
||||
NULL;
|
||||
@@ -79,6 +87,7 @@ void
|
||||
binder_ext_plugin_register(
|
||||
BinderExtPlugin* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const char* name = binder_ext_plugin_name(self);
|
||||
|
||||
if (name) {
|
||||
@@ -95,6 +104,7 @@ void
|
||||
binder_ext_plugin_unregister(
|
||||
const char* name)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (binder_ext_plugin_table) {
|
||||
g_hash_table_remove(binder_ext_plugin_table, name);
|
||||
if (!g_hash_table_size(binder_ext_plugin_table)) {
|
||||
@@ -113,6 +123,7 @@ void
|
||||
binder_ext_plugin_init(
|
||||
BinderExtPlugin* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
static
|
||||
@@ -120,6 +131,7 @@ void
|
||||
binder_ext_plugin_class_init(
|
||||
BinderExtPluginClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
#define GLIB_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "binder_ext_slot_impl.h"
|
||||
#include <gutil_log.h>
|
||||
#define DBG(fmt, ...) \
|
||||
gutil_log(GLOG_MODULE_CURRENT, GLOG_LEVEL_ALWAYS, "ext:"fmt, ##__VA_ARGS__)
|
||||
|
||||
struct binder_ext_slot_priv {
|
||||
gboolean dropped;
|
||||
@@ -37,6 +40,7 @@ BinderExtSlot*
|
||||
binder_ext_slot_ref(
|
||||
BinderExtSlot* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_ref(self);
|
||||
}
|
||||
@@ -47,6 +51,7 @@ void
|
||||
binder_ext_slot_unref(
|
||||
BinderExtSlot* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_unref(self);
|
||||
}
|
||||
@@ -56,6 +61,7 @@ void
|
||||
binder_ext_slot_drop(
|
||||
BinderExtSlot* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtSlotPriv* priv = self->priv;
|
||||
|
||||
@@ -72,6 +78,7 @@ binder_ext_slot_get_interface(
|
||||
BinderExtSlot* self,
|
||||
GType type)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return G_LIKELY(self) ? GET_CLASS(self)->get_interface(self, type) : NULL;
|
||||
}
|
||||
|
||||
@@ -85,6 +92,7 @@ binder_ext_slot_default_get_interface(
|
||||
BinderExtSlot* self,
|
||||
GType iface)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -93,6 +101,7 @@ void
|
||||
binder_ext_slot_nop(
|
||||
BinderExtSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
static
|
||||
@@ -100,6 +109,7 @@ void
|
||||
binder_ext_slot_init(
|
||||
BinderExtSlot* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, THIS_TYPE,
|
||||
BinderExtSlotPriv);
|
||||
}
|
||||
@@ -109,6 +119,7 @@ void
|
||||
binder_ext_slot_class_init(
|
||||
BinderExtSlotClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_type_class_add_private(klass, sizeof(BinderExtSlotPriv));
|
||||
klass->get_interface = binder_ext_slot_default_get_interface;
|
||||
klass->shutdown = binder_ext_slot_nop;
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
*/
|
||||
|
||||
#include "binder_ext_sms_impl.h"
|
||||
#include <gutil_log.h>
|
||||
#define DBG(fmt, ...) \
|
||||
gutil_log(GLOG_MODULE_CURRENT, GLOG_LEVEL_ALWAYS, "ext:"fmt, ##__VA_ARGS__)
|
||||
|
||||
G_DEFINE_INTERFACE(BinderExtSms, binder_ext_sms, G_TYPE_OBJECT)
|
||||
#define GET_IFACE(obj) BINDER_EXT_SMS_GET_IFACE(obj)
|
||||
@@ -26,6 +29,7 @@ BinderExtSms*
|
||||
binder_ext_sms_ref(
|
||||
BinderExtSms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_ref(self);
|
||||
}
|
||||
@@ -36,6 +40,7 @@ void
|
||||
binder_ext_sms_unref(
|
||||
BinderExtSms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_unref(self);
|
||||
}
|
||||
@@ -45,6 +50,7 @@ BINDER_EXT_SMS_INTERFACE_FLAGS
|
||||
binder_ext_sms_get_interface_flags(
|
||||
BinderExtSms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return G_LIKELY(self) ? GET_IFACE(self)->flags :
|
||||
BINDER_EXT_SMS_INTERFACE_NO_FLAGS;
|
||||
}
|
||||
@@ -61,6 +67,7 @@ binder_ext_sms_send(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtSmsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -77,6 +84,7 @@ binder_ext_sms_cancel(
|
||||
BinderExtSms* self,
|
||||
guint id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
BinderExtSmsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -92,6 +100,7 @@ binder_ext_sms_add_report_handler(
|
||||
BinderExtSmsReportFunc cb,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(cb)) {
|
||||
BinderExtSmsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -108,6 +117,7 @@ binder_ext_sms_add_incoming_handler(
|
||||
BinderExtSmsIncomingFunc cb,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(cb)) {
|
||||
BinderExtSmsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -124,6 +134,7 @@ binder_ext_sms_ack_report(
|
||||
guint msg_ref,
|
||||
gboolean ok)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtSmsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -138,6 +149,7 @@ binder_ext_sms_ack_incoming(
|
||||
BinderExtSms* self,
|
||||
gboolean ok)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderExtSmsInterface* iface = GET_IFACE(self);
|
||||
|
||||
@@ -152,6 +164,7 @@ binder_ext_sms_remove_handler(
|
||||
BinderExtSms* self,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
/*
|
||||
* Since we provide the default callback, we can safely assume
|
||||
@@ -167,6 +180,7 @@ binder_ext_sms_remove_handlers(
|
||||
gulong* ids,
|
||||
guint count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(ids) && G_LIKELY(count)) {
|
||||
BinderExtSmsInterface* iface = GET_IFACE(self);
|
||||
int i;
|
||||
@@ -194,6 +208,7 @@ binder_ext_sms_default_remove_handler(
|
||||
BinderExtSms* self,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (id) {
|
||||
g_signal_handler_disconnect(self, id);
|
||||
}
|
||||
@@ -204,6 +219,7 @@ void
|
||||
binder_ext_sms_default_init(
|
||||
BinderExtSmsInterface* iface)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* Assume the smallest interface version. Implementation must overwrite
|
||||
* iface->version with BINDER_EXT_SMS_INTERFACE_VERSION known to it at
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Name: ofono-binder-plugin
|
||||
|
||||
Version: 1.1.20
|
||||
Version: 1.1.21
|
||||
Release: 1
|
||||
Summary: Binder based ofono plugin
|
||||
License: GPLv2
|
||||
|
||||
@@ -53,6 +53,7 @@ GQuark
|
||||
binder_base_property_quark(
|
||||
guint property)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(property < BINDER_BASE_MAX_PROPERTIES);
|
||||
/* For ANY property this function is expected to return zero */
|
||||
if (property > 0 && G_LIKELY(property < BINDER_BASE_MAX_PROPERTIES)) {
|
||||
@@ -77,6 +78,7 @@ binder_base_property_changed(
|
||||
guint property,
|
||||
BinderBaseClosure* closure)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderBaseClass* klass = GET_CLASS(self);
|
||||
|
||||
closure->callback(((guint8*)self) + klass->public_offset, property,
|
||||
@@ -94,6 +96,7 @@ binder_base_add_property_handler(
|
||||
GCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(callback)) {
|
||||
/*
|
||||
* We can't directly connect the provided callback because
|
||||
@@ -122,6 +125,7 @@ binder_base_queue_property_change(
|
||||
BinderBase* self,
|
||||
guint property)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->queued_signals |= BINDER_BASE_PROPERTY_BIT(property);
|
||||
}
|
||||
|
||||
@@ -130,6 +134,7 @@ binder_base_emit_property_change(
|
||||
BinderBase* self,
|
||||
guint property)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_base_queue_property_change(self, property);
|
||||
binder_base_emit_queued_signals(self);
|
||||
}
|
||||
@@ -138,13 +143,14 @@ void
|
||||
binder_base_emit_queued_signals(
|
||||
BinderBase* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint p;
|
||||
|
||||
/* Signal handlers may release references to this object */
|
||||
g_object_ref(self);
|
||||
|
||||
/* Emit the signals */
|
||||
for (p = 0; self->queued_signals && p < BINDER_BASE_MAX_PROPERTIES; p++) {
|
||||
/* Emit the signals, ignore the ANY property */
|
||||
for (p = 1; self->queued_signals && p < BINDER_BASE_MAX_PROPERTIES; p++) {
|
||||
if (self->queued_signals & BINDER_BASE_PROPERTY_BIT(p)) {
|
||||
self->queued_signals &= ~BINDER_BASE_PROPERTY_BIT(p);
|
||||
g_signal_emit(self, binder_base_signals[SIGNAL_PROPERTY_CHANGED],
|
||||
@@ -165,6 +171,7 @@ void
|
||||
binder_base_init(
|
||||
BinderBase* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
static
|
||||
@@ -172,6 +179,7 @@ void
|
||||
binder_base_class_init(
|
||||
BinderBaseClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* By default assume that public part immediately follows BinderBase */
|
||||
klass->public_offset = sizeof(BinderBase);
|
||||
binder_base_signals[SIGNAL_PROPERTY_CHANGED] =
|
||||
|
||||
@@ -64,6 +64,7 @@ binder_call_barring_callback_data_new(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallBarringCbData* cbd = g_slice_new0(BinderCallBarringCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -77,6 +78,7 @@ void
|
||||
binder_call_barring_callback_data_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderCallBarringCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -86,6 +88,7 @@ binder_call_barring_query_ok(
|
||||
const BinderCallBarringCbData* cbd,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderReader reader;
|
||||
gint32 response;
|
||||
|
||||
@@ -117,6 +120,7 @@ binder_call_barring_query_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallBarringCbData* cbd = user_data;
|
||||
|
||||
@@ -148,6 +152,7 @@ binder_call_barring_query(
|
||||
ofono_call_barring_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallBarring* self = ofono_call_barring_get_data(b);
|
||||
|
||||
/*
|
||||
@@ -192,6 +197,7 @@ binder_call_barring_set_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallBarringCbData* cbd = user_data;
|
||||
ofono_call_barring_set_cb_t cb = cbd->cb.set;
|
||||
@@ -230,6 +236,7 @@ binder_call_barring_set(
|
||||
ofono_call_barring_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallBarring* self = ofono_call_barring_get_data(b);
|
||||
|
||||
/*
|
||||
@@ -277,6 +284,7 @@ binder_call_barring_set_passwd_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallBarringCbData* cbd = user_data;
|
||||
ofono_call_barring_set_cb_t cb = cbd->cb.set;
|
||||
@@ -311,6 +319,7 @@ binder_call_barring_set_passwd(
|
||||
ofono_call_barring_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallBarring* self = ofono_call_barring_get_data(b);
|
||||
const RADIO_AIDL_INTERFACE iface_aidl =
|
||||
radio_client_aidl_interface(self->network_client);
|
||||
@@ -350,6 +359,7 @@ gboolean
|
||||
binder_call_barring_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallBarring* self = user_data;
|
||||
|
||||
GASSERT(self->register_id);
|
||||
@@ -365,6 +375,7 @@ binder_call_barring_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderCallBarring* self = g_new0(struct binder_call_barring, 1);
|
||||
|
||||
@@ -386,6 +397,7 @@ void
|
||||
binder_call_barring_remove(
|
||||
struct ofono_call_barring* b)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallBarring* self = binder_call_barring_get_data(b);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -418,12 +430,14 @@ static const struct ofono_call_barring_driver binder_call_barring_driver = {
|
||||
void
|
||||
binder_call_barring_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_call_barring_driver_register(&binder_call_barring_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_call_barring_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_call_barring_driver_unregister(&binder_call_barring_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ binder_call_forwarding_callback_data_new(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallForwardingCbData* cbd = g_slice_new0(BinderCallForwardingCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -75,6 +76,7 @@ void
|
||||
binder_call_forwarding_callback_data_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderCallForwardingCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -92,6 +94,7 @@ binder_call_forwarding_call(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* getCallForwardStatus(int32_t serial, CallForwardInfo callInfo);
|
||||
* setCallForward(int32_t serial, CallForwardInfo callInfo);
|
||||
@@ -158,6 +161,7 @@ binder_call_forwarding_set_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallForwardingCbData* cbd = user_data;
|
||||
ofono_call_forwarding_set_cb_t cb = cbd->cb.set;
|
||||
@@ -192,6 +196,7 @@ binder_call_forwarding_set(
|
||||
ofono_call_forwarding_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_SET_CALL_FORWARD :
|
||||
RADIO_REQ_SET_CALL_FORWARD;
|
||||
@@ -211,6 +216,7 @@ binder_call_forwarding_registration(
|
||||
ofono_call_forwarding_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallForwarding* self = binder_call_forwarding_get_data(f);
|
||||
|
||||
DBG_(self, "%d", type);
|
||||
@@ -227,6 +233,7 @@ binder_call_forwarding_erasure(
|
||||
ofono_call_forwarding_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallForwarding* self = binder_call_forwarding_get_data(f);
|
||||
|
||||
DBG_(self, "%d", type);
|
||||
@@ -243,6 +250,7 @@ binder_call_forwarding_deactivate(
|
||||
ofono_call_forwarding_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallForwarding* self = binder_call_forwarding_get_data(f);
|
||||
|
||||
DBG_(self, "%d", type);
|
||||
@@ -259,6 +267,7 @@ binder_call_forwarding_activate(
|
||||
ofono_call_forwarding_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallForwarding* self = binder_call_forwarding_get_data(f);
|
||||
|
||||
DBG_(self, "%d", type);
|
||||
@@ -272,6 +281,7 @@ binder_call_forwarding_query_ok(
|
||||
const BinderCallForwardingCbData* cbd,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const RadioCallForwardInfo* infos;
|
||||
struct ofono_call_forwarding_condition* list = NULL;
|
||||
@@ -312,6 +322,7 @@ binder_call_forwarding_query_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallForwardingCbData* cbd = user_data;
|
||||
|
||||
@@ -342,6 +353,7 @@ binder_call_forwarding_query(
|
||||
ofono_call_forwarding_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallForwarding* self = binder_call_forwarding_get_data(f);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_GET_CALL_FORWARD_STATUS :
|
||||
@@ -365,6 +377,7 @@ gboolean
|
||||
binder_call_forwarding_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallForwarding* self = user_data;
|
||||
|
||||
GASSERT(self->register_id);
|
||||
@@ -380,6 +393,7 @@ binder_call_forwarding_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderCallForwarding* self = g_new0(BinderCallForwarding, 1);
|
||||
|
||||
@@ -399,6 +413,7 @@ void
|
||||
binder_call_forwarding_remove(
|
||||
struct ofono_call_forwarding* f)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallForwarding* self = binder_call_forwarding_get_data(f);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -432,12 +447,14 @@ binder_call_forwarding_driver = {
|
||||
void
|
||||
binder_call_forwarding_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_call_forwarding_driver_register(&binder_call_forwarding_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_call_forwarding_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_call_forwarding_driver_unregister(&binder_call_forwarding_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ binder_call_settings_callback_data_new(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallSettingsCbData* cbd = g_slice_new0(BinderCallSettingsCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -74,6 +75,7 @@ void
|
||||
binder_call_settings_callback_data_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderCallSettingsCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -86,6 +88,7 @@ binder_call_settings_call(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioRequest* req = radio_request_new2(self->g, code, NULL, complete,
|
||||
binder_call_settings_callback_data_free,
|
||||
binder_call_settings_callback_data_new(self, cb, data));
|
||||
@@ -104,6 +107,7 @@ binder_call_settings_set_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallSettingsCbData* cbd = user_data;
|
||||
ofono_call_settings_set_cb_t cb = cbd->cb.set;
|
||||
@@ -124,6 +128,7 @@ binder_call_settings_cw_set(
|
||||
ofono_call_settings_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallSettings* self = binder_call_settings_get_data(s);
|
||||
|
||||
/*
|
||||
@@ -160,6 +165,7 @@ binder_call_settings_cw_query_ok(
|
||||
const BinderCallSettingsCbData* cbd,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
ofono_call_settings_status_cb_t cb = cbd->cb.status;
|
||||
GBinderReader reader;
|
||||
@@ -196,6 +202,7 @@ binder_call_settings_cw_query_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallSettingsCbData* cbd = user_data;
|
||||
|
||||
@@ -224,6 +231,7 @@ void binder_call_settings_cw_query(
|
||||
ofono_call_settings_status_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallSettings* self = binder_call_settings_get_data(s);
|
||||
|
||||
/*
|
||||
@@ -259,6 +267,7 @@ binder_call_settings_clip_query_ok(
|
||||
const BinderCallSettingsCbData* cbd,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
GBinderReader reader;
|
||||
gint32 status;
|
||||
@@ -282,6 +291,7 @@ binder_call_settings_clip_query_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallSettingsCbData* cbd = user_data;
|
||||
|
||||
@@ -310,6 +320,7 @@ binder_call_settings_clip_query(
|
||||
ofono_call_settings_status_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallSettings* self = binder_call_settings_get_data(s);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_GET_CLIP : RADIO_REQ_GET_CLIP;
|
||||
@@ -326,6 +337,7 @@ binder_call_settings_clir_ok(
|
||||
const BinderCallSettingsCbData* cbd,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
GBinderReader reader;
|
||||
gint32 n, m;
|
||||
@@ -351,6 +363,7 @@ binder_call_settings_clir_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallSettingsCbData* cbd = user_data;
|
||||
|
||||
@@ -379,6 +392,7 @@ binder_call_settings_clir_query(
|
||||
ofono_call_settings_clir_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallSettings* self = binder_call_settings_get_data(s);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_GET_CLIR : RADIO_REQ_GET_CLIR;
|
||||
@@ -397,6 +411,7 @@ binder_call_settings_clir_set(
|
||||
ofono_call_settings_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallSettings* self = binder_call_settings_get_data(s);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_SET_CLIR : RADIO_REQ_SET_CLIR;
|
||||
@@ -421,6 +436,7 @@ gboolean
|
||||
binder_call_settings_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallSettings* self = user_data;
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -437,6 +453,7 @@ binder_call_settings_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderCallSettings* self = g_new0(BinderCallSettings, 1);
|
||||
|
||||
@@ -456,6 +473,7 @@ void
|
||||
binder_call_settings_remove(
|
||||
struct ofono_call_settings* s)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallSettings* self = binder_call_settings_get_data(s);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -488,12 +506,14 @@ static const struct ofono_call_settings_driver binder_call_settings_driver = {
|
||||
void
|
||||
binder_call_settings_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_call_settings_driver_register(&binder_call_settings_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_call_settings_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_call_settings_driver_unregister(&binder_call_settings_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ binder_call_volume_callback_data_new(
|
||||
ofono_call_volume_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallVolumeCbData* cbd = g_slice_new0(BinderCallVolumeCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -69,6 +70,7 @@ void
|
||||
binder_call_volume_callback_data_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderCallVolumeCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -82,6 +84,7 @@ binder_call_volume_mute_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderCallVolumeCbData* cbd = user_data;
|
||||
ofono_call_volume_cb_t cb = cbd->cb;
|
||||
@@ -111,6 +114,7 @@ binder_call_volume_mute(
|
||||
ofono_call_volume_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallVolume* self = binder_call_volume_get_data(v);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_SET_MUTE : RADIO_REQ_SET_MUTE;
|
||||
@@ -140,6 +144,7 @@ binder_call_volume_query_mute_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderCallVolume* self = user_data;
|
||||
if (status == RADIO_TX_STATUS_OK) {
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
@@ -171,6 +176,7 @@ gboolean
|
||||
binder_call_volume_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallVolume* self = user_data;
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_GET_MUTE : RADIO_REQ_GET_MUTE;
|
||||
@@ -194,6 +200,7 @@ binder_call_volume_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderCallVolume* self = g_new0(BinderCallVolume, 1);
|
||||
|
||||
@@ -213,6 +220,7 @@ void
|
||||
binder_call_volume_remove(
|
||||
struct ofono_call_volume* v)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCallVolume* self = binder_call_volume_get_data(v);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -241,12 +249,14 @@ static const struct ofono_call_volume_driver binder_call_volume_driver = {
|
||||
void
|
||||
binder_call_volume_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_call_volume_driver_register(&binder_call_volume_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_call_volume_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_call_volume_driver_unregister(&binder_call_volume_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ binder_cbs_callback_data_new(
|
||||
ofono_cbs_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCbsCbData* cbd = g_slice_new0(BinderCbsCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -75,6 +76,7 @@ void
|
||||
binder_cbs_callback_data_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderCbsCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -88,6 +90,7 @@ binder_cbs_retry(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return error == RADIO_ERROR_INVALID_STATE;
|
||||
}
|
||||
|
||||
@@ -101,6 +104,7 @@ binder_cbs_activate_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
BinderCbsCbData* cbd = user_data;
|
||||
guint32 code = cbd->self->interface_aidl == RADIO_MESSAGING_INTERFACE ?
|
||||
@@ -132,6 +136,7 @@ binder_cbs_activate(
|
||||
ofono_cbs_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* setGsmBroadcastActivation(int32_t serial, bool activate); */
|
||||
GBinderWriter writer;
|
||||
guint32 code = self->interface_aidl == RADIO_MESSAGING_INTERFACE ?
|
||||
@@ -161,6 +166,7 @@ binder_cbs_set_config_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCbsCbData* cbd = user_data;
|
||||
struct ofono_error err;
|
||||
|
||||
@@ -191,6 +197,7 @@ binder_cbs_set_config(
|
||||
ofono_cbs_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderWriter writer;
|
||||
guint32 code = self->interface_aidl == RADIO_MESSAGING_INTERFACE ?
|
||||
RADIO_MESSAGING_REQ_SET_GSM_BROADCAST_CONFIG :
|
||||
@@ -287,6 +294,7 @@ binder_cbs_set_topics(
|
||||
ofono_cbs_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCbs* self = binder_cbs_get_data(cbs);
|
||||
|
||||
DBG_(self, "%s", topics);
|
||||
@@ -300,6 +308,7 @@ binder_cbs_clear_topics(
|
||||
ofono_cbs_set_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCbs* self = binder_cbs_get_data(cbs);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -314,6 +323,7 @@ binder_cbs_notify(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCbs* self = user_data;
|
||||
GBinderReader reader;
|
||||
const guchar* ptr;
|
||||
@@ -356,6 +366,7 @@ gboolean
|
||||
binder_cbs_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCbs* self = user_data;
|
||||
RadioClient* client = self->g->client;
|
||||
guint32 code = self->interface_aidl == RADIO_MESSAGING_INTERFACE ?
|
||||
@@ -378,6 +389,7 @@ binder_cbs_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderCbs* self = g_new0(BinderCbs, 1);
|
||||
|
||||
@@ -397,6 +409,7 @@ void
|
||||
binder_cbs_remove(
|
||||
struct ofono_cbs* cbs)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCbs* self = binder_cbs_get_data(cbs);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -427,12 +440,14 @@ static const struct ofono_cbs_driver binder_cbs_driver = {
|
||||
void
|
||||
binder_cbs_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_cbs_driver_register(&binder_cbs_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_cbs_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_cbs_driver_unregister(&binder_cbs_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ binder_cell_info_int_format(
|
||||
int value,
|
||||
const char* format)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (value == OFONO_CELL_INVALID_VALUE) {
|
||||
return "";
|
||||
} else {
|
||||
@@ -112,6 +113,7 @@ binder_cell_info_int64_format(
|
||||
guint64 value,
|
||||
const char* format)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (value == OFONO_CELL_INVALID_VALUE_INT64) {
|
||||
return "";
|
||||
} else {
|
||||
@@ -129,6 +131,7 @@ binder_cell_info_list_compare(
|
||||
gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return ofono_cell_compare_location(*(struct ofono_cell**)a,
|
||||
*(struct ofono_cell**)b);
|
||||
}
|
||||
@@ -139,6 +142,7 @@ binder_cell_info_list_equal(
|
||||
const ofono_cell_ptr* l1,
|
||||
const ofono_cell_ptr* l2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (l1 && l2) {
|
||||
while (*l1 && *l2) {
|
||||
if (memcmp(*l1, *l2, sizeof(struct ofono_cell))) {
|
||||
@@ -158,6 +162,7 @@ void
|
||||
binder_cell_info_clear(
|
||||
BinderCellInfo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->cells && self->cells[0]) {
|
||||
gutil_ptrv_free((void**)self->cells);
|
||||
self->info.cells = self->cells = g_new0(struct ofono_cell*, 1);
|
||||
@@ -172,6 +177,7 @@ binder_cell_info_update_cells(
|
||||
BinderCellInfo* self,
|
||||
GPtrArray* l)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (l) {
|
||||
g_ptr_array_sort(l, binder_cell_info_list_compare);
|
||||
g_ptr_array_add(l, NULL);
|
||||
@@ -197,6 +203,7 @@ binder_cell_info_invalidate(
|
||||
void* info,
|
||||
gsize size)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const int n = size/sizeof(int);
|
||||
int* value = info;
|
||||
int i;
|
||||
@@ -211,6 +218,7 @@ void
|
||||
binder_cell_info_invalidate_nr(
|
||||
struct ofono_cell_info_nr* nr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
nr->mcc = OFONO_CELL_INVALID_VALUE;
|
||||
nr->mnc = OFONO_CELL_INVALID_VALUE;
|
||||
nr->nci = OFONO_CELL_INVALID_VALUE_INT64;
|
||||
@@ -232,6 +240,7 @@ binder_cell_info_new_cell_gsm(
|
||||
const RadioCellIdentityGsm* id,
|
||||
const RadioSignalStrengthGsm* ss)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_cell* cell = binder_cell_new();
|
||||
struct ofono_cell_info_gsm* gsm = &cell->info.gsm;
|
||||
|
||||
@@ -269,6 +278,7 @@ binder_cell_info_new_cell_wcdma(
|
||||
const RadioCellIdentityWcdma* id,
|
||||
const RadioSignalStrengthWcdma* ss)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_cell* cell = binder_cell_new();
|
||||
struct ofono_cell_info_wcdma* wcdma = &cell->info.wcdma;
|
||||
|
||||
@@ -302,6 +312,7 @@ binder_cell_info_new_cell_lte(
|
||||
const RadioCellIdentityLte* id,
|
||||
const RadioSignalStrengthLte* ss)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_cell* cell = binder_cell_new();
|
||||
struct ofono_cell_info_lte* lte = &cell->info.lte;
|
||||
|
||||
@@ -342,6 +353,7 @@ binder_cell_info_new_cell_nr(
|
||||
const RadioCellIdentityNr* id,
|
||||
const RadioSignalStrengthNr* ss)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_cell* cell = binder_cell_new();
|
||||
struct ofono_cell_info_nr* nr = &cell->info.nr;
|
||||
|
||||
@@ -382,6 +394,7 @@ binder_cell_info_new_cell_gsm_aidl(
|
||||
gboolean registered,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_cell* cell = binder_cell_new();
|
||||
struct ofono_cell_info_gsm* gsm = &cell->info.gsm;
|
||||
gsize data_read;
|
||||
@@ -436,6 +449,7 @@ binder_cell_info_new_cell_wcdma_aidl(
|
||||
gboolean registered,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_cell* cell = binder_cell_new();
|
||||
struct ofono_cell_info_wcdma* wcdma = &cell->info.wcdma;
|
||||
gsize data_read;
|
||||
@@ -489,6 +503,7 @@ binder_cell_info_new_cell_lte_aidl(
|
||||
gboolean registered,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_cell* cell = binder_cell_new();
|
||||
struct ofono_cell_info_lte* lte = &cell->info.lte;
|
||||
gsize data_read;
|
||||
@@ -548,6 +563,7 @@ binder_cell_info_new_cell_nr_aidl(
|
||||
gboolean registered,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_cell* cell = binder_cell_new();
|
||||
struct ofono_cell_info_nr* nr = &cell->info.nr;
|
||||
gsize data_read;
|
||||
@@ -613,6 +629,7 @@ binder_cell_info_array_new_1_0(
|
||||
const RadioCellInfo* cells,
|
||||
gsize count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize i;
|
||||
GPtrArray* l = g_ptr_array_sized_new(count + 1);
|
||||
|
||||
@@ -664,6 +681,7 @@ binder_cell_info_array_new_1_2(
|
||||
const RadioCellInfo_1_2* cells,
|
||||
gsize count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize i;
|
||||
GPtrArray* l = g_ptr_array_sized_new(count + 1);
|
||||
|
||||
@@ -715,6 +733,7 @@ binder_cell_info_array_new_1_4(
|
||||
const RadioCellInfo_1_4* cells,
|
||||
gsize count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize i;
|
||||
GPtrArray* l = g_ptr_array_sized_new(count + 1);
|
||||
|
||||
@@ -758,6 +777,7 @@ binder_cell_info_array_new_1_5(
|
||||
const RadioCellInfo_1_5* cells,
|
||||
gsize count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize i;
|
||||
GPtrArray* l = g_ptr_array_sized_new(count + 1);
|
||||
|
||||
@@ -800,6 +820,7 @@ GPtrArray*
|
||||
binder_cell_info_array_new_aidl(
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize i;
|
||||
gint32 count = 0;
|
||||
GPtrArray* l;
|
||||
@@ -853,6 +874,7 @@ binder_cell_info_list_1_0(
|
||||
BinderCellInfo* self,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize count;
|
||||
const RadioCellInfo* cells = gbinder_reader_read_hidl_type_vec(reader,
|
||||
RadioCellInfo, &count);
|
||||
@@ -871,6 +893,7 @@ binder_cell_info_list_1_2(
|
||||
BinderCellInfo* self,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize count;
|
||||
const RadioCellInfo_1_2* cells = gbinder_reader_read_hidl_type_vec(reader,
|
||||
RadioCellInfo_1_2, &count);
|
||||
@@ -889,6 +912,7 @@ binder_cell_info_list_1_4(
|
||||
BinderCellInfo* self,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize count;
|
||||
const RadioCellInfo_1_4* cells = gbinder_reader_read_hidl_type_vec(reader,
|
||||
RadioCellInfo_1_4, &count);
|
||||
@@ -907,6 +931,7 @@ binder_cell_info_list_1_5(
|
||||
BinderCellInfo* self,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize count;
|
||||
const RadioCellInfo_1_5* cells = gbinder_reader_read_hidl_type_vec(reader,
|
||||
RadioCellInfo_1_5, &count);
|
||||
@@ -925,6 +950,7 @@ binder_cell_info_list_aidl(
|
||||
BinderCellInfo* self,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_cell_info_update_cells(self,
|
||||
binder_cell_info_array_new_aidl(reader));
|
||||
}
|
||||
@@ -937,6 +963,7 @@ binder_cell_info_list_changed_1_0(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
GASSERT(code == RADIO_IND_CELL_INFO_LIST);
|
||||
@@ -956,6 +983,7 @@ binder_cell_info_list_changed_1_2(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
GASSERT(code == RADIO_IND_CELL_INFO_LIST_1_2);
|
||||
@@ -975,6 +1003,7 @@ binder_cell_info_list_changed_1_4(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
GASSERT(code == RADIO_IND_CELL_INFO_LIST_1_4);
|
||||
@@ -994,6 +1023,7 @@ binder_cell_info_list_changed_1_5(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
GASSERT(code == RADIO_IND_CELL_INFO_LIST_1_5);
|
||||
@@ -1013,6 +1043,7 @@ binder_cell_info_list_changed_aidl(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
GASSERT((RADIO_NETWORK_IND)code == RADIO_NETWORK_IND_CELL_INFO_LIST);
|
||||
@@ -1034,6 +1065,7 @@ binder_cell_info_list_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
GASSERT(self->query_req == req);
|
||||
@@ -1085,6 +1117,7 @@ binder_cell_info_set_rate_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(self->client);
|
||||
guint32 code = iface_aidl == RADIO_NETWORK_INTERFACE ?
|
||||
@@ -1117,6 +1150,7 @@ binder_cell_info_retry(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
switch (error) {
|
||||
@@ -1133,6 +1167,7 @@ void
|
||||
binder_cell_info_query(
|
||||
BinderCellInfo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(self->client);
|
||||
guint32 code = iface_aidl == RADIO_NETWORK_INTERFACE ?
|
||||
RADIO_NETWORK_REQ_GET_CELL_INFO_LIST :
|
||||
@@ -1152,6 +1187,7 @@ void
|
||||
binder_cell_info_set_rate(
|
||||
BinderCellInfo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderWriter writer;
|
||||
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(self->client);
|
||||
guint32 code = iface_aidl == RADIO_NETWORK_INTERFACE ?
|
||||
@@ -1177,6 +1213,7 @@ void
|
||||
binder_cell_info_refresh(
|
||||
BinderCellInfo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* getCellInfoList fails without SIM card */
|
||||
if (self->enabled &&
|
||||
self->radio->state == RADIO_STATE_ON &&
|
||||
@@ -1194,6 +1231,7 @@ binder_cell_info_radio_state_cb(
|
||||
BINDER_RADIO_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
DBG_(self, "%s", binder_radio_state_string(radio->state));
|
||||
@@ -1206,6 +1244,7 @@ binder_cell_info_sim_status_cb(
|
||||
BinderSimCard* sim,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(user_data);
|
||||
|
||||
self->sim_card_ready = binder_sim_card_ready(sim);
|
||||
@@ -1234,6 +1273,7 @@ void
|
||||
binder_cell_info_ref_proc(
|
||||
struct ofono_cell_info* info)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_object_ref(binder_cell_info_cast(info));
|
||||
}
|
||||
|
||||
@@ -1242,6 +1282,7 @@ void
|
||||
binder_cell_info_unref_proc(
|
||||
struct ofono_cell_info* info)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_object_unref(binder_cell_info_cast(info));
|
||||
}
|
||||
|
||||
@@ -1251,6 +1292,7 @@ binder_cell_info_cells_changed_cb(
|
||||
BinderCellInfo* self,
|
||||
BinderCellInfoClosure* closure)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
closure->cb(&self->info, closure->user_data);
|
||||
}
|
||||
|
||||
@@ -1261,6 +1303,7 @@ binder_cell_info_add_cells_changed_handler_proc(
|
||||
ofono_cell_info_cb_t cb,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (cb) {
|
||||
BinderCellInfoClosure* closure = (BinderCellInfoClosure *)
|
||||
g_closure_new_simple(sizeof(BinderCellInfoClosure), NULL);
|
||||
@@ -1284,6 +1327,7 @@ binder_cell_info_remove_handler_proc(
|
||||
struct ofono_cell_info* info,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(id)) {
|
||||
g_signal_handler_disconnect(binder_cell_info_cast(info), id);
|
||||
}
|
||||
@@ -1295,6 +1339,7 @@ binder_cell_info_set_update_interval_proc(
|
||||
struct ofono_cell_info* info,
|
||||
int ms)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = binder_cell_info_cast(info);
|
||||
|
||||
if (self->update_rate_ms != ms) {
|
||||
@@ -1312,6 +1357,7 @@ binder_cell_info_set_enabled_proc(
|
||||
struct ofono_cell_info* info,
|
||||
gboolean enabled)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = binder_cell_info_cast(info);
|
||||
|
||||
if (self->enabled != enabled) {
|
||||
@@ -1336,6 +1382,7 @@ binder_cell_info_new(
|
||||
BinderRadio* radio,
|
||||
BinderSimCard* sim)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = g_object_new(THIS_TYPE, 0);
|
||||
|
||||
self->instance = radio_instance_ref(instance);
|
||||
@@ -1397,6 +1444,7 @@ void
|
||||
binder_cell_info_init(
|
||||
BinderCellInfo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
static const struct ofono_cell_info_proc binder_cell_info_proc = {
|
||||
binder_cell_info_ref_proc,
|
||||
binder_cell_info_unref_proc,
|
||||
@@ -1416,6 +1464,7 @@ void
|
||||
binder_cell_info_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderCellInfo* self = THIS(object);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -1438,6 +1487,7 @@ void
|
||||
binder_cell_info_class_init(
|
||||
BinderCellInfoClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_cell_info_finalize;
|
||||
binder_cell_info_signals[SIGNAL_CELLS_CHANGED] =
|
||||
g_signal_new(SIGNAL_CELLS_CHANGED_NAME, G_OBJECT_CLASS_TYPE(klass),
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "binder_base.h"
|
||||
#include "binder_connman.h"
|
||||
#include "binder_log.h"
|
||||
|
||||
#include <ofono/log.h>
|
||||
#include <ofono/gdbus.h>
|
||||
@@ -85,6 +86,7 @@ ConnManObject*
|
||||
connman_object_cast(
|
||||
BinderConnman* connman)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return G_LIKELY(connman) ?
|
||||
THIS(G_CAST(connman, ConnManObject, pub)) :
|
||||
NULL;
|
||||
@@ -95,6 +97,7 @@ const char*
|
||||
connman_iter_get_string(
|
||||
DBusMessageIter* it)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const char* str = NULL;
|
||||
|
||||
dbus_message_iter_get_basic(it, &str);
|
||||
@@ -106,6 +109,7 @@ void
|
||||
connman_object_emit_pending_signals(
|
||||
ConnManObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderBase* base = &self->base;
|
||||
BinderConnman* connman = &self->pub;
|
||||
gsize late_signals = 0;
|
||||
@@ -144,6 +148,7 @@ void
|
||||
connman_cancel_call(
|
||||
ConnManObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->call) {
|
||||
dbus_pending_call_cancel(self->call);
|
||||
dbus_pending_call_unref(self->call);
|
||||
@@ -157,6 +162,7 @@ connman_tech_new(
|
||||
ConnManObject* self,
|
||||
const char* path)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ConnManTech* tech = g_new0(ConnManTech, 1);
|
||||
char* key = g_strdup(path);
|
||||
|
||||
@@ -171,6 +177,7 @@ void
|
||||
connman_invalidate(
|
||||
ConnManObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderConnman* connman = &self->pub;
|
||||
|
||||
if (connman->valid) {
|
||||
@@ -185,6 +192,7 @@ void
|
||||
connman_update_valid(
|
||||
ConnManObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderConnman* connman = &self->pub;
|
||||
const gboolean valid = (connman->present && !self->call);
|
||||
|
||||
@@ -200,6 +208,7 @@ gboolean
|
||||
connman_update_tethering(
|
||||
ConnManObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderConnman* connman = &self->pub;
|
||||
gboolean tethering = FALSE;
|
||||
GHashTableIter it;
|
||||
@@ -231,6 +240,7 @@ connman_set_tech_tethering(
|
||||
ConnManTech* tech,
|
||||
gboolean tethering)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (tech->tethering != tethering) {
|
||||
ConnManObject* self = tech->obj;
|
||||
|
||||
@@ -260,6 +270,7 @@ connman_set_tech_connected(
|
||||
ConnManTech* tech,
|
||||
gboolean connected)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (tech->connected != connected) {
|
||||
ConnManObject* self = tech->obj;
|
||||
|
||||
@@ -283,6 +294,7 @@ connman_tech_set_property(
|
||||
ConnManTech* tech,
|
||||
DBusMessageIter* it)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBusMessageIter var;
|
||||
DBusBasicValue value;
|
||||
const char* key = connman_iter_get_string(it);
|
||||
@@ -310,6 +322,7 @@ connman_tech_set_properties(
|
||||
ConnManTech* tech,
|
||||
DBusMessageIter* it)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBusMessageIter dict;
|
||||
int handled = 0;
|
||||
|
||||
@@ -334,6 +347,7 @@ connman_tech_property_changed(
|
||||
DBusMessage* msg,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const char* path = dbus_message_get_path(msg);
|
||||
ConnManObject* self = THIS(user_data);
|
||||
ConnManTech* tech = g_hash_table_lookup(self->techs, path);
|
||||
@@ -357,6 +371,7 @@ connman_set_techs(
|
||||
ConnManObject* self,
|
||||
DBusMessageIter* it)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBusMessageIter list;
|
||||
|
||||
dbus_message_iter_recurse(it, &list);
|
||||
@@ -387,6 +402,7 @@ connman_techs_reply(
|
||||
DBusPendingCall* call,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ConnManObject* self = THIS(user_data);
|
||||
DBusMessage* reply = dbus_pending_call_steal_reply(call);
|
||||
DBusError error;
|
||||
@@ -413,6 +429,7 @@ void
|
||||
connman_get_techs(
|
||||
ConnManObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBusMessage* msg = dbus_message_new_method_call(CONNMAN_SERVICE,
|
||||
CONNMAN_PATH, CONNMAN_MANAGER_INTERFACE, CONNMAN_GET_TECHNOLOGIES);
|
||||
|
||||
@@ -433,6 +450,7 @@ connman_appeared(
|
||||
DBusConnection* conn,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ConnManObject* self = THIS(user_data);
|
||||
BinderConnman* connman = &self->pub;
|
||||
|
||||
@@ -452,6 +470,7 @@ connman_vanished(
|
||||
DBusConnection* conn,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ConnManObject* self = THIS(user_data);
|
||||
BinderConnman* connman = &self->pub;
|
||||
|
||||
@@ -482,6 +501,7 @@ connman_init(
|
||||
ConnManObject* self,
|
||||
DBusConnection* connection)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->connection = dbus_connection_ref(connection);
|
||||
self->service_watch = g_dbus_add_service_watch(self->connection,
|
||||
CONNMAN_SERVICE, connman_appeared, connman_vanished, self, NULL);
|
||||
@@ -497,6 +517,7 @@ connman_init(
|
||||
BinderConnman*
|
||||
binder_connman_new()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
static ConnManObject* instance = NULL;
|
||||
|
||||
if (instance) {
|
||||
@@ -528,6 +549,7 @@ BinderConnman*
|
||||
binder_connman_ref(
|
||||
BinderConnman* connman)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ConnManObject* self = connman_object_cast(connman);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -540,6 +562,7 @@ void
|
||||
binder_connman_unref(
|
||||
BinderConnman* connman)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ConnManObject* self = connman_object_cast(connman);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -554,6 +577,7 @@ binder_connman_add_property_changed_handler(
|
||||
BinderConnmanPropertyFunc callback,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ConnManObject* self = connman_object_cast(connman);
|
||||
|
||||
return G_LIKELY(self) ? binder_base_add_property_handler(&self->base,
|
||||
@@ -565,6 +589,7 @@ binder_connman_remove_handler(
|
||||
BinderConnman* connman,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(id)) {
|
||||
ConnManObject* self = connman_object_cast(connman);
|
||||
|
||||
@@ -580,6 +605,7 @@ binder_connman_remove_handlers(
|
||||
gulong* ids,
|
||||
int n)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_disconnect_handlers(connman_object_cast(connman), ids, n);
|
||||
}
|
||||
|
||||
@@ -592,6 +618,7 @@ void
|
||||
connman_object_init(
|
||||
ConnManObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->techs = g_hash_table_new_full(g_str_hash, g_str_equal,
|
||||
g_free, g_free);
|
||||
}
|
||||
@@ -601,6 +628,7 @@ void
|
||||
connman_object_finalize(
|
||||
GObject *object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ConnManObject* self = THIS(object);
|
||||
|
||||
connman_cancel_call(self);
|
||||
@@ -613,6 +641,7 @@ connman_object_finalize(
|
||||
|
||||
static void connman_object_class_init(ConnManObjectClass *klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = connman_object_finalize;
|
||||
BINDER_BASE_CLASS(klass)->public_offset =
|
||||
G_STRUCT_OFFSET(ConnManObject, pub);
|
||||
|
||||
@@ -313,6 +313,7 @@ guint8
|
||||
binder_data_modem_id(
|
||||
BinderDataObject* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (data) {
|
||||
guint count = 0;
|
||||
BinderDataManager* dm = data->dm;
|
||||
@@ -338,6 +339,7 @@ binder_data_deactivate_data_call_request_new(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioClient* client = group->client;
|
||||
const RADIO_INTERFACE iface = radio_client_interface(client);
|
||||
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(client);
|
||||
@@ -392,6 +394,7 @@ binder_data_set_data_allowed_request_new(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderWriter args;
|
||||
guint32 code =
|
||||
radio_client_aidl_interface(group->client) == RADIO_DATA_INTERFACE ?
|
||||
@@ -413,6 +416,7 @@ static
|
||||
BinderDataCall*
|
||||
binder_data_call_new()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return g_new0(struct binder_data_call, 1);
|
||||
}
|
||||
|
||||
@@ -421,6 +425,7 @@ BinderDataCall*
|
||||
binder_data_call_dup(
|
||||
const BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (call) {
|
||||
BinderDataCall* dc = binder_data_call_new();
|
||||
|
||||
@@ -445,6 +450,7 @@ void
|
||||
binder_data_call_destroy(
|
||||
BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_free(call->ifname);
|
||||
g_strfreev(call->dnses);
|
||||
g_strfreev(call->gateways);
|
||||
@@ -457,6 +463,7 @@ void
|
||||
binder_data_call_free(
|
||||
BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (call) {
|
||||
binder_data_call_destroy(call);
|
||||
g_free(call);
|
||||
@@ -468,6 +475,7 @@ void
|
||||
binder_data_call_list_free(
|
||||
GSList* calls)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slist_free_full(calls, (GDestroyNotify) binder_data_call_free);
|
||||
}
|
||||
|
||||
@@ -477,6 +485,7 @@ binder_data_call_compare(
|
||||
gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderDataCall* ca = a;
|
||||
const BinderDataCall* cb = b;
|
||||
|
||||
@@ -488,6 +497,7 @@ BinderDataCall*
|
||||
binder_data_call_new_1_0(
|
||||
const RadioDataCall* dc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataCall* call = binder_data_call_new();
|
||||
|
||||
call->cid = dc->cid;
|
||||
@@ -516,6 +526,7 @@ binder_data_call_list_1_0(
|
||||
const RadioDataCall* calls,
|
||||
gsize n)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (n) {
|
||||
gsize i;
|
||||
GSList* l = NULL;
|
||||
@@ -537,6 +548,7 @@ BinderDataCall*
|
||||
binder_data_call_new_1_4(
|
||||
const RadioDataCall_1_4* dc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataCall* call = binder_data_call_new();
|
||||
|
||||
call->cid = dc->cid;
|
||||
@@ -567,6 +579,7 @@ BinderDataCall*
|
||||
binder_data_call_new_1_5(
|
||||
const RadioDataCall_1_5* dc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataCall* call = binder_data_call_new();
|
||||
|
||||
call->cid = dc->cid;
|
||||
@@ -597,6 +610,7 @@ BinderDataCall*
|
||||
binder_data_call_new_aidl(
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataCall* call = binder_data_call_new();
|
||||
|
||||
gsize data_read;
|
||||
@@ -684,6 +698,7 @@ binder_data_call_list_1_4(
|
||||
const RadioDataCall_1_4* calls,
|
||||
gsize n)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (n) {
|
||||
gsize i;
|
||||
GSList* l = NULL;
|
||||
@@ -706,6 +721,7 @@ binder_data_call_list_1_5(
|
||||
const RadioDataCall_1_5* calls,
|
||||
gsize n)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (n) {
|
||||
gsize i;
|
||||
GSList* l = NULL;
|
||||
@@ -727,6 +743,7 @@ GSList*
|
||||
binder_data_call_list_aidl(
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gint32 n;
|
||||
gbinder_reader_read_int32(reader, &n);
|
||||
if (n > 0) {
|
||||
@@ -751,6 +768,7 @@ binder_data_call_equal(
|
||||
const BinderDataCall* c1,
|
||||
const BinderDataCall* c2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (c1 == c2) {
|
||||
return TRUE;
|
||||
} else if (c1 && c2) {
|
||||
@@ -776,6 +794,7 @@ binder_data_call_list_equal(
|
||||
GSList* l1,
|
||||
GSList* l2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
while (l1 && l2) {
|
||||
if (!binder_data_call_equal(l1->data, l2->data)) {
|
||||
return FALSE;
|
||||
@@ -792,6 +811,7 @@ binder_data_call_list_contains(
|
||||
GSList* l,
|
||||
const BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
while (l) {
|
||||
if (binder_data_call_equal(l->data, call)) {
|
||||
return TRUE;
|
||||
@@ -807,6 +827,7 @@ binder_data_call_find(
|
||||
GSList* l,
|
||||
int cid)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
while (l) {
|
||||
BinderDataCall* call = l->data;
|
||||
|
||||
@@ -824,6 +845,7 @@ binder_data_set_calls(
|
||||
BinderDataObject* self,
|
||||
GSList* list)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderBase* base = &self->base;
|
||||
BinderData* data = &self->pub;
|
||||
GHashTableIter it;
|
||||
@@ -874,6 +896,7 @@ gboolean
|
||||
binder_data_is_allowed(
|
||||
BinderDataObject* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return G_LIKELY(data) &&
|
||||
(data->restricted_state & RADIO_RESTRICTED_STATE_PS_ALL) == 0 &&
|
||||
(data->flags & (BINDER_DATA_FLAG_ALLOWED | BINDER_DATA_FLAG_ON)) ==
|
||||
@@ -886,6 +909,7 @@ binder_data_check_allowed(
|
||||
BinderDataObject* data,
|
||||
gboolean was_allowed)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (binder_data_is_allowed(data) != was_allowed) {
|
||||
binder_base_queue_property_change(&data->base,
|
||||
BINDER_DATA_PROPERTY_ALLOWED);
|
||||
@@ -900,6 +924,7 @@ binder_data_restricted_state_changed(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = THIS(user_data);
|
||||
GBinderReader reader;
|
||||
gint32 state;
|
||||
@@ -927,6 +952,7 @@ binder_data_call_list_changed(
|
||||
BinderDataObject* data,
|
||||
GSList* list)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (data->query_req) {
|
||||
/* We have received change event before query has completed */
|
||||
DBG_(data, "cancelling query");
|
||||
@@ -945,6 +971,7 @@ binder_data_call_list_changed_1_0(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = THIS(user_data);
|
||||
GBinderReader reader;
|
||||
const RadioDataCall* calls;
|
||||
@@ -965,6 +992,7 @@ binder_data_call_list_changed_1_4(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = THIS(user_data);
|
||||
GBinderReader reader;
|
||||
const RadioDataCall_1_4* calls;
|
||||
@@ -985,6 +1013,7 @@ binder_data_call_list_changed_1_5(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = THIS(user_data);
|
||||
GBinderReader reader;
|
||||
const RadioDataCall_1_5* calls;
|
||||
@@ -1005,6 +1034,7 @@ binder_data_call_list_changed_aidl(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = THIS(user_data);
|
||||
GBinderReader reader;
|
||||
|
||||
@@ -1024,6 +1054,7 @@ void binder_data_query_data_calls_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = THIS(user_data);
|
||||
|
||||
GASSERT(data->query_req == req);
|
||||
@@ -1102,6 +1133,7 @@ void
|
||||
binder_data_request_free(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dr->free) {
|
||||
dr->free(dr);
|
||||
} else {
|
||||
@@ -1114,6 +1146,7 @@ void
|
||||
binder_data_request_detach(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dr) {
|
||||
dr->cb.ptr = NULL;
|
||||
dr->arg = NULL;
|
||||
@@ -1126,6 +1159,7 @@ binder_data_request_call(
|
||||
BinderDataRequest* dr,
|
||||
RadioRequest* req)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(!dr->radio_req);
|
||||
radio_request_drop(dr->radio_req);
|
||||
if (radio_request_submit(req)) {
|
||||
@@ -1144,6 +1178,7 @@ void
|
||||
binder_data_request_cancel_io(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dr->radio_req) {
|
||||
radio_request_drop(dr->radio_req);
|
||||
dr->radio_req = NULL;
|
||||
@@ -1155,6 +1190,7 @@ void
|
||||
binder_data_request_submit_next(
|
||||
BinderDataObject* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!data->pending_req) {
|
||||
int submission_failure = 0;
|
||||
|
||||
@@ -1192,6 +1228,7 @@ gboolean
|
||||
binder_data_request_do_cancel(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dr && !(dr->flags & DATA_REQUEST_FLAG_COMPLETED)) {
|
||||
BinderDataObject* data = dr->data;
|
||||
|
||||
@@ -1232,6 +1269,7 @@ void
|
||||
binder_data_request_cancel(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dr) {
|
||||
BinderDataObject* data = dr->data;
|
||||
|
||||
@@ -1246,6 +1284,7 @@ void
|
||||
binder_data_request_completed(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(!(dr->flags & DATA_REQUEST_FLAG_COMPLETED));
|
||||
dr->flags |= DATA_REQUEST_FLAG_COMPLETED;
|
||||
}
|
||||
@@ -1255,6 +1294,7 @@ void
|
||||
binder_data_request_finish(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = dr->data;
|
||||
|
||||
GASSERT(dr == data->pending_req);
|
||||
@@ -1270,6 +1310,11 @@ void
|
||||
binder_data_request_queue(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if(dr == NULL){
|
||||
DBG("dr == NULL,func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return;
|
||||
}
|
||||
BinderDataObject* data = dr->data;
|
||||
|
||||
dr->next = NULL;
|
||||
@@ -1298,6 +1343,7 @@ void
|
||||
binder_data_call_setup_cancel(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestSetup* setup = G_CAST(dr, BinderDataRequestSetup, req);
|
||||
|
||||
binder_data_request_cancel_io(dr);
|
||||
@@ -1318,6 +1364,7 @@ gboolean
|
||||
binder_data_call_setup_retry(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestSetup* setup = user_data;
|
||||
BinderDataRequest* dr = &setup->req;
|
||||
|
||||
@@ -1335,6 +1382,7 @@ gboolean
|
||||
binder_data_call_retry(
|
||||
BinderDataRequestSetup* setup)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequest* dr = &setup->req;
|
||||
const BinderDataOptions* options = &dr->data->options;
|
||||
|
||||
@@ -1369,6 +1417,7 @@ binder_data_call_setup_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestSetup* setup = user_data;
|
||||
BinderDataRequest* dr = &setup->req;
|
||||
BinderDataObject* self = dr->data;
|
||||
@@ -1504,6 +1553,7 @@ gboolean
|
||||
binder_data_call_setup_submit(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestSetup* setup = G_CAST(dr, BinderDataRequestSetup, req);
|
||||
BinderDataObject* data = dr->data;
|
||||
BinderNetwork* network = data->network;
|
||||
@@ -1711,6 +1761,7 @@ void
|
||||
binder_data_call_setup_free(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestSetup* setup = G_CAST(dr, BinderDataRequestSetup, req);
|
||||
|
||||
g_free(setup->apn);
|
||||
@@ -1728,6 +1779,7 @@ binder_data_call_setup_new(
|
||||
BinderDataCallSetupFunc cb,
|
||||
void* arg)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderDataProfileConfig* dpc = &data->profile_config;
|
||||
BinderDataRequestSetup* setup = g_new0(BinderDataRequestSetup, 1);
|
||||
BinderDataRequest* dr = &setup->req;
|
||||
@@ -1777,6 +1829,7 @@ void
|
||||
binder_data_call_deact_cancel(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_data_request_cancel_io(dr);
|
||||
if (dr->cb.deact) {
|
||||
BinderDataCallDeactivateFunc cb = dr->cb.deact;
|
||||
@@ -1796,6 +1849,7 @@ binder_data_call_deact_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestDeact* deact = user_data;
|
||||
BinderDataRequest* dr = &deact->req;
|
||||
BinderDataObject* self = dr->data;
|
||||
@@ -1855,6 +1909,7 @@ gboolean
|
||||
binder_data_call_deact_submit(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestDeact* deact = G_CAST(dr, BinderDataRequestDeact, req);
|
||||
BinderDataObject* data = dr->data;
|
||||
|
||||
@@ -1871,6 +1926,7 @@ binder_data_call_deact_new(
|
||||
BinderDataCallDeactivateFunc cb,
|
||||
void* arg)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestDeact* deact = g_new0(BinderDataRequestDeact, 1);
|
||||
BinderDataRequest* dr = &deact->req;
|
||||
|
||||
@@ -1890,6 +1946,7 @@ binder_data_call_deact_cid(
|
||||
BinderDataObject* data,
|
||||
int cid)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_data_request_queue(binder_data_call_deact_new(data, cid,
|
||||
NULL, NULL));
|
||||
}
|
||||
@@ -1908,6 +1965,7 @@ binder_data_set_preferred_data_modem_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequest* dr = user_data;
|
||||
BinderDataObject* data = dr->data;
|
||||
|
||||
@@ -1947,6 +2005,7 @@ gboolean
|
||||
binder_data_set_preferred_data_modem_submit(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderWriter args;
|
||||
BinderDataObject* data = dr->data;
|
||||
BinderDataManager* dm = data->dm;
|
||||
@@ -1975,6 +2034,7 @@ BinderDataRequest*
|
||||
binder_data_set_preferred_data_modem_new(
|
||||
BinderDataObject* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequest* dr = g_new0(BinderDataRequest, 1);
|
||||
|
||||
dr->name = "SET_PREFERRED_DATA_MODEM";
|
||||
@@ -1999,6 +2059,7 @@ binder_data_allow_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestAllowData* ad = user_data;
|
||||
BinderDataRequest* dr = &ad->req;
|
||||
BinderDataObject* data = dr->data;
|
||||
@@ -2042,6 +2103,7 @@ gboolean
|
||||
binder_data_allow_submit(
|
||||
BinderDataRequest* dr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestAllowData* ad =
|
||||
G_CAST(dr, BinderDataRequestAllowData, req);
|
||||
BinderDataObject* data = dr->data;
|
||||
@@ -2059,6 +2121,7 @@ binder_data_allow_new(
|
||||
BinderDataObject* data,
|
||||
gboolean allow)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequestAllowData* ad = g_new0(BinderDataRequestAllowData, 1);
|
||||
BinderDataRequest* dr = &ad->req;
|
||||
|
||||
@@ -2076,6 +2139,7 @@ gboolean
|
||||
binder_data_allow_can_submit(
|
||||
BinderDataObject* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (data) {
|
||||
switch (data->options.allow_data) {
|
||||
case BINDER_ALLOW_DATA_ENABLED:
|
||||
@@ -2093,6 +2157,7 @@ binder_data_allow_submit_request(
|
||||
BinderDataObject* data,
|
||||
gboolean allow)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (binder_data_manager_need_set_data_allowed(data->dm)) {
|
||||
if (binder_data_allow_can_submit(data)) {
|
||||
binder_data_request_queue(binder_data_allow_new(data, allow));
|
||||
@@ -2115,6 +2180,7 @@ enum ofono_radio_access_mode
|
||||
binder_data_max_allowed_modes(
|
||||
BinderDataObject* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return data->downgraded_tech ?
|
||||
OFONO_RADIO_ACCESS_UMTS_MASK :
|
||||
OFONO_RADIO_ACCESS_MODE_ALL;
|
||||
@@ -2127,6 +2193,7 @@ binder_data_add_property_handler(
|
||||
BinderDataPropertyFunc callback,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
|
||||
return G_LIKELY(self) ? binder_base_add_property_handler(&self->base,
|
||||
@@ -2138,6 +2205,7 @@ binder_data_remove_handler(
|
||||
BinderData* data,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(id)) {
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
|
||||
@@ -2154,6 +2222,7 @@ binder_data_imsi_changed(
|
||||
BINDER_SIM_SETTINGS_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = THIS(user_data);
|
||||
|
||||
GASSERT(property == BINDER_SIM_SETTINGS_PROPERTY_IMSI);
|
||||
@@ -2174,6 +2243,7 @@ binder_data_pref_changed(
|
||||
BINDER_SIM_SETTINGS_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(property == BINDER_SIM_SETTINGS_PROPERTY_PREF);
|
||||
binder_data_manager_check_network_mode(THIS(user_data)->dm);
|
||||
}
|
||||
@@ -2183,6 +2253,7 @@ void binder_data_client_dead_cb(
|
||||
RadioClient* client,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* data = THIS(user_data);
|
||||
|
||||
DBG_(data, "disconnected");
|
||||
@@ -2197,6 +2268,7 @@ binder_data_compare_cb(
|
||||
gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderDataObject* d1 = THIS(a);
|
||||
const BinderDataObject* d2 = THIS(b);
|
||||
|
||||
@@ -2214,6 +2286,7 @@ binder_data_new(
|
||||
const BinderDataOptions* options,
|
||||
const BinderSlotConfig* config)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(dm);
|
||||
if (G_LIKELY(dm)) {
|
||||
BinderDataObject* self = g_object_new(THIS_TYPE, NULL);
|
||||
@@ -2293,6 +2366,7 @@ binder_data_poll_call_state_retry(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (error) {
|
||||
case RADIO_ERROR_NONE:
|
||||
case RADIO_ERROR_RADIO_NOT_AVAILABLE:
|
||||
@@ -2306,6 +2380,7 @@ void
|
||||
binder_data_poll_call_state(
|
||||
BinderData* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
guint32 code = self->interface_aidl == RADIO_DATA_INTERFACE ?
|
||||
RADIO_DATA_REQ_GET_DATA_CALL_LIST :
|
||||
@@ -2330,6 +2405,7 @@ BinderData*
|
||||
binder_data_ref(
|
||||
BinderData* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -2342,6 +2418,7 @@ void
|
||||
binder_data_unref(
|
||||
BinderData* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -2353,6 +2430,7 @@ gboolean
|
||||
binder_data_allowed(
|
||||
BinderData* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_data_is_allowed(binder_data_cast(data));
|
||||
}
|
||||
|
||||
@@ -2361,6 +2439,7 @@ void
|
||||
binder_data_deactivate_all(
|
||||
BinderDataObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l;
|
||||
|
||||
for (l = self->pub.calls; l; l = l->next) {
|
||||
@@ -2378,6 +2457,7 @@ void
|
||||
binder_data_power_update(
|
||||
BinderDataObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->pending_req || self->req_queue) {
|
||||
binder_radio_power_on(self->radio, self);
|
||||
} else {
|
||||
@@ -2391,6 +2471,7 @@ binder_data_cancel_requests(
|
||||
BinderDataObject* self,
|
||||
BINDER_DATA_REQUEST_FLAGS flags)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequest* dr = self->req_queue;
|
||||
|
||||
while (dr) {
|
||||
@@ -2413,6 +2494,7 @@ void
|
||||
binder_data_cancel_all_requests(
|
||||
BinderDataObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataRequest* dr = self->req_queue;
|
||||
|
||||
binder_data_request_do_cancel(self->pending_req);
|
||||
@@ -2429,6 +2511,7 @@ void
|
||||
binder_data_disallow(
|
||||
BinderDataObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const gboolean was_allowed = binder_data_is_allowed(self);
|
||||
|
||||
DBG_(self, "disallowed");
|
||||
@@ -2463,6 +2546,7 @@ binder_data_max_speed_cb(
|
||||
gpointer data,
|
||||
gpointer max_speed)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (data != max_speed) {
|
||||
THIS(data)->flags &= ~BINDER_DATA_FLAG_MAX_SPEED;
|
||||
}
|
||||
@@ -2474,6 +2558,7 @@ binder_data_disallow_cb(
|
||||
gpointer data,
|
||||
gpointer allowed)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (data != allowed) {
|
||||
BinderDataObject* obj = THIS(data);
|
||||
|
||||
@@ -2488,6 +2573,7 @@ binder_data_allow(
|
||||
BinderData* data,
|
||||
enum ofono_slot_data_role role)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
if (G_LIKELY(self)) {
|
||||
BinderDataManager* dm = self->dm;
|
||||
@@ -2541,6 +2627,7 @@ binder_data_call_setup(
|
||||
BinderDataCallSetupFunc cb,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
BinderDataRequest* dr = NULL;
|
||||
|
||||
@@ -2558,6 +2645,7 @@ binder_data_call_deactivate(
|
||||
BinderDataCallDeactivateFunc cb,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
BinderDataRequest* dr = NULL;
|
||||
|
||||
@@ -2574,6 +2662,7 @@ binder_data_call_grab(
|
||||
int cid,
|
||||
void* cookie)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
|
||||
if (self && cookie && binder_data_call_find(data->calls, cid)) {
|
||||
@@ -2596,6 +2685,7 @@ binder_data_call_release(
|
||||
int cid,
|
||||
void* cookie)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = binder_data_cast(data);
|
||||
|
||||
if (self && cookie) {
|
||||
@@ -2608,6 +2698,7 @@ void
|
||||
binder_data_object_init(
|
||||
BinderDataObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->grab = g_hash_table_new(g_direct_hash, g_direct_equal);
|
||||
}
|
||||
|
||||
@@ -2616,6 +2707,7 @@ void
|
||||
binder_data_object_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataObject* self = THIS(object);
|
||||
BinderData* data = &self->pub;
|
||||
BinderNetwork* network = self->network;
|
||||
@@ -2652,6 +2744,7 @@ binder_data_object_class_init(
|
||||
BinderDataObjectClass* klass)
|
||||
{
|
||||
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_data_object_finalize;
|
||||
}
|
||||
|
||||
@@ -2669,6 +2762,7 @@ binder_data_manager_get_phone_capability_done(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataManager* dm = user_data;
|
||||
|
||||
GASSERT(dm->phone_cap_req == req);
|
||||
@@ -2770,6 +2864,7 @@ void
|
||||
binder_data_manager_request_phone_capability(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint req_code = RADIO_CONFIG_REQ_NONE;
|
||||
RADIO_INTERFACE_TYPE interface_type = radio_config_interface_type(dm->rc);
|
||||
|
||||
@@ -2799,6 +2894,7 @@ binder_data_manager_new(
|
||||
BINDER_DATA_MANAGER_FLAGS flags,
|
||||
enum ofono_radio_access_mode non_data_mode)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataManager* dm = g_new0(BinderDataManager, 1);
|
||||
|
||||
g_atomic_int_set(&dm->refcount, 1);
|
||||
@@ -2813,6 +2909,7 @@ BinderDataManager*
|
||||
binder_data_manager_ref(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dm) {
|
||||
GASSERT(dm->refcount > 0);
|
||||
g_atomic_int_inc(&dm->refcount);
|
||||
@@ -2824,6 +2921,7 @@ void
|
||||
binder_data_manager_unref(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dm) {
|
||||
GASSERT(dm->refcount > 0);
|
||||
if (g_atomic_int_dec_and_test(&dm->refcount)) {
|
||||
@@ -2841,6 +2939,7 @@ binder_data_manager_set_radio_config(
|
||||
BinderDataManager* dm,
|
||||
RadioConfig* rc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dm && dm->rc != rc) {
|
||||
radio_config_unref(dm->rc);
|
||||
dm->rc = radio_config_ref(rc);
|
||||
@@ -2857,6 +2956,7 @@ gboolean
|
||||
binder_data_manager_handover(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* The 3G/LTE handover thing only makes sense if we are managing
|
||||
* more than one SIM slot. Otherwise leave things where they are.
|
||||
@@ -2870,6 +2970,7 @@ gboolean
|
||||
binder_data_manager_requests_pending(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l;
|
||||
|
||||
for (l = dm->data_list; l; l = l->next) {
|
||||
@@ -2888,6 +2989,7 @@ void
|
||||
binder_data_manager_check_network_mode(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l;
|
||||
|
||||
if (dm->non_data_mode && binder_data_manager_handover(dm)) {
|
||||
@@ -2950,6 +3052,7 @@ BinderDataObject*
|
||||
binder_data_manager_allowed(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (dm) {
|
||||
GSList* l;
|
||||
|
||||
@@ -2970,6 +3073,7 @@ binder_data_manager_switch_data_on(
|
||||
BinderDataManager* dm,
|
||||
BinderDataObject* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG_(data, "allowing data");
|
||||
GASSERT(!(data->flags & BINDER_DATA_FLAG_ON));
|
||||
|
||||
@@ -2991,6 +3095,7 @@ void
|
||||
binder_data_manager_check_data(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* Don't do anything if there're any requests pending.
|
||||
*/
|
||||
@@ -3008,6 +3113,7 @@ void
|
||||
binder_data_manager_assert_data_on(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (binder_data_manager_need_set_data_allowed(dm)) {
|
||||
binder_data_allow_submit_request(binder_data_manager_allowed(dm), TRUE);
|
||||
}
|
||||
@@ -3017,6 +3123,7 @@ gboolean
|
||||
binder_data_manager_need_set_data_allowed(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return dm &&
|
||||
radio_config_interface_type(dm->rc) == RADIO_INTERFACE_TYPE_HIDL &&
|
||||
radio_config_interface(dm->rc) < RADIO_CONFIG_INTERFACE_1_1;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "binder_devinfo.h"
|
||||
#include "binder_modem.h"
|
||||
#include "binder_util.h"
|
||||
#include "binder_log.h"
|
||||
|
||||
#include <ofono/devinfo.h>
|
||||
#include <ofono/log.h>
|
||||
@@ -63,6 +64,7 @@ binder_devinfo_callback_data_new(
|
||||
ofono_devinfo_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDevInfoCbData* cbd = g_slice_new0(BinderDevInfoCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -76,6 +78,7 @@ void
|
||||
binder_devinfo_callback_data_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderDevInfoCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -86,6 +89,7 @@ binder_devinfo_query_unsupported(
|
||||
ofono_devinfo_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error error;
|
||||
|
||||
cb(binder_error_failure(&error), "", data);
|
||||
@@ -97,6 +101,7 @@ binder_devinfo_query_revision_ok(
|
||||
const BinderDevInfoCbData* cbd,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
GBinderReader reader;
|
||||
char* res;
|
||||
@@ -128,6 +133,7 @@ binder_devinfo_query_revision_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error err;
|
||||
const BinderDevInfoCbData* cbd = user_data;
|
||||
guint32 code =
|
||||
@@ -158,6 +164,7 @@ binder_devinfo_query_revision(
|
||||
ofono_devinfo_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDevInfo* self = binder_devinfo_get_data(di);
|
||||
guint32 code =
|
||||
(radio_client_aidl_interface(self->g->client) == RADIO_MODEM_INTERFACE) ?
|
||||
@@ -180,6 +187,7 @@ void
|
||||
binder_devinfo_query_serial_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDevInfoCbData* cbd = user_data;
|
||||
BinderDevInfo* self = cbd->self;
|
||||
struct ofono_error error;
|
||||
@@ -193,6 +201,7 @@ void
|
||||
binder_devinfo_query_svn_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDevInfoCbData* cbd = user_data;
|
||||
BinderDevInfo* self = cbd->self;
|
||||
struct ofono_error error;
|
||||
@@ -214,6 +223,7 @@ binder_devinfo_query(
|
||||
ofono_devinfo_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GVERIFY_FALSE(gutil_idle_queue_cancel_tag(self->iq, tag));
|
||||
gutil_idle_queue_add_tag_full(self->iq, tag, fn,
|
||||
binder_devinfo_callback_data_new(self, cb, data),
|
||||
@@ -227,6 +237,7 @@ binder_devinfo_query_serial(
|
||||
ofono_devinfo_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDevInfo* self = binder_devinfo_get_data(devinfo);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -241,6 +252,7 @@ binder_devinfo_query_svn(
|
||||
ofono_devinfo_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDevInfo* self = binder_devinfo_get_data(devinfo);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -253,6 +265,7 @@ void
|
||||
binder_devinfo_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDevInfo* self = user_data;
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -266,6 +279,7 @@ binder_devinfo_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderDevInfo* self = g_new0(BinderDevInfo, 1);
|
||||
|
||||
@@ -287,6 +301,7 @@ void
|
||||
binder_devinfo_remove(
|
||||
struct ofono_devinfo* di)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDevInfo* self = binder_devinfo_get_data(di);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -319,12 +334,14 @@ static const struct ofono_devinfo_driver binder_devinfo_driver = {
|
||||
void
|
||||
binder_devinfo_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_devinfo_driver_register(&binder_devinfo_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_devinfo_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_devinfo_driver_unregister(&binder_devinfo_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include "binder_devmon.h"
|
||||
#include "binder_log.h"
|
||||
|
||||
BinderDevmonIo*
|
||||
binder_devmon_start_io(
|
||||
@@ -22,6 +23,7 @@ binder_devmon_start_io(
|
||||
RadioClient* if_client,
|
||||
struct ofono_slot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return devmon ? devmon->start_io(devmon, ds_client, if_client, slot) : NULL;
|
||||
}
|
||||
|
||||
@@ -29,6 +31,7 @@ void
|
||||
binder_devmon_io_free(
|
||||
BinderDevmonIo* io)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (io) {
|
||||
io->free(io);
|
||||
}
|
||||
@@ -38,6 +41,7 @@ void
|
||||
binder_devmon_free(
|
||||
BinderDevmon* devmon)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (devmon) {
|
||||
devmon->free(devmon);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include "binder_devmon.h"
|
||||
#include "binder_log.h"
|
||||
|
||||
#include <ofono/log.h>
|
||||
|
||||
@@ -42,6 +43,7 @@ void
|
||||
binder_devmon_combine_io_free(
|
||||
BinderDevmonIo* io)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
DevMonIo* self = binder_devmon_combine_io_cast(io);
|
||||
|
||||
@@ -59,6 +61,7 @@ binder_devmon_combine_start_io(
|
||||
RadioClient* if_client,
|
||||
struct ofono_slot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
DevMon* self = binder_devmon_combine_cast(devmon);
|
||||
DevMonIo* io = g_malloc0(sizeof(DevMonIo) +
|
||||
@@ -79,6 +82,7 @@ void
|
||||
binder_devmon_combine_free(
|
||||
BinderDevmon* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMon* self = binder_devmon_combine_cast(dm);
|
||||
guint i;
|
||||
|
||||
@@ -97,6 +101,7 @@ binder_devmon_combine(
|
||||
BinderDevmon* dm[],
|
||||
guint n)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
DevMon* self = g_malloc0(sizeof(DevMon) + sizeof(BinderDevmon*) * n);
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ binder_devmon_ds_io_low_data_state_sent(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMonIo* self = user_data;
|
||||
guint32 code =
|
||||
radio_client_aidl_interface(self->client) == RADIO_MODEM_INTERFACE ?
|
||||
@@ -150,6 +151,7 @@ binder_devmon_ds_io_charging_state_sent(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMonIo* self = user_data;
|
||||
guint32 code =
|
||||
radio_client_aidl_interface(self->client) == RADIO_MODEM_INTERFACE ?
|
||||
@@ -180,6 +182,7 @@ binder_devmon_ds_io_send_device_state(
|
||||
gboolean state,
|
||||
RadioRequestCompleteFunc callback)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderWriter writer;
|
||||
RadioRequest* req;
|
||||
guint32 code =
|
||||
@@ -205,6 +208,7 @@ void
|
||||
binder_devmon_ds_io_update_charging(
|
||||
DevMonIo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const gboolean charging = binder_devmon_ds_charging(self->charger);
|
||||
|
||||
if (self->charging != charging) {
|
||||
@@ -224,6 +228,7 @@ void
|
||||
binder_devmon_ds_io_update_low_data(
|
||||
DevMonIo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const gboolean low_data =
|
||||
!binder_devmon_ds_tethering_on(self->connman) &&
|
||||
!binder_devmon_ds_charging(self->charger) &&
|
||||
@@ -246,6 +251,7 @@ void
|
||||
binder_devmon_ds_io_set_cell_info_update_interval(
|
||||
DevMonIo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_slot_set_cell_info_update_interval(self->slot, self,
|
||||
(binder_devmon_ds_display_on(self->display) &&
|
||||
(binder_devmon_ds_charging(self->charger) ||
|
||||
@@ -261,6 +267,7 @@ binder_devmon_ds_io_connman_cb(
|
||||
BINDER_CONNMAN_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_devmon_ds_io_update_low_data((DevMonIo*)user_data);
|
||||
}
|
||||
|
||||
@@ -270,6 +277,7 @@ binder_devmon_ds_io_battery_cb(
|
||||
MceBattery* battery,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_devmon_ds_io_set_cell_info_update_interval((DevMonIo*)user_data);
|
||||
}
|
||||
|
||||
@@ -279,6 +287,7 @@ binder_devmon_ds_io_display_cb(
|
||||
MceDisplay* display,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMonIo* self = user_data;
|
||||
|
||||
binder_devmon_ds_io_update_low_data(self);
|
||||
@@ -291,6 +300,7 @@ binder_devmon_ds_io_charger_cb(
|
||||
MceCharger* charger,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMonIo* self = user_data;
|
||||
|
||||
binder_devmon_ds_io_update_low_data(self);
|
||||
@@ -303,6 +313,7 @@ void
|
||||
binder_devmon_ds_io_free(
|
||||
BinderDevmonIo* io)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMonIo* self = binder_devmon_ds_io_cast(io);
|
||||
|
||||
binder_connman_remove_all_handlers(self->connman, self->connman_event_id);
|
||||
@@ -334,6 +345,7 @@ binder_devmon_ds_start_io(
|
||||
RadioClient* if_client,
|
||||
struct ofono_slot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMon* ds = binder_devmon_ds_cast(devmon);
|
||||
DevMonIo* self = g_new0(DevMonIo, 1);
|
||||
|
||||
@@ -391,6 +403,7 @@ void
|
||||
binder_devmon_ds_free(
|
||||
BinderDevmon* devmon)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMon* self = binder_devmon_ds_cast(devmon);
|
||||
|
||||
binder_connman_unref(self->connman);
|
||||
@@ -408,6 +421,7 @@ BinderDevmon*
|
||||
binder_devmon_ds_new(
|
||||
const BinderSlotConfig* config)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMon* self = g_new0(DevMon, 1);
|
||||
|
||||
self->pub.free = binder_devmon_ds_free;
|
||||
|
||||
@@ -102,6 +102,7 @@ binder_devmon_if_io_indication_filter_sent(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMonIo* self = user_data;
|
||||
|
||||
GASSERT(self->req == req);
|
||||
@@ -132,6 +133,7 @@ void
|
||||
binder_devmon_if_io_set_indication_filter(
|
||||
DevMonIo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->ind_filter_supported) {
|
||||
GBinderWriter args;
|
||||
RADIO_REQ code;
|
||||
@@ -195,6 +197,7 @@ void
|
||||
binder_devmon_if_io_set_cell_info_update_interval(
|
||||
DevMonIo* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_slot_set_cell_info_update_interval(self->slot, self,
|
||||
(self->display_on && (binder_devmon_if_charging(self->charger) ||
|
||||
binder_devmon_if_battery_ok(self->battery))) ?
|
||||
@@ -208,6 +211,7 @@ binder_devmon_if_io_battery_cb(
|
||||
MceBattery* battery,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_devmon_if_io_set_cell_info_update_interval((DevMonIo*)user_data);
|
||||
}
|
||||
|
||||
@@ -216,6 +220,7 @@ void binder_devmon_if_io_charger_cb(
|
||||
MceCharger* charger,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_devmon_if_io_set_cell_info_update_interval((DevMonIo*)user_data);
|
||||
}
|
||||
|
||||
@@ -225,6 +230,7 @@ binder_devmon_if_io_display_cb(
|
||||
MceDisplay* display,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMonIo* self = user_data;
|
||||
const gboolean display_on = binder_devmon_if_display_on(display);
|
||||
|
||||
@@ -240,6 +246,7 @@ void
|
||||
binder_devmon_if_io_free(
|
||||
BinderDevmonIo* io)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMonIo* self = binder_devmon_if_io_cast(io);
|
||||
|
||||
mce_battery_remove_all_handlers(self->battery, self->battery_event_id);
|
||||
@@ -267,6 +274,7 @@ binder_devmon_if_start_io(
|
||||
RadioClient* if_client,
|
||||
struct ofono_slot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMon* impl = binder_devmon_if_cast(devmon);
|
||||
DevMonIo* self = g_new0(DevMonIo, 1);
|
||||
|
||||
@@ -313,6 +321,7 @@ void
|
||||
binder_devmon_if_free(
|
||||
BinderDevmon* devmon)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMon* self = binder_devmon_if_cast(devmon);
|
||||
|
||||
mce_battery_unref(self->battery);
|
||||
@@ -329,6 +338,7 @@ BinderDevmon*
|
||||
binder_devmon_if_new(
|
||||
const BinderSlotConfig* config)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DevMon* self = g_new0(DevMon, 1);
|
||||
|
||||
self->pub.free = binder_devmon_if_free;
|
||||
|
||||
@@ -65,6 +65,7 @@ binder_gprs_cbd_new(
|
||||
ofono_gprs_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprsCbData* cbd = g_slice_new0(BinderGprsCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -77,6 +78,7 @@ void
|
||||
binder_gprs_cbd_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderGprsCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -86,6 +88,7 @@ binder_gprs_fix_registration_status(
|
||||
BinderGprs* self,
|
||||
enum ofono_netreg_status status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!binder_data_allowed(self->data)) {
|
||||
return OFONO_NETREG_STATUS_NOT_REGISTERED;
|
||||
} else {
|
||||
@@ -104,6 +107,7 @@ void
|
||||
binder_gprs_data_update_registration_state(
|
||||
BinderGprs* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const enum ofono_netreg_status status = binder_gprs_fix_registration_status
|
||||
(self, self->network->data.status);
|
||||
|
||||
@@ -121,6 +125,7 @@ void
|
||||
binder_gprs_check_data_allowed(
|
||||
BinderGprs* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG_(self, "%d %d", binder_data_allowed(self->data), self->attached);
|
||||
if (!binder_data_allowed(self->data) && self->attached) {
|
||||
self->attached = FALSE;
|
||||
@@ -137,6 +142,7 @@ gboolean
|
||||
binder_gprs_set_attached_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprsCbData* cbd = user_data;
|
||||
BinderGprs* self = cbd->self;
|
||||
struct ofono_error err;
|
||||
@@ -156,6 +162,7 @@ binder_gprs_set_attached(
|
||||
ofono_gprs_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprs* self = binder_gprs_get_data(gprs);
|
||||
struct ofono_error err;
|
||||
|
||||
@@ -181,6 +188,7 @@ binder_gprs_allow_data_changed(
|
||||
BINDER_DATA_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprs* self = user_data;
|
||||
|
||||
DBG_(self, "%d", binder_data_allowed(data));
|
||||
@@ -196,11 +204,19 @@ binder_gprs_max_data_calls_changed(
|
||||
BINDER_NETWORK_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprs* self = user_data;
|
||||
|
||||
if (net->max_data_calls > 0) {
|
||||
DBG_(self, "setting max cids to %d", net->max_data_calls);
|
||||
ofono_gprs_set_cid_range(self->gprs, 1, net->max_data_calls);
|
||||
int max_data_calls = net->max_data_calls;
|
||||
|
||||
// Some MediaTek RILs support more than 1 active context on Android
|
||||
// but report only 1 in response to getDataRegistrationState
|
||||
if (max_data_calls == 1)
|
||||
max_data_calls = 3;
|
||||
|
||||
DBG_(self, "setting max cids to %d", max_data_calls);
|
||||
ofono_gprs_set_cid_range(self->gprs, 1, max_data_calls);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,6 +227,7 @@ binder_gprs_data_registration_state_changed(
|
||||
BINDER_NETWORK_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_gprs_data_update_registration_state((BinderGprs*)user_data);
|
||||
}
|
||||
|
||||
@@ -221,6 +238,7 @@ binder_gprs_registration_status(
|
||||
ofono_gprs_status_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprs* self = binder_gprs_get_data(gprs);
|
||||
struct ofono_error err;
|
||||
const enum ofono_netreg_status status = self->attached ?
|
||||
@@ -235,6 +253,7 @@ gboolean
|
||||
binder_gprs_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprs* self = user_data;
|
||||
BinderNetwork* network = self->network;
|
||||
struct ofono_gprs* gprs = self->gprs;
|
||||
@@ -256,8 +275,15 @@ binder_gprs_register(
|
||||
network->data.status);
|
||||
|
||||
if (network->max_data_calls > 0) {
|
||||
DBG_(self, "setting max cids to %d", network->max_data_calls);
|
||||
ofono_gprs_set_cid_range(gprs, 1,network->max_data_calls);
|
||||
int max_data_calls = network->max_data_calls;
|
||||
|
||||
// Some MediaTek RILs support more than 1 active context on Android
|
||||
// but report only 1 in response to getDataRegistrationState
|
||||
if (max_data_calls == 1)
|
||||
max_data_calls = 3;
|
||||
|
||||
DBG_(self, "setting max cids to %d", max_data_calls);
|
||||
ofono_gprs_set_cid_range(self->gprs, 1, max_data_calls);
|
||||
}
|
||||
|
||||
ofono_gprs_register(gprs);
|
||||
@@ -271,6 +297,7 @@ binder_gprs_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderGprs* self = g_new0(BinderGprs, 1);
|
||||
|
||||
@@ -292,6 +319,7 @@ void
|
||||
binder_gprs_remove(
|
||||
struct ofono_gprs* gprs)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprs* self = binder_gprs_get_data(gprs);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -332,12 +360,14 @@ static const struct ofono_gprs_driver binder_gprs_driver = {
|
||||
void
|
||||
binder_gprs_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_gprs_driver_register(&binder_gprs_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_gprs_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_gprs_driver_unregister(&binder_gprs_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ char*
|
||||
binder_gprs_context_netmask(
|
||||
const char* bits)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint nbits;
|
||||
|
||||
if (gutil_parse_uint(bits, 0, &nbits) && nbits < 33) {
|
||||
@@ -87,6 +88,7 @@ int
|
||||
binder_gprs_context_address_family(
|
||||
const char* addr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (strchr(addr, ':')) {
|
||||
return AF_INET6;
|
||||
} else if (strchr(addr, '.')) {
|
||||
@@ -101,6 +103,7 @@ void
|
||||
binder_gprs_context_free_active_call(
|
||||
BinderGprsContext* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->active_call) {
|
||||
binder_data_call_release(self->data, self->active_call->cid, self);
|
||||
binder_data_call_free(self->active_call);
|
||||
@@ -122,6 +125,7 @@ binder_gprs_context_set_active_call(
|
||||
BinderGprsContext* self,
|
||||
const BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (call) {
|
||||
binder_data_call_free(self->active_call);
|
||||
self->active_call = binder_data_call_dup(call);
|
||||
@@ -147,6 +151,7 @@ void
|
||||
binder_gprs_context_set_disconnected(
|
||||
BinderGprsContext* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->active_call) {
|
||||
binder_gprs_context_free_active_call(self);
|
||||
if (self->deactivate.req) {
|
||||
@@ -178,6 +183,7 @@ binder_gprs_context_set_address(
|
||||
struct ofono_gprs_context *gc,
|
||||
const BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const char* ip_addr = NULL;
|
||||
char* ip_mask = NULL;
|
||||
const char* ipv6_addr = NULL;
|
||||
@@ -250,6 +256,7 @@ binder_gprs_context_set_gateway(
|
||||
struct ofono_gprs_context *gc,
|
||||
const BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const char* ip_gw = NULL;
|
||||
const char* ipv6_gw = NULL;
|
||||
char* const* list = call->gateways;
|
||||
@@ -287,6 +294,7 @@ binder_gprs_context_set_servers(
|
||||
ofono_gprs_context_list_setter_t set_ipv4,
|
||||
ofono_gprs_context_list_setter_t set_ipv6)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
int i;
|
||||
const char** ip_list = NULL, ** ip_ptr = NULL;
|
||||
const char** ipv6_list = NULL, ** ipv6_ptr = NULL;
|
||||
@@ -326,6 +334,7 @@ binder_gprs_context_set_dns_servers(
|
||||
struct ofono_gprs_context* gc,
|
||||
const BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_gprs_context_set_servers(gc, call->dnses,
|
||||
ofono_gprs_context_set_ipv4_dns_servers,
|
||||
ofono_gprs_context_set_ipv6_dns_servers);
|
||||
@@ -337,6 +346,7 @@ binder_gprs_context_set_proxy_cscf(
|
||||
struct ofono_gprs_context* gc,
|
||||
const BinderDataCall* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_gprs_context_set_servers(gc, call->pcscf,
|
||||
ofono_gprs_context_set_ipv4_proxy_cscf,
|
||||
ofono_gprs_context_set_ipv6_proxy_cscf);
|
||||
@@ -357,6 +367,7 @@ binder_gprs_context_data_call_change(
|
||||
const BinderDataCall* c1,
|
||||
const BinderDataCall* c2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (c1 == c2) {
|
||||
return 0;
|
||||
} else if (c1 && c2) {
|
||||
@@ -395,6 +406,7 @@ binder_gprs_context_call_list_changed(
|
||||
BINDER_DATA_PROPERTY property,
|
||||
void* arg)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprsContext* self = arg;
|
||||
struct ofono_gprs_context* gc = self->gc;
|
||||
|
||||
@@ -476,6 +488,7 @@ binder_gprs_context_activate_primary_cb(
|
||||
const BinderDataCall* call,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprsContext* self = user_data;
|
||||
struct ofono_gprs_context* gc = self->gc;
|
||||
struct ofono_error error;
|
||||
@@ -532,6 +545,7 @@ binder_gprs_context_activate_primary(
|
||||
ofono_gprs_context_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprsContext* self = binder_gprs_context_get_data(gc);
|
||||
struct ofono_watch* watch = self->watch;
|
||||
struct ofono_netreg* netreg = watch->netreg;
|
||||
@@ -571,6 +585,7 @@ binder_gprs_context_deactivate_primary_cb(
|
||||
RADIO_ERROR radio_error,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprsContext* gcd = user_data;
|
||||
|
||||
/*
|
||||
@@ -612,6 +627,7 @@ binder_gprs_context_deactivate_primary(
|
||||
ofono_gprs_context_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprsContext* self = binder_gprs_context_get_data(gc);
|
||||
|
||||
GASSERT(self->active_ctx_cid == id);
|
||||
@@ -636,6 +652,7 @@ binder_gprs_context_detach_shutdown(
|
||||
struct ofono_gprs_context* gc,
|
||||
unsigned int id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_gprs_context_deactivate_primary(gc, id, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -646,6 +663,7 @@ binder_gprs_context_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderGprsContext* self = g_new0(BinderGprsContext, 1);
|
||||
|
||||
@@ -667,6 +685,7 @@ void
|
||||
binder_gprs_context_remove(
|
||||
struct ofono_gprs_context* gc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderGprsContext* self = binder_gprs_context_get_data(gc);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -717,12 +736,14 @@ static const struct ofono_gprs_context_driver binder_gprs_context_driver = {
|
||||
void
|
||||
binder_gprs_context_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_gprs_context_driver_register(&binder_gprs_context_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_gprs_context_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_gprs_context_driver_unregister(&binder_gprs_context_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "binder_util.h"
|
||||
|
||||
#include "binder_ext_ims.h"
|
||||
#include "binder_ext_slot.h"
|
||||
|
||||
#include <ofono/ims.h>
|
||||
|
||||
@@ -54,6 +55,7 @@ binder_ims_cbd_new(
|
||||
ofono_ims_register_cb_t cb,
|
||||
void* cb_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsCbData* cbd = g_slice_new0(BinderImsCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -67,6 +69,7 @@ void
|
||||
binder_ims_cbd_free(
|
||||
BinderImsCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_slice_free(cbd);
|
||||
}
|
||||
|
||||
@@ -77,6 +80,7 @@ binder_ims_register_complete(
|
||||
BINDER_EXT_IMS_RESULT result,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsCbData* cbd = user_data;
|
||||
BinderIms* self = cbd->self;
|
||||
struct ofono_error err;
|
||||
@@ -95,6 +99,7 @@ void
|
||||
binder_ims_notify(
|
||||
BinderIms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsReg* ims = self->ims;
|
||||
|
||||
ofono_ims_status_notify(self->handle, ims->registered,
|
||||
@@ -108,6 +113,7 @@ binder_ims_registration_changed(
|
||||
BINDER_IMS_REG_PROPERTY property,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderIms* self = user_data;
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -123,6 +129,7 @@ binder_ims_control(
|
||||
ofono_ims_register_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderIms* self = binder_ims_get_data(handle);
|
||||
struct ofono_error err;
|
||||
|
||||
@@ -149,6 +156,7 @@ binder_ims_register(
|
||||
ofono_ims_register_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_ims_control(handle, BINDER_EXT_IMS_REGISTRATION_ON, cb, data);
|
||||
}
|
||||
|
||||
@@ -159,6 +167,7 @@ binder_ims_unregister(
|
||||
ofono_ims_register_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_ims_control(handle, BINDER_EXT_IMS_REGISTRATION_OFF, cb, data);
|
||||
}
|
||||
|
||||
@@ -169,6 +178,7 @@ binder_ims_registration_status(
|
||||
ofono_ims_status_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderIms* self = binder_ims_get_data(handle);
|
||||
BinderImsReg* ims = self->ims;
|
||||
struct ofono_error err;
|
||||
@@ -182,6 +192,7 @@ gboolean
|
||||
binder_ims_start(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderIms* self = user_data;
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -203,6 +214,7 @@ binder_ims_probe(
|
||||
struct ofono_ims* handle,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderIms* self = g_new0(BinderIms, 1);
|
||||
|
||||
@@ -211,6 +223,8 @@ binder_ims_probe(
|
||||
|
||||
self->handle = handle;
|
||||
self->ims = binder_ims_reg_ref(modem->ims);
|
||||
self->ext = binder_ext_ims_ref(binder_ext_slot_get_interface(modem->ext,
|
||||
BINDER_EXT_TYPE_IMS));
|
||||
self->start_id = g_idle_add(binder_ims_start, self);
|
||||
ofono_ims_set_data(handle, self);
|
||||
return 0;
|
||||
@@ -221,6 +235,7 @@ void
|
||||
binder_ims_remove(
|
||||
struct ofono_ims* handle)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderIms* self = binder_ims_get_data(handle);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -259,12 +274,14 @@ static const struct ofono_ims_driver binder_ims_driver = {
|
||||
void
|
||||
binder_ims_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_ims_driver_register(&binder_ims_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_ims_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_ims_driver_unregister(&binder_ims_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ binder_ims_reg_query_done(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsRegObject* self = THIS(user_data);
|
||||
BinderBase* base = &self->base;
|
||||
BinderImsReg* ims = &self->pub;
|
||||
@@ -128,6 +129,7 @@ void
|
||||
binder_ims_reg_query(
|
||||
BinderImsRegObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioRequestGroup* g = self->g;
|
||||
RadioRequest* req = radio_request_new2(g,
|
||||
radio_client_aidl_interface(g->client) == RADIO_NETWORK_INTERFACE ?
|
||||
@@ -147,6 +149,7 @@ binder_ims_reg_state_changed(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsRegObject* self = THIS(user_data);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -158,6 +161,7 @@ void
|
||||
binder_ims_reg_update_state(
|
||||
BinderImsRegObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BINDER_EXT_IMS_STATE state = binder_ext_ims_get_state(self->ext);
|
||||
const gboolean registered = (state == BINDER_EXT_IMS_STATE_REGISTERED);
|
||||
BinderImsReg* ims = &self->pub;
|
||||
@@ -176,6 +180,7 @@ binder_ims_ext_state_changed(
|
||||
BinderExtIms* ext,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsRegObject* self = THIS(user_data);
|
||||
|
||||
binder_ims_reg_update_state(self);
|
||||
@@ -192,6 +197,7 @@ binder_ims_reg_new(
|
||||
BinderExtSlot* ext_slot,
|
||||
const char* log_prefix)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsReg* ims = NULL;
|
||||
|
||||
if (client) {
|
||||
@@ -268,6 +274,7 @@ BinderImsReg*
|
||||
binder_ims_reg_ref(
|
||||
BinderImsReg* ims)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsRegObject* self = binder_ims_reg_cast(ims);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -282,6 +289,7 @@ void
|
||||
binder_ims_reg_unref(
|
||||
BinderImsReg* ims)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsRegObject* self = binder_ims_reg_cast(ims);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -296,6 +304,7 @@ binder_ims_reg_add_property_handler(
|
||||
BinderImsRegPropertyFunc callback,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsRegObject* self = binder_ims_reg_cast(ims);
|
||||
|
||||
return G_LIKELY(self) ? binder_base_add_property_handler(&self->base,
|
||||
@@ -307,6 +316,7 @@ binder_ims_reg_remove_handler(
|
||||
BinderImsReg* ims,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(id)) {
|
||||
BinderImsRegObject* self = binder_ims_reg_cast(ims);
|
||||
|
||||
@@ -322,6 +332,7 @@ binder_ims_reg_remove_handlers(
|
||||
gulong* ids,
|
||||
int count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_disconnect_handlers(binder_ims_reg_cast(ims), ids, count);
|
||||
}
|
||||
|
||||
@@ -334,6 +345,7 @@ void
|
||||
binder_ims_reg_object_init(
|
||||
BinderImsRegObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
static
|
||||
@@ -341,6 +353,7 @@ void
|
||||
binder_ims_reg_object_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderImsRegObject* self = THIS(object);
|
||||
|
||||
if (self->ext) {
|
||||
@@ -365,6 +378,7 @@ void
|
||||
binder_ims_reg_object_class_init(
|
||||
BinderImsRegObjectClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_ims_reg_object_finalize;
|
||||
BINDER_BASE_CLASS(klass)->public_offset =
|
||||
G_STRUCT_OFFSET(BinderImsRegObject, pub);
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
#include <gutil_log.h>
|
||||
#include <ofono/log.h>
|
||||
|
||||
#undef DBG
|
||||
#define DBG(fmt, ...) \
|
||||
gutil_log(GLOG_MODULE_CURRENT, GLOG_LEVEL_ALWAYS, "binder_plugin:"fmt, ##__VA_ARGS__)
|
||||
|
||||
#endif /* BINDER_LOG_H */
|
||||
|
||||
/*
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "binder_logger.h"
|
||||
#include "binder_util.h"
|
||||
#include "binder_log.h"
|
||||
|
||||
#include <radio_config.h>
|
||||
#include <radio_instance.h>
|
||||
@@ -71,6 +72,7 @@ binder_logger_trace_req(
|
||||
guint code,
|
||||
GBinderLocalRequest* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderLoggerCallbacks* cb = logger->cb;
|
||||
static const GLogModule* log = &binder_logger_module;
|
||||
const gsize header_size = cb->rpc_header_size(logger->object, code);
|
||||
@@ -102,6 +104,7 @@ binder_logger_trace_resp(
|
||||
const RadioResponseInfo* info,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
static const GLogModule* log = &binder_logger_module;
|
||||
const BinderLoggerCallbacks* cb = logger->cb;
|
||||
const char* name = cb->resp_name(logger->object, code);
|
||||
@@ -129,6 +132,7 @@ binder_logger_trace_ind(
|
||||
RADIO_IND code,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderLoggerCallbacks* cb = logger->cb;
|
||||
const char* name = cb->ind_name(logger->object, code);
|
||||
static const GLogModule* log = &binder_logger_module;
|
||||
@@ -142,6 +146,7 @@ void
|
||||
binder_logger_dump_req(
|
||||
GBinderLocalRequest* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderWriter writer;
|
||||
const guint8* data;
|
||||
gsize size;
|
||||
@@ -158,6 +163,7 @@ void
|
||||
binder_logger_dump_reader(
|
||||
const GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize size;
|
||||
const guint8* data = gbinder_reader_get_data(reader, &size);
|
||||
|
||||
@@ -177,6 +183,7 @@ binder_logger_radio_trace_req_cb(
|
||||
GBinderLocalRequest* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_trace_req((BinderLogger*)user_data, code, args);
|
||||
}
|
||||
|
||||
@@ -189,6 +196,7 @@ binder_logger_radio_trace_resp_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_trace_resp((BinderLogger*)user_data, code, info, args);
|
||||
}
|
||||
|
||||
@@ -201,6 +209,7 @@ binder_logger_radio_trace_ind_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_trace_ind((BinderLogger*)user_data, code, args);
|
||||
}
|
||||
|
||||
@@ -211,6 +220,7 @@ binder_logger_radio_trace_ack_cb(
|
||||
guint32 serial,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderLogger* logger = user_data;
|
||||
|
||||
gutil_log(&binder_logger_module, GLOG_LEVEL_VERBOSE, "%s> [%08x] "
|
||||
@@ -225,6 +235,7 @@ binder_logger_radio_dump_req_cb(
|
||||
GBinderLocalRequest* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_dump_req(args);
|
||||
}
|
||||
|
||||
@@ -237,6 +248,7 @@ binder_logger_radio_dump_resp_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_dump_reader(args);
|
||||
}
|
||||
|
||||
@@ -249,6 +261,7 @@ binder_logger_radio_dump_ind_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_dump_reader(args);
|
||||
}
|
||||
|
||||
@@ -258,6 +271,7 @@ binder_logger_radio_req_name(
|
||||
gpointer object,
|
||||
guint32 code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return radio_req_name2(object, code);
|
||||
}
|
||||
|
||||
@@ -267,6 +281,7 @@ binder_logger_radio_resp_name(
|
||||
gpointer object,
|
||||
guint32 code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return radio_resp_name2(object, code);
|
||||
}
|
||||
|
||||
@@ -276,6 +291,7 @@ binder_logger_radio_ind_name(
|
||||
gpointer object,
|
||||
guint32 code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return radio_ind_name2(object, code);
|
||||
}
|
||||
|
||||
@@ -285,6 +301,7 @@ binder_logger_radio_rpc_header_size(
|
||||
gpointer object,
|
||||
guint32 code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return radio_instance_rpc_header_size(object, code);
|
||||
}
|
||||
|
||||
@@ -293,6 +310,7 @@ void
|
||||
binder_logger_radio_drop_object(
|
||||
BinderLogger* logger)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
radio_instance_remove_all_handlers(logger->object, logger->event_id);
|
||||
radio_instance_unref(logger->object);
|
||||
}
|
||||
@@ -308,6 +326,7 @@ binder_logger_radio_new(
|
||||
RadioIndicationObserverFunc ind_cb,
|
||||
RadioAckFunc ack_cb)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
static BinderLoggerCallbacks binder_logger_radio_callbacks = {
|
||||
.req_name = binder_logger_radio_req_name,
|
||||
.resp_name = binder_logger_radio_resp_name,
|
||||
@@ -351,6 +370,7 @@ binder_logger_config_trace_req_cb(
|
||||
GBinderLocalRequest* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_trace_req((BinderLogger*)user_data, code, args);
|
||||
}
|
||||
|
||||
@@ -363,6 +383,7 @@ binder_logger_config_trace_resp_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_trace_resp((BinderLogger*)user_data, code, info, args);
|
||||
}
|
||||
|
||||
@@ -374,6 +395,7 @@ binder_logger_config_trace_ind_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_trace_ind((BinderLogger*)user_data, code, args);
|
||||
}
|
||||
|
||||
@@ -385,6 +407,7 @@ binder_logger_config_dump_req_cb(
|
||||
GBinderLocalRequest* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_dump_req(args);
|
||||
}
|
||||
|
||||
@@ -397,6 +420,7 @@ binder_logger_config_dump_resp_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_dump_reader(args);
|
||||
}
|
||||
|
||||
@@ -408,6 +432,7 @@ binder_logger_config_dump_ind_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_logger_dump_reader(args);
|
||||
}
|
||||
|
||||
@@ -417,6 +442,7 @@ binder_logger_config_req_name(
|
||||
gpointer object,
|
||||
guint32 code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return radio_config_req_name(object, code);
|
||||
}
|
||||
|
||||
@@ -426,6 +452,7 @@ binder_logger_config_resp_name(
|
||||
gpointer object,
|
||||
guint32 code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return radio_config_resp_name(object, code);
|
||||
}
|
||||
|
||||
@@ -435,6 +462,7 @@ binder_logger_config_ind_name(
|
||||
gpointer object,
|
||||
guint32 code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return radio_config_ind_name(object, code);
|
||||
}
|
||||
|
||||
@@ -444,6 +472,7 @@ binder_logger_config_rpc_header_size(
|
||||
gpointer object,
|
||||
guint32 code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return radio_config_rpc_header_size(object, code);
|
||||
}
|
||||
|
||||
@@ -452,6 +481,7 @@ void
|
||||
binder_logger_config_drop_object(
|
||||
BinderLogger* logger)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
radio_config_remove_all_handlers(logger->object, logger->event_id);
|
||||
radio_config_unref(logger->object);
|
||||
}
|
||||
@@ -466,6 +496,7 @@ binder_logger_config_new(
|
||||
RadioConfigResponseObserverFunc resp_cb,
|
||||
RadioConfigIndicationObserverFunc ind_cb)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
static BinderLoggerCallbacks binder_logger_config_callbacks = {
|
||||
.req_name = binder_logger_config_req_name,
|
||||
.resp_name = binder_logger_config_resp_name,
|
||||
@@ -504,6 +535,7 @@ binder_logger_new_radio_trace(
|
||||
RadioInstance* radio,
|
||||
const char* prefix)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_logger_radio_new(radio, prefix,
|
||||
RADIO_INSTANCE_PRIORITY_HIGHEST, binder_logger_radio_trace_req_cb,
|
||||
binder_logger_radio_trace_resp_cb, binder_logger_radio_trace_ind_cb,
|
||||
@@ -515,6 +547,7 @@ binder_logger_new_radio_dump(
|
||||
RadioInstance* radio,
|
||||
const char* prefix)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_logger_radio_new(radio, prefix,
|
||||
RADIO_INSTANCE_PRIORITY_HIGHEST - 1, binder_logger_radio_dump_req_cb,
|
||||
binder_logger_radio_dump_resp_cb, binder_logger_radio_dump_ind_cb,
|
||||
@@ -525,6 +558,7 @@ BinderLogger*
|
||||
binder_logger_new_config_trace(
|
||||
RadioConfig* config)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_logger_config_new(config, CONFIG_PREFIX,
|
||||
RADIO_INSTANCE_PRIORITY_HIGHEST, binder_logger_config_trace_req_cb,
|
||||
binder_logger_config_trace_resp_cb, binder_logger_config_trace_ind_cb);
|
||||
@@ -534,6 +568,7 @@ BinderLogger*
|
||||
binder_logger_new_config_dump(
|
||||
RadioConfig* config)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_logger_config_new(config, CONFIG_PREFIX,
|
||||
RADIO_INSTANCE_PRIORITY_HIGHEST - 1, binder_logger_config_dump_req_cb,
|
||||
binder_logger_config_dump_resp_cb, binder_logger_config_dump_ind_cb);
|
||||
@@ -543,6 +578,7 @@ void
|
||||
binder_logger_free(
|
||||
BinderLogger* logger)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (logger) {
|
||||
logger->cb->drop_object(logger);
|
||||
g_free(logger->prefix);
|
||||
|
||||
@@ -113,6 +113,7 @@ void
|
||||
binder_modem_online_request_done(
|
||||
BinderModemOnlineRequest* req)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (req->cb) {
|
||||
struct ofono_error error;
|
||||
ofono_modem_online_cb_t cb = req->cb;
|
||||
@@ -130,6 +131,7 @@ void
|
||||
binder_modem_online_request_ok(
|
||||
BinderModemOnlineRequest* req)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (req->timeout_id) {
|
||||
g_source_remove(req->timeout_id);
|
||||
req->timeout_id = 0;
|
||||
@@ -142,6 +144,7 @@ void
|
||||
binder_modem_update_online_state(
|
||||
BinderModemPriv* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (self->pub.radio->state) {
|
||||
case RADIO_STATE_ON:
|
||||
DBG_(self, "online");
|
||||
@@ -172,6 +175,7 @@ gboolean
|
||||
binder_modem_online_request_timeout(
|
||||
gpointer data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModemOnlineRequest* req = data;
|
||||
|
||||
GASSERT(req->timeout_id);
|
||||
@@ -187,6 +191,7 @@ gboolean
|
||||
binder_modem_online_check(
|
||||
gpointer data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModemPriv* self = data;
|
||||
|
||||
GASSERT(self->online_check_id);
|
||||
@@ -200,6 +205,7 @@ void
|
||||
binder_modem_schedule_online_check(
|
||||
BinderModemPriv* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!self->online_check_id) {
|
||||
self->online_check_id = g_idle_add(binder_modem_online_check, self);
|
||||
}
|
||||
@@ -210,6 +216,7 @@ void
|
||||
binder_modem_update_radio_settings(
|
||||
BinderModemPriv* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = &self->pub;
|
||||
struct ofono_watch* watch = modem->watch;
|
||||
struct ofono_radio_settings* rs =
|
||||
@@ -235,6 +242,7 @@ binder_modem_radio_state_cb(
|
||||
BINDER_RADIO_PROPERTY property,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_modem_update_online_state((BinderModemPriv*)data);
|
||||
}
|
||||
|
||||
@@ -244,6 +252,7 @@ binder_modem_imsi_cb(
|
||||
struct ofono_watch* watch,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_modem_update_radio_settings((BinderModemPriv*)data);
|
||||
}
|
||||
|
||||
@@ -253,6 +262,7 @@ binder_modem_iccid_cb(
|
||||
struct ofono_watch* watch,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModemPriv* self = data;
|
||||
|
||||
if (watch->iccid) {
|
||||
@@ -268,6 +278,7 @@ binder_modem_sim_state_cb(
|
||||
struct ofono_watch* watch,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModemPriv* self = data;
|
||||
const enum ofono_sim_state state = ofono_sim_get_state(watch->sim);
|
||||
|
||||
@@ -284,6 +295,7 @@ void
|
||||
binder_modem_pre_sim(
|
||||
struct ofono_modem* ofono)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(ofono);
|
||||
BinderModemPriv* self = binder_modem_cast(modem);
|
||||
const BINDER_FEATURE_MASK features = modem->config.features;
|
||||
@@ -307,6 +319,7 @@ void
|
||||
binder_modem_post_sim(
|
||||
struct ofono_modem* ofono)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(ofono);
|
||||
BinderModemPriv* self = binder_modem_cast(modem);
|
||||
const BINDER_FEATURE_MASK features = modem->config.features;
|
||||
@@ -369,6 +382,7 @@ void
|
||||
binder_modem_post_online(
|
||||
struct ofono_modem* ofono)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(ofono);
|
||||
const BINDER_FEATURE_MASK features = modem->config.features;
|
||||
|
||||
@@ -395,6 +409,7 @@ binder_modem_set_online(
|
||||
ofono_modem_online_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(ofono);
|
||||
BinderModemPriv* self = binder_modem_cast(modem);
|
||||
struct binder_radio* radio = modem->radio;
|
||||
@@ -426,6 +441,7 @@ int
|
||||
binder_modem_enable(
|
||||
struct ofono_modem* ofono)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModemPriv* self = binder_modem_get_priv(ofono);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -438,6 +454,7 @@ int
|
||||
binder_modem_disable(
|
||||
struct ofono_modem* ofono)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModemPriv* self = binder_modem_get_priv(ofono);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -455,6 +472,7 @@ int
|
||||
binder_modem_probe(
|
||||
struct ofono_modem* ofono)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG("%s", ofono_modem_get_path(ofono));
|
||||
return 0;
|
||||
}
|
||||
@@ -464,6 +482,7 @@ void
|
||||
binder_modem_remove(
|
||||
struct ofono_modem* ofono)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(ofono);
|
||||
BinderModemPriv* self = binder_modem_cast(modem);
|
||||
|
||||
@@ -534,12 +553,14 @@ static const struct ofono_modem_driver binder_modem_driver = {
|
||||
void
|
||||
binder_modem_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_modem_driver_register(&binder_modem_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_modem_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_modem_driver_unregister(&binder_modem_driver);
|
||||
}
|
||||
|
||||
@@ -565,6 +586,7 @@ binder_modem_create(
|
||||
BinderSimSettings* settings,
|
||||
struct ofono_cell_info* cell_info)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Skip the slash from the path, it looks like "/ril_0" */
|
||||
struct ofono_modem* ofono = ofono_modem_create(path + 1, BINDER_DRIVER);
|
||||
|
||||
|
||||
@@ -166,6 +166,7 @@ binder_netreg_cbd_new(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetRegCbData* cbd = g_slice_new0(BinderNetRegCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -179,6 +180,7 @@ void
|
||||
binder_netreg_cbd_free(
|
||||
BinderNetRegCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_slice_free(cbd);
|
||||
}
|
||||
|
||||
@@ -190,6 +192,7 @@ binder_netreg_check_status(
|
||||
BinderNetReg* self,
|
||||
int status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (self && self->netreg) ?
|
||||
binder_netreg_check_if_really_roaming(self->netreg, status) :
|
||||
status;
|
||||
@@ -200,6 +203,7 @@ gboolean
|
||||
binder_netreg_status_notify_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
BinderNetwork* network = self->network;
|
||||
BinderRegistrationState* current = &self->reg_state;
|
||||
@@ -246,6 +250,7 @@ binder_netreg_status_notify(
|
||||
BINDER_NETWORK_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
|
||||
/* Coalesce multiple notifications into one */
|
||||
@@ -264,6 +269,7 @@ binder_netreg_registration_status(
|
||||
ofono_netreg_status_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = binder_netreg_get_data(netreg);
|
||||
const BinderRegistrationState* reg = &self->network->voice;
|
||||
struct ofono_error error;
|
||||
@@ -278,6 +284,7 @@ gboolean
|
||||
binder_netreg_current_operator_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetRegCbData* cbd = user_data;
|
||||
BinderNetReg* self = cbd->self;
|
||||
ofono_netreg_operator_cb_t cb = cbd->cb.operator;
|
||||
@@ -298,6 +305,7 @@ binder_netreg_current_operator(
|
||||
ofono_netreg_operator_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = binder_netreg_get_data(netreg);
|
||||
|
||||
/*
|
||||
@@ -323,6 +331,7 @@ binder_netreg_strange(
|
||||
const struct ofono_network_operator* op,
|
||||
struct ofono_sim* sim)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gsize mcclen;
|
||||
|
||||
if (sim && op->status != OFONO_OPERATOR_STATUS_CURRENT) {
|
||||
@@ -360,6 +369,7 @@ binder_netreg_process_operators(
|
||||
BinderNetReg* self,
|
||||
BinderOpList* oplist)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->replace_strange_oper && oplist) {
|
||||
guint i;
|
||||
|
||||
@@ -389,6 +399,7 @@ binder_netreg_scan_new(
|
||||
ofono_netreg_operator_list_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetRegScan* scan = g_slice_new0(BinderNetRegScan);
|
||||
|
||||
scan->cb = cb;
|
||||
@@ -402,6 +413,7 @@ binder_netreg_scan_free(
|
||||
BinderNetReg* self,
|
||||
BinderNetRegScan* scan)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (scan) {
|
||||
if (scan->cb) {
|
||||
struct ofono_error err;
|
||||
@@ -432,6 +444,7 @@ binder_netreg_scan_complete(
|
||||
BinderNetReg* self,
|
||||
BinderNetRegScan* scan)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (scan) {
|
||||
if (scan->cb) {
|
||||
struct ofono_error ok;
|
||||
@@ -460,6 +473,7 @@ binder_netreg_scan_drop(
|
||||
BinderNetReg* self,
|
||||
BinderNetRegScan* scan)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (scan) {
|
||||
scan->cb = NULL;
|
||||
binder_netreg_scan_free(self, scan);
|
||||
@@ -474,6 +488,7 @@ binder_netreg_oplist_fill(
|
||||
gsize count,
|
||||
enum ofono_access_technology default_tech)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
|
||||
/* This allocates the list if necessary */
|
||||
@@ -521,6 +536,7 @@ gboolean
|
||||
binder_netreg_scan_timeoult_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
BinderNetRegScan* scan = self->scan;
|
||||
|
||||
@@ -542,6 +558,7 @@ binder_netreg_start_scan_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
BinderNetRegScan* scan = self->scan;
|
||||
|
||||
@@ -576,6 +593,7 @@ void
|
||||
binder_netreg_start_network_scan(
|
||||
BinderNetReg* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* Caller has checked that a) self->scan exists and b) radio
|
||||
* interface version is >= 1.2
|
||||
@@ -847,6 +865,7 @@ binder_netreg_get_available_networks_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
BinderNetRegScan* scan = self->scan;
|
||||
|
||||
@@ -906,6 +925,7 @@ binder_netreg_list_operators(
|
||||
ofono_netreg_operator_list_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = binder_netreg_get_data(netreg);
|
||||
BinderNetRegScan* scan = binder_netreg_scan_new(cb, data);
|
||||
|
||||
@@ -950,6 +970,7 @@ binder_netreg_scan_op_copy_name(
|
||||
const RadioCellIdentityOperatorNames* src,
|
||||
struct ofono_network_operator* dest)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Try to use long by default */
|
||||
if (src->alphaLong.len) {
|
||||
g_strlcpy(dest->name, src->alphaLong.data.str, sizeof(dest->name));
|
||||
@@ -964,6 +985,7 @@ binder_netreg_scan_op_copy_name_aidl(
|
||||
GBinderReader* reader,
|
||||
struct ofono_network_operator* dest)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char* alpha_long;
|
||||
char* alpha_short;
|
||||
binder_read_parcelable_size(reader);
|
||||
@@ -988,6 +1010,7 @@ binder_netreg_scan_op_convert_gsm(
|
||||
const RadioCellIdentityGsm_1_2* src,
|
||||
struct ofono_network_operator* dest)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const RadioCellIdentityGsm* gsm = &src->base;
|
||||
|
||||
memset(dest, 0, sizeof(*dest));
|
||||
@@ -1011,6 +1034,7 @@ binder_netreg_scan_op_convert_wcdma(
|
||||
const RadioCellIdentityWcdma_1_2* src,
|
||||
struct ofono_network_operator* dest)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const RadioCellIdentityWcdma* wcdma = &src->base;
|
||||
|
||||
memset(dest, 0, sizeof(*dest));
|
||||
@@ -1034,6 +1058,7 @@ binder_netreg_scan_op_convert_lte(
|
||||
const RadioCellIdentityLte_1_2* src,
|
||||
struct ofono_network_operator* dest)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const RadioCellIdentityLte* lte = &src->base;
|
||||
|
||||
memset(dest, 0, sizeof(*dest));
|
||||
@@ -1057,6 +1082,7 @@ binder_netreg_scan_op_convert_nr(
|
||||
const RadioCellIdentityNr* src,
|
||||
struct ofono_network_operator* dest)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const RadioCellIdentityNr* nr = src;
|
||||
|
||||
memset(dest, 0, sizeof(*dest));
|
||||
@@ -1078,6 +1104,7 @@ struct ofono_network_operator*
|
||||
binder_netreg_scan_op_append(
|
||||
BinderNetRegScan* scan)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const guint i = scan->oplist ? scan->oplist->count : 0;
|
||||
|
||||
/*
|
||||
@@ -1095,6 +1122,7 @@ binder_netreg_scan_op_convert_aidl(
|
||||
GBinderReader* reader,
|
||||
BinderNetRegScan* scan)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
for (i = 0; i < count; i++) {
|
||||
gboolean registered;
|
||||
@@ -1230,6 +1258,7 @@ binder_netreg_scan_result_notify(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
BinderNetRegScan* scan = self->scan;
|
||||
|
||||
@@ -1395,6 +1424,7 @@ binder_netreg_register_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetRegCbData* cbd = user_data;
|
||||
BinderNetReg* self = cbd->self;
|
||||
ofono_netreg_register_cb_t cb = cbd->cb.reg;
|
||||
@@ -1436,6 +1466,7 @@ binder_netreg_query_register_auto_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetRegCbData* cbd = user_data;
|
||||
BinderNetReg* self = cbd->self;
|
||||
ofono_netreg_register_cb_t cb = cbd->cb.reg;
|
||||
@@ -1502,6 +1533,7 @@ binder_netreg_register_auto(
|
||||
ofono_netreg_register_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = binder_netreg_get_data(netreg);
|
||||
guint32 code = self->interface_aidl == RADIO_NETWORK_INTERFACE ?
|
||||
RADIO_NETWORK_REQ_GET_NETWORK_SELECTION_MODE :
|
||||
@@ -1535,6 +1567,7 @@ binder_netreg_register_manual(
|
||||
ofono_netreg_register_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = binder_netreg_get_data(netreg);
|
||||
char* numeric = g_strconcat(mcc, mnc, NULL);
|
||||
GBinderWriter writer;
|
||||
@@ -1602,6 +1635,7 @@ int
|
||||
binder_netreg_dbm_from_rssi(
|
||||
int rssi)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (rssi >= RSSI_MIN && rssi <= RSSI_MAX) ?
|
||||
(-113 + 2 * (rssi - RSSI_MIN)) : -140;
|
||||
}
|
||||
@@ -1625,6 +1659,7 @@ int
|
||||
binder_netreg_dbm_from_rsrp(
|
||||
int rsrp)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (rsrp >= RSRP_MIN && rsrp <= RSRP_MAX) ? -rsrp : -140;
|
||||
}
|
||||
|
||||
@@ -1653,6 +1688,7 @@ int
|
||||
binder_netreg_dbm_from_rscp(
|
||||
int rscp)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (rscp >= RSCP_MIN && rscp <= RSCP_MAX) ?
|
||||
(-120 + (rscp - RSCP_MIN)) : -140;
|
||||
}
|
||||
@@ -1666,6 +1702,7 @@ binder_netreg_get_signal_strength_dbm(
|
||||
const RadioSignalStrengthTdScdma_1_2* tdscdma,
|
||||
const RadioSignalStrengthNr* nr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
int rssi = -1, rscp = -1, rsrp = -1;
|
||||
|
||||
if (gsm->signalStrength <= RSSI_MAX) {
|
||||
@@ -1724,6 +1761,7 @@ int
|
||||
binder_netreg_get_signal_strength_dbm_aidl(
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
int rssi = -1, rscp = -1, rsrp = -1;
|
||||
const RadioSignalStrengthGsm* gsm;
|
||||
const RadioSignalStrengthLte* lte;
|
||||
@@ -1798,6 +1836,7 @@ binder_netreg_percent_from_dbm(
|
||||
BinderNetReg* self,
|
||||
int dbm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const int min_dbm = self->signal_strength_dbm_weak; /* dBm */
|
||||
const int max_dbm = self->signal_strength_dbm_strong; /* dBm */
|
||||
|
||||
@@ -1814,6 +1853,7 @@ binder_netreg_strength_notify(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
GBinderReader reader;
|
||||
int dbm = 0;
|
||||
@@ -1865,6 +1905,7 @@ static void binder_netreg_strength_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetRegCbData* cbd = user_data;
|
||||
BinderNetReg* self = cbd->self;
|
||||
ofono_netreg_strength_cb_t cb = cbd->cb.strength;
|
||||
@@ -1940,6 +1981,7 @@ binder_netreg_strength(
|
||||
ofono_netreg_strength_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = binder_netreg_get_data(netreg);
|
||||
RadioRequest* req = radio_request_new(self->client,
|
||||
self->interface_aidl == RADIO_NETWORK_INTERFACE ?
|
||||
@@ -1972,6 +2014,7 @@ binder_netreg_nitz_notify(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
GBinderReader reader;
|
||||
int year, mon, mday, hour, min, sec, tzi, dst = 0;
|
||||
@@ -2030,6 +2073,7 @@ binder_netreg_modem_reset_notify(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
|
||||
if (self->interface_aidl == RADIO_AIDL_INTERFACE_NONE) {
|
||||
@@ -2064,6 +2108,7 @@ gboolean
|
||||
binder_netreg_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = user_data;
|
||||
|
||||
GASSERT(self->init_id);
|
||||
@@ -2155,6 +2200,7 @@ binder_netreg_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderNetReg* self = g_new0(BinderNetReg, 1);
|
||||
const BinderSlotConfig* config = &modem->config;
|
||||
@@ -2185,6 +2231,7 @@ void
|
||||
binder_netreg_remove(
|
||||
struct ofono_netreg* netreg)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetReg* self = binder_netreg_get_data(netreg);
|
||||
|
||||
DBG_(self, "%p", netreg);
|
||||
@@ -2238,12 +2285,14 @@ static const struct ofono_netreg_driver binder_netreg_driver = {
|
||||
void
|
||||
binder_netreg_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_netreg_driver_register(&binder_netreg_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_netreg_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_netreg_driver_unregister(&binder_netreg_driver);
|
||||
}
|
||||
|
||||
@@ -2252,6 +2301,7 @@ binder_netreg_check_if_really_roaming(
|
||||
struct ofono_netreg* netreg,
|
||||
enum ofono_netreg_status status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (status == OFONO_NETREG_STATUS_ROAMING && netreg) {
|
||||
/* These functions tolerate NULL argument */
|
||||
const char* net_mcc = ofono_netreg_get_mcc(netreg);
|
||||
|
||||
@@ -191,6 +191,7 @@ binder_network_stop_timer(
|
||||
BinderNetworkObject* self,
|
||||
BINDER_NETWORK_TIMER tid)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->timer[tid]) {
|
||||
g_source_remove(self->timer[tid]);
|
||||
self->timer[tid] = 0;
|
||||
@@ -202,6 +203,7 @@ void
|
||||
binder_network_reset_state(
|
||||
BinderRegistrationState* reg)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
memset(reg, 0, sizeof(*reg));
|
||||
reg->status = OFONO_NETREG_STATUS_NONE;
|
||||
reg->access_tech = OFONO_ACCESS_TECHNOLOGY_NONE;
|
||||
@@ -216,6 +218,7 @@ binder_network_op_copy(
|
||||
struct ofono_network_operator* dest,
|
||||
const struct ofono_network_operator* src)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_strlcpy(dest->mcc, src->mcc, sizeof(dest->mcc));
|
||||
g_strlcpy(dest->mnc, src->mnc, sizeof(dest->mnc));
|
||||
g_strlcpy(dest->name, src->name, sizeof(dest->name));
|
||||
@@ -230,6 +233,7 @@ binder_network_op_equal(
|
||||
const struct ofono_network_operator* op1,
|
||||
const struct ofono_network_operator* op2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (op1 == op2) {
|
||||
return TRUE;
|
||||
} else if (!op1 || !op2) {
|
||||
@@ -249,6 +253,7 @@ binder_network_poll_operator_ok(
|
||||
BinderNetworkObject* self,
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char* lalpha;
|
||||
char* salpha;
|
||||
char* numeric;
|
||||
@@ -324,6 +329,7 @@ binder_network_poll_operator_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
guint32 code = self->interface_aidl == RADIO_NETWORK_INTERFACE ?
|
||||
RADIO_NETWORK_RESP_GET_OPERATOR : RADIO_RESP_GET_OPERATOR;
|
||||
@@ -358,6 +364,7 @@ binder_network_set_registration_state(
|
||||
int lac,
|
||||
int ci)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
reg->status = OFONO_NETREG_STATUS_NONE;
|
||||
reg->access_tech = binder_access_tech_from_radio_tech(rat);
|
||||
reg->radio_tech = rat;
|
||||
@@ -412,6 +419,7 @@ binder_network_location_1_0(
|
||||
const RadioCellIdentity* cell,
|
||||
BinderNetworkLocation* l)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (cell->cellInfoType) {
|
||||
case RADIO_CELL_INFO_GSM:
|
||||
if (cell->gsm.count > 0 && cell->gsm.data.ptr) {
|
||||
@@ -463,6 +471,7 @@ binder_network_location_1_2(
|
||||
const RadioCellIdentity_1_2* cell,
|
||||
BinderNetworkLocation* l)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (cell->cellInfoType) {
|
||||
case RADIO_CELL_INFO_GSM:
|
||||
if (cell->gsm.count > 0 && cell->gsm.data.ptr) {
|
||||
@@ -514,6 +523,7 @@ binder_network_location_1_5(
|
||||
const RadioCellIdentity_1_5* cell,
|
||||
BinderNetworkLocation* l)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (cell->cellIdentityType) {
|
||||
case RADIO_CELL_IDENTITY_1_5_GSM: {
|
||||
const RadioCellIdentityGsm_1_5* gsm = &cell->identity.gsm;
|
||||
@@ -564,6 +574,7 @@ binder_network_location_aidl(
|
||||
GBinderReader* reader,
|
||||
BinderNetworkLocation* l)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gint32 type;
|
||||
gsize data_read;
|
||||
gsize parcel_size;
|
||||
@@ -625,6 +636,7 @@ binder_network_poll_voice_state_1_0(
|
||||
BinderRegistrationState* state,
|
||||
const RadioVoiceRegStateResult* result)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
|
||||
binder_network_location_1_0(&result->cellIdentity, &l);
|
||||
@@ -638,6 +650,7 @@ binder_network_poll_voice_state_1_2(
|
||||
BinderRegistrationState* state,
|
||||
const RadioVoiceRegStateResult_1_2* result)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
|
||||
binder_network_location_1_2(&result->cellIdentity, &l);
|
||||
@@ -651,6 +664,7 @@ binder_network_poll_voice_state_1_5(
|
||||
BinderRegistrationState* state,
|
||||
const RadioRegStateResult_1_5* result)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
|
||||
binder_network_location_1_5(&result->cellIdentity, &l);
|
||||
@@ -665,6 +679,7 @@ binder_network_poll_voice_state_aidl(
|
||||
GBinderReader* reader,
|
||||
gint32* reason_for_denial)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
|
||||
gint32 reg_state;
|
||||
@@ -691,6 +706,7 @@ binder_network_poll_voice_state_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
GASSERT(self->voice_poll_req == req);
|
||||
@@ -776,6 +792,7 @@ binder_network_poll_data_state_1_0(
|
||||
BinderRegistrationState* state,
|
||||
const RadioDataRegStateResult* result)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
|
||||
binder_network_location_1_0(&result->cellIdentity, &l);
|
||||
@@ -789,6 +806,7 @@ binder_network_poll_data_state_1_2(
|
||||
BinderRegistrationState* state,
|
||||
const RadioDataRegStateResult_1_2* result)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
|
||||
binder_network_location_1_2(&result->cellIdentity, &l);
|
||||
@@ -803,6 +821,7 @@ binder_network_poll_data_state_1_4(
|
||||
BinderNetworkObject* self,
|
||||
const RadioDataRegStateResult_1_4* result)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
RADIO_TECH rat = result->rat;
|
||||
|
||||
@@ -829,6 +848,7 @@ binder_network_poll_data_state_1_5(
|
||||
BinderNetworkObject* self,
|
||||
const RadioRegStateResult_1_5* result)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
RADIO_TECH rat = result->rat;
|
||||
|
||||
@@ -858,6 +878,7 @@ binder_network_poll_data_state_aidl(
|
||||
GBinderReader* reader,
|
||||
gint32* reason_for_denial)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkLocation l;
|
||||
RADIO_TECH rat;
|
||||
gint32 reg_state;
|
||||
@@ -915,6 +936,7 @@ binder_network_poll_data_state_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
GASSERT(self->data_poll_req == req);
|
||||
@@ -1028,6 +1050,7 @@ binder_network_retry(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (error) {
|
||||
case RADIO_ERROR_NONE:
|
||||
case RADIO_ERROR_RADIO_NOT_AVAILABLE:
|
||||
@@ -1045,6 +1068,7 @@ binder_network_poll_and_retry(
|
||||
RADIO_REQ code,
|
||||
RadioRequestCompleteFunc complete)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Don't wait for retry timeout to expire */
|
||||
if (!radio_request_retry(req)) {
|
||||
radio_request_drop(req);
|
||||
@@ -1062,6 +1086,7 @@ void
|
||||
binder_network_poll_registration_state(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioClient* client = self->g->client;
|
||||
const RADIO_INTERFACE iface = radio_client_interface(client);
|
||||
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(client);
|
||||
@@ -1096,6 +1121,7 @@ void
|
||||
binder_network_poll_state(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG_(self, "");
|
||||
guint32 code = self->interface_aidl == RADIO_NETWORK_INTERFACE ?
|
||||
RADIO_NETWORK_REQ_GET_OPERATOR : RADIO_REQ_GET_OPERATOR;
|
||||
@@ -1112,6 +1138,7 @@ binder_network_mode_to_pref(
|
||||
BinderNetworkObject* self,
|
||||
enum ofono_radio_access_mode mode)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettings* settings = self->pub.settings;
|
||||
|
||||
switch (ofono_radio_access_max_mode(mode)) {
|
||||
@@ -1144,6 +1171,7 @@ enum ofono_radio_access_mode
|
||||
binder_network_actual_pref_modes(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetwork* net = &self->pub;
|
||||
BinderSimSettings* settings = net->settings;
|
||||
BinderRadioCaps* caps = self->caps;
|
||||
@@ -1172,6 +1200,7 @@ binder_network_data_profile_init(
|
||||
const struct ofono_gprs_primary_context* ctx,
|
||||
RADIO_DATA_PROFILE_ID id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
memset(profile, 0, sizeof(*profile));
|
||||
profile->id = id;
|
||||
profile->type = RADIO_DATA_PROFILE_3GPP;
|
||||
@@ -1197,6 +1226,7 @@ binder_network_data_profile_new(
|
||||
const struct ofono_gprs_primary_context* ctx,
|
||||
RADIO_DATA_PROFILE_ID id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Allocate the whole thing as a single memory block */
|
||||
BinderNetworkDataProfile profile;
|
||||
BinderNetworkDataProfile* out;
|
||||
@@ -1253,6 +1283,7 @@ binder_network_fill_radio_data_profile(
|
||||
const BinderNetworkDataProfile* src,
|
||||
const BinderDataProfileConfig* dpc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const char* proto = binder_proto_str_from_ofono_proto(src->proto);
|
||||
|
||||
binder_copy_hidl_string(writer, &dp->apn, src->apn);
|
||||
@@ -1276,6 +1307,7 @@ binder_network_new_radio_data_profile(
|
||||
const BinderNetworkDataProfile* src,
|
||||
const BinderDataProfileConfig* dpc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_network_fill_radio_data_profile(writer,
|
||||
gbinder_writer_new0(writer, RadioDataProfile), src, dpc);
|
||||
}
|
||||
@@ -1288,6 +1320,7 @@ binder_network_fill_radio_data_profile_1_4(
|
||||
const BinderNetworkDataProfile* src,
|
||||
const BinderDataProfileConfig* dpc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_copy_hidl_string(writer, &dp->apn, src->apn);
|
||||
binder_copy_hidl_string(writer, &dp->user, src->username);
|
||||
binder_copy_hidl_string(writer, &dp->password, src->password);
|
||||
@@ -1310,6 +1343,7 @@ binder_network_fill_radio_data_profile_1_5(
|
||||
const BinderNetworkDataProfile* src,
|
||||
const BinderDataProfileConfig* dpc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_copy_hidl_string(writer, &dp->apn, src->apn);
|
||||
binder_copy_hidl_string(writer, &dp->user, src->username);
|
||||
binder_copy_hidl_string(writer, &dp->password, src->password);
|
||||
@@ -1331,6 +1365,7 @@ binder_network_fill_radio_data_profile_aidl(
|
||||
const BinderNetworkDataProfile* src,
|
||||
const BinderDataProfileConfig* dpc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gint32 initial_size;
|
||||
|
||||
/* dataProfileInfo */
|
||||
@@ -1380,6 +1415,7 @@ binder_network_new_radio_data_profile_1_4(
|
||||
const BinderNetworkDataProfile* src,
|
||||
const BinderDataProfileConfig* dpc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_network_fill_radio_data_profile_1_4(writer,
|
||||
gbinder_writer_new0(writer, RadioDataProfile_1_4), src, dpc);
|
||||
}
|
||||
@@ -1391,6 +1427,7 @@ binder_network_new_radio_data_profile_1_5(
|
||||
const BinderNetworkDataProfile* src,
|
||||
const BinderDataProfileConfig* dpc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_network_fill_radio_data_profile_1_5(writer,
|
||||
gbinder_writer_new0(writer, RadioDataProfile_1_5), src, dpc);
|
||||
}
|
||||
@@ -1401,6 +1438,7 @@ binder_network_data_profile_equal(
|
||||
const BinderNetworkDataProfile* profile1,
|
||||
const BinderNetworkDataProfile* profile2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (profile1 == profile2) {
|
||||
return TRUE;
|
||||
} else if (!profile1 || !profile2) {
|
||||
@@ -1423,6 +1461,7 @@ binder_network_data_profiles_equal(
|
||||
GSList* list1,
|
||||
GSList* list2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (g_slist_length(list1) != g_slist_length(list2)) {
|
||||
return FALSE;
|
||||
} else {
|
||||
@@ -1449,6 +1488,7 @@ void
|
||||
binder_network_data_profiles_free(
|
||||
GSList* list)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Profiles are allocated as single memory blocks */
|
||||
g_slist_free_full(list, g_free);
|
||||
}
|
||||
@@ -1463,6 +1503,7 @@ binder_network_set_data_profiles_done(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
GASSERT(self->set_data_profiles_req == req);
|
||||
@@ -1482,6 +1523,7 @@ void
|
||||
binder_network_set_data_profiles(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioClient* client = self->data_client;
|
||||
const BinderDataProfileConfig* dpc = &self->data_profile_config;
|
||||
const RADIO_INTERFACE iface = radio_client_interface(client);
|
||||
@@ -1560,6 +1602,7 @@ void
|
||||
binder_network_check_data_profiles(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderDataProfileConfig* dpc = &self->data_profile_config;
|
||||
struct ofono_gprs* gprs = self->watch->gprs;
|
||||
|
||||
@@ -1612,6 +1655,7 @@ gboolean
|
||||
binder_network_need_initial_attach_apn(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (binder_network_actual_pref_modes(self) &
|
||||
(OFONO_RADIO_ACCESS_MODE_LTE | OFONO_RADIO_ACCESS_MODE_NR))
|
||||
? TRUE : FALSE;
|
||||
@@ -1622,6 +1666,7 @@ gboolean
|
||||
binder_network_can_set_initial_attach_apn(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_watch* watch = self->watch;
|
||||
BinderRadio* radio = self->radio;
|
||||
|
||||
@@ -1636,6 +1681,7 @@ binder_network_set_initial_attach_apn(
|
||||
BinderNetworkObject* self,
|
||||
const struct ofono_gprs_primary_context* ctx)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const RADIO_INTERFACE iface = radio_client_interface(self->g->client);
|
||||
const BinderDataProfileConfig* dpc = &self->data_profile_config;
|
||||
BinderNetworkDataProfile profile;
|
||||
@@ -1697,6 +1743,7 @@ void
|
||||
binder_network_try_set_initial_attach_apn(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->set_initial_attach_apn &&
|
||||
binder_network_can_set_initial_attach_apn(self)) {
|
||||
struct ofono_gprs* gprs = self->watch->gprs;
|
||||
@@ -1716,6 +1763,7 @@ void
|
||||
binder_network_check_initial_attach_apn(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const gboolean need = binder_network_need_initial_attach_apn(self);
|
||||
|
||||
if (self->need_initial_attach_apn != need) {
|
||||
@@ -1734,6 +1782,7 @@ void
|
||||
binder_network_reset_initial_attach_apn(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (binder_network_need_initial_attach_apn(self) &&
|
||||
!self->set_initial_attach_apn) {
|
||||
/* Will set initial attach APN when we have a chance */
|
||||
@@ -1748,6 +1797,7 @@ gboolean
|
||||
binder_network_can_set_pref_mode(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* With some modems an attempt to set rat significantly slows
|
||||
* down SIM I/O, let's avoid that.
|
||||
@@ -1761,6 +1811,7 @@ gboolean
|
||||
binder_network_set_pref_holdoff_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
GASSERT(self->timer[TIMER_SET_RAT_HOLDOFF]);
|
||||
@@ -1780,6 +1831,7 @@ binder_network_set_pref_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
GASSERT(self->set_rat_req == req);
|
||||
@@ -1799,6 +1851,7 @@ binder_network_set_pref(
|
||||
BinderNetworkObject* self,
|
||||
RADIO_PREF_NET_TYPE rat)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCard* card = self->simcard;
|
||||
|
||||
if (!self->set_rat_req &&
|
||||
@@ -1865,6 +1918,7 @@ binder_network_update_pref_mode(
|
||||
BinderNetworkObject* self,
|
||||
RADIO_PREF_NET_TYPE rat)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->rat != rat || self->assert_rat) {
|
||||
binder_network_set_pref(self, rat);
|
||||
}
|
||||
@@ -1876,6 +1930,7 @@ binder_network_check_pref_mode(
|
||||
BinderNetworkObject* self,
|
||||
gboolean immediate)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadio* radio = self->radio;
|
||||
|
||||
/*
|
||||
@@ -1931,6 +1986,7 @@ void
|
||||
binder_network_assert_pref_mode(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->assert_rat = TRUE;
|
||||
binder_network_check_pref_mode(self, FALSE);
|
||||
}
|
||||
@@ -1944,6 +2000,7 @@ binder_network_query_rat_done(
|
||||
RADIO_ERROR error,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (status == RADIO_TX_STATUS_OK) {
|
||||
if (resp == RADIO_RESP_GET_PREFERRED_NETWORK_TYPE) {
|
||||
/*
|
||||
@@ -1991,6 +2048,7 @@ binder_network_query_raf_done(
|
||||
RADIO_ERROR error,
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (status == RADIO_TX_STATUS_OK) {
|
||||
guint32 code = self->interface_aidl == RADIO_NETWORK_INTERFACE ?
|
||||
RADIO_NETWORK_RESP_GET_ALLOWED_NETWORK_TYPES_BITMAP :
|
||||
@@ -2052,6 +2110,7 @@ binder_network_initial_pref_query_done(
|
||||
RADIO_ERROR error,
|
||||
const GBinderReader* args))
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_network_object_ref(self);
|
||||
if (handle(self, status, resp, error, args)) {
|
||||
/*
|
||||
@@ -2073,6 +2132,7 @@ binder_network_initial_rat_query_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_network_initial_pref_query_done(THIS(user_data),
|
||||
status, resp, error, args, binder_network_query_rat_done);
|
||||
}
|
||||
@@ -2087,6 +2147,7 @@ binder_network_initial_raf_query_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_network_initial_pref_query_done(THIS(user_data),
|
||||
status, resp, error, args, binder_network_query_raf_done);
|
||||
}
|
||||
@@ -2096,6 +2157,7 @@ void
|
||||
binder_network_initial_rat_query(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioClient* client = self->g->client;
|
||||
const RADIO_INTERFACE iface = radio_client_interface(client);
|
||||
RadioRequest* req;
|
||||
@@ -2136,6 +2198,7 @@ binder_network_pref_query_done(
|
||||
RADIO_ERROR error,
|
||||
const GBinderReader* args))
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(self->query_rat_req);
|
||||
radio_request_unref(self->query_rat_req);
|
||||
self->query_rat_req = NULL;
|
||||
@@ -2158,6 +2221,7 @@ binder_network_rat_query_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_network_pref_query_done(THIS(user_data),
|
||||
status, resp, error, args, binder_network_query_rat_done);
|
||||
}
|
||||
@@ -2172,6 +2236,7 @@ binder_network_raf_query_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_network_pref_query_done(THIS(user_data),
|
||||
status, resp, error, args, binder_network_query_raf_done);
|
||||
}
|
||||
@@ -2181,6 +2246,7 @@ void
|
||||
binder_network_query_pref_mode(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioClient* client = self->g->client;
|
||||
const RADIO_INTERFACE iface = radio_client_interface(client);
|
||||
RadioRequest* req;
|
||||
@@ -2217,6 +2283,7 @@ enum ofono_radio_access_mode
|
||||
binder_network_max_supported_mode(
|
||||
BinderNetwork* net)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = binder_network_cast(net);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -2239,6 +2306,7 @@ binder_network_caps_raf_handler(
|
||||
BinderRadioCaps* caps,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
DBG_(self, "raf 0x%08x (%s)", caps->raf, ofono_radio_access_mode_to_string
|
||||
@@ -2252,6 +2320,7 @@ binder_network_radio_capability_tx_done_cb(
|
||||
BinderRadioCapsManager* mgr,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -2263,6 +2332,7 @@ void
|
||||
binder_network_release_radio_caps(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCaps* caps = self->caps;
|
||||
|
||||
if (caps) {
|
||||
@@ -2282,6 +2352,7 @@ binder_network_attach_radio_caps(
|
||||
BinderNetworkObject* self,
|
||||
BinderRadioCaps* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->caps = binder_radio_caps_ref(caps);
|
||||
self->caps_raf_event_id = binder_radio_caps_add_raf_handler(caps,
|
||||
binder_network_caps_raf_handler, self);
|
||||
@@ -2301,6 +2372,7 @@ binder_network_state_changed_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -2319,6 +2391,7 @@ binder_network_modem_reset_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
guint32 ind_code =
|
||||
radio_client_aidl_interface(client) == RADIO_MODEM_INTERFACE ?
|
||||
@@ -2361,6 +2434,7 @@ binder_network_current_physical_channel_configs_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
GBinderReader reader;
|
||||
gboolean nr_connected = FALSE;
|
||||
@@ -2424,6 +2498,7 @@ binder_network_radio_state_cb(
|
||||
BINDER_RADIO_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
binder_network_check_pref_mode(self, FALSE);
|
||||
@@ -2440,6 +2515,7 @@ binder_network_radio_online_cb(
|
||||
BINDER_RADIO_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
if (binder_network_can_set_pref_mode(self)) {
|
||||
@@ -2452,6 +2528,7 @@ gboolean
|
||||
binder_network_check_pref_mode_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
GASSERT(self->timer[TIMER_FORCE_CHECK_PREF_MODE]);
|
||||
@@ -2470,6 +2547,7 @@ binder_network_settings_pref_changed_cb(
|
||||
BINDER_SIM_SETTINGS_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
|
||||
/*
|
||||
@@ -2491,6 +2569,7 @@ binder_network_sim_status_changed_cb(
|
||||
BinderSimCard* card,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
const BinderSimCardStatus* status = card->status;
|
||||
|
||||
@@ -2508,6 +2587,7 @@ binder_network_watch_gprs_cb(
|
||||
struct ofono_watch* watch,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
const BinderDataProfileConfig* dpc = &self->data_profile_config;
|
||||
|
||||
@@ -2526,6 +2606,7 @@ binder_network_watch_gprs_settings_cb(
|
||||
const struct ofono_gprs_primary_context* settings,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(user_data);
|
||||
const BinderDataProfileConfig* dpc = &self->data_profile_config;
|
||||
|
||||
@@ -2554,6 +2635,7 @@ binder_network_new(
|
||||
BinderSimSettings* settings,
|
||||
const BinderSlotConfig* config)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderDataProfileConfig* dpc = &config->data_profile_config;
|
||||
BinderNetworkObject* self = g_object_new(THIS_TYPE, NULL);
|
||||
BinderNetwork* net = &self->pub;
|
||||
@@ -2653,6 +2735,7 @@ BinderNetwork*
|
||||
binder_network_ref(
|
||||
BinderNetwork* net)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = binder_network_cast(net);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -2667,6 +2750,7 @@ void
|
||||
binder_network_unref(
|
||||
BinderNetwork* net)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = binder_network_cast(net);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -2678,6 +2762,7 @@ void
|
||||
binder_network_query_registration_state(
|
||||
BinderNetwork* net)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = binder_network_cast(net);
|
||||
|
||||
if (self) {
|
||||
@@ -2692,6 +2777,7 @@ binder_network_set_allowed_modes(
|
||||
enum ofono_radio_access_mode modes,
|
||||
gboolean force_check)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = binder_network_cast(net);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -2716,6 +2802,7 @@ binder_network_set_radio_caps(
|
||||
BinderNetwork* net,
|
||||
BinderRadioCaps* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = binder_network_cast(net);
|
||||
|
||||
if (G_LIKELY(self) && self->caps != caps) {
|
||||
@@ -2734,6 +2821,7 @@ binder_network_add_property_handler(
|
||||
BinderNetworkPropertyFunc callback,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = binder_network_cast(net);
|
||||
|
||||
return G_LIKELY(self) ? binder_base_add_property_handler(&self->base,
|
||||
@@ -2745,6 +2833,7 @@ binder_network_remove_handler(
|
||||
BinderNetwork* net,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(id)) {
|
||||
BinderNetworkObject* self = binder_network_cast(net);
|
||||
|
||||
@@ -2760,6 +2849,7 @@ binder_network_remove_handlers(
|
||||
gulong* ids,
|
||||
int count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_disconnect_handlers(binder_network_cast(net), ids, count);
|
||||
}
|
||||
|
||||
@@ -2772,6 +2862,7 @@ void
|
||||
binder_network_object_init(
|
||||
BinderNetworkObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetwork* net = &self->pub;
|
||||
|
||||
self->rat = RADIO_PREF_NET_INVALID;
|
||||
@@ -2784,6 +2875,7 @@ void
|
||||
binder_network_object_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderNetworkObject* self = THIS(object);
|
||||
BinderNetwork* net = &self->pub;
|
||||
BINDER_NETWORK_TIMER tid;
|
||||
@@ -2829,6 +2921,7 @@ void
|
||||
binder_network_object_class_init(
|
||||
BinderNetworkObjectClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_network_object_finalize;
|
||||
BINDER_BASE_CLASS(klass)->public_offset =
|
||||
G_STRUCT_OFFSET(BinderNetworkObject, pub);
|
||||
|
||||
@@ -14,12 +14,14 @@
|
||||
*/
|
||||
|
||||
#include "binder_oplist.h"
|
||||
#include "binder_log.h"
|
||||
|
||||
#include <ofono/netreg.h>
|
||||
|
||||
BinderOpList*
|
||||
binder_oplist_new()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (BinderOpList*) g_array_new(FALSE, TRUE,
|
||||
sizeof(struct ofono_network_operator));
|
||||
}
|
||||
@@ -29,6 +31,7 @@ binder_oplist_set_count(
|
||||
BinderOpList* oplist,
|
||||
guint count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!oplist) {
|
||||
oplist = binder_oplist_new();
|
||||
}
|
||||
@@ -41,6 +44,7 @@ binder_oplist_append(
|
||||
BinderOpList* oplist,
|
||||
const struct ofono_network_operator* op)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!oplist) {
|
||||
oplist = binder_oplist_new();
|
||||
}
|
||||
@@ -52,6 +56,7 @@ void
|
||||
binder_oplist_free(
|
||||
BinderOpList* oplist)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (oplist) {
|
||||
g_array_free((GArray*)oplist, TRUE);
|
||||
}
|
||||
|
||||
@@ -395,6 +395,7 @@ void
|
||||
binder_radio_config_trace_update(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (plugin) {
|
||||
if (binder_logger_trace.flags & OFONO_DEBUG_FLAG_PRINT) {
|
||||
if (!plugin->radio_config_trace) {
|
||||
@@ -413,6 +414,7 @@ void
|
||||
binder_radio_config_dump_update(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (plugin) {
|
||||
if (binder_logger_dump.flags & OFONO_DEBUG_FLAG_PRINT) {
|
||||
if (!plugin->radio_config_dump) {
|
||||
@@ -433,6 +435,7 @@ binder_plugin_foreach_slot_param(
|
||||
BinderPluginSlotParamFunc fn,
|
||||
void* param)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (plugin) {
|
||||
GSList* l = plugin->slots;
|
||||
|
||||
@@ -451,6 +454,7 @@ binder_plugin_foreach_slot(
|
||||
BinderPlugin* plugin,
|
||||
BinderPluginSlotFunc fn)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (plugin) {
|
||||
GSList* l = plugin->slots;
|
||||
|
||||
@@ -468,6 +472,7 @@ void
|
||||
binder_logger_dump_update_slot(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
for (i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
@@ -488,6 +493,7 @@ void
|
||||
binder_logger_trace_update_slot(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
for (i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
@@ -508,6 +514,7 @@ void
|
||||
binder_plugin_check_if_started(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (plugin->start_timeout_id) {
|
||||
GSList* l;
|
||||
|
||||
@@ -534,6 +541,7 @@ gboolean
|
||||
binder_plugin_is_slot_client_connected(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
for (i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
@@ -548,6 +556,7 @@ binder_plugin_slot_shutdown(
|
||||
BinderSlot* slot,
|
||||
gboolean kill_io)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (slot->modem) {
|
||||
binder_data_allow(slot->data, OFONO_SLOT_DATA_NONE);
|
||||
ofono_modem_remove(slot->modem->ofono);
|
||||
@@ -649,6 +658,7 @@ void
|
||||
binder_plugin_power_check(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_radio_confirm_power_on(slot->radio);
|
||||
}
|
||||
|
||||
@@ -660,6 +670,7 @@ binder_plugin_radio_state_changed(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderReader reader;
|
||||
RADIO_STATE radio_state = RADIO_STATE_UNAVAILABLE;
|
||||
|
||||
@@ -678,6 +689,7 @@ static
|
||||
enum ofono_slot_sim_presence
|
||||
binder_plugin_sim_presence(BinderSlot *slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderSimCardStatus* status = slot->sim_card->status;
|
||||
|
||||
if (status) {
|
||||
@@ -702,6 +714,7 @@ binder_plugin_slot_data_role_changed(
|
||||
enum ofono_slot_property property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot* slot = user_data;
|
||||
const enum ofono_slot_data_role role = ofono_slot->data_role;
|
||||
|
||||
@@ -722,6 +735,7 @@ RADIO_AIDL_INTERFACE
|
||||
binder_plugin_modem_interface(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (slot->plugin->settings.interface_type == RADIO_INTERFACE_TYPE_AIDL) {
|
||||
return RADIO_MODEM_INTERFACE;
|
||||
}
|
||||
@@ -734,6 +748,7 @@ binder_plugin_interface_index(
|
||||
BinderSlot* slot,
|
||||
RADIO_AIDL_INTERFACE interface)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (slot->plugin->settings.interface_type == RADIO_INTERFACE_TYPE_AIDL) {
|
||||
return interface;
|
||||
}
|
||||
@@ -746,6 +761,7 @@ void
|
||||
binder_plugin_modem_check(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint modem_interface =
|
||||
binder_plugin_interface_index(slot, RADIO_MODEM_INTERFACE);
|
||||
guint data_interface =
|
||||
@@ -790,6 +806,7 @@ binder_plugin_slot_enabled_changed(
|
||||
enum ofono_slot_property property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot* slot = user_data;
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
@@ -814,6 +831,7 @@ void
|
||||
binder_plugin_slot_startup_check(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = slot->plugin;
|
||||
guint modem_interface =
|
||||
binder_plugin_interface_index(slot, RADIO_MODEM_INTERFACE);
|
||||
@@ -861,6 +879,7 @@ binder_plugin_handle_error(
|
||||
BinderSlot* slot,
|
||||
const char* message)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_error("%s %s", slot->name, message);
|
||||
ofono_slot_error(slot->handle, BINDER_ERROR_ID_DEATH, message);
|
||||
binder_plugin_slot_shutdown(slot, TRUE);
|
||||
@@ -875,6 +894,7 @@ binder_plugin_slot_death(
|
||||
RadioClient* client,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_plugin_handle_error((BinderSlot*)user_data, "binder service died");
|
||||
}
|
||||
|
||||
@@ -884,6 +904,7 @@ binder_plugin_caps_switch_aborted(
|
||||
BinderRadioCapsManager* mgr,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = user_data;
|
||||
|
||||
DBG("radio caps switch aborted");
|
||||
@@ -902,6 +923,7 @@ binder_plugin_device_identity_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot *slot = user_data;
|
||||
|
||||
GASSERT(slot->imei_req == req);
|
||||
@@ -979,6 +1001,7 @@ binder_plugin_slot_get_device_identity(
|
||||
gboolean blocking,
|
||||
int retries)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RADIO_AIDL_INTERFACE modem_interface = binder_plugin_modem_interface(slot);
|
||||
guint req_code = RADIO_REQ_GET_DEVICE_IDENTITY;
|
||||
if (modem_interface == RADIO_MODEM_INTERFACE) {
|
||||
@@ -1010,6 +1033,7 @@ binder_plugin_slot_sim_state_changed(
|
||||
BinderSimCard* card,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot* slot = data;
|
||||
enum ofono_slot_sim_presence presence = binder_plugin_sim_presence(slot);
|
||||
|
||||
@@ -1052,6 +1076,7 @@ binder_plugin_slot_radio_caps_cb(
|
||||
const RadioCapability* cap,
|
||||
void *user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot* slot = user_data;
|
||||
guint modem_interface =
|
||||
binder_plugin_interface_index(slot, RADIO_MODEM_INTERFACE);
|
||||
@@ -1086,6 +1111,7 @@ void
|
||||
binder_plugin_slot_connected(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = slot->plugin;
|
||||
const BinderPluginSettings* ps = &plugin->settings;
|
||||
guint modem_interface =
|
||||
@@ -1182,6 +1208,7 @@ binder_plugin_service_list_proc(
|
||||
char** services,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = data;
|
||||
|
||||
plugin->list_call_id = 0;
|
||||
@@ -1217,6 +1244,7 @@ binder_plugin_slot_service_list_proc(
|
||||
char** services,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot* slot = data;
|
||||
char* fqname = NULL;
|
||||
|
||||
@@ -1248,6 +1276,7 @@ void
|
||||
binder_plugin_service_check(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gbinder_servicemanager_cancel(plugin->svcmgr, plugin->list_call_id);
|
||||
plugin->list_call_id = gbinder_servicemanager_list(plugin->svcmgr,
|
||||
binder_plugin_service_list_proc, plugin);
|
||||
@@ -1270,6 +1299,7 @@ binder_plugin_service_registration_proc(
|
||||
const char* name,
|
||||
void* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG("%s is there", name);
|
||||
binder_plugin_service_check((BinderPlugin*) plugin);
|
||||
}
|
||||
@@ -1281,6 +1311,7 @@ binder_plugin_slot_service_registration_proc(
|
||||
const char* name,
|
||||
void* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG("%s is there", name);
|
||||
binder_plugin_slot_check((BinderSlot*) slot);
|
||||
}
|
||||
@@ -1290,6 +1321,7 @@ void
|
||||
binder_plugin_drop_radio_config(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_data_manager_set_radio_config(plugin->data_manager, NULL);
|
||||
binder_logger_free(plugin->radio_config_trace);
|
||||
binder_logger_free(plugin->radio_config_dump);
|
||||
@@ -1304,6 +1336,7 @@ void
|
||||
binder_plugin_check_config_client(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (plugin->flags & BINDER_PLUGIN_HAVE_CONFIG_SERVICE) {
|
||||
if (!plugin->radio_config) {
|
||||
plugin->radio_config =
|
||||
@@ -1336,6 +1369,7 @@ void
|
||||
binder_plugin_check_data_manager(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* If we haven't found any IRadioConfig (even 1.0) then still create
|
||||
* the data manager.
|
||||
@@ -1354,6 +1388,7 @@ binder_plugin_slot_connected_cb(
|
||||
RadioClient* client,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot* slot = user_data;
|
||||
|
||||
radio_client_remove_handlers(client, slot->client_event_id +
|
||||
@@ -1368,6 +1403,7 @@ binder_plugin_connect_to_interface(
|
||||
const char* dev,
|
||||
RADIO_AIDL_INTERFACE aidl_interface) {
|
||||
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint index = binder_plugin_interface_index(slot, aidl_interface);
|
||||
slot->instance[index] =
|
||||
radio_instance_new_with_modem_slot_version_and_interface(
|
||||
@@ -1407,6 +1443,7 @@ void
|
||||
binder_plugin_slot_check_radio_client(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = slot->plugin;
|
||||
const gboolean need_client =
|
||||
(slot->flags & BINDER_PLUGIN_SLOT_HAVE_RADIO_SERVICE) &&
|
||||
@@ -1460,6 +1497,7 @@ binder_plugin_config_get_ints(
|
||||
const char* group,
|
||||
const char* key)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char* value = ofono_conf_get_string(file, group, key);
|
||||
|
||||
if (value) {
|
||||
@@ -1496,6 +1534,7 @@ const char*
|
||||
binder_plugin_radio_interface_name(
|
||||
RADIO_INTERFACE interface)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (interface) {
|
||||
case RADIO_INTERFACE_1_0: return BINDER_SLOT_RADIO_INTERFACE_1_0;
|
||||
case RADIO_INTERFACE_1_1: return BINDER_SLOT_RADIO_INTERFACE_1_1;
|
||||
@@ -1515,6 +1554,7 @@ RADIO_INTERFACE
|
||||
binder_plugin_parse_radio_interface(
|
||||
const char* name)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (name) {
|
||||
RADIO_INTERFACE i;
|
||||
|
||||
@@ -1545,6 +1585,7 @@ binder_plugin_parse_spec_params(
|
||||
const char* spec,
|
||||
GHashTable* params)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char* name = NULL;
|
||||
char* sep = strchr(spec, ':');
|
||||
|
||||
@@ -1587,6 +1628,7 @@ binder_plugin_create_slot(
|
||||
const char* name,
|
||||
GKeyFile* file)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot* slot;
|
||||
BinderSlotConfig* config;
|
||||
BinderDataOptions* data_opt;
|
||||
@@ -1891,6 +1933,7 @@ void
|
||||
binder_plugin_slot_free(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = slot->plugin;
|
||||
|
||||
DBG("%s", slot->name);
|
||||
@@ -1924,6 +1967,7 @@ binder_plugin_add_slot(
|
||||
GSList* slots,
|
||||
BinderSlot* new_slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* link = slots;
|
||||
|
||||
/* Slot numbers and paths must be unique */
|
||||
@@ -1958,6 +2002,7 @@ binder_plugin_try_add_slot(
|
||||
GSList* slots,
|
||||
BinderSlot* new_slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return new_slot ? binder_plugin_add_slot(slots, new_slot) : slots;
|
||||
}
|
||||
|
||||
@@ -1967,6 +2012,7 @@ binder_plugin_parse_identity(
|
||||
BinderPluginIdentity* id,
|
||||
const char* value)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char* sep = strchr(value, ':');
|
||||
const char* user = value;
|
||||
const char* group = NULL;
|
||||
@@ -2023,6 +2069,7 @@ char**
|
||||
binder_plugin_find_slots(
|
||||
GBinderServiceManager* sm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char** slots = NULL;
|
||||
char** services = gbinder_servicemanager_list_sync(sm);
|
||||
|
||||
@@ -2062,6 +2109,7 @@ binder_plugin_pattern_match(
|
||||
GPatternSpec** patterns,
|
||||
const char* str)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const guint len = strlen(str);
|
||||
|
||||
while (*patterns) {
|
||||
@@ -2080,6 +2128,7 @@ binder_plugin_parse_config_file(
|
||||
BinderPlugin* plugin,
|
||||
GKeyFile* file)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderServiceManager* sm = plugin->svcmgr;
|
||||
BinderPluginSettings* ps = &plugin->settings;
|
||||
GSList* list = NULL;
|
||||
@@ -2226,6 +2275,7 @@ binder_plugin_load_config(
|
||||
BinderPlugin* plugin,
|
||||
const char* path)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const char* dev;
|
||||
char* cfg_dev;
|
||||
GKeyFile* file = g_key_file_new();
|
||||
@@ -2257,6 +2307,7 @@ binder_plugin_set_perm(
|
||||
mode_t mode,
|
||||
const BinderPluginIdentity* id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (chmod(path, mode)) {
|
||||
ofono_error("chmod(%s,%o) failed: %s", path, mode, strerror(errno));
|
||||
}
|
||||
@@ -2273,6 +2324,7 @@ binder_plugin_set_storage_perm(
|
||||
const char* path,
|
||||
const BinderPluginIdentity* id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DIR* d;
|
||||
const mode_t dir_mode = S_IRUSR | S_IWUSR | S_IXUSR;
|
||||
const mode_t file_mode = S_IRUSR | S_IWUSR;
|
||||
@@ -2310,6 +2362,7 @@ void
|
||||
binder_plugin_switch_identity(
|
||||
const BinderPluginIdentity* id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG("%d:%d", id->uid, id->gid);
|
||||
binder_plugin_set_storage_perm(ofono_storage_dir(), id);
|
||||
if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) {
|
||||
@@ -2341,6 +2394,7 @@ binder_plugin_slot_modem_changed(
|
||||
struct ofono_watch* watch,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot *slot = user_data;
|
||||
|
||||
DBG("%s", slot->path);
|
||||
@@ -2358,6 +2412,7 @@ gboolean
|
||||
binder_plugin_manager_start_timeout(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = user_data;
|
||||
|
||||
DBG("");
|
||||
@@ -2381,6 +2436,7 @@ void
|
||||
binder_plugin_drop_orphan_slots(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l = plugin->slots;
|
||||
|
||||
while (l) {
|
||||
@@ -2400,6 +2456,7 @@ void
|
||||
binder_plugin_manager_start_done(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = user_data;
|
||||
|
||||
DBG("");
|
||||
@@ -2416,6 +2473,7 @@ binder_plugin_slot_pick_shortest_timeout_cb(
|
||||
BinderSlot* slot,
|
||||
void* param)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint* timeout = param;
|
||||
|
||||
if (!(*timeout) || (*timeout) < slot->start_timeout_ms) {
|
||||
@@ -2428,6 +2486,7 @@ gboolean
|
||||
binder_plugin_slot_start_timeout(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSlot* slot = user_data;
|
||||
BinderPlugin* plugin = slot->plugin;
|
||||
|
||||
@@ -2455,6 +2514,7 @@ void
|
||||
binder_logger_slot_start(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char* name = NULL;
|
||||
if (slot->interface_type == RADIO_INTERFACE_TYPE_HIDL) {
|
||||
name = g_strdup(binder_radio_ifaces[slot->version]);
|
||||
@@ -2476,6 +2536,7 @@ static BinderPlugin*
|
||||
binder_plugin_slot_driver_init(
|
||||
struct ofono_slot_manager* sm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = g_new0(BinderPlugin, 1);
|
||||
BinderPluginSettings* ps = &plugin->settings;
|
||||
char* config_file = g_build_filename(ofono_config_dir(),
|
||||
@@ -2583,6 +2644,7 @@ binder_plugin_slot_check_plugin_flags_cb(
|
||||
BinderSlot* slot,
|
||||
void* param)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = param;
|
||||
|
||||
if (slot->version >= RADIO_INTERFACE_1_2) {
|
||||
@@ -2595,6 +2657,7 @@ guint
|
||||
binder_plugin_slot_driver_start(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPluginSettings* ps = &plugin->settings;
|
||||
guint start_timeout, shortest_timeout = 0;
|
||||
|
||||
@@ -2655,6 +2718,7 @@ binder_plugin_slot_driver_cancel(
|
||||
BinderPlugin* plugin,
|
||||
guint id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG("%u", id);
|
||||
GASSERT(plugin->start_timeout_id == id);
|
||||
plugin->start_timeout_id = 0;
|
||||
@@ -2666,6 +2730,7 @@ void
|
||||
binder_plugin_slot_driver_cleanup(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (plugin) {
|
||||
guint i;
|
||||
|
||||
@@ -2693,6 +2758,7 @@ void
|
||||
binder_plugin_mce_log_notify(
|
||||
struct ofono_debug_desc* desc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
mce_log.level = (desc->flags & OFONO_DEBUG_FLAG_PRINT) ?
|
||||
GLOG_LEVEL_VERBOSE : GLOG_LEVEL_INHERIT;
|
||||
}
|
||||
@@ -2706,6 +2772,7 @@ void
|
||||
binder_logger_trace_notify(
|
||||
struct ofono_debug_desc* desc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = ofono_slot_driver_get_data(binder_driver_reg);
|
||||
|
||||
binder_logger_module.level = (desc->flags & OFONO_DEBUG_FLAG_PRINT) ?
|
||||
@@ -2719,6 +2786,7 @@ void
|
||||
binder_logger_dump_notify(
|
||||
struct ofono_debug_desc* desc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderPlugin* plugin = ofono_slot_driver_get_data(binder_driver_reg);
|
||||
|
||||
binder_plugin_foreach_slot(plugin, binder_logger_dump_update_slot);
|
||||
@@ -2730,6 +2798,7 @@ void
|
||||
binder_plugin_manager_started(
|
||||
BinderPlugin* plugin)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_plugin_drop_orphan_slots(plugin);
|
||||
binder_plugin_check_data_manager(plugin);
|
||||
binder_data_manager_check_data(plugin->data_manager);
|
||||
@@ -2740,6 +2809,7 @@ static
|
||||
int
|
||||
binder_plugin_init(void)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
static const struct ofono_slot_driver binder_slot_driver = {
|
||||
.name = BINDER_DRIVER,
|
||||
.api_version = OFONO_SLOT_API_VERSION,
|
||||
@@ -2773,6 +2843,7 @@ static
|
||||
void
|
||||
binder_plugin_exit(void)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG("");
|
||||
binder_plugin_foreach_slot(ofono_slot_driver_get_data(binder_driver_reg),
|
||||
binder_plugin_slot_free);
|
||||
|
||||
@@ -89,6 +89,7 @@ gboolean
|
||||
binder_radio_power_should_be_on(
|
||||
BinderRadioObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadio* radio = &self->pub;
|
||||
|
||||
return (radio->online || g_hash_table_size(self->req_table) > 0) &&
|
||||
@@ -100,6 +101,7 @@ gboolean
|
||||
binder_radio_power_request_retry_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = THIS(user_data);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -116,6 +118,7 @@ void
|
||||
binder_radio_cancel_retry(
|
||||
BinderRadioObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->retry_id) {
|
||||
DBG_(self, "retry cancelled");
|
||||
g_source_remove(self->retry_id);
|
||||
@@ -128,6 +131,7 @@ void
|
||||
binder_radio_check_state(
|
||||
BinderRadioObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadio* radio = &self->pub;
|
||||
|
||||
if (!self->pending_req) {
|
||||
@@ -163,6 +167,7 @@ void
|
||||
binder_radio_power_request_done(
|
||||
BinderRadioObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(!self->pending_req);
|
||||
if (self->next_state_valid) {
|
||||
binder_radio_submit_power_request(self, self->next_state);
|
||||
@@ -181,6 +186,7 @@ binder_radio_power_request_cb(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = THIS(user_data);
|
||||
const RADIO_INTERFACE iface = radio_client_interface(self->client);
|
||||
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(self->client);
|
||||
@@ -218,6 +224,7 @@ binder_radio_submit_power_request(
|
||||
BinderRadioObject* self,
|
||||
gboolean on)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* setRadioPower(int32 serial, bool on)
|
||||
* setRadioPower_1_5(int32 serial, bool on, bool forEmergencyCall,
|
||||
* bool preferredForEmergencyCall)
|
||||
@@ -270,6 +277,7 @@ binder_radio_power_request(
|
||||
gboolean on,
|
||||
gboolean allow_repeat)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const char* on_off = on ? "on" : "off";
|
||||
|
||||
if (self->pending_req) {
|
||||
@@ -300,6 +308,7 @@ binder_radio_state_changed(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = THIS(user_data);
|
||||
RADIO_STATE radio_state = RADIO_STATE_UNAVAILABLE;
|
||||
GBinderReader reader;
|
||||
@@ -357,6 +366,7 @@ binder_radio_new(
|
||||
RadioClient* client,
|
||||
const char* log_prefix)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = g_object_new(THIS_TYPE, NULL);
|
||||
BinderRadio* radio = &self->pub;
|
||||
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(client);
|
||||
@@ -386,6 +396,7 @@ BinderRadio*
|
||||
binder_radio_ref(
|
||||
BinderRadio* radio)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -400,6 +411,7 @@ void
|
||||
binder_radio_unref(
|
||||
BinderRadio* radio)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -412,6 +424,7 @@ binder_radio_set_online(
|
||||
BinderRadio* radio,
|
||||
gboolean online)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
if (G_LIKELY(self) && radio->online != online) {
|
||||
@@ -431,6 +444,7 @@ void
|
||||
binder_radio_confirm_power_on(
|
||||
BinderRadio* radio)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
if (G_LIKELY(self) && binder_radio_power_should_be_on(self)) {
|
||||
@@ -452,6 +466,7 @@ void
|
||||
binder_radio_power_cycle(
|
||||
BinderRadio* radio)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -475,6 +490,7 @@ binder_radio_power_on(
|
||||
BinderRadio* radio,
|
||||
gpointer tag)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -495,6 +511,7 @@ binder_radio_power_off(
|
||||
BinderRadio* radio,
|
||||
gpointer tag)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -515,6 +532,7 @@ binder_radio_add_property_handler(
|
||||
BinderRadioPropertyFunc callback,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
return G_LIKELY(self) ? binder_base_add_property_handler(&self->base,
|
||||
@@ -526,6 +544,7 @@ binder_radio_remove_handler(
|
||||
BinderRadio* radio,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(id)) {
|
||||
BinderRadioObject* self = binder_radio_object_cast(radio);
|
||||
|
||||
@@ -541,6 +560,7 @@ binder_radio_remove_handlers(
|
||||
gulong* ids,
|
||||
int count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_disconnect_handlers(binder_radio_object_cast(radio), ids, count);
|
||||
}
|
||||
|
||||
@@ -553,6 +573,7 @@ void
|
||||
binder_radio_object_init(
|
||||
BinderRadioObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->req_table = g_hash_table_new(g_direct_hash, g_direct_equal);
|
||||
}
|
||||
|
||||
@@ -561,6 +582,7 @@ void
|
||||
binder_radio_object_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioObject* self = THIS(object);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -583,6 +605,7 @@ void
|
||||
binder_radio_object_class_init(
|
||||
BinderRadioObjectClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_radio_object_finalize;
|
||||
BINDER_BASE_CLASS(klass)->public_offset =
|
||||
G_STRUCT_OFFSET(BinderRadioObject, pub);
|
||||
|
||||
@@ -266,6 +266,7 @@ binder_radio_caps_permutate(
|
||||
guint off,
|
||||
guint n)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (off < n) {
|
||||
guint i;
|
||||
|
||||
@@ -287,6 +288,7 @@ binder_radio_caps_generate_permutations(
|
||||
GPtrArray* list,
|
||||
guint n)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_ptr_array_set_size(list, 0);
|
||||
|
||||
if (n > 0) {
|
||||
@@ -309,6 +311,7 @@ RadioCapability*
|
||||
binder_radio_caps_dup(
|
||||
const RadioCapability* in)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (in) {
|
||||
if (in->logicalModemUuid.data.str) {
|
||||
/* Allocate the whole thing from a single memory block */
|
||||
@@ -334,6 +337,7 @@ binder_radio_caps_equal(
|
||||
const RadioCapability* rc1,
|
||||
const RadioCapability* rc2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (rc1 == rc2) {
|
||||
return TRUE;
|
||||
} else if (rc1 && rc2) {
|
||||
@@ -362,6 +366,7 @@ binder_radio_caps_check_done(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsCheckData* check = user_data;
|
||||
RadioCapability* result = NULL;
|
||||
char* uuid_str = NULL;
|
||||
@@ -419,6 +424,7 @@ binder_radio_caps_check_retry(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (status == RADIO_TX_STATUS_OK) {
|
||||
switch (error) {
|
||||
case RADIO_ERROR_NONE:
|
||||
@@ -438,6 +444,7 @@ binder_radio_caps_check(
|
||||
BinderRadioCapsCheckFunc cb,
|
||||
void* cb_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsCheckData* check = g_new0(BinderRadioCapsCheckData, 1);
|
||||
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(client);
|
||||
guint32 code = iface_aidl == RADIO_MODEM_INTERFACE ?
|
||||
@@ -487,6 +494,7 @@ enum ofono_radio_access_mode
|
||||
binder_radio_caps_access_mode(
|
||||
const RadioCapability* cap)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (cap) {
|
||||
const RADIO_ACCESS_FAMILY raf = cap->raf;
|
||||
int i;
|
||||
@@ -506,6 +514,7 @@ enum ofono_radio_access_mode
|
||||
binder_radio_caps_modes(
|
||||
const RadioCapability* cap)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
enum ofono_radio_access_mode modes = OFONO_RADIO_ACCESS_MODE_NONE;
|
||||
|
||||
if (cap) {
|
||||
@@ -527,6 +536,7 @@ void
|
||||
binder_radio_caps_update_raf(
|
||||
BinderRadioCapsObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCaps* caps = &self->pub;
|
||||
const RadioCapability* cap = self->cap;
|
||||
RADIO_ACCESS_FAMILY raf = cap ? cap->raf : RAF_NONE;
|
||||
@@ -545,6 +555,7 @@ binder_radio_caps_score(
|
||||
const BinderRadioCapsObject* self,
|
||||
const RadioCapability* cap)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!self->radio->online || !self->simcard->status ||
|
||||
self->simcard->status->card_state != RADIO_CARD_STATE_PRESENT) {
|
||||
/* Unusable slot */
|
||||
@@ -569,6 +580,7 @@ binder_radio_caps_slot_compare(
|
||||
gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderRadioCapsObject* c1 = *(void**)a;
|
||||
const BinderRadioCapsObject* c2 = *(void**)b;
|
||||
|
||||
@@ -582,6 +594,7 @@ binder_radio_caps_radio_event(
|
||||
BINDER_RADIO_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = RADIO_CAPS(user_data);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -594,6 +607,7 @@ binder_radio_caps_simcard_event(
|
||||
BinderSimCard* sim,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = RADIO_CAPS(user_data);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -606,6 +620,7 @@ binder_radio_caps_watch_event(
|
||||
struct ofono_watch* watch,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = RADIO_CAPS(user_data);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -619,6 +634,7 @@ binder_radio_caps_settings_event(
|
||||
BINDER_SIM_SETTINGS_PROPERTY property,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = RADIO_CAPS(user_data);
|
||||
BinderRadioCapsManager* mgr = self->pub.mgr;
|
||||
|
||||
@@ -635,6 +651,7 @@ binder_radio_caps_changed_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* radioCapabilityIndication(RadioIndicationType, RadioCapability rc) */
|
||||
BinderRadioCapsObject* self = RADIO_CAPS(user_data);
|
||||
const RadioCapability* cap = binder_read_hidl_struct(args, RadioCapability);
|
||||
@@ -655,6 +672,7 @@ void
|
||||
binder_radio_caps_finish_init(
|
||||
BinderRadioCapsObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Register for update notifications */
|
||||
self->client_event_id[CLIENT_EVENT_IND_RADIO_CAPABILITY] =
|
||||
radio_client_add_indication_handler(self->client,
|
||||
@@ -675,6 +693,7 @@ binder_radio_caps_initial_query_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = RADIO_CAPS(user_data);
|
||||
const RadioCapability* cap = NULL;
|
||||
|
||||
@@ -714,6 +733,7 @@ binder_radio_caps_new(
|
||||
const BinderSlotConfig* config,
|
||||
const RadioCapability* cap)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(mgr);
|
||||
if (G_LIKELY(mgr)) {
|
||||
BinderRadioCapsObject* self = g_object_new(RADIO_CAPS_TYPE, 0);
|
||||
@@ -785,6 +805,7 @@ BinderRadioCaps*
|
||||
binder_radio_caps_ref(
|
||||
BinderRadioCaps* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = binder_radio_caps_cast(caps);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -797,6 +818,7 @@ void
|
||||
binder_radio_caps_unref(
|
||||
BinderRadioCaps* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = binder_radio_caps_cast(caps);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -808,6 +830,7 @@ void
|
||||
binder_radio_caps_drop(
|
||||
BinderRadioCaps* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = binder_radio_caps_cast(caps);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -822,6 +845,7 @@ binder_radio_caps_signal_cb(
|
||||
BinderRadioCapsObject* caps,
|
||||
BinderRadioCapsClosure* closure)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
closure->cb(&caps->pub, closure->user_data);
|
||||
}
|
||||
|
||||
@@ -831,6 +855,7 @@ binder_radio_caps_add_raf_handler(
|
||||
BinderRadioCapsFunc cb,
|
||||
void* arg)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = binder_radio_caps_cast(caps);
|
||||
|
||||
if (G_LIKELY(self) && G_LIKELY(cb)) {
|
||||
@@ -854,6 +879,7 @@ binder_radio_caps_remove_handler(
|
||||
BinderRadioCaps* caps,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(id)) {
|
||||
BinderRadioCapsObject* self = binder_radio_caps_cast(caps);
|
||||
|
||||
@@ -868,6 +894,7 @@ void
|
||||
binder_radio_caps_object_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* self = RADIO_CAPS(object);
|
||||
BinderRadioCapsManager* mgr = self->pub.mgr;
|
||||
|
||||
@@ -904,6 +931,7 @@ void
|
||||
binder_radio_caps_object_init(
|
||||
BinderRadioCapsObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->idle_pool = gutil_idle_pool_ref
|
||||
(gutil_idle_pool_get(&binder_radio_caps_shared_pool));
|
||||
}
|
||||
@@ -912,6 +940,7 @@ static
|
||||
void
|
||||
binder_radio_caps_object_class_init(BinderRadioCapsObjectClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_radio_caps_object_finalize;
|
||||
binder_radio_caps_signals[CAPS_SIGNAL_RAF_CHANGED] =
|
||||
g_signal_new(CAPS_SIGNAL_RAF_CHANGED_NAME,
|
||||
@@ -929,6 +958,7 @@ binder_radio_caps_manager_order_str(
|
||||
BinderRadioCapsManager* self,
|
||||
const guint* order)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const guint n = self->caps_list->len;
|
||||
|
||||
if (n > 0) {
|
||||
@@ -955,6 +985,7 @@ binder_radio_caps_manager_role_str(
|
||||
BinderRadioCapsManager* self,
|
||||
enum ofono_slot_data_role role)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char* str;
|
||||
|
||||
switch (role) {
|
||||
@@ -977,6 +1008,7 @@ binder_radio_caps_manager_foreach(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsEnumFunc cb)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
|
||||
@@ -991,6 +1023,7 @@ binder_radio_caps_manager_foreach_tx(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsEnumFunc cb)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
|
||||
@@ -1009,6 +1042,7 @@ gboolean
|
||||
binder_radio_caps_manager_tx_pending(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
|
||||
@@ -1034,6 +1068,7 @@ gboolean
|
||||
binder_radio_caps_manager_can_check(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->caps_list && !binder_radio_caps_manager_tx_pending(self)) {
|
||||
const GPtrArray* list = self->caps_list;
|
||||
const BinderRadioCapsObject* prev_caps = NULL;
|
||||
@@ -1087,6 +1122,7 @@ binder_radio_caps_manager_issue_requests(
|
||||
const BinderRadioCapsRequestTxPhase* phase,
|
||||
RadioRequestCompleteFunc handler)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
|
||||
@@ -1141,6 +1177,7 @@ binder_radio_caps_manager_next_transaction_cb(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
radio_request_group_cancel(caps->g);
|
||||
radio_client_remove_handlers(caps->client, caps->client_event_id +
|
||||
CLIENT_EVENT_OWNER, 1);
|
||||
@@ -1153,6 +1190,7 @@ void
|
||||
binder_radio_caps_manager_next_transaction(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_radio_caps_manager_foreach(self,
|
||||
binder_radio_caps_manager_next_transaction_cb);
|
||||
self->tx_failed = FALSE;
|
||||
@@ -1166,6 +1204,7 @@ void binder_radio_caps_manager_cancel_cb(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GASSERT(!caps->client_event_id[CLIENT_EVENT_OWNER]);
|
||||
radio_request_group_unblock(caps->g);
|
||||
}
|
||||
@@ -1175,6 +1214,7 @@ void
|
||||
binder_radio_caps_manager_transaction_done(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_radio_caps_manager_schedule_check(self);
|
||||
binder_data_manager_assert_data_on(self->data_manager);
|
||||
binder_radio_caps_manager_foreach(self,
|
||||
@@ -1191,6 +1231,7 @@ binder_radio_caps_manager_abort_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* caps = RADIO_CAPS(user_data);
|
||||
BinderRadioCapsManager* self = caps->pub.mgr;
|
||||
|
||||
@@ -1223,6 +1264,7 @@ void
|
||||
binder_radio_caps_manager_abort_transaction(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
const int prev_tx_id = self->tx_id;
|
||||
@@ -1262,6 +1304,7 @@ void binder_radio_caps_manager_next_phase_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* caps = RADIO_CAPS(user_data);
|
||||
BinderRadioCapsManager* self = caps->pub.mgr;
|
||||
gboolean ok = FALSE;
|
||||
@@ -1314,6 +1357,7 @@ void
|
||||
binder_radio_caps_manager_next_phase(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Note: -1 > 2 if 2 is unsigned (which turns -1 into 4294967295) */
|
||||
const int max_index = G_N_ELEMENTS(binder_radio_caps_tx_phase) - 1;
|
||||
|
||||
@@ -1363,6 +1407,7 @@ binder_radio_caps_manager_data_off_done(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!binder_radio_caps_manager_tx_pending(self)) {
|
||||
if (self->tx_failed) {
|
||||
DBG("failed to start the transaction");
|
||||
@@ -1389,6 +1434,7 @@ binder_radio_caps_manager_data_disallowed(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* caps = RADIO_CAPS(user_data);
|
||||
BinderRadioCapsManager* self = caps->pub.mgr;
|
||||
|
||||
@@ -1409,6 +1455,7 @@ binder_radio_caps_manager_data_off(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (binder_data_manager_need_set_data_allowed(self->data_manager)) {
|
||||
RadioRequest* req = binder_data_set_data_allowed_request_new(caps->g,
|
||||
FALSE, binder_radio_caps_manager_data_disallowed, NULL, caps);
|
||||
@@ -1433,6 +1480,7 @@ binder_radio_caps_manager_deactivate_data_call_done(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* caps = RADIO_CAPS(user_data);
|
||||
BinderRadioCapsManager* self = caps->pub.mgr;
|
||||
|
||||
@@ -1468,6 +1516,7 @@ binder_radio_caps_deactivate_data_call(
|
||||
BinderRadioCapsObject* caps,
|
||||
int cid)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioRequest* req = binder_data_deactivate_data_call_request_new(caps->g,
|
||||
cid, binder_radio_caps_manager_deactivate_data_call_done,
|
||||
NULL, caps);
|
||||
@@ -1486,6 +1535,7 @@ binder_radio_caps_deactivate_data_call_cb(
|
||||
gpointer list_data,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderDataCall* call = list_data;
|
||||
|
||||
if (call->status == RADIO_DATA_CALL_FAIL_NONE) {
|
||||
@@ -1500,6 +1550,7 @@ binder_radio_caps_manager_deactivate_all_cb(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderData* data = caps->data;
|
||||
|
||||
if (data) {
|
||||
@@ -1513,6 +1564,7 @@ void
|
||||
binder_radio_caps_manager_deactivate_all(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_radio_caps_manager_foreach_tx(self,
|
||||
binder_radio_caps_manager_deactivate_all_cb);
|
||||
if (!binder_radio_caps_manager_tx_pending(self)) {
|
||||
@@ -1529,6 +1581,7 @@ binder_radio_caps_tx_wait_cb(
|
||||
RadioClient* client,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* caps = RADIO_CAPS(user_data);
|
||||
BinderRadioCapsManager* self = caps->pub.mgr;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
@@ -1564,6 +1617,7 @@ void
|
||||
binder_radio_caps_manager_lock_io_for_transaction(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const GPtrArray* list = self->caps_list;
|
||||
gboolean can_start = TRUE;
|
||||
guint i;
|
||||
@@ -1612,6 +1666,7 @@ binder_radio_caps_manager_stop_sim_io_watch(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* binder_sim_card_remove_handlers zeros the id */
|
||||
binder_sim_card_remove_handlers(caps->simcard, caps->simcard_event_id +
|
||||
SIM_EVENT_IO_ACTIVE_CHANGED, 1);
|
||||
@@ -1623,6 +1678,7 @@ binder_radio_caps_tx_wait_sim_io_cb(
|
||||
BinderSimCard* simcard,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsObject* src = RADIO_CAPS(user_data);
|
||||
BinderRadioCapsManager* self = src->pub.mgr;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
@@ -1652,6 +1708,7 @@ binder_radio_caps_manager_start_sim_io_watch(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
caps->simcard_event_id[SIM_EVENT_IO_ACTIVE_CHANGED] =
|
||||
binder_sim_card_add_sim_io_active_changed_handler(caps->simcard,
|
||||
binder_radio_caps_tx_wait_sim_io_cb, caps);
|
||||
@@ -1662,6 +1719,7 @@ void
|
||||
binder_radio_caps_manager_start_transaction(
|
||||
BinderRadioCapsManager *self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const GPtrArray* list = self->caps_list;
|
||||
gboolean sim_io_active = FALSE;
|
||||
guint i, count = 0;
|
||||
@@ -1707,6 +1765,7 @@ binder_radio_caps_manager_set_order(
|
||||
BinderRadioCapsManager* self,
|
||||
const guint* order)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const GPtrArray* list = self->caps_list;
|
||||
guint i;
|
||||
|
||||
@@ -1731,6 +1790,7 @@ void
|
||||
binder_radio_caps_manager_check(
|
||||
BinderRadioCapsManager *self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (binder_radio_caps_manager_can_check(self)) {
|
||||
guint i;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
@@ -1769,6 +1829,7 @@ gboolean
|
||||
binder_radio_caps_manager_check_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsManager* self = RADIO_CAPS_MANAGER(user_data);
|
||||
|
||||
GASSERT(self->check_id);
|
||||
@@ -1782,6 +1843,7 @@ void
|
||||
binder_radio_caps_manager_recheck_later(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!binder_radio_caps_manager_tx_pending(self)) {
|
||||
if (self->check_id) {
|
||||
g_source_remove(self->check_id);
|
||||
@@ -1797,6 +1859,7 @@ void
|
||||
binder_radio_caps_manager_schedule_check(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!self->check_id && !binder_radio_caps_manager_tx_pending(self)) {
|
||||
self->check_id = g_idle_add(binder_radio_caps_manager_check_cb, self);
|
||||
}
|
||||
@@ -1808,6 +1871,7 @@ binder_caps_manager_request_sort(
|
||||
gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderRadioCapsRequest* r1 = *(void**)a;
|
||||
const BinderRadioCapsRequest* r2 = *(void**)b;
|
||||
|
||||
@@ -1827,6 +1891,7 @@ void
|
||||
binder_radio_caps_manager_consider_requests(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
gboolean changed = FALSE;
|
||||
const GPtrArray* list = self->caps_list;
|
||||
@@ -1869,6 +1934,7 @@ void
|
||||
binder_radio_caps_manager_list_changed(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Order list elements according to slot numbers */
|
||||
g_ptr_array_sort(self->caps_list, binder_radio_caps_slot_compare);
|
||||
|
||||
@@ -1883,6 +1949,7 @@ binder_radio_caps_manager_add(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_ptr_array_add(self->caps_list, caps);
|
||||
binder_radio_caps_manager_list_changed(self);
|
||||
}
|
||||
@@ -1892,6 +1959,7 @@ void binder_radio_caps_manager_remove(
|
||||
BinderRadioCapsManager* self,
|
||||
BinderRadioCapsObject* caps)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (g_ptr_array_remove(self->caps_list, caps)) {
|
||||
binder_radio_caps_manager_list_changed(self);
|
||||
}
|
||||
@@ -1903,6 +1971,7 @@ binder_radio_caps_manager_add_tx_aborted_handler(
|
||||
BinderRadioCapsManagerFunc cb,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (G_LIKELY(self) && G_LIKELY(cb)) ? g_signal_connect(self,
|
||||
CAPS_MANAGER_SIGNAL_ABORTED_NAME, G_CALLBACK(cb), user_data) : 0;
|
||||
}
|
||||
@@ -1913,6 +1982,7 @@ binder_radio_caps_manager_add_tx_done_handler(
|
||||
BinderRadioCapsManagerFunc cb,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (G_LIKELY(self) && G_LIKELY(cb)) ? g_signal_connect(self,
|
||||
CAPS_MANAGER_SIGNAL_TX_DONE_NAME, G_CALLBACK(cb), user_data) : 0;
|
||||
}
|
||||
@@ -1922,6 +1992,7 @@ binder_radio_caps_manager_remove_handler(
|
||||
BinderRadioCapsManager* self,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
g_signal_handler_disconnect(self, id);
|
||||
}
|
||||
@@ -1933,6 +2004,7 @@ binder_radio_caps_manager_remove_handlers(
|
||||
gulong* ids,
|
||||
int count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_disconnect_handlers(self, ids, count);
|
||||
}
|
||||
|
||||
@@ -1940,6 +2012,7 @@ BinderRadioCapsManager*
|
||||
binder_radio_caps_manager_ref(
|
||||
BinderRadioCapsManager *self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_ref(RADIO_CAPS_MANAGER(self));
|
||||
}
|
||||
@@ -1950,6 +2023,7 @@ void
|
||||
binder_radio_caps_manager_unref(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(self)) {
|
||||
g_object_unref(RADIO_CAPS_MANAGER(self));
|
||||
}
|
||||
@@ -1959,6 +2033,7 @@ BinderRadioCapsManager*
|
||||
binder_radio_caps_manager_new(
|
||||
BinderDataManager* dm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsManager* self = g_object_new(RADIO_CAPS_MANAGER_TYPE, 0);
|
||||
|
||||
self->data_manager = binder_data_manager_ref(dm);
|
||||
@@ -1970,6 +2045,7 @@ void
|
||||
binder_radio_caps_manager_init(
|
||||
BinderRadioCapsManager* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->caps_list = g_ptr_array_new();
|
||||
self->order_list = g_ptr_array_new();
|
||||
self->requests = g_ptr_array_new();
|
||||
@@ -1983,6 +2059,7 @@ void
|
||||
binder_radio_caps_manager_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsManager* self = RADIO_CAPS_MANAGER(object);
|
||||
|
||||
GASSERT(!self->caps_list->len);
|
||||
@@ -2004,6 +2081,7 @@ void
|
||||
binder_radio_caps_manager_class_init(
|
||||
BinderRadioCapsManagerClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GType type = G_OBJECT_CLASS_TYPE(klass);
|
||||
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_radio_caps_manager_finalize;
|
||||
@@ -2025,6 +2103,7 @@ binder_radio_caps_request_new(
|
||||
enum ofono_radio_access_mode modes,
|
||||
enum ofono_slot_data_role role)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioCapsRequest* req = NULL;
|
||||
BinderRadioCapsObject* caps = binder_radio_caps_cast(pub);
|
||||
|
||||
@@ -2048,6 +2127,7 @@ void
|
||||
binder_radio_caps_request_free(
|
||||
BinderRadioCapsRequest* req)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (req) {
|
||||
/* In case if g_object_unref frees the caps */
|
||||
BinderRadioCapsManager* mgr =
|
||||
|
||||
@@ -50,6 +50,7 @@ void
|
||||
binder_radio_settings_callback_data_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderRadioSettingsCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -61,6 +62,7 @@ binder_radio_settings_later(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettingsCbData* cbd = g_slice_new0(BinderRadioSettingsCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -77,6 +79,7 @@ gboolean
|
||||
binder_radio_settings_set_rat_mode_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettingsCbData* cbd = user_data;
|
||||
BinderRadioSettings* self = cbd->self;
|
||||
struct ofono_error error;
|
||||
@@ -95,6 +98,7 @@ binder_radio_settings_set_rat_mode(
|
||||
ofono_radio_settings_rat_mode_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettings* self = binder_radio_settings_get_data(rs);
|
||||
|
||||
DBG_(self, "%s", ofono_radio_access_mode_to_string(mode));
|
||||
@@ -109,6 +113,7 @@ gboolean
|
||||
binder_radio_settings_query_rat_mode_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettingsCbData* cbd = user_data;
|
||||
BinderRadioSettings* self = cbd->self;
|
||||
const enum ofono_radio_access_mode mode =
|
||||
@@ -129,6 +134,7 @@ binder_radio_settings_query_rat_mode(
|
||||
ofono_radio_settings_rat_mode_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettings* self = binder_radio_settings_get_data(rs);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -141,6 +147,7 @@ gboolean
|
||||
binder_radio_settings_query_available_rats_cb(
|
||||
gpointer data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettingsCbData* cbd = data;
|
||||
BinderRadioSettings* self = cbd->self;
|
||||
struct ofono_error error;
|
||||
@@ -159,6 +166,7 @@ binder_radio_settings_query_available_rats(
|
||||
ofono_radio_settings_available_rats_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettings* self = binder_radio_settings_get_data(rs);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -171,6 +179,7 @@ gboolean
|
||||
binder_radio_settings_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettings* self = user_data;
|
||||
|
||||
GASSERT(self->callback_id);
|
||||
@@ -186,6 +195,7 @@ binder_radio_settings_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderRadioSettings* self = g_new0(struct binder_radio_settings, 1);
|
||||
|
||||
@@ -204,6 +214,7 @@ void
|
||||
binder_radio_settings_remove(
|
||||
struct ofono_radio_settings* rs)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderRadioSettings* self = binder_radio_settings_get_data(rs);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -233,12 +244,14 @@ static const struct ofono_radio_settings_driver binder_radio_settings_driver = {
|
||||
void
|
||||
binder_radio_settings_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_radio_settings_driver_register(&binder_radio_settings_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_radio_settings_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_radio_settings_driver_unregister(&binder_radio_settings_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -197,6 +197,7 @@ binder_sim_cbd_io_new(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = g_slice_new0(BinderSimCbdIo);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -211,6 +212,7 @@ void
|
||||
binder_sim_cbd_io_free(
|
||||
gpointer data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = data;
|
||||
|
||||
binder_sim_card_sim_io_finished(cbd->card, cbd->req_id);
|
||||
@@ -224,6 +226,7 @@ binder_sim_cbd_io_start(
|
||||
BinderSimCbdIo* cbd,
|
||||
RadioRequest* req)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (radio_request_submit(req)) {
|
||||
binder_sim_card_sim_io_started(cbd->card, cbd->req_id = req);
|
||||
return TRUE;
|
||||
@@ -240,6 +243,7 @@ binder_sim_session_cbd_new(
|
||||
ofono_sim_logical_access_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSessionCbData* cbd = g_slice_new0(BinderSimSessionCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -257,6 +261,7 @@ void
|
||||
binder_sim_session_cbd_unref(
|
||||
gpointer data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSessionCbData* cbd = data;
|
||||
|
||||
if (--(cbd->ref_count) < 1) {
|
||||
@@ -272,6 +277,7 @@ binder_sim_session_cbd_start(
|
||||
BinderSimSessionCbData* cbd,
|
||||
RadioRequest* req)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const gpointer finished_req = cbd->req_id;
|
||||
gboolean ok;
|
||||
|
||||
@@ -293,6 +299,7 @@ binder_sim_pin_cbd_state_event_count_cb(
|
||||
BinderSimCard* sc,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimPinCbData* cbd = user_data;
|
||||
|
||||
/*
|
||||
@@ -312,6 +319,7 @@ binder_sim_pin_cbd_new(
|
||||
ofono_sim_lock_unlock_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimPinCbData* cbd = g_slice_new0(BinderSimPinCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -332,6 +340,7 @@ void
|
||||
binder_sim_pin_cbd_free(
|
||||
BinderSimPinCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (cbd->timeout_id) {
|
||||
g_source_remove(cbd->timeout_id);
|
||||
}
|
||||
@@ -346,6 +355,7 @@ void
|
||||
binder_sim_pin_req_done(
|
||||
gpointer ptr)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimPinCbData* cbd = ptr;
|
||||
|
||||
/* Only free if callback isn't waiting for something else to happen */
|
||||
@@ -364,6 +374,7 @@ binder_sim_append_path(
|
||||
const guchar* path,
|
||||
guint path_len)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const RADIO_APP_TYPE app_type = binder_sim_card_app_type(self->card);
|
||||
guchar db_path[OFONO_EF_PATH_BUFFER_SIZE] = { 0x00 };
|
||||
char* hex_path = NULL;
|
||||
@@ -402,6 +413,7 @@ binder_sim_io_response_new(
|
||||
const GBinderReader* args,
|
||||
RADIO_AIDL_INTERFACE interface_aidl)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const RadioIccIoResult* result;
|
||||
GBinderReader reader;
|
||||
|
||||
@@ -445,6 +457,7 @@ void
|
||||
binder_sim_io_response_free(
|
||||
BinderSimIoResponse* res)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (res) {
|
||||
g_free(res->data);
|
||||
g_slice_free(BinderSimIoResponse, res);
|
||||
@@ -456,6 +469,7 @@ gboolean
|
||||
binder_sim_io_response_ok(
|
||||
const BinderSimIoResponse* res)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (res) {
|
||||
static const struct binder_sim_io_error {
|
||||
gint32 sw;
|
||||
@@ -537,6 +551,7 @@ binder_sim_file_info_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = user_data;
|
||||
BinderSim* self = cbd->self;
|
||||
ofono_sim_file_info_cb_t cb = cbd->cb.file_info;
|
||||
@@ -615,6 +630,7 @@ binder_sim_request_io(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
static const char empty[] = "";
|
||||
const char* aid = binder_sim_card_app_aid(self->card);
|
||||
BinderSimCbdIo* cbd = binder_sim_cbd_io_new(self, cb, data);
|
||||
@@ -697,6 +713,7 @@ binder_sim_ofono_read_file_info(
|
||||
ofono_sim_file_info_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!binder_sim_request_io(binder_sim_get_data(sim), CMD_GET_RESPONSE,
|
||||
fileid, 0, 0, 15, NULL, path, len, binder_sim_file_info_cb,
|
||||
BINDER_CB(cb), data)) {
|
||||
@@ -717,6 +734,7 @@ binder_sim_read_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = user_data;
|
||||
BinderSim* self = cbd->self;
|
||||
ofono_sim_read_cb_t cb = cbd->cb.read;
|
||||
@@ -770,6 +788,7 @@ binder_sim_read(
|
||||
ofono_sim_read_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!binder_sim_request_io(binder_sim_get_data(sim), cmd, fileid, p1, p2,
|
||||
p3, NULL, path, path_len, binder_sim_read_cb, BINDER_CB(cb), data)) {
|
||||
struct ofono_error err;
|
||||
@@ -790,6 +809,7 @@ binder_sim_ofono_read_file_transparent(
|
||||
ofono_sim_read_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sim_read(sim, CMD_READ_BINARY, fileid, (start >> 8), (start & 0xff),
|
||||
length, path, path_len, cb, data);
|
||||
}
|
||||
@@ -806,6 +826,7 @@ binder_sim_ofono_read_file_linear(
|
||||
ofono_sim_read_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sim_read(sim, CMD_READ_RECORD, fileid, record, MODE_ABSOLUTE,
|
||||
length, path, path_len, cb, data);
|
||||
}
|
||||
@@ -822,6 +843,7 @@ binder_sim_ofono_read_file_cyclic(
|
||||
ofono_sim_read_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sim_read(sim, CMD_READ_RECORD, fileid, record, MODE_ABSOLUTE,
|
||||
length, path, path_len, cb, data);
|
||||
}
|
||||
@@ -835,6 +857,7 @@ void binder_sim_write_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = user_data;
|
||||
BinderSim* self = cbd->self;
|
||||
ofono_sim_write_cb_t cb = cbd->cb.write;
|
||||
@@ -888,6 +911,7 @@ binder_sim_write(
|
||||
ofono_sim_write_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char* hex_data = binder_encode_hex(value, length);
|
||||
|
||||
if (!binder_sim_request_io(binder_sim_get_data(sim), cmd, fileid, p1, p2,
|
||||
@@ -913,6 +937,7 @@ binder_sim_write_file_transparent(
|
||||
ofono_sim_write_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sim_write(sim, CMD_UPDATE_BINARY, fileid, (start >> 8),
|
||||
(start & 0xff), length, value, path, path_len, cb, data);
|
||||
}
|
||||
@@ -930,6 +955,7 @@ binder_sim_write_file_linear(
|
||||
ofono_sim_write_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sim_write(sim, CMD_UPDATE_RECORD, fileid, record, MODE_ABSOLUTE,
|
||||
length, value, path, path_len, cb, data);
|
||||
}
|
||||
@@ -946,6 +972,7 @@ binder_sim_write_file_cyclic(
|
||||
ofono_sim_write_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sim_write(sim, CMD_UPDATE_RECORD, fileid, 0, MODE_PREVIOUS,
|
||||
length, value, path, path_len, cb, data);
|
||||
}
|
||||
@@ -960,6 +987,7 @@ binder_sim_get_imsi_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = user_data;
|
||||
ofono_sim_imsi_cb_t cb = cbd->cb.imsi;
|
||||
struct ofono_error err;
|
||||
@@ -1009,6 +1037,7 @@ binder_sim_read_imsi(
|
||||
ofono_sim_imsi_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
BinderSimCbdIo* cbd = binder_sim_cbd_io_new(self, BINDER_CB(cb), data);
|
||||
const char* aid = binder_sim_card_app_aid(self->card);
|
||||
@@ -1051,6 +1080,7 @@ enum ofono_sim_password_type
|
||||
binder_sim_passwd_state(
|
||||
BinderSim* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderSimCardApp *app = self->card->app;
|
||||
|
||||
if (app) {
|
||||
@@ -1100,6 +1130,7 @@ gboolean
|
||||
binder_sim_app_in_transient_state(
|
||||
BinderSim* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderSimCardApp* app = self->card->app;
|
||||
|
||||
if (app) {
|
||||
@@ -1127,6 +1158,7 @@ binder_sim_finish_passwd_state_query(
|
||||
BinderSim* self,
|
||||
enum ofono_sim_password_type state)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->query_passwd_state_timeout_id) {
|
||||
g_source_remove(self->query_passwd_state_timeout_id);
|
||||
self->query_passwd_state_timeout_id = 0;
|
||||
@@ -1160,6 +1192,7 @@ void
|
||||
binder_sim_check_perm_lock(
|
||||
BinderSim* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCard* sim = self->card;
|
||||
|
||||
/*
|
||||
@@ -1192,6 +1225,7 @@ void
|
||||
binder_sim_invalidate_passwd_state(
|
||||
BinderSim* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
guint i;
|
||||
|
||||
self->ofono_passwd_state = OFONO_SIM_PASSWORD_INVALID;
|
||||
@@ -1209,6 +1243,7 @@ binder_sim_app_changed_cb(
|
||||
BinderSimCard* sim,
|
||||
void *user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sim_check_perm_lock((BinderSim*)user_data);
|
||||
}
|
||||
|
||||
@@ -1218,6 +1253,7 @@ binder_sim_status_changed_cb(
|
||||
BinderSimCard* sim,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = user_data;
|
||||
|
||||
GASSERT(self->card == sim);
|
||||
@@ -1255,6 +1291,7 @@ binder_sim_state_changed_cb(
|
||||
struct ofono_watch* watch,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = data;
|
||||
const enum ofono_sim_state state = ofono_sim_get_state(watch->sim);
|
||||
|
||||
@@ -1275,6 +1312,7 @@ binder_sim_enter_sim_pin_req(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* supplyIccPinForApp(int32 serial, string pin, string aid);
|
||||
* supplyIccPin2ForApp(int32_t serial, string pin2, string aid);
|
||||
@@ -1308,6 +1346,7 @@ binder_sim_enter_sim_puk_req(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* supplyIccPukForApp(int32 serial, string puk, string pin, string aid);
|
||||
* supplyIccPuk2ForApp(int32 serial, string puk2, string pin2, string aid);
|
||||
@@ -1346,6 +1385,7 @@ binder_sim_empty_sim_pin_req(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_sim_enter_sim_pin_req(self, code, "",
|
||||
complete, destroy, user_data);
|
||||
}
|
||||
@@ -1359,6 +1399,7 @@ binder_sim_empty_sim_puk_req(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_sim_enter_sim_puk_req(self, code, "", "",
|
||||
complete, destroy, user_data);
|
||||
}
|
||||
@@ -1399,6 +1440,7 @@ binder_sim_retry_query_cbd_new(
|
||||
ofono_sim_pin_retries_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimRetryQueryCbData* cbd = g_slice_new(BinderSimRetryQueryCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -1413,6 +1455,7 @@ void
|
||||
binder_sim_retry_query_cbd_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderSimRetryQueryCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -1424,6 +1467,7 @@ binder_sim_query_retry_count(
|
||||
ofono_sim_pin_retries_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->empty_pin_query_allowed) {
|
||||
guint i = start_index;
|
||||
|
||||
@@ -1464,6 +1508,7 @@ binder_sim_query_retry_count_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimRetryQueryCbData* cbd = user_data;
|
||||
BinderSim* self = cbd->self;
|
||||
struct ofono_error err;
|
||||
@@ -1508,6 +1553,7 @@ binder_sim_query_pin_retries(
|
||||
ofono_sim_pin_retries_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -1527,6 +1573,7 @@ binder_sim_query_passwd_state_complete_cb(
|
||||
BinderSimCard* sim,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = user_data;
|
||||
|
||||
GASSERT(self->query_passwd_state_sim_status_refresh_id);
|
||||
@@ -1538,6 +1585,7 @@ gboolean
|
||||
binder_sim_query_passwd_state_timeout_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = user_data;
|
||||
|
||||
GASSERT(self->query_passwd_state_cb);
|
||||
@@ -1554,6 +1602,7 @@ binder_sim_query_passwd_state(
|
||||
ofono_sim_passwd_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
|
||||
if (self->query_passwd_state_timeout_id) {
|
||||
@@ -1597,6 +1646,7 @@ gboolean
|
||||
binder_sim_pin_change_state_timeout_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimPinCbData* cbd = user_data;
|
||||
BinderSim* self = cbd->self;
|
||||
struct ofono_error err;
|
||||
@@ -1616,6 +1666,7 @@ binder_sim_pin_change_state_status_cb(
|
||||
BinderSimCard* sim,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimPinCbData* cbd = user_data;
|
||||
BinderSim* self = cbd->self;
|
||||
|
||||
@@ -1650,6 +1701,7 @@ binder_sim_pin_change_state_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimPinCbData* cbd = user_data;
|
||||
BinderSim* self = cbd->self;
|
||||
enum ofono_sim_password_type type = cbd->passwd_type;
|
||||
@@ -1737,6 +1789,7 @@ binder_sim_pin_send(
|
||||
ofono_sim_lock_unlock_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
guint32 code = self->interface_aidl == RADIO_SIM_INTERFACE ?
|
||||
RADIO_SIM_REQ_SUPPLY_ICC_PIN_FOR_APP : RADIO_REQ_SUPPLY_ICC_PIN_FOR_APP;
|
||||
@@ -1767,6 +1820,7 @@ binder_perso_change_state(
|
||||
ofono_sim_lock_unlock_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
guint32 code = RADIO_REQ_NONE;
|
||||
gboolean ok = FALSE;
|
||||
@@ -1812,6 +1866,7 @@ const char*
|
||||
binder_sim_facility_code(
|
||||
enum ofono_sim_password_type type)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (type) {
|
||||
case OFONO_SIM_PASSWORD_SIM_PIN:
|
||||
return "SC";
|
||||
@@ -1844,6 +1899,7 @@ binder_sim_pin_change_state(
|
||||
ofono_sim_lock_unlock_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
const char* aid = binder_sim_card_app_aid(self->card);
|
||||
const char* fac = binder_sim_facility_code(pwtype);
|
||||
@@ -1903,6 +1959,7 @@ binder_sim_pin_send_puk(
|
||||
ofono_sim_lock_unlock_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
guint32 code = self->interface_aidl == RADIO_SIM_INTERFACE ?
|
||||
RADIO_SIM_REQ_SUPPLY_ICC_PUK_FOR_APP :
|
||||
@@ -1935,6 +1992,7 @@ binder_sim_change_passwd(
|
||||
ofono_sim_lock_unlock_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
RADIO_REQ code = RADIO_REQ_NONE;
|
||||
gboolean ok = FALSE;
|
||||
@@ -2000,6 +2058,7 @@ binder_sim_query_facility_lock_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = user_data;
|
||||
ofono_query_facility_lock_cb_t cb = cbd->cb.query_facility_lock;
|
||||
struct ofono_error err;
|
||||
@@ -2019,13 +2078,17 @@ binder_sim_query_facility_lock_cb(
|
||||
return;
|
||||
} else {
|
||||
ofono_error("Broken getFacilityLockForApp response?");
|
||||
DBG("func:%s,line:%d,Broken getFacilityLockForApp response?", __func__, __LINE__);
|
||||
}
|
||||
} else {
|
||||
ofono_error("Facility lock query error: %s",
|
||||
binder_radio_error_string(error));
|
||||
DBG("func:%s,line:%d,Facility lock query error: %s", __func__, __LINE__,
|
||||
binder_radio_error_string(error));
|
||||
}
|
||||
} else {
|
||||
ofono_error("Unexpected getFacilityLockForApp response %d", resp);
|
||||
DBG("Unexpected getFacilityLockForApp response %d", resp);
|
||||
}
|
||||
}
|
||||
/* Error */
|
||||
@@ -2042,6 +2105,7 @@ binder_sim_query_facility_lock_retry(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return (status == RADIO_TX_STATUS_TIMEOUT);
|
||||
}
|
||||
|
||||
@@ -2053,6 +2117,7 @@ binder_sim_query_facility_lock(
|
||||
ofono_query_facility_lock_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
const char* fac = binder_sim_facility_code(type);
|
||||
BinderSimCbdIo* cbd = binder_sim_cbd_io_new(self, BINDER_CB(cb), data);
|
||||
@@ -2107,6 +2172,7 @@ gboolean
|
||||
binder_sim_list_apps_cb(
|
||||
gpointer data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimListApps* cbd = data;
|
||||
BinderSim* self = cbd->self;
|
||||
const BinderSimCardStatus* status = self->card->status;
|
||||
@@ -2163,6 +2229,7 @@ binder_sim_list_apps(
|
||||
ofono_sim_list_apps_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
BinderSimListApps* cbd = g_new(BinderSimListApps, 1);
|
||||
|
||||
@@ -2186,6 +2253,7 @@ binder_sim_open_channel_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = user_data;
|
||||
ofono_sim_open_channel_cb_t cb = cbd->cb.open_channel;
|
||||
struct ofono_error err;
|
||||
@@ -2232,6 +2300,7 @@ binder_sim_open_channel(
|
||||
ofono_sim_open_channel_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
BinderSimCbdIo* cbd = binder_sim_cbd_io_new(self, BINDER_CB(cb), data);
|
||||
gboolean ok;
|
||||
@@ -2275,6 +2344,7 @@ binder_sim_close_channel_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCbdIo* cbd = user_data;
|
||||
struct ofono_error err;
|
||||
guint32 code = cbd->self->interface_aidl == RADIO_SIM_INTERFACE ?
|
||||
@@ -2305,6 +2375,7 @@ binder_sim_close_channel(
|
||||
ofono_sim_close_channel_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
BinderSimCbdIo* cbd = binder_sim_cbd_io_new(self, BINDER_CB(cb), data);
|
||||
gboolean ok;
|
||||
@@ -2341,6 +2412,7 @@ binder_sim_logical_access_get_results_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSessionCbData* cbd = user_data;
|
||||
ofono_sim_logical_access_cb_t cb = cbd->cb;
|
||||
struct ofono_error err;
|
||||
@@ -2385,6 +2457,7 @@ binder_sim_logical_access_transmit(
|
||||
const char* hex_data,
|
||||
RadioRequestCompleteFunc cb)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* iccTransmitApduLogicalChannel(int32 serial, SimApdu message); */
|
||||
BinderSim* self = cbd->self;
|
||||
GBinderWriter writer;
|
||||
@@ -2449,6 +2522,7 @@ binder_sim_logical_access_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSessionCbData* cbd = user_data;
|
||||
ofono_sim_logical_access_cb_t cb = cbd->cb;
|
||||
struct ofono_error err;
|
||||
@@ -2515,6 +2589,7 @@ binder_sim_logical_access(
|
||||
ofono_sim_logical_access_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
const char* hex_data;
|
||||
char* tmp;
|
||||
@@ -2549,6 +2624,7 @@ binder_sim_session_read_binary(
|
||||
ofono_sim_read_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error error;
|
||||
|
||||
ofono_error("session_read_binary not implemented");
|
||||
@@ -2568,6 +2644,7 @@ binder_sim_session_read_record(
|
||||
ofono_sim_read_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error error;
|
||||
|
||||
ofono_error("session_read_record not implemented");
|
||||
@@ -2585,6 +2662,7 @@ binder_sim_session_read_info(
|
||||
ofono_sim_file_info_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_error error;
|
||||
|
||||
ofono_error("session_read_info not implemented");
|
||||
@@ -2599,6 +2677,7 @@ binder_sim_refresh_cb(
|
||||
const GBinderReader* reader,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = user_data;
|
||||
|
||||
/*
|
||||
@@ -2614,6 +2693,7 @@ gboolean
|
||||
binder_sim_register(
|
||||
gpointer user)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = user;
|
||||
RadioClient* client = self->g->client;
|
||||
|
||||
@@ -2659,6 +2739,7 @@ binder_sim_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderSim* self = g_new0(BinderSim, 1);
|
||||
|
||||
@@ -2680,6 +2761,7 @@ binder_sim_probe(
|
||||
|
||||
static void binder_sim_remove(struct ofono_sim *sim)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSim* self = binder_sim_get_data(sim);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -2757,12 +2839,14 @@ static const struct ofono_sim_driver binder_sim_driver = {
|
||||
void
|
||||
binder_sim_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_sim_driver_register(&binder_sim_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_sim_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_sim_driver_unregister(&binder_sim_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ binder_sim_card_app_equal(
|
||||
const BinderSimCardApp* a1,
|
||||
const BinderSimCardApp* a2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (a1 == a2) {
|
||||
return TRUE;
|
||||
} else if (!a1 || !a2) {
|
||||
@@ -134,6 +135,7 @@ binder_sim_card_status_compare(
|
||||
const BinderSimCardStatus* s1,
|
||||
const BinderSimCardStatus* s2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (s1 == s2) {
|
||||
return 0;
|
||||
} else if (!s1 || !s2) {
|
||||
@@ -170,6 +172,7 @@ void
|
||||
binder_sim_card_status_free(
|
||||
BinderSimCardStatus* status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (status) {
|
||||
if (status->apps) {
|
||||
int i;
|
||||
@@ -189,6 +192,7 @@ void
|
||||
binder_sim_card_tx_start(
|
||||
BinderSimCardObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RADIO_BLOCK block = radio_request_group_block_status(self->g);
|
||||
|
||||
if (block == RADIO_BLOCK_NONE) {
|
||||
@@ -203,6 +207,7 @@ void
|
||||
binder_sim_card_tx_check(
|
||||
BinderSimCardObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (radio_request_group_block_status(self->g) != RADIO_BLOCK_NONE) {
|
||||
BinderSimCard* card = &self->card;
|
||||
const BinderSimCardStatus* status = card->status;
|
||||
@@ -231,6 +236,7 @@ void
|
||||
binder_sim_card_subscription_done(
|
||||
BinderSimCardObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->sub_start_timer) {
|
||||
/* Don't need this timer anymore */
|
||||
g_source_remove(self->sub_start_timer);
|
||||
@@ -253,6 +259,7 @@ binder_sim_card_subscribe_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = THIS(user_data);
|
||||
guint32 code = self->interface_aidl == RADIO_SIM_INTERFACE ?
|
||||
RADIO_SIM_RESP_SET_UICC_SUBSCRIPTION: RADIO_RESP_SET_UICC_SUBSCRIPTION;
|
||||
@@ -274,6 +281,7 @@ binder_sim_card_subscribe(
|
||||
BinderSimCardObject* self,
|
||||
int app_index)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCard* card = &self->card;
|
||||
GBinderWriter args;
|
||||
guint32 code = self->interface_aidl == RADIO_SIM_INTERFACE ?
|
||||
@@ -318,6 +326,7 @@ int
|
||||
binder_sim_card_select_app(
|
||||
const BinderSimCardStatus *status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
int i, selected_app = -1;
|
||||
|
||||
for (i = 0; i < status->num_apps; i++) {
|
||||
@@ -340,6 +349,7 @@ void
|
||||
binder_sim_card_update_app(
|
||||
BinderSimCardObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCard* card = &self->card;
|
||||
const BinderSimCardApp* old_app = card->app;
|
||||
const BinderSimCardStatus* status = card->status;
|
||||
@@ -378,6 +388,7 @@ gboolean
|
||||
binder_sim_card_sub_start_timeout(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = THIS(user_data);
|
||||
|
||||
DBG("%u", self->card.slot);
|
||||
@@ -393,6 +404,7 @@ binder_sim_card_update_status(
|
||||
BinderSimCardObject* self,
|
||||
BinderSimCardStatus* status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCard* card = &self->card;
|
||||
const int diff = binder_sim_card_status_compare(card->status, status);
|
||||
|
||||
@@ -443,6 +455,7 @@ BinderSimCardStatus*
|
||||
binder_sim_card_status_new(
|
||||
const RadioCardStatus* radio_status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const guint num_apps = radio_status->apps.count;
|
||||
BinderSimCardStatus* status = g_malloc0(sizeof(BinderSimCardStatus) +
|
||||
num_apps * sizeof(BinderSimCardApp));
|
||||
@@ -492,6 +505,7 @@ BinderSimCardStatus*
|
||||
binder_sim_card_status_new_from_aidl(
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gint32 card_state, pin_state;
|
||||
gint32 gsm_umts_index, cdma_index, ims_index;
|
||||
guint32 num_apps = 0;
|
||||
@@ -580,6 +594,7 @@ binder_sim_card_status_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = THIS(user_data);
|
||||
|
||||
GASSERT(self->status_req);
|
||||
@@ -644,6 +659,7 @@ void
|
||||
binder_sim_card_get_status(
|
||||
BinderSimCardObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->status_req) {
|
||||
/* Retry right away, don't wait for retry timeout to expire */
|
||||
radio_request_retry(self->status_req);
|
||||
@@ -670,6 +686,7 @@ void
|
||||
binder_sim_card_update_sim_io_active(
|
||||
BinderSimCardObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* SIM I/O is considered active for certain period of time after
|
||||
* the last request has completed. That's because SIM_IO requests
|
||||
* are usually submitted in large quantities and quick succession.
|
||||
@@ -693,6 +710,7 @@ gboolean
|
||||
binder_sim_card_sim_io_idle_cb(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = THIS(user_data);
|
||||
|
||||
if (++(self->sim_io_idle_count) >= SIM_IO_IDLE_LOOPS) {
|
||||
@@ -713,6 +731,7 @@ binder_sim_card_status_changed(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sim_card_get_status(THIS(user_data));
|
||||
}
|
||||
|
||||
@@ -725,6 +744,7 @@ binder_sim_card_new(
|
||||
RadioClient* client,
|
||||
guint slot)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = g_object_new(THIS_TYPE, NULL);
|
||||
BinderSimCard *card = &self->card;
|
||||
|
||||
@@ -760,6 +780,7 @@ BinderSimCard*
|
||||
binder_sim_card_ref(
|
||||
BinderSimCard* card)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(card)) {
|
||||
g_object_ref(THIS(card));
|
||||
}
|
||||
@@ -770,6 +791,7 @@ void
|
||||
binder_sim_card_unref(
|
||||
BinderSimCard* card)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(card)) {
|
||||
g_object_unref(THIS(card));
|
||||
}
|
||||
@@ -779,6 +801,7 @@ void
|
||||
binder_sim_card_reset(
|
||||
BinderSimCard* card)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(card)) {
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
BinderSimCardStatus* status = g_new0(BinderSimCardStatus, 1);
|
||||
@@ -796,6 +819,7 @@ void
|
||||
binder_sim_card_request_status(
|
||||
BinderSimCard* card)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(card)) {
|
||||
binder_sim_card_get_status(binder_sim_card_cast(card));
|
||||
}
|
||||
@@ -806,6 +830,7 @@ binder_sim_card_sim_io_started(
|
||||
BinderSimCard* card,
|
||||
gpointer key)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
|
||||
if (G_LIKELY(self) && G_LIKELY(key)) {
|
||||
@@ -824,6 +849,7 @@ binder_sim_card_sim_io_finished(
|
||||
BinderSimCard* card,
|
||||
gpointer key)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (G_LIKELY(card) && G_LIKELY(key)) {
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
|
||||
@@ -845,6 +871,7 @@ gboolean
|
||||
binder_sim_card_ready(
|
||||
BinderSimCard* card)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return card && card->app &&
|
||||
((card->app->app_state == RADIO_APP_STATE_READY) ||
|
||||
(card->app->app_state == RADIO_APP_STATE_SUBSCRIPTION_PERSO &&
|
||||
@@ -857,6 +884,7 @@ binder_sim_card_add_status_received_handler(
|
||||
BinderSimCardFunc fn,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
|
||||
return (G_LIKELY(self) && G_LIKELY(fn)) ? g_signal_connect(self,
|
||||
@@ -869,6 +897,7 @@ binder_sim_card_add_status_changed_handler(
|
||||
BinderSimCardFunc fn,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
|
||||
return (G_LIKELY(self) && G_LIKELY(fn)) ? g_signal_connect(self,
|
||||
@@ -881,6 +910,7 @@ binder_sim_card_add_state_changed_handler(
|
||||
BinderSimCardFunc fn,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
|
||||
return (G_LIKELY(self) && G_LIKELY(fn)) ? g_signal_connect(self,
|
||||
@@ -893,6 +923,7 @@ binder_sim_card_add_app_changed_handler(
|
||||
BinderSimCardFunc fn,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
|
||||
return (G_LIKELY(self) && G_LIKELY(fn)) ? g_signal_connect(self,
|
||||
@@ -905,6 +936,7 @@ binder_sim_card_add_sim_io_active_changed_handler(
|
||||
BinderSimCardFunc fn,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
|
||||
return (G_LIKELY(self) && G_LIKELY(fn)) ? g_signal_connect(self,
|
||||
@@ -916,6 +948,7 @@ binder_sim_card_remove_handler(
|
||||
BinderSimCard* card,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = binder_sim_card_cast(card);
|
||||
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
@@ -929,6 +962,7 @@ binder_sim_card_remove_handlers(
|
||||
gulong* ids,
|
||||
int n)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_disconnect_handlers(binder_sim_card_cast(card), ids, n);
|
||||
}
|
||||
|
||||
@@ -941,6 +975,7 @@ void
|
||||
binder_sim_card_init(
|
||||
BinderSimCardObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
self->sim_io_pending = g_hash_table_new(g_direct_hash, g_direct_equal);
|
||||
}
|
||||
|
||||
@@ -949,6 +984,7 @@ void
|
||||
binder_sim_card_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimCardObject* self = THIS(object);
|
||||
BinderSimCard* card = &self->card;
|
||||
|
||||
@@ -977,6 +1013,7 @@ void
|
||||
binder_sim_card_class_init(
|
||||
BinderSimCardObjectClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_sim_card_finalize;
|
||||
NEW_SIGNAL_(klass,STATUS_RECEIVED);
|
||||
NEW_SIGNAL(klass,STATUS);
|
||||
|
||||
@@ -51,6 +51,7 @@ BinderSimSettingsObject*
|
||||
binder_sim_settings_cast(
|
||||
BinderSimSettings* settings)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return G_LIKELY(settings) ?
|
||||
THIS(G_CAST(settings, BinderSimSettingsObject, pub)) :
|
||||
NULL;
|
||||
@@ -62,6 +63,7 @@ binder_sim_settings_imsi_changed(
|
||||
struct ofono_watch* watch,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettingsObject* self = THIS(user_data);
|
||||
|
||||
if (g_strcmp0(self->imsi, watch->imsi)) {
|
||||
@@ -83,6 +85,7 @@ binder_sim_settings_new(
|
||||
const char* path,
|
||||
enum ofono_radio_access_mode techs)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettings* settings = NULL;
|
||||
|
||||
if (G_LIKELY(path)) {
|
||||
@@ -104,6 +107,7 @@ BinderSimSettings*
|
||||
binder_sim_settings_ref(
|
||||
BinderSimSettings* settings)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettingsObject* self = binder_sim_settings_cast(settings);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -116,6 +120,7 @@ void
|
||||
binder_sim_settings_unref(
|
||||
BinderSimSettings* settings)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettingsObject* self = binder_sim_settings_cast(settings);
|
||||
|
||||
if (G_LIKELY(self)) {
|
||||
@@ -128,6 +133,7 @@ binder_sim_settings_set_pref(
|
||||
BinderSimSettings* settings,
|
||||
enum ofono_radio_access_mode pref)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettingsObject* self = binder_sim_settings_cast(settings);
|
||||
|
||||
if (G_LIKELY(self) && settings->pref != pref) {
|
||||
@@ -144,6 +150,7 @@ binder_sim_settings_add_property_handler(
|
||||
BinderSimSettingsPropertyFunc callback,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettingsObject* self = binder_sim_settings_cast(settings);
|
||||
|
||||
return G_LIKELY(self) ? binder_base_add_property_handler(&self->base,
|
||||
@@ -155,6 +162,7 @@ binder_sim_settings_remove_handler(
|
||||
BinderSimSettings* settings,
|
||||
gulong id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettingsObject* self = binder_sim_settings_cast(settings);
|
||||
|
||||
if (G_LIKELY(self) && G_LIKELY(id)) {
|
||||
@@ -168,6 +176,7 @@ binder_sim_settings_remove_handlers(
|
||||
gulong* ids,
|
||||
int count)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_disconnect_handlers(binder_sim_settings_cast(settings), ids, count);
|
||||
}
|
||||
|
||||
@@ -180,6 +189,7 @@ void
|
||||
binder_sim_settings_object_init(
|
||||
BinderSimSettingsObject* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
static
|
||||
@@ -187,6 +197,7 @@ void
|
||||
binder_sim_settings_object_finalize(
|
||||
GObject* object)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSimSettingsObject* self = THIS(object);
|
||||
|
||||
ofono_watch_remove_all_handlers(self->watch, self->watch_event_id);
|
||||
@@ -200,6 +211,7 @@ void
|
||||
binder_sim_settings_object_class_init(
|
||||
BinderSimSettingsObjectClass* klass)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
G_OBJECT_CLASS(klass)->finalize = binder_sim_settings_object_finalize;
|
||||
BINDER_BASE_CLASS(klass)->public_offset =
|
||||
G_STRUCT_OFFSET(BinderSimSettingsObject, pub);
|
||||
|
||||
@@ -145,6 +145,7 @@ binder_sms_cbd_new(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsCbData* cbd = g_slice_new0(BinderSmsCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -158,6 +159,7 @@ void
|
||||
binder_sms_cbd_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderSmsCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -171,6 +173,7 @@ binder_sms_submit_cbd_new(
|
||||
ofono_sms_submit_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsSubmitCbData* cbd = g_slice_new0(BinderSmsSubmitCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -187,6 +190,7 @@ void
|
||||
binder_sms_submit_cbd_free(
|
||||
gpointer data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsSubmitCbData* cbd = data;
|
||||
|
||||
g_free(cbd->pdu);
|
||||
@@ -199,6 +203,7 @@ binder_sms_sim_read_data_new(
|
||||
BinderSms* self,
|
||||
int rec)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsSimReadData* rd = g_slice_new0(BinderSmsSimReadData);
|
||||
|
||||
rd->self = self;
|
||||
@@ -211,6 +216,7 @@ void
|
||||
binder_sms_sim_read_data_free(
|
||||
BinderSmsSimReadData* rd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_slice_free(rd);
|
||||
}
|
||||
|
||||
@@ -224,6 +230,7 @@ binder_sms_sca_set_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsCbData* cbd = user_data;
|
||||
ofono_sms_sca_set_cb_t cb = cbd->cb.sca_set;
|
||||
struct ofono_error err;
|
||||
@@ -256,6 +263,7 @@ binder_sms_sca_set(
|
||||
ofono_sms_sca_set_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSms* self = binder_sms_get_data(sms);
|
||||
char* tmp = NULL;
|
||||
GBinderWriter writer;
|
||||
@@ -297,6 +305,7 @@ binder_sms_sca_query_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsCbData* cbd = user_data;
|
||||
BinderSms* self = cbd->self;
|
||||
ofono_sms_sca_query_cb_t cb = cbd->cb.sca_query;
|
||||
@@ -354,6 +363,7 @@ binder_sms_sca_query(
|
||||
ofono_sms_sca_query_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSms* self = binder_sms_get_data(sms);
|
||||
guint32 code = self->interface_aidl == RADIO_MESSAGING_INTERFACE ?
|
||||
RADIO_MESSAGING_REQ_GET_SMSC_ADDRESS :
|
||||
@@ -376,6 +386,7 @@ gboolean
|
||||
binder_sms_can_send_ims_message(
|
||||
BinderSms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return self->ims_reg && self->ims_reg->registered &&
|
||||
(self->ims_reg->caps & OFONO_IMS_SMS_CAPABLE);
|
||||
}
|
||||
@@ -385,6 +396,7 @@ gboolean
|
||||
binder_sms_can_send_ext_message(
|
||||
BinderSms* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return self->sms_ext && (!(binder_ext_sms_get_interface_flags
|
||||
(self->sms_ext) & BINDER_EXT_SMS_INTERFACE_FLAG_IMS_REQUIRED) ||
|
||||
binder_sms_can_send_ims_message(self));
|
||||
@@ -400,6 +412,7 @@ binder_sms_submit_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsSubmitCbData* cbd = user_data;
|
||||
BinderSms* self = cbd->self;
|
||||
ofono_sms_submit_cb_t cb = cbd->cb;
|
||||
@@ -468,18 +481,19 @@ binder_sms_submit_cb(
|
||||
(RADIO_MESSAGING_RESP)resp == RADIO_MESSAGING_RESP_SEND_IMS_SMS) {
|
||||
if (error == RADIO_ERROR_NONE) {
|
||||
GBinderReader reader;
|
||||
gint32 message_ref;
|
||||
char* ack_pdu = NULL;
|
||||
gint32 error_code;
|
||||
|
||||
gbinder_reader_copy(&reader, args);
|
||||
|
||||
if (binder_read_parcelable_size(&reader)) {
|
||||
gint32 message_ref;
|
||||
char* ack_pdu = NULL;
|
||||
gint32 error_code;
|
||||
|
||||
gbinder_reader_read_int32(&reader, &message_ref);
|
||||
ack_pdu = gbinder_reader_read_string16(&reader);
|
||||
gbinder_reader_read_int32(&reader, &error_code);
|
||||
DBG("%ssms msg ref: %d, ack: %s err: %d", ims ? "ims " : "",
|
||||
message_ref, ack_pdu, error_code);
|
||||
message_ref, ack_pdu, error_code);
|
||||
g_free(ack_pdu);
|
||||
|
||||
/*
|
||||
@@ -495,7 +509,6 @@ binder_sms_submit_cb(
|
||||
return;
|
||||
}
|
||||
}
|
||||
g_free(ack_pdu);
|
||||
} else {
|
||||
ofono_error("%ssms send error %s", ims ? "ims " : "",
|
||||
binder_radio_error_string(error));
|
||||
@@ -522,6 +535,7 @@ binder_sms_submit_ext_cb(
|
||||
guint msg_ref,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsSubmitCbData* cbd = user_data;
|
||||
BinderSms* self = cbd->self;
|
||||
struct ofono_error err;
|
||||
@@ -568,6 +582,7 @@ binder_sms_gsm_message(
|
||||
int tpdu_len,
|
||||
const GBinderParent* parent)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* SMSC address:
|
||||
*
|
||||
@@ -609,6 +624,7 @@ binder_sms_ims_message(
|
||||
int pdu_len,
|
||||
int tpdu_len)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioImsSmsMessage* ims = gbinder_writer_new0(writer, RadioImsSmsMessage);
|
||||
RadioGsmSmsMessage* gsm = gbinder_writer_new0(writer, RadioGsmSmsMessage);
|
||||
GBinderParent p;
|
||||
@@ -635,6 +651,7 @@ binder_sms_gsm_message_aidl(
|
||||
int pdu_len,
|
||||
int tpdu_len)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* SMSC address:
|
||||
*
|
||||
@@ -675,6 +692,7 @@ binder_sms_ims_message_aidl(
|
||||
int pdu_len,
|
||||
int tpdu_len)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gint32 initial_size;
|
||||
/* Non-null parcelable */
|
||||
gbinder_writer_append_int32(writer, 1);
|
||||
@@ -710,6 +728,7 @@ binder_sms_send(
|
||||
ofono_sms_submit_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsSubmitCbData* cbd = NULL;
|
||||
struct ofono_error err;
|
||||
|
||||
@@ -811,6 +830,7 @@ binder_sms_submit(
|
||||
ofono_sms_submit_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_sms_send(binder_sms_get_data(sms), pdu, pdu_len, tpdu_len,
|
||||
expect_more ? BINDER_SMS_SEND_FLAG_EXPECT_MORE :
|
||||
BINDER_SMS_SEND_FLAGS_NONE, cb, data);
|
||||
@@ -826,6 +846,7 @@ binder_sms_ack_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSms* self = user_data;
|
||||
if (status == RADIO_TX_STATUS_OK) {
|
||||
guint32 code = self->interface_aidl == RADIO_MESSAGING_INTERFACE ?
|
||||
@@ -851,6 +872,7 @@ binder_sms_ack(
|
||||
BinderSms* self,
|
||||
gboolean ok)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderWriter writer;
|
||||
guint32 code = self->interface_aidl == RADIO_MESSAGING_INTERFACE ?
|
||||
RADIO_MESSAGING_REQ_ACKNOWLEDGE_LAST_INCOMING_GSM_SMS :
|
||||
@@ -883,6 +905,7 @@ binder_sms_incoming(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSms* self = user_data;
|
||||
GBinderReader reader;
|
||||
const guint8* pdu;
|
||||
@@ -962,6 +985,7 @@ binder_sms_notify(
|
||||
int len,
|
||||
int tpdu_len))
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (pdu_len > 0) {
|
||||
const guint smsc_len = (guint)pdu[0] + 1;
|
||||
|
||||
@@ -985,6 +1009,7 @@ binder_sms_ext_incoming(
|
||||
guint pdu_len,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_info("incoming %ssms, %u bytes", SMS_TYPE_STR(ext), pdu_len);
|
||||
if (binder_sms_notify((BinderSms*) user_data, pdu, pdu_len,
|
||||
ofono_sms_deliver_notify)) {
|
||||
@@ -1004,6 +1029,7 @@ binder_sms_ext_status_report(
|
||||
guint msg_ref,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_info("incoming %ssms report, %u bytes", SMS_TYPE_STR(ext), pdu_len);
|
||||
if (binder_sms_notify((BinderSms*) user_data, pdu, pdu_len,
|
||||
ofono_sms_status_notify)) {
|
||||
@@ -1024,6 +1050,7 @@ binder_sms_delete_on_sim_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSms* self = user_data;
|
||||
if (status == RADIO_TX_STATUS_OK) {
|
||||
guint32 code = self->interface_aidl == RADIO_MESSAGING_INTERFACE ?
|
||||
@@ -1054,6 +1081,7 @@ binder_sms_on_sim_cb(
|
||||
int length,
|
||||
void* userdata)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSmsSimReadData* cbd = userdata;
|
||||
BinderSms* self = cbd->self;
|
||||
|
||||
@@ -1113,6 +1141,7 @@ binder_sms_on_sim(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSms* self = user_data;
|
||||
GBinderReader reader;
|
||||
gint32 rec;
|
||||
@@ -1138,6 +1167,7 @@ static
|
||||
gboolean binder_sms_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSms* self = user_data;
|
||||
RadioClient* client = self->g->client;
|
||||
|
||||
@@ -1190,6 +1220,7 @@ binder_sms_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderSms* self = g_new0(BinderSms, 1);
|
||||
|
||||
@@ -1220,6 +1251,7 @@ void
|
||||
binder_sms_remove(
|
||||
struct ofono_sms* sms)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderSms* self = binder_sms_get_data(sms);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -1265,12 +1297,14 @@ static const struct ofono_sms_driver binder_sms_driver = {
|
||||
void
|
||||
binder_sms_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_sms_driver_register(&binder_sms_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_sms_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_sms_driver_unregister(&binder_sms_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ binder_stk_cbd_new(
|
||||
BinderCallback cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStkCbData* cbd = g_slice_new0(BinderStkCbData);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -82,6 +83,7 @@ void
|
||||
binder_stk_cbd_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderStkCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -93,6 +95,7 @@ static void binder_stk_envelope_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStkCbData* cbd = user_data;
|
||||
ofono_stk_envelope_cb_t cb = cbd->cb.envelope;
|
||||
struct ofono_error err;
|
||||
@@ -126,6 +129,7 @@ binder_stk_envelope(
|
||||
ofono_stk_envelope_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = binder_stk_get_data(stk);
|
||||
char* hex = binder_encode_hex(cmd, length);
|
||||
GBinderWriter writer;
|
||||
@@ -162,6 +166,7 @@ binder_stk_terminal_response_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStkCbData* cbd = user_data;
|
||||
ofono_stk_generic_cb_t cb = cbd->cb.generic;
|
||||
struct ofono_error err;
|
||||
@@ -196,6 +201,7 @@ binder_stk_terminal_response(
|
||||
ofono_stk_generic_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = binder_stk_get_data(stk);
|
||||
char* hex = binder_encode_hex(resp, length);
|
||||
GBinderWriter writer;
|
||||
@@ -226,6 +232,7 @@ binder_stk_user_confirmation(
|
||||
struct ofono_stk* stk,
|
||||
ofono_bool_t confirm)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = binder_stk_get_data(stk);
|
||||
GBinderWriter writer;
|
||||
guint32 code =
|
||||
@@ -252,6 +259,7 @@ binder_stk_proactive_command(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = user_data;
|
||||
GBinderReader reader;
|
||||
char* pcmd;
|
||||
@@ -292,6 +300,7 @@ binder_stk_event_notify(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = user_data;
|
||||
GBinderReader reader;
|
||||
char* pcmd;
|
||||
@@ -332,6 +341,7 @@ binder_stk_session_end_notify(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = user_data;
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -344,6 +354,7 @@ void
|
||||
binder_stk_agent_ready(
|
||||
struct ofono_stk* stk)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = binder_stk_get_data(stk);
|
||||
RadioClient* client = self->g->client;
|
||||
|
||||
@@ -402,6 +413,7 @@ static
|
||||
gboolean binder_stk_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = user_data;
|
||||
|
||||
DBG("");
|
||||
@@ -420,6 +432,7 @@ binder_stk_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderStk* self = g_new0(BinderStk, 1);
|
||||
|
||||
@@ -440,6 +453,7 @@ void
|
||||
binder_stk_remove(
|
||||
struct ofono_stk* stk)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderStk* self = binder_stk_get_data(stk);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -476,12 +490,14 @@ static const struct ofono_stk_driver binder_stk_driver = {
|
||||
void
|
||||
binder_stk_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_stk_driver_register(&binder_stk_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_stk_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_stk_driver_unregister(&binder_stk_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ binder_ussd_cbd_new(
|
||||
ofono_ussd_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderUssdCbData* cbd = g_slice_new(struct binder_ussd_cbd);
|
||||
|
||||
cbd->self = self;
|
||||
@@ -76,6 +77,7 @@ void
|
||||
binder_ussd_cbd_free(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderUssdCbData, cbd);
|
||||
}
|
||||
|
||||
@@ -89,6 +91,7 @@ binder_ussd_cancel_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderUssdCbData* cbd = user_data;
|
||||
BinderUssd* self = cbd->self;
|
||||
struct ofono_error err;
|
||||
@@ -130,6 +133,7 @@ binder_ussd_send_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderUssdCbData* cbd = user_data;
|
||||
BinderUssd* self = cbd->self;
|
||||
struct ofono_error err;
|
||||
@@ -168,6 +172,7 @@ binder_ussd_request(
|
||||
ofono_ussd_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderUssd* self = binder_ussd_get_data(ussd);
|
||||
char* text = ofono_ussd_decode(dcs, pdu, len);
|
||||
struct ofono_error err;
|
||||
@@ -217,6 +222,7 @@ binder_ussd_cancel(
|
||||
ofono_ussd_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderUssd* self = binder_ussd_get_data(ussd);
|
||||
|
||||
ofono_info("sending ussd cancel");
|
||||
@@ -249,6 +255,7 @@ binder_ussd_notify(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderUssd* self = user_data;
|
||||
GBinderReader reader;
|
||||
gint32 type = 0;
|
||||
@@ -305,6 +312,7 @@ gboolean
|
||||
binder_ussd_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderUssd* self = user_data;
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -332,6 +340,7 @@ binder_ussd_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderUssd* self = g_new0(BinderUssd, 1);
|
||||
|
||||
@@ -351,6 +360,7 @@ void
|
||||
binder_ussd_remove(
|
||||
struct ofono_ussd* ussd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderUssd* self = binder_ussd_get_data(ussd);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -385,12 +395,14 @@ static const struct ofono_ussd_driver binder_ussd_driver = {
|
||||
void
|
||||
binder_ussd_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_ussd_driver_register(&binder_ussd_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_ussd_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_ussd_driver_unregister(&binder_ussd_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include "binder_util.h"
|
||||
#include "binder_log.h"
|
||||
|
||||
#include <ofono/misc.h>
|
||||
#include <ofono/netreg.h>
|
||||
@@ -47,6 +48,7 @@ const char*
|
||||
binder_pool_string(
|
||||
char* str)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GUtilIdlePool* pool = gutil_idle_pool_get(&binder_util_pool);
|
||||
|
||||
gutil_idle_pool_add(pool, str, g_free);
|
||||
@@ -57,6 +59,7 @@ RADIO_ACCESS_NETWORK
|
||||
binder_radio_access_network_for_tech(
|
||||
RADIO_TECH tech)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (tech) {
|
||||
case RADIO_TECH_GPRS:
|
||||
case RADIO_TECH_EDGE:
|
||||
@@ -95,6 +98,7 @@ binder_radio_apn_types_for_profile(
|
||||
guint profile_id,
|
||||
const BinderDataProfileConfig* config)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RADIO_APN_TYPES apn_types = RADIO_APN_TYPE_NONE;
|
||||
|
||||
if (profile_id == config->mms_profile_id) {
|
||||
@@ -138,6 +142,7 @@ RADIO_PDP_PROTOCOL_TYPE
|
||||
binder_proto_from_ofono_proto(
|
||||
enum ofono_gprs_proto proto)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (proto) {
|
||||
case OFONO_GPRS_PROTO_IP:
|
||||
return RADIO_PDP_PROTOCOL_IP;
|
||||
@@ -153,6 +158,7 @@ const char*
|
||||
binder_proto_str_from_ofono_proto(
|
||||
enum ofono_gprs_proto proto)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (proto) {
|
||||
case OFONO_GPRS_PROTO_IP:
|
||||
return PROTO_IP_STR;
|
||||
@@ -168,6 +174,7 @@ enum ofono_gprs_proto
|
||||
binder_ofono_proto_from_proto_type(
|
||||
RADIO_PDP_PROTOCOL_TYPE type)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (type) {
|
||||
case RADIO_PDP_PROTOCOL_IP:
|
||||
return OFONO_GPRS_PROTO_IP;
|
||||
@@ -189,6 +196,7 @@ enum ofono_gprs_proto
|
||||
binder_ofono_proto_from_proto_str(
|
||||
const char* type)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (type) {
|
||||
if (!g_ascii_strcasecmp(type, PROTO_IP_STR)) {
|
||||
return OFONO_GPRS_PROTO_IP;
|
||||
@@ -206,6 +214,7 @@ RADIO_APN_AUTH_TYPE
|
||||
binder_radio_auth_from_ofono_method(
|
||||
enum ofono_gprs_auth_method auth)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (auth) {
|
||||
case OFONO_GPRS_AUTH_METHOD_NONE:
|
||||
return RADIO_APN_AUTH_NONE;
|
||||
@@ -225,6 +234,7 @@ RADIO_PREF_NET_TYPE
|
||||
binder_pref_from_raf(
|
||||
RADIO_ACCESS_FAMILY raf)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (raf & RADIO_ACCESS_FAMILY_GSM) {
|
||||
if (raf & RADIO_ACCESS_FAMILY_UMTS) {
|
||||
if (raf & RADIO_ACCESS_FAMILY_LTE) {
|
||||
@@ -266,6 +276,7 @@ binder_pref_mask(
|
||||
int lte_mask,
|
||||
int nr_mask)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (pref) {
|
||||
case RADIO_PREF_NET_GSM_ONLY:
|
||||
return gsm_mask;
|
||||
@@ -333,6 +344,7 @@ RADIO_ACCESS_FAMILY
|
||||
binder_raf_from_pref(
|
||||
RADIO_PREF_NET_TYPE pref)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_pref_mask(pref, RAF_NONE,
|
||||
RADIO_ACCESS_FAMILY_GSM, RADIO_ACCESS_FAMILY_UMTS,
|
||||
RADIO_ACCESS_FAMILY_LTE, RADIO_ACCESS_FAMILY_NR);
|
||||
@@ -342,6 +354,7 @@ enum ofono_radio_access_mode
|
||||
binder_access_modes_from_pref(
|
||||
RADIO_PREF_NET_TYPE pref)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_pref_mask(pref, OFONO_RADIO_ACCESS_MODE_NONE,
|
||||
OFONO_RADIO_ACCESS_MODE_GSM, OFONO_RADIO_ACCESS_MODE_UMTS,
|
||||
OFONO_RADIO_ACCESS_MODE_LTE, OFONO_RADIO_ACCESS_MODE_NR);
|
||||
@@ -352,6 +365,7 @@ binder_access_modes_from_raf(
|
||||
RADIO_ACCESS_FAMILY raf)
|
||||
{
|
||||
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (raf == RAF_UNKNOWN) {
|
||||
return OFONO_RADIO_ACCESS_MODE_ALL;
|
||||
} else {
|
||||
@@ -377,6 +391,7 @@ enum ofono_radio_access_mode
|
||||
binder_access_modes_up_to(
|
||||
enum ofono_radio_access_mode mode)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Make sure only one bit is set in max_mode */
|
||||
enum ofono_radio_access_mode max_mode = ofono_radio_access_max_mode(mode);
|
||||
|
||||
@@ -389,6 +404,7 @@ enum ofono_access_technology
|
||||
binder_access_tech_from_radio_tech(
|
||||
RADIO_TECH radio_tech)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (radio_tech) {
|
||||
case RADIO_TECH_UNKNOWN:
|
||||
return OFONO_ACCESS_TECHNOLOGY_NONE;
|
||||
@@ -431,6 +447,7 @@ const char*
|
||||
binder_ofono_access_technology_string(
|
||||
enum ofono_access_technology act)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (act) {
|
||||
case OFONO_ACCESS_TECHNOLOGY_NONE:
|
||||
return "none";
|
||||
@@ -464,6 +481,7 @@ const char*
|
||||
binder_radio_op_status_string(
|
||||
RADIO_OP_STATUS status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (status) {
|
||||
case RADIO_OP_AVAILABLE:
|
||||
return "available";
|
||||
@@ -481,6 +499,7 @@ const char*
|
||||
binder_radio_state_string(
|
||||
RADIO_STATE state)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
#define RADIO_STATE_(name) case RADIO_STATE_##name: return #name
|
||||
switch (state) {
|
||||
RADIO_STATE_(OFF);
|
||||
@@ -494,6 +513,7 @@ const char*
|
||||
binder_radio_error_string(
|
||||
RADIO_ERROR error)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (error) {
|
||||
#define RADIO_ERROR_STR_(name) case RADIO_ERROR_##name: return #name
|
||||
RADIO_ERROR_STR_(NONE);
|
||||
@@ -590,6 +610,7 @@ binder_parse_tech(
|
||||
const char* stech,
|
||||
RADIO_TECH* radio_tech)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
int rt = RADIO_TECH_UNKNOWN;
|
||||
const enum ofono_access_technology at = gutil_parse_int(stech, 0, &rt) ?
|
||||
binder_access_tech_from_radio_tech(rt) : OFONO_ACCESS_TECHNOLOGY_NONE;
|
||||
@@ -605,6 +626,7 @@ binder_parse_mcc_mnc(
|
||||
const char* str,
|
||||
struct ofono_network_operator* op)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (str) {
|
||||
int i;
|
||||
const char* ptr = str;
|
||||
@@ -652,6 +674,7 @@ binder_encode_hex(
|
||||
const void* in,
|
||||
guint size)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
char *out = g_new(char, size * 2 + 1);
|
||||
|
||||
ofono_encode_hex(in, size, out);
|
||||
@@ -664,6 +687,7 @@ binder_decode_hex(
|
||||
int len,
|
||||
guint* out_size)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
void* out = NULL;
|
||||
guint size = 0;
|
||||
|
||||
@@ -692,6 +716,7 @@ binder_print_strv(
|
||||
char** strv,
|
||||
const char* sep)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!strv) {
|
||||
return NULL;
|
||||
} else if (!strv[0]) {
|
||||
@@ -710,6 +735,7 @@ binder_print_hex(
|
||||
const void* data,
|
||||
gsize size)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (data && size) {
|
||||
const guint8* bytes = data;
|
||||
GUtilIdlePool* pool = gutil_idle_pool_get(&binder_util_pool);
|
||||
@@ -736,6 +762,7 @@ binder_submit_request(
|
||||
RadioRequestGroup* g,
|
||||
RADIO_REQ code)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioRequest* req = radio_request_new2(g, code, NULL, NULL, NULL, NULL);
|
||||
gboolean ok = radio_request_submit(req);
|
||||
|
||||
@@ -751,6 +778,7 @@ binder_submit_request2(
|
||||
GDestroyNotify destroy,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioRequest* req = radio_request_new2(g, code, NULL, complete, destroy,
|
||||
user_data);
|
||||
gboolean ok = radio_request_submit(req);
|
||||
@@ -763,6 +791,7 @@ const char*
|
||||
binder_read_hidl_string(
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderReader reader;
|
||||
|
||||
/* Read a single string arg */
|
||||
@@ -774,6 +803,7 @@ char*
|
||||
binder_read_string16(
|
||||
const GBinderReader* args)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderReader reader;
|
||||
|
||||
/* Read a single string arg */
|
||||
@@ -786,6 +816,7 @@ binder_read_int32(
|
||||
const GBinderReader* args,
|
||||
gint32* value)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderReader reader;
|
||||
|
||||
/* Read a single int32 arg */
|
||||
@@ -798,6 +829,7 @@ binder_read_hidl_struct1(
|
||||
const GBinderReader* args,
|
||||
gsize size)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderReader reader;
|
||||
|
||||
/* Read a single struct */
|
||||
@@ -810,6 +842,7 @@ binder_read_parcelable(
|
||||
const GBinderReader* args,
|
||||
gsize* out_size)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderReader reader;
|
||||
|
||||
/* Read a single AIDL parcelable */
|
||||
@@ -821,6 +854,7 @@ gsize
|
||||
binder_read_parcelable_size(
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Read a single AIDL parcelable header and return inner data size */
|
||||
guint32 non_null = 0, payload_size = 0;
|
||||
if (gbinder_reader_read_uint32(reader, &non_null) && non_null &&
|
||||
@@ -836,6 +870,7 @@ char**
|
||||
binder_strv_from_hidl_string_vec(
|
||||
const GBinderHidlVec* vec)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (vec) {
|
||||
const GBinderHidlString* strings = vec->data.ptr;
|
||||
char** out = g_new(char*, vec->count + 1);
|
||||
@@ -858,6 +893,7 @@ binder_read_string16_parse_int(
|
||||
GBinderReader* reader,
|
||||
gint32* value)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Read a string and parse integer value from it */
|
||||
gboolean ret = FALSE;
|
||||
char* str = gbinder_reader_read_string16(reader);
|
||||
@@ -872,6 +908,7 @@ char**
|
||||
binder_strv_from_string16_array(
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (reader) {
|
||||
gint32 count;
|
||||
gbinder_reader_read_int32(reader, &count);
|
||||
@@ -901,6 +938,7 @@ binder_append_vec_with_data(
|
||||
guint count,
|
||||
const GBinderParent* parent)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderHidlVec* vec = gbinder_writer_new0(writer, GBinderHidlVec);
|
||||
GBinderParent p;
|
||||
|
||||
@@ -923,6 +961,7 @@ binder_copy_hidl_string_impl(
|
||||
const char* src,
|
||||
gssize len)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
dest->owns_buffer = TRUE;
|
||||
if (len > 0) {
|
||||
/* GBinderWriter takes ownership of the string contents */
|
||||
@@ -941,6 +980,7 @@ binder_copy_hidl_string(
|
||||
GBinderHidlString* dest,
|
||||
const char* src)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_copy_hidl_string_impl(writer, dest, src, src ? strlen(src) : 0);
|
||||
}
|
||||
|
||||
@@ -951,6 +991,7 @@ binder_copy_hidl_string_len(
|
||||
const char* src,
|
||||
gssize len)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_copy_hidl_string_impl(writer, dest, src, (src && len < 0) ?
|
||||
strlen(src) : 0);
|
||||
}
|
||||
@@ -962,6 +1003,7 @@ binder_append_hidl_string_with_parent(
|
||||
guint32 index,
|
||||
guint32 offset)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderParent parent;
|
||||
|
||||
parent.index = index;
|
||||
|
||||
@@ -133,6 +133,7 @@ binder_voicecall_cbd_new(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCallCbData* req = g_slice_new0(BinderVoiceCallCbData);
|
||||
|
||||
req->ref_count = 1;
|
||||
@@ -147,6 +148,7 @@ void
|
||||
binder_voicecall_cbd_unref(
|
||||
BinderVoiceCallCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!--cbd->ref_count) {
|
||||
gutil_slice_free(cbd);
|
||||
}
|
||||
@@ -157,6 +159,7 @@ void
|
||||
binder_voicecall_clear_dtmf_queue(
|
||||
BinderVoiceCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
gutil_ring_clear(self->dtmf_queue);
|
||||
if (self->ext_send_dtmf_id) {
|
||||
binder_ext_call_cancel(self->ext, self->ext_send_dtmf_id);
|
||||
@@ -173,6 +176,7 @@ enum ofono_call_mode
|
||||
binder_voicecall_ext_call_state_to_ofono(
|
||||
BINDER_EXT_CALL_STATE state)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (state) {
|
||||
case BINDER_EXT_CALL_STATE_INVALID:
|
||||
break;
|
||||
@@ -199,6 +203,7 @@ binder_voicecall_ofono_call_equal(
|
||||
const struct ofono_call* c1,
|
||||
const struct ofono_call* c2)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return c1->id == c2->id &&
|
||||
c1->type == c2->type &&
|
||||
c1->direction == c2->direction &&
|
||||
@@ -217,6 +222,7 @@ binder_voicecall_info_compare(
|
||||
gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const guint ca = ((const BinderVoiceCallInfo*)a)->oc.id;
|
||||
const guint cb = ((const BinderVoiceCallInfo*)b)->oc.id;
|
||||
|
||||
@@ -228,6 +234,7 @@ void
|
||||
binder_voicecall_info_free(
|
||||
gpointer data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
g_slice_free(BinderVoiceCallInfo, data);
|
||||
}
|
||||
|
||||
@@ -236,6 +243,7 @@ BinderVoiceCallInfo*
|
||||
binder_voicecall_info_new(
|
||||
const RadioCall* rc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCallInfo* call = g_slice_new0(BinderVoiceCallInfo);
|
||||
struct ofono_call* oc = &call->oc;
|
||||
|
||||
@@ -272,6 +280,7 @@ BinderVoiceCallInfo*
|
||||
binder_voicecall_info_new_aidl(
|
||||
GBinderReader* reader)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCallInfo* call = g_slice_new0(BinderVoiceCallInfo);
|
||||
struct ofono_call* oc = &call->oc;
|
||||
gboolean is_mt;
|
||||
@@ -337,6 +346,7 @@ binder_voicecall_info_ext_new(
|
||||
const BinderExtCallInfo* ci,
|
||||
BinderExtCall* ext)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCallInfo* call = g_slice_new0(BinderVoiceCallInfo);
|
||||
struct ofono_call* oc = &call->oc;
|
||||
|
||||
@@ -375,6 +385,7 @@ binder_voicecall_list_find_call_link_with_id(
|
||||
GSList* list,
|
||||
guint call_id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l;
|
||||
|
||||
/*
|
||||
@@ -398,6 +409,7 @@ binder_voicecall_merge_ext_calls(
|
||||
GSList* list,
|
||||
gboolean keep_ext)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l;
|
||||
|
||||
/*
|
||||
@@ -424,6 +436,7 @@ gboolean
|
||||
binder_voicecall_have_ext_call(
|
||||
BinderVoiceCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->ext) {
|
||||
GSList* l;
|
||||
|
||||
@@ -444,6 +457,7 @@ binder_voicecall_find_call_with_status(
|
||||
BinderVoiceCall* self,
|
||||
enum ofono_call_status status)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l;
|
||||
|
||||
/*
|
||||
@@ -466,6 +480,7 @@ binder_voicecall_find_call_link_with_id(
|
||||
BinderVoiceCall* self,
|
||||
guint call_id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return binder_voicecall_list_find_call_link_with_id(self->calls, call_id);
|
||||
}
|
||||
|
||||
@@ -475,6 +490,7 @@ binder_voicecall_find_call_with_id(
|
||||
BinderVoiceCall* self,
|
||||
unsigned int call_id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l = binder_voicecall_find_call_link_with_id(self, call_id);
|
||||
|
||||
return l ? l->data : NULL;
|
||||
@@ -486,6 +502,7 @@ binder_voicecall_status_with_id(
|
||||
BinderVoiceCall* self,
|
||||
unsigned int call_id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
const BinderVoiceCallInfo* call =
|
||||
binder_voicecall_find_call_with_id(self, call_id);
|
||||
|
||||
@@ -499,6 +516,7 @@ binder_voicecall_remove_call_id(
|
||||
BinderVoiceCall* self,
|
||||
guint call_id)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GSList* l = binder_voicecall_find_call_link_with_id(self, call_id);
|
||||
|
||||
if (l) {
|
||||
@@ -515,6 +533,7 @@ binder_voicecall_map_cause(
|
||||
guint cid,
|
||||
RADIO_LAST_CALL_FAIL_CAUSE last_cause)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (gutil_ints_contains(self->remote_hangup_reasons, last_cause)) {
|
||||
DBG_(self, "hangup cause %d => remote hangup", last_cause);
|
||||
return OFONO_DISCONNECT_REASON_REMOTE_HANGUP;
|
||||
@@ -583,6 +602,7 @@ binder_voicecall_lastcause_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCallLastCauseData* data = user_data;
|
||||
BinderVoiceCall* self = data->self;
|
||||
struct ofono_voicecall* vc = self->vc;
|
||||
@@ -596,8 +616,11 @@ binder_voicecall_lastcause_cb(
|
||||
|
||||
if (resp == code) {
|
||||
GBinderReader reader;
|
||||
const RadioLastCallFailCauseInfo* info;
|
||||
gint32 cause_code;
|
||||
/*
|
||||
* Cause code 0 is invalid and can be used to check if code was
|
||||
* obtained.
|
||||
*/
|
||||
gint32 cause_code = 0;
|
||||
|
||||
/*
|
||||
* getLastCallFailCauseResponse(RadioResponseInfo,
|
||||
@@ -605,14 +628,17 @@ binder_voicecall_lastcause_cb(
|
||||
*/
|
||||
gbinder_reader_copy(&reader, args);
|
||||
if (self->interface_aidl == RADIO_AIDL_INTERFACE_NONE) {
|
||||
info = gbinder_reader_read_hidl_struct(&reader,
|
||||
RadioLastCallFailCauseInfo);
|
||||
cause_code = info->causeCode;
|
||||
const RadioLastCallFailCauseInfo* info =
|
||||
gbinder_reader_read_hidl_struct(&reader,
|
||||
RadioLastCallFailCauseInfo);
|
||||
if (info) {
|
||||
cause_code = info->causeCode;
|
||||
}
|
||||
} else {
|
||||
gbinder_reader_read_int32(&reader, &cause_code);
|
||||
gbinder_reader_skip_string16(&reader);
|
||||
}
|
||||
if (info) {
|
||||
if (cause_code) {
|
||||
enum ofono_disconnect_reason reason =
|
||||
binder_voicecall_map_cause(self, cid, cause_code);
|
||||
|
||||
@@ -641,6 +667,7 @@ binder_voicecall_set_calls(
|
||||
BinderVoiceCall* self,
|
||||
GSList* list)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
struct ofono_voicecall* vc = self->vc;
|
||||
GSList* n = list;
|
||||
GSList* o = self->calls;
|
||||
@@ -719,6 +746,7 @@ binder_voicecall_clcc_poll_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
GSList* list = NULL;
|
||||
|
||||
@@ -803,6 +831,7 @@ binder_voicecall_clcc_retry(
|
||||
const GBinderReader* args,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (status == RADIO_TX_STATUS_OK) {
|
||||
switch (error) {
|
||||
case RADIO_ERROR_NONE:
|
||||
@@ -820,6 +849,7 @@ void
|
||||
binder_voicecall_clcc_poll(
|
||||
BinderVoiceCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!self->clcc_poll_req) {
|
||||
/* getCurrentCalls(int32 serial); */
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
@@ -844,6 +874,7 @@ void
|
||||
binder_voicecall_cbd_destroy(
|
||||
gpointer cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_voicecall_cbd_unref((BinderVoiceCallCbData*) cbd);
|
||||
}
|
||||
|
||||
@@ -852,6 +883,7 @@ void
|
||||
binder_voicecall_request_submitted(
|
||||
BinderVoiceCallCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
cbd->ref_count++;
|
||||
cbd->pending_call_count++;
|
||||
}
|
||||
@@ -862,6 +894,7 @@ binder_voicecall_request_completed(
|
||||
BinderVoiceCallCbData* cbd,
|
||||
gboolean ok)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/*
|
||||
* The ofono API call is considered successful if at least one
|
||||
* associated request succeeds.
|
||||
@@ -898,6 +931,7 @@ binder_voicecall_cbd_complete(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCallCbData* data = user_data;
|
||||
|
||||
binder_voicecall_clcc_poll(data->self);
|
||||
@@ -912,6 +946,7 @@ binder_voicecall_cbd_ext_complete(
|
||||
BINDER_EXT_CALL_RESULT result,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCallCbData* data = user_data;
|
||||
|
||||
data->self->ext_req_id = 0;
|
||||
@@ -926,6 +961,7 @@ binder_voicecall_request_submit(
|
||||
RADIO_REQ code,
|
||||
BinderVoiceCallCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
RadioRequest* req = radio_request_new2(self->g, code, NULL,
|
||||
binder_voicecall_cbd_complete,
|
||||
binder_voicecall_cbd_destroy, cbd);
|
||||
@@ -947,6 +983,7 @@ binder_voicecall_dial_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
|
||||
if (status == RADIO_TX_STATUS_OK) {
|
||||
@@ -994,6 +1031,7 @@ binder_voicecall_ext_dial_cb(
|
||||
BINDER_EXT_CALL_RESULT result,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
|
||||
self->ext_req_id = 0;
|
||||
@@ -1017,6 +1055,7 @@ gboolean
|
||||
binder_voicecall_can_ext_dial(
|
||||
BinderVoiceCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
return self->ext && (!(binder_ext_call_get_interface_flags
|
||||
(self->ext) & BINDER_EXT_CALL_INTERFACE_FLAG_IMS_REQUIRED) ||
|
||||
(self->ims_reg && self->ims_reg->registered &&
|
||||
@@ -1028,6 +1067,7 @@ BINDER_EXT_CALL_CLIR
|
||||
binder_voicecall_ext_clir(
|
||||
enum ofono_clir_option clir)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (clir) {
|
||||
case OFONO_CLIR_OPTION_INVOCATION:
|
||||
return BINDER_EXT_CALL_CLIR_INVOCATION;
|
||||
@@ -1048,6 +1088,7 @@ binder_voicecall_dial(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
char phbuf[OFONO_PHONE_NUMBER_BUFFER_SIZE];
|
||||
const char* phstr = ofono_phone_number_to_string(ph, phbuf);
|
||||
@@ -1130,6 +1171,7 @@ binder_voicecall_submit_hangup_req(
|
||||
int cid,
|
||||
BinderVoiceCallCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
RadioRequest* req;
|
||||
const BinderVoiceCallInfo* call =
|
||||
@@ -1177,6 +1219,7 @@ BINDER_EXT_CALL_DISCONNECT_REASON
|
||||
binder_voicecall_ext_disconnect_reason(
|
||||
const BinderVoiceCallInfo* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (call->oc.status) {
|
||||
case OFONO_CALL_STATUS_INCOMING:
|
||||
case OFONO_CALL_STATUS_WAITING:
|
||||
@@ -1196,6 +1239,7 @@ gboolean
|
||||
binder_voicecall_hangup_filter_active(
|
||||
const BinderVoiceCallInfo* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (call->oc.status) {
|
||||
case OFONO_CALL_STATUS_ACTIVE:
|
||||
case OFONO_CALL_STATUS_DIALING:
|
||||
@@ -1215,6 +1259,7 @@ gboolean
|
||||
binder_voicecall_hangup_filter_incoming_waiting(
|
||||
const BinderVoiceCallInfo* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (call->oc.status) {
|
||||
case OFONO_CALL_STATUS_INCOMING:
|
||||
case OFONO_CALL_STATUS_WAITING:
|
||||
@@ -1234,6 +1279,7 @@ gboolean
|
||||
binder_voicecall_hangup_filter_held(
|
||||
const BinderVoiceCallInfo* call)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
switch (call->oc.status) {
|
||||
case OFONO_CALL_STATUS_WAITING:
|
||||
case OFONO_CALL_STATUS_HELD:
|
||||
@@ -1256,6 +1302,7 @@ binder_voicecall_hangup(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
BinderVoiceCallCbData* cbd = NULL;
|
||||
GSList* l;
|
||||
@@ -1311,6 +1358,7 @@ binder_voicecall_hangup_active(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_voicecall_hangup(vc,
|
||||
binder_voicecall_hangup_filter_active, cb, data);
|
||||
}
|
||||
@@ -1322,6 +1370,7 @@ binder_voicecall_hangup_all(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
binder_voicecall_hangup(vc, NULL, cb, data);
|
||||
}
|
||||
|
||||
@@ -1333,6 +1382,7 @@ binder_voicecall_release_specific(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
BinderVoiceCallCbData* cbd = binder_voicecall_cbd_new(self, cb, data);
|
||||
const BinderVoiceCallInfo* call =
|
||||
@@ -1371,6 +1421,7 @@ binder_voicecall_call_state_changed_event(
|
||||
const GBinderReader* args,
|
||||
gpointer self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
/* Just need to request the call list again */
|
||||
binder_voicecall_clcc_poll((BinderVoiceCall*) self);
|
||||
}
|
||||
@@ -1382,6 +1433,7 @@ binder_voicecall_ext_supp_svc_notification(
|
||||
const BinderExtCallSuppSvcNotify* ssn,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
|
||||
if (ssn->mt) {
|
||||
@@ -1414,6 +1466,7 @@ binder_voicecall_supp_svc_notification(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
const RadioSuppSvcNotification* ssn;
|
||||
GBinderReader reader;
|
||||
@@ -1485,6 +1538,7 @@ binder_voicecall_ext_answer(
|
||||
BinderVoiceCall* self,
|
||||
BinderVoiceCallCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->ext) {
|
||||
binder_ext_call_cancel(self->ext, self->ext_req_id);
|
||||
self->ext_req_id = binder_ext_call_answer(self->ext, ANSWER_FLAGS,
|
||||
@@ -1505,6 +1559,7 @@ binder_voicecall_answer(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
BinderVoiceCallCbData* cbd = binder_voicecall_cbd_new(self, cb, data);
|
||||
const BinderVoiceCallInfo* call =
|
||||
@@ -1538,6 +1593,7 @@ binder_voicecall_send_dtmf_cb(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
|
||||
GASSERT(self->send_dtmf_req == req);
|
||||
@@ -1570,6 +1626,7 @@ binder_voicecall_send_dtmf_ext_cb(
|
||||
BINDER_EXT_CALL_RESULT result,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
|
||||
self->ext_send_dtmf_id = 0;
|
||||
@@ -1587,6 +1644,7 @@ void
|
||||
binder_voicecall_send_one_dtmf(
|
||||
BinderVoiceCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (!self->send_dtmf_req &&
|
||||
!self->ext_send_dtmf_id &&
|
||||
gutil_ring_size(self->dtmf_queue) > 0) {
|
||||
@@ -1633,6 +1691,7 @@ binder_voicecall_send_dtmf(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
struct ofono_error err;
|
||||
|
||||
@@ -1656,6 +1715,7 @@ binder_voicecall_ext_conference(
|
||||
BinderVoiceCall* self,
|
||||
BinderVoiceCallCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->ext) {
|
||||
binder_ext_call_cancel(self->ext, self->ext_req_id);
|
||||
self->ext_req_id = binder_ext_call_conference(self->ext,
|
||||
@@ -1677,6 +1737,7 @@ binder_voicecall_create_multiparty(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
BinderVoiceCallCbData* cbd = binder_voicecall_cbd_new(self, cb, data);
|
||||
const guint32 req = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
@@ -1701,6 +1762,7 @@ binder_voicecall_ext_transfer(
|
||||
BinderVoiceCall* self,
|
||||
BinderVoiceCallCbData* cbd)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->ext) {
|
||||
binder_ext_call_cancel(self->ext, self->ext_req_id);
|
||||
self->ext_req_id = binder_ext_call_transfer(self->ext,
|
||||
@@ -1722,6 +1784,7 @@ binder_voicecall_transfer(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
BinderVoiceCallCbData* cbd = binder_voicecall_cbd_new(self, cb, data);
|
||||
const guint32 req = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
@@ -1749,6 +1812,7 @@ binder_voicecall_private_chat(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
BinderVoiceCallCbData* cbd = binder_voicecall_cbd_new(self, cb, data);
|
||||
|
||||
@@ -1776,6 +1840,7 @@ binder_voicecall_ext_swap(
|
||||
BinderVoiceCallCbData* cbd,
|
||||
BINDER_EXT_CALL_SWAP_FLAGS swap_flags)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
if (self->ext) {
|
||||
binder_ext_call_cancel(self->ext, self->ext_req_id);
|
||||
self->ext_req_id = binder_ext_call_swap(self->ext, swap_flags,
|
||||
@@ -1798,6 +1863,7 @@ binder_voicecall_swap_with_fallback(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
BinderVoiceCallCbData* cbd = binder_voicecall_cbd_new(self, cb, data);
|
||||
|
||||
@@ -1821,6 +1887,7 @@ binder_voicecall_swap_without_accept(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE :
|
||||
@@ -1836,6 +1903,7 @@ binder_voicecall_hold_all_active(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE :
|
||||
@@ -1851,6 +1919,7 @@ binder_voicecall_release_all_active(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
RADIO_VOICE_REQ_HANGUP_FOREGROUND_RESUME_BACKGROUND :
|
||||
@@ -1869,6 +1938,7 @@ binder_voicecall_hangup_with_fallback(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
BinderVoiceCallCbData* cbd = binder_voicecall_cbd_new(self, cb, data);
|
||||
|
||||
@@ -1923,6 +1993,7 @@ binder_voicecall_release_all_held(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG__(vc, "");
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
@@ -1941,6 +2012,7 @@ binder_voicecall_set_udub(
|
||||
ofono_voicecall_cb_t cb,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
DBG__(vc, "");
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
guint32 code = self->interface_aidl == RADIO_VOICE_INTERFACE ?
|
||||
@@ -1956,6 +2028,7 @@ void
|
||||
binder_voicecall_enable_supp_svc(
|
||||
BinderVoiceCall* self)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
GBinderWriter writer;
|
||||
const RADIO_AIDL_INTERFACE iface_aidl =
|
||||
radio_client_aidl_interface(self->network_client);
|
||||
@@ -1982,6 +2055,7 @@ binder_voicecall_ringback_tone_event(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
GBinderReader reader;
|
||||
gboolean start;
|
||||
@@ -2002,6 +2076,7 @@ binder_voicecall_ecclist_changed(
|
||||
const GBinderReader* args,
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
GBinderReader reader;
|
||||
|
||||
@@ -2064,6 +2139,7 @@ binder_voicecall_ext_calls_changed(
|
||||
BinderExtCall* ext,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
const BinderExtCallInfo* const* calls = binder_ext_call_get_calls(ext);
|
||||
const BinderExtCallInfo* const* ptr = calls;
|
||||
@@ -2094,6 +2170,7 @@ binder_voicecall_ext_call_disconnected(
|
||||
BINDER_EXT_CALL_DISCONNECT_REASON reason,
|
||||
void* user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
|
||||
if (binder_voicecall_find_call_link_with_id(self, call_id)) {
|
||||
@@ -2117,6 +2194,7 @@ void
|
||||
binder_voicecall_register(
|
||||
gpointer user_data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = user_data;
|
||||
RadioClient* client = self->g->client;
|
||||
|
||||
@@ -2203,6 +2281,7 @@ binder_voicecall_probe(
|
||||
unsigned int vendor,
|
||||
void* data)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderModem* modem = binder_modem_get_data(data);
|
||||
BinderVoiceCall* self = g_new0(BinderVoiceCall, 1);
|
||||
const BinderSlotConfig* cfg = &modem->config;
|
||||
@@ -2240,6 +2319,7 @@ void
|
||||
binder_voicecall_remove(
|
||||
struct ofono_voicecall* vc)
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
BinderVoiceCall* self = binder_voicecall_get_data(vc);
|
||||
|
||||
DBG_(self, "");
|
||||
@@ -2302,12 +2382,14 @@ static const struct ofono_voicecall_driver binder_voicecall_driver = {
|
||||
void
|
||||
binder_voicecall_init()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_voicecall_driver_register(&binder_voicecall_driver);
|
||||
}
|
||||
|
||||
void
|
||||
binder_voicecall_cleanup()
|
||||
{
|
||||
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
|
||||
ofono_voicecall_driver_unregister(&binder_voicecall_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,12 +16,15 @@ endif
|
||||
SRC ?= $(EXE).c
|
||||
# COMMON_SRC += test_main.c
|
||||
|
||||
# Allow building against an oFono variant.
|
||||
OFONO_PKG ?= ofono
|
||||
|
||||
#
|
||||
# Required packages
|
||||
#
|
||||
|
||||
LINK_PKGS += libglibutil glib-2.0 gobject-2.0
|
||||
PKGS += $(LINK_PKGS) libgbinder libgbinder-radio
|
||||
PKGS += $(OFONO_PKG) $(LINK_PKGS) libgbinder libgbinder-radio
|
||||
|
||||
#
|
||||
# Default target
|
||||
|
||||
Reference in New Issue
Block a user