summaryrefslogtreecommitdiffstats
path: root/src/plugins/afb
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/afb')
-rw-r--r--src/plugins/afb/AFBApiImpl.cpp8
-rw-r--r--src/plugins/afb/AFBApiImpl.h6
-rw-r--r--src/plugins/afb/AFBRequestImpl.cpp6
-rw-r--r--src/plugins/afb/AFBRequestImpl.h6
-rw-r--r--src/plugins/afb/include/AFBEventImpl.h6
-rw-r--r--src/plugins/afb/src/AFBEventImpl.cpp8
6 files changed, 20 insertions, 20 deletions
diff --git a/src/plugins/afb/AFBApiImpl.cpp b/src/plugins/afb/AFBApiImpl.cpp
index 443a412..aab2ce6 100644
--- a/src/plugins/afb/AFBApiImpl.cpp
+++ b/src/plugins/afb/AFBApiImpl.cpp
@@ -21,7 +21,7 @@
extern "C" {
#define AFB_BINDING_VERSION 3
-#include "afb-definitions.h"
+#include <afb/afb-binding.h>
}
static std::string TAG = "vshlcapabilities::afb::AFBApiImpl";
@@ -36,11 +36,11 @@ using namespace vshlcapabilities::utilities::logging;
namespace vshlcapabilities {
namespace afb {
-std::unique_ptr<AFBApiImpl> AFBApiImpl::create(AFB_ApiT api) {
+std::unique_ptr<AFBApiImpl> AFBApiImpl::create(afb_api_t api) {
return std::unique_ptr<AFBApiImpl>(new AFBApiImpl(api));
}
-AFBApiImpl::AFBApiImpl(AFB_ApiT api) : mApi(api), mLogger(Logger::create(api)) {
+AFBApiImpl::AFBApiImpl(afb_api_t api) : mApi(api), mLogger(Logger::create(api)) {
}
AFBApiImpl::~AFBApiImpl() {
@@ -59,7 +59,7 @@ int AFBApiImpl::callSync(
std::string& info) {
char* errorStr = NULL;
char* infoStr = NULL;
- int rc = AFB_ApiSync(mApi, api.c_str(), verb.c_str(), request, result, &errorStr, &infoStr);
+ int rc = afb_api_call_sync(mApi, api.c_str(), verb.c_str(), request, result, &errorStr, &infoStr);
if (errorStr) {
error = errorStr;
diff --git a/src/plugins/afb/AFBApiImpl.h b/src/plugins/afb/AFBApiImpl.h
index a8d8e08..70da627 100644
--- a/src/plugins/afb/AFBApiImpl.h
+++ b/src/plugins/afb/AFBApiImpl.h
@@ -31,7 +31,7 @@ namespace afb {
class AFBApiImpl : public vshlcapabilities::common::interfaces::IAFBApi {
public:
- static std::unique_ptr<AFBApiImpl> create(AFB_ApiT api);
+ static std::unique_ptr<AFBApiImpl> create(afb_api_t api);
~AFBApiImpl();
@@ -46,10 +46,10 @@ public:
std::string& info) override;
private:
- AFBApiImpl(AFB_ApiT api);
+ AFBApiImpl(afb_api_t api);
// AFB API Binding
- AFB_ApiT mApi;
+ afb_api_t mApi;
// Logger
std::shared_ptr<vshlcapabilities::common::interfaces::ILogger> mLogger;
diff --git a/src/plugins/afb/AFBRequestImpl.cpp b/src/plugins/afb/AFBRequestImpl.cpp
index 3e20172..db897d3 100644
--- a/src/plugins/afb/AFBRequestImpl.cpp
+++ b/src/plugins/afb/AFBRequestImpl.cpp
@@ -16,17 +16,17 @@
#include "afb/AFBRequestImpl.h"
extern "C" {
-#include "afb-definitions.h"
+#include <afb/afb-binding.h>
}
namespace vshlcapabilities {
namespace afb {
-std::unique_ptr<AFBRequestImpl> AFBRequestImpl::create(AFB_ReqT afbRequest) {
+std::unique_ptr<AFBRequestImpl> AFBRequestImpl::create(afb_req_t afbRequest) {
return std::unique_ptr<AFBRequestImpl>(new AFBRequestImpl(afbRequest));
}
-AFBRequestImpl::AFBRequestImpl(AFB_ReqT afbRequest) : mAfbRequest(afbRequest) {
+AFBRequestImpl::AFBRequestImpl(afb_req_t afbRequest) : mAfbRequest(afbRequest) {
}
void* AFBRequestImpl::getNativeRequest() {
diff --git a/src/plugins/afb/AFBRequestImpl.h b/src/plugins/afb/AFBRequestImpl.h
index c155f31..ac8f31f 100644
--- a/src/plugins/afb/AFBRequestImpl.h
+++ b/src/plugins/afb/AFBRequestImpl.h
@@ -31,16 +31,16 @@ namespace afb {
*/
class AFBRequestImpl : public vshlcapabilities::common::interfaces::IAFBRequest {
public:
- static std::unique_ptr<AFBRequestImpl> create(AFB_ReqT afbRequest);
+ static std::unique_ptr<AFBRequestImpl> create(afb_req_t afbRequest);
// {@c IAFBRequest Implementation
void *getNativeRequest() override;
// @c IAFBRequest Implementation }
private:
- AFBRequestImpl(AFB_ReqT afbRequest);
+ AFBRequestImpl(afb_req_t afbRequest);
- AFB_ReqT mAfbRequest;
+ afb_req_t mAfbRequest;
};
} // namespace afb
diff --git a/src/plugins/afb/include/AFBEventImpl.h b/src/plugins/afb/include/AFBEventImpl.h
index 2dda513..2d06dc9 100644
--- a/src/plugins/afb/include/AFBEventImpl.h
+++ b/src/plugins/afb/include/AFBEventImpl.h
@@ -36,7 +36,7 @@ namespace afb {
class AFBEventImpl : public vshlcapabilities::common::interfaces::IAFBApi::IAFBEvent {
public:
static unique_ptr<AFBEventImpl>
- create(shared_ptr<vshlcapabilities::common::interfaces::ILogger> logger, AFB_ApiT api,
+ create(shared_ptr<vshlcapabilities::common::interfaces::ILogger> logger, afb_api_t api,
const string &eventName);
// Destructor
@@ -52,14 +52,14 @@ public:
private:
AFBEventImpl(shared_ptr<vshlcapabilities::common::interfaces::ILogger> logger,
- AFB_ApiT api, const string &eventName);
+ afb_api_t api, const string &eventName);
// Make the event. This is a lazy make that happens
// usually during the subscribe stage.
void makeEventIfNeccessary();
// Binding API reference
- AFB_ApiT mAfbApi;
+ afb_api_t mAfbApi;
// AFB Event
afb_event_t mAfbEvent;
diff --git a/src/plugins/afb/src/AFBEventImpl.cpp b/src/plugins/afb/src/AFBEventImpl.cpp
index 7ddac36..86cbd4c 100644
--- a/src/plugins/afb/src/AFBEventImpl.cpp
+++ b/src/plugins/afb/src/AFBEventImpl.cpp
@@ -24,14 +24,14 @@ namespace afb {
unique_ptr<AFBEventImpl> AFBEventImpl::create(
shared_ptr<vshlcapabilities::common::interfaces::ILogger> logger,
- AFB_ApiT api,
+ afb_api_t api,
const string& eventName) {
return unique_ptr<AFBEventImpl>(new AFBEventImpl(logger, api, eventName));
}
AFBEventImpl::AFBEventImpl(
shared_ptr<vshlcapabilities::common::interfaces::ILogger> logger,
- AFB_ApiT api,
+ afb_api_t api,
const string& eventName) :
mLogger(logger),
mAfbApi(api),
@@ -53,7 +53,7 @@ bool AFBEventImpl::isValid() {
bool AFBEventImpl::subscribe(IAFBRequest& requestInterface) {
makeEventIfNeccessary();
- auto request = static_cast<AFB_ReqT>(requestInterface.getNativeRequest());
+ auto request = static_cast<afb_req_t>(requestInterface.getNativeRequest());
if (isValid() && afb_req_subscribe(request, mAfbEvent) == 0) {
return true;
}
@@ -63,7 +63,7 @@ bool AFBEventImpl::subscribe(IAFBRequest& requestInterface) {
bool AFBEventImpl::unsubscribe(IAFBRequest& requestInterface) {
makeEventIfNeccessary();
- auto request = static_cast<AFB_ReqT>(requestInterface.getNativeRequest());
+ auto request = static_cast<afb_req_t>(requestInterface.getNativeRequest());
if (isValid() && afb_req_unsubscribe(request, mAfbEvent) == 0) {
return true;
}