use grandfathered convention for class members names and initialise them

pull/9537/head
paul-szczepanek-arm 2019-02-05 14:35:05 +00:00
parent 3808db90b2
commit 1cea53b6a7
7 changed files with 20 additions and 12 deletions

View File

@ -112,7 +112,7 @@ public:
*/ */
void setEventHandler(EventHandler *handler) void setEventHandler(EventHandler *handler)
{ {
_eventHandler = handler; eventHandler = handler;
} }
/** /**
@ -795,7 +795,7 @@ public:
} }
protected: protected:
GattClient() GattClient() : eventHandler(NULL)
{ {
/* Empty */ /* Empty */
} }
@ -850,7 +850,7 @@ protected:
/** /**
* Event handler provided by the application. * Event handler provided by the application.
*/ */
EventHandler *_eventHandler; EventHandler *eventHandler;
/** /**
* Callchain containing all registered event handlers for data read * Callchain containing all registered event handlers for data read

View File

@ -116,7 +116,7 @@ public:
*/ */
void setEventHandler(EventHandler *handler) void setEventHandler(EventHandler *handler)
{ {
_eventHandler = handler; eventHandler = handler;
} }
/** /**
@ -198,6 +198,7 @@ protected:
GattServer() : GattServer() :
serviceCount(0), serviceCount(0),
characteristicCount(0), characteristicCount(0),
eventHandler(NULL),
dataSentCallChain(), dataSentCallChain(),
dataWrittenCallChain(), dataWrittenCallChain(),
dataReadCallChain(), dataReadCallChain(),
@ -813,7 +814,7 @@ protected:
/** /**
* Event handler provided by the application. * Event handler provided by the application.
*/ */
EventHandler *_eventHandler; EventHandler *eventHandler;
/** /**
* The total number of services added to the ATT table. * The total number of services added to the ATT table.

View File

@ -37,13 +37,16 @@ class GenericGattClient : public GattClient,
public pal::GattClient::EventHandler { public pal::GattClient::EventHandler {
public: public:
/**
* @see pal::GattClient::EventHandler::on_att_mtu_change
*/
virtual void on_att_mtu_change( virtual void on_att_mtu_change(
ble::connection_handle_t connection_handle, ble::connection_handle_t connection_handle,
uint16_t att_mtu_size uint16_t att_mtu_size
) )
{ {
if (_eventHandler) { if (eventHandler) {
_eventHandler->onAttMtuChange(connection_handle, att_mtu_size); eventHandler->onAttMtuChange(connection_handle, att_mtu_size);
} }
} }
@ -140,8 +143,12 @@ public:
*/ */
virtual void set_signing_event_handler(pal::SigningEventMonitor::EventHandler *signing_event_handler); virtual void set_signing_event_handler(pal::SigningEventMonitor::EventHandler *signing_event_handler);
/**
* Return the user registered event handler.
* @return User registered event handler or NULL if none is present.
*/
::GattClient::EventHandler* getEventHandler() { ::GattClient::EventHandler* getEventHandler() {
return _eventHandler; return eventHandler;
} }
private: private:

View File

@ -63,7 +63,7 @@ public:
static GattServer &getInstance(); static GattServer &getInstance();
::GattServer::EventHandler* getEventHandler() { ::GattServer::EventHandler* getEventHandler() {
return _eventHandler; return eventHandler;
} }
/** /**

View File

@ -42,7 +42,7 @@ public:
void hwCallback(ble_evt_t *p_ble_evt); void hwCallback(ble_evt_t *p_ble_evt);
EventHandler* getEventHandler() { EventHandler* getEventHandler() {
return _eventHandler; return eventHandler;
} }
private: private:

View File

@ -42,7 +42,7 @@ public:
void hwCallback(const ble_evt_t *p_ble_evt); void hwCallback(const ble_evt_t *p_ble_evt);
EventHandler* getEventHandler() { EventHandler* getEventHandler() {
return _eventHandler; return eventHandler;
} }
private: private:

View File

@ -42,7 +42,7 @@ public:
void hwCallback(const ble_evt_t *p_ble_evt); void hwCallback(const ble_evt_t *p_ble_evt);
EventHandler* getEventHandler() { EventHandler* getEventHandler() {
return _eventHandler; return eventHandler;
} }
private: private: