Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
connect-paired.c File Reference
#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"

Functions

static void enabled (void *data, bool powered)
 
static void found_device (void *user_data, const struct sol_bt_device_info *device)
 
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 void shutdown (void)
 
 SOL_MAIN_DEFAULT (startup, shutdown)
 
static void startup (void)
 

Variables

static struct sol_network_link_addr paired_device_addr
 
static struct sol_bt_connpaired_device_conn
 
static struct sol_bt_scan_pendingscan
 
static struct sol_bt_sessionsession
 

Function Documentation

static void enabled ( void *  data,
bool  powered 
)
static
static void found_device ( void *  user_data,
const struct sol_bt_device_info device 
)
static
static bool on_connect ( void *  user_data,
struct sol_bt_conn conn 
)
static
static void on_disconnect ( void *  user_data,
struct sol_bt_conn conn 
)
static
static void on_error ( void *  user_data,
int  error 
)
static

References paired_device_conn.

Referenced by found_device().

static void shutdown ( void  )
static
SOL_MAIN_DEFAULT ( startup  ,
shutdown   
)
static void startup ( void  )
static

Variable Documentation

struct sol_network_link_addr paired_device_addr
static
struct sol_bt_conn* paired_device_conn
static
struct sol_bt_scan_pending* scan
static

Referenced by enabled(), found_device(), and shutdown().

struct sol_bt_session* session
static

Referenced by shutdown(), and startup().