Cordio: Forward server related events to CordioGattServer

pull/6932/head
Vincent Coubard 2018-05-01 12:27:49 +01:00
parent 0f64b1c988
commit d0c4d7a8a3
2 changed files with 16 additions and 0 deletions

View File

@ -32,6 +32,16 @@
#define MAX_CCCD_CNT 20
namespace ble {
// fwd declaration of CordioAttClient and BLE
namespace pal {
namespace vendor {
namespace cordio {
class CordioAttClient;
}
}
}
namespace vendor {
namespace cordio {
@ -41,6 +51,8 @@ namespace cordio {
class GattServer : public ::GattServer,
public pal::SigningEventMonitor
{
friend ble::pal::vendor::cordio::CordioAttClient;
public:
/**
* Return the singleton of the Cordio implementation of ::GattServer.

View File

@ -17,6 +17,7 @@
#ifndef CORDIO_PAL_ATT_CLIENT_
#define CORDIO_PAL_ATT_CLIENT_
#include "CordioGattServer.h"
#include "ble/pal/AttClient.h"
#include "ble/pal/SimpleAttServerMessage.h"
#include "att_api.h"
@ -349,6 +350,9 @@ public:
return;
}
}
// pass events not handled to the server side
ble::vendor::cordio::GattServer::getInstance().att_cb(event);
}
private: