forked from h2zero/esp-nimble-cpp
Fix comments for doxygen (#16)
* Fix comments for doxygen * Add documentation and update readme.
This commit is contained in:
+39
-16
@@ -54,7 +54,7 @@ public:
|
||||
uint16_t minInterval, uint16_t maxInterval,
|
||||
uint16_t latency, uint16_t timeout);
|
||||
uint16_t getPeerMTU(uint16_t conn_id);
|
||||
std::vector<uint16_t> getPeerDevices();
|
||||
// std::vector<uint16_t> getPeerDevices();
|
||||
void advertiseOnDisconnect(bool);
|
||||
|
||||
private:
|
||||
@@ -83,29 +83,52 @@ private:
|
||||
class NimBLEServerCallbacks {
|
||||
public:
|
||||
virtual ~NimBLEServerCallbacks() {};
|
||||
|
||||
/**
|
||||
* @brief Handle a new client connection.
|
||||
*
|
||||
* When a new client connects, we are invoked.
|
||||
*
|
||||
* @param [in] pServer A reference to the %BLE server that received the client connection.
|
||||
* @brief Handle a client connection.
|
||||
* This is called when a client connects.
|
||||
* @param [in] pServer A pointer to the %BLE server that received the client connection.
|
||||
*/
|
||||
virtual void onConnect(NimBLEServer* pServer);
|
||||
virtual void onConnect(NimBLEServer* pServer, ble_gap_conn_desc* desc);
|
||||
|
||||
/**
|
||||
* @brief Handle an existing client disconnection.
|
||||
*
|
||||
* When an existing client disconnects, we are invoked.
|
||||
*
|
||||
* @brief Handle a client connection.
|
||||
* This is called when a client connects.
|
||||
* @param [in] pServer A pointer to the %BLE server that received the client connection.
|
||||
* @param [in] desc A pointer to the connection description structure containig information
|
||||
* about the connection parameters.
|
||||
*/
|
||||
virtual void onConnect(NimBLEServer* pServer, ble_gap_conn_desc* desc);
|
||||
|
||||
/**
|
||||
* @brief Handle a client disconnection.
|
||||
* This is called when a client disconnects.
|
||||
* @param [in] pServer A reference to the %BLE server that received the existing client disconnection.
|
||||
*/
|
||||
virtual void onDisconnect(NimBLEServer* pServer);
|
||||
|
||||
virtual uint32_t onPassKeyRequest(); //{return 0;}
|
||||
virtual void onPassKeyNotify(uint32_t pass_key); //{}
|
||||
virtual bool onSecurityRequest(); //{return true;}
|
||||
virtual void onAuthenticationComplete(ble_gap_conn_desc* desc);//{};
|
||||
virtual bool onConfirmPIN(uint32_t pin);//{return true;}
|
||||
/**
|
||||
* @brief Called when a client requests a passkey for pairing.
|
||||
* @return The passkey to be sent to the client.
|
||||
*/
|
||||
virtual uint32_t onPassKeyRequest();
|
||||
|
||||
//virtual void onPassKeyNotify(uint32_t pass_key);
|
||||
//virtual bool onSecurityRequest();
|
||||
|
||||
/**
|
||||
* @brief Called when the pairing procedure is complete.
|
||||
* @param [in] desc A pointer to the struct containing the connection information.\n
|
||||
* This can be used to check the status of the connection encryption/pairing.
|
||||
*/
|
||||
virtual void onAuthenticationComplete(ble_gap_conn_desc* desc);
|
||||
|
||||
/**
|
||||
* @brief Called when using numeric comparision for pairing.
|
||||
* @param [in] pin The pin to compare with the client.
|
||||
* @return True to accept the pin.
|
||||
*/
|
||||
virtual bool onConfirmPIN(uint32_t pin);
|
||||
}; // NimBLEServerCallbacks
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user