#ifndef _BLE_CLIENT_H
#define _BLE_CLIENT_H


#define MAX_SERVICE_NUM              5
#define MAX_CHARACTERISTIC_NUM       10

typedef enum {
    STA_IDLE,
    STA_W4_ENCRYPTED_CONNECTION,
    STA_W4_SERVICE_RESULT,
    STA_W4_CHARACTERISTIC_RESULT,
    STA_W4_DATA_SOURCE_SUBSCRIBED,
    STA_W4_NOTIFICATION_SOURCE_SUBSCRIBED,
    STA_SUBSCRIBED,
    STA_W4_DISCONNECT
} client_state_t;

typedef struct {
    gatt_client_service_t  service[MAX_SERVICE_NUM];
    gatt_client_characteristic_t characteristic[MAX_CHARACTERISTIC_NUM];
    uint8_t service_cnt;
    uint8_t characteristic_cnt;
    uint8_t service_index;
    uint8_t characteristic_index;
    uint16_t conn_handle;
} server_info_t;

void ble_client_init(void);
void ble_init_register(void);
void ble_client_user_process(void);
#endif // _BLE_CLIENT_H
