Soletta™ Framework
|
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "soletta.h"
#include "sol-log.h"
#include "sol-mainloop.h"
#include "sol-bluetooth.h"
#include "sol-gatt.h"
Functions | |
static void | enabled (void *data, bool powered) |
static void | found_device (void *user_data, const struct sol_bt_device_info *device) |
static bool | notify_callback (void *user_data, const struct sol_gatt_attr *attr, const struct sol_buffer *buffer) |
static bool | on_connect (void *user_data, struct sol_bt_conn *conn) |
static void | on_disconnect (void *user_data, struct sol_bt_conn *conn) |
static void | on_error (void *user_data, int error) |
static bool | print_attr (void *user_data, struct sol_bt_conn *conn, const struct sol_gatt_attr *attr) |
static void | shutdown (void) |
SOL_MAIN_DEFAULT (startup, shutdown) | |
static void | startup (void) |
static bool | timeout_cb (void *data) |
Variables | |
static struct sol_network_link_addr | browse_addr |
static struct sol_bt_conn * | browse_conn |
static struct sol_bt_scan_pending * | scan |
static struct sol_bt_session * | session |
static struct sol_timeout * | timeout |
|
static |
References found_device(), scan, sol_bt_start_scan(), SOL_BT_TRANSPORT_ALL, SOL_INF, and SOL_NULL_CHECK.
Referenced by startup().
|
static |
References sol_bt_device_info::addr, browse_addr, sol_network_link_addr::family, sol_bt_device_info::in_range, scan, SOL_BLUETOOTH_ADDR_STRLEN, sol_bt_stop_scan(), SOL_BUFFER_DECLARE_STATIC, SOL_INF, SOL_NETWORK_FAMILY_UNSPEC, sol_network_link_addr_eq(), sol_network_link_addr_to_str(), SOL_NULL_CHECK, sol_timeout_add(), timeout, and timeout_cb().
Referenced by enabled().
|
static |
References SOL_INF, and sol_buffer::used.
Referenced by print_attr().
|
static |
References print_attr(), SOL_BLUETOOTH_ADDR_STRLEN, sol_bt_conn_get_addr(), SOL_BUFFER_DECLARE_STATIC, sol_gatt_discover(), SOL_INF, SOL_INT_CHECK, and sol_network_link_addr_to_str().
Referenced by timeout_cb().
|
static |
References browse_conn, SOL_BLUETOOTH_ADDR_STRLEN, sol_bt_conn_get_addr(), SOL_BUFFER_DECLARE_STATIC, SOL_INF, and sol_network_link_addr_to_str().
Referenced by timeout_cb().
|
static |
References browse_conn, and SOL_DBG.
Referenced by timeout_cb().
|
static |
References sol_buffer::data, sol_gatt_attr::flags, notify_callback(), sol_bt_uuid_to_str(), sol_buffer_fini(), SOL_BUFFER_INIT_EMPTY, SOL_GATT_ATTR_TYPE_CHARACTERISTIC, SOL_GATT_CHR_FLAGS_INDICATE, SOL_GATT_CHR_FLAGS_NOTIFY, sol_gatt_subscribe(), SOL_INF, SOL_INT_CHECK_GOTO, sol_gatt_attr::type, sol_buffer::used, and sol_gatt_attr::uuid.
Referenced by on_connect().
|
static |
References browse_conn, scan, session, sol_bt_conn_unref(), sol_bt_disable(), and sol_bt_stop_scan().
|
static |
References sol_network_link_addr::addr, browse_addr, enabled(), session, sol_argc(), sol_argv(), sol_bt_enable(), sol_network_link_addr_from_str(), SOL_NULL_CHECK, sol_quit_with_code(), and SOL_WRN.
|
static |
References browse_addr, browse_conn, on_connect(), on_disconnect(), on_error(), sol_bt_connect(), and SOL_NULL_CHECK.
Referenced by found_device().
|
static |
Referenced by found_device(), startup(), and timeout_cb().
|
static |
Referenced by on_disconnect(), on_error(), shutdown(), and timeout_cb().
|
static |
Referenced by enabled(), found_device(), and shutdown().
|
static |
Referenced by shutdown(), and startup().
|
static |