#ifndef BLE_MGMT_H
#define BLE_MGMT_H

/**
 * @file ble_mgmt.h
 * @brief Bluetooth Low Energy management for provisioning and game communication.
 * This module handles Bluetooth initialization, advertising, and stopping advertising.
 */

/**
 * @brief Device types for LaserTag devices.
 */
#define LT_TYPE_LEADER  0x01
#define LT_TYPE_WEAPON  0x02
#define LT_TYPE_VEST    0x03
#define LT_TYPE_BEACON  0x04

/**
 * @brief Initialize Bluetooth and prepare services.
 * 
 * @param device_type The type of the device (e.g., leader, weapon, vest, beacon).
 * @return 0 on success.
 */
int ble_mgmt_init(uint8_t device_type);

/**
 * @brief Start Bluetooth advertising so the web app can find the device.
 * @return 0 on success.
 */
int ble_mgmt_adv_start(void);

/**
 * @brief Stop Bluetooth advertising.
 * @return 0 on success.
 */
int ble_mgmt_adv_stop(void);

#endif /* BLE_MGMT_H */