Compare commits

..

7 Commits
0.0.1 ... 1.0.3

Author SHA1 Message Date
Slava Monich
1ebf32bc73 Version 1.0.3 2019-03-05 02:59:50 +02:00
Slava Monich
a119a68374 [gbinder-radio] Added RADIO_APN_AUTH_TYPE enum. JB#44551 2019-03-05 02:56:47 +02:00
Slava Monich
1e7506e7ac Version 1.0.2 2019-02-22 00:14:31 +02:00
Slava Monich
bd20f5aabe [gbinder-radio] Optimize radio_instance_response()
... by using gbinder_reader_read_hidl_struct() instead of
gbinder_reader_read_buffer(). The former doesn't allocate
anything - it returns direct pointer to the memory block
associated with the transaction.
2019-02-22 00:14:00 +02:00
Slava Monich
42fc35fbc7 [gbinder-radio] Moved RadioResponseInfo to radio_types.h. JB#44551 2019-02-22 00:06:45 +02:00
Slava Monich
031228b3a8 Version 1.0.1 2019-01-30 00:06:19 +02:00
Slava Monich
bcb1963582 [gbinder-radio] Added more IRadio types. JB#44067
Specifically, RADIO_ACCESS_FAMILY and RadioActivityStatsInfo.
2019-01-29 23:59:15 +02:00
5 changed files with 58 additions and 24 deletions

View File

@@ -23,7 +23,7 @@ all: debug release pkgconfig
VERSION_MAJOR = 1
VERSION_MINOR = 0
VERSION_RELEASE = 0
VERSION_RELEASE = 3
# Version for pkg-config
PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
@@ -144,9 +144,6 @@ pkgconfig: $(PKGCONFIG)
clean:
rm -f *~ $(SRC_DIR)/*~ $(INCLUDE_DIR)/*~
rm -fr $(BUILD_DIR) RPMS installroot
rm -fr debian/tmp debian/libgbinder debian/libgbinder-dev
rm -f documentation.list debian/files debian/*.substvars
rm -f debian/*.debhelper.log debian/*.debhelper debian/*~
$(BUILD_DIR):
mkdir -p $@
@@ -199,18 +196,17 @@ $(PKGCONFIG): $(LIB_NAME).pc.in Makefile
# Install
#
INSTALL_PERM = 644
INSTALL = install
INSTALL_DIRS = $(INSTALL) -d
INSTALL_FILES = $(INSTALL) -m $(INSTALL_PERM)
INSTALL_LIBS = $(INSTALL) -m 755
INSTALL_FILES = $(INSTALL) -m 644
INSTALL_LIB_DIR = $(DESTDIR)/usr/lib
INSTALL_INCLUDE_DIR = $(DESTDIR)/usr/include/$(NAME)
INSTALL_PKGCONFIG_DIR = $(DESTDIR)/usr/lib/pkgconfig
install: $(INSTALL_LIB_DIR)
$(INSTALL_FILES) $(RELEASE_SO) $(INSTALL_LIB_DIR)
$(INSTALL_LIBS) $(RELEASE_SO) $(INSTALL_LIB_DIR)
ln -sf $(LIB_SO) $(INSTALL_LIB_DIR)/$(LIB_SYMLINK2)
ln -sf $(LIB_SYMLINK2) $(INSTALL_LIB_DIR)/$(LIB_SYMLINK1)

View File

@@ -54,12 +54,6 @@ struct radio_instance {
const char* key;
};
typedef struct radio_response_info {
RADIO_RESP_TYPE type;
guint32 serial;
guint32 error;
} RadioResponseInfo;
typedef
void
(*RadioInstanceFunc)(

View File

@@ -151,6 +151,38 @@ typedef enum radio_tech {
} RADIO_TECH;
G_STATIC_ASSERT(sizeof(RADIO_TECH) == 4);
typedef enum radio_access_family {
RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
RAF_GPRS = (1 << RADIO_TECH_GPRS),
RAF_EDGE = (1 << RADIO_TECH_EDGE),
RAF_UMTS = (1 << RADIO_TECH_UMTS),
RAF_IS95A = (1 << RADIO_TECH_IS95A),
RAF_IS95B = (1 << RADIO_TECH_IS95B),
RAF_ONE_X_RTT = (1 << RADIO_TECH_ONE_X_RTT),
RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
RAF_HSPA = (1 << RADIO_TECH_HSPA),
RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
RAF_LTE = (1 << RADIO_TECH_LTE),
RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
RAF_GSM = (1 << RADIO_TECH_GSM),
RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
RAF_IWLAN = (1 << RADIO_TECH_IWLAN),
RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
} RADIO_ACCESS_FAMILY;
G_STATIC_ASSERT(sizeof(RADIO_ACCESS_FAMILY) == 4);
typedef enum radio_apn_auth_type {
RADIO_APN_AUTH_NONE,
RADIO_APN_AUTH_PAP,
RADIO_APN_AUTH_CHAP,
RADIO_APN_AUTH_PAP_CHAP
} RADIO_APN_AUTH_TYPE;
G_STATIC_ASSERT(sizeof(RADIO_APN_AUTH_TYPE) == 4);
typedef enum radio_card_state {
RADIO_CARD_STATE_ABSENT,
RADIO_CARD_STATE_PRESENT,
@@ -234,6 +266,13 @@ typedef enum radio_capability_status {
} RADIO_CAPABILITY_STATUS;
G_STATIC_ASSERT(sizeof(RADIO_CAPABILITY_STATUS) == 4);
typedef struct radio_response_info {
RADIO_RESP_TYPE type RADIO_ALIGNED(4);
guint32 serial RADIO_ALIGNED(4);
guint32 error RADIO_ALIGNED(4);
} RadioResponseInfo;
G_STATIC_ASSERT(sizeof(RadioResponseInfo) == 12);
typedef struct radio_card_status {
RADIO_CARD_STATE cardState RADIO_ALIGNED(4);
RADIO_PIN_STATE universalPinState RADIO_ALIGNED(4);
@@ -306,7 +345,7 @@ typedef struct radio_data_profile {
GBinderHidlString apn RADIO_ALIGNED(8);
GBinderHidlString protocol RADIO_ALIGNED(8);
GBinderHidlString roamingProtocol RADIO_ALIGNED(8);
gint32 authType RADIO_ALIGNED(4);
RADIO_APN_AUTH_TYPE authType RADIO_ALIGNED(4);
GBinderHidlString user RADIO_ALIGNED(8);
GBinderHidlString password RADIO_ALIGNED(8);
gint32 type RADIO_ALIGNED(4);
@@ -336,7 +375,6 @@ typedef struct radio_data_call {
gint32 mtu RADIO_ALIGNED(4);
} RADIO_ALIGNED(8) RadioDataCall;
G_STATIC_ASSERT(sizeof(RadioDataCall) == 120);
#define DATA_CALL_VERSION (11)
#define DATA_CALL_VERSION (11)
@@ -613,6 +651,14 @@ typedef struct radio_lce_status_info {
} RADIO_ALIGNED(4) RadioLceStatusInfo;
G_STATIC_ASSERT(sizeof(RadioLceStatusInfo) == 8);
typedef struct radio_activity_stats_info {
guint32 sleepModeTimeMs RADIO_ALIGNED(4);
guint32 idleModeTimeMs RADIO_ALIGNED(4);
guint32 txmModetimeMs[5 /* NUM_TX_POWER_LEVELS */] RADIO_ALIGNED(4);
guint32 rxModeTimeMs RADIO_ALIGNED(4);
} RADIO_ALIGNED(4) RadioActivityStatsInfo;
G_STATIC_ASSERT(sizeof(RadioActivityStatsInfo) == 32);
/* c(req,resp,callName,CALL_NAME) */
#define RADIO_CALL_1_0(c) \
c(2,1,getIccCardStatus,GET_ICC_CARD_STATUS) \

View File

@@ -1,5 +1,5 @@
Name: libgbinder-radio
Version: 0.0.1
Version: 1.0.3
Release: 0
Summary: Binder client library for Android radio interfaces
Group: Development/Libraries
@@ -8,7 +8,8 @@ URL: https://github.com/mer-hybris/libgbinder-radio
Source: %{name}-%{version}.tar.bz2
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libglibutil)
BuildRequires: pkgconfig(libgbinder)
BuildRequires: pkgconfig(libgbinder) >= 1.0.9
Requires: libgbinder >= 1.0.9
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

View File

@@ -217,14 +217,12 @@ radio_instance_response(
} else {
/* All other responses have RadioResponseInfo */
GBinderReader reader;
GBinderBuffer* buf;
const RadioResponseInfo* info;
gbinder_remote_request_init_reader(req, &reader);
buf = gbinder_reader_read_buffer(&reader);
GASSERT(buf && buf->size == sizeof(RadioResponseInfo));
if (buf && buf->size == sizeof(RadioResponseInfo)) {
info = gbinder_reader_read_hidl_struct(&reader, RadioResponseInfo);
if (info) {
GQuark quark = radio_instance_resp_quark(self, code);
const RadioResponseInfo* info = buf->data;
gboolean handled = FALSE;
g_signal_emit(self,
@@ -238,7 +236,6 @@ radio_instance_response(
radio_instance_ack(self);
}
}
gbinder_buffer_free(buf);
}
*status = GBINDER_STATUS_OK;
} else {