summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2016-03-11 14:24:41 -0600
committerDenis Kenzior <denkenz@gmail.com>2016-03-11 14:24:41 -0600
commitc7d9ff7e63f7d69934701a5c63a826feace63ded (patch)
tree34c25f5b4e32f92088bc07a2e97d92dd90eb88d4 /include
parent0c938417e93c52c829ecc24d9506ee844d7645d5 (diff)
downloadofono-c7d9ff7e63f7d69934701a5c63a826feace63ded.tar.gz
include: Add netmon.h
Diffstat (limited to 'include')
-rw-r--r--include/netmon.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/include/netmon.h b/include/netmon.h
new file mode 100644
index 00000000..89d4e071
--- /dev/null
+++ b/include/netmon.h
@@ -0,0 +1,85 @@
+/*
+ *
+ * oFono - Open Source Telephony
+ *
+ * Copyright (C) 2008-2016 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __OFONO_NETMON_H
+#define __OFONO_NETMON_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ofono/types.h>
+
+struct ofono_netmon;
+
+typedef void (*ofono_netmon_cb_t)(const struct ofono_error *error, void *data);
+
+struct ofono_netmon_driver {
+ const char *name;
+ int (*probe)(struct ofono_netmon *netmon, unsigned int vendor,
+ void *data);
+ void (*remove)(struct ofono_netmon *netmon);
+ void (*request_update)(struct ofono_netmon *netmon,
+ ofono_netmon_cb_t cb, void *data);
+};
+
+enum ofono_netmon_cell_type {
+ OFONO_NETMON_CELL_TYPE_GSM,
+ OFONO_NETMON_CELL_TYPE_UMTS,
+ OFONO_NETMON_CELL_TYPE_LTE,
+};
+
+enum ofono_netmon_info {
+ OFONO_NETMON_INFO_MCC, /* char *, up to 3 digits + null */
+ OFONO_NETMON_INFO_MNC, /* char *, up to 3 digits + null */
+ OFONO_NETMON_INFO_LAC, /* int */
+ OFONO_NETMON_INFO_CI, /* int */
+ OFONO_NETMON_INFO_ARFCN, /* int */
+ OFONO_NETMON_INFO_BSIC, /* int */
+ OFONO_NETMON_INFO_RXLEV, /* int */
+ OFONO_NETMON_INFO_BER, /* int */
+ OFONO_NETMON_INFO_RSSI, /* int */
+ OFONO_NETMON_INFO_TIMING_ADVANCE, /* int */
+ OFONO_NETMON_INFO_PSC, /* int */
+ OFONO_NETMON_INVALID,
+};
+
+/*
+ * Examples:
+ * ofono_netmon_serving_cell_notify(netmon, OFONO_NETMON_CELL_TYPE_GSM,
+ * OFONO_NETMON_INFO_MCC, "123",
+ * OFONO_NETMON_INFO_MNC, "456",
+ * OFONO_NETMON_INFO_LAC, lac,
+ * OFONO_NETMON_INFO_CI, ci,
+ * OFONO_NETMON_INFO_RSSI, rssi,
+ * OFONO_NETMON_INFO_RXLEV, rxlev,
+ * OFONO_NETMON_INVALID);
+ */
+void ofono_netmon_serving_cell_notify(struct ofono_netmon *netmon,
+ enum ofono_netmon_cell_type type,
+ int info_type, ...);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OFONO_NETMON_H */