Friendly LWM2M client
WppBindings.cpp
Go to the documentation of this file.
1
#include "
WppBindings.h
"
2
#include <vector>
3
4
namespace
wpp
{
5
6
bool
wppBindingValidate
(
const
STRING_T
& binding) {
7
std::vector<STRING_T> supportedBuindings = {
WPP_BINDING_UDP
,
WPP_BINDING_TCP
,
WPP_BINDING_SMS
,
WPP_BINDING_NON_IP
};
8
for
(
auto
&item : binding) {
9
if
(std::find(supportedBuindings.begin(), supportedBuindings.end(),
STRING_T
(1, item)) == supportedBuindings.end())
return
false
;
10
}
11
return
true
;
12
}
13
14
}
// wpp
WppBindings.h
WPP_BINDING_TCP
#define WPP_BINDING_TCP
Definition:
WppBindings.h:7
WPP_BINDING_SMS
#define WPP_BINDING_SMS
Definition:
WppBindings.h:8
WPP_BINDING_UDP
#define WPP_BINDING_UDP
Definition:
WppBindings.h:6
WPP_BINDING_NON_IP
#define WPP_BINDING_NON_IP
Definition:
WppBindings.h:9
wpp
The WppConnection class represents a connection interface for the Wpp library.
Definition:
WppClient.cpp:14
wpp::wppBindingValidate
bool wppBindingValidate(const STRING_T &binding)
Definition:
WppBindings.cpp:6
wpp::STRING_T
std::string STRING_T
Definition:
WppTypes.h:45
wpp
utils
bindings
WppBindings.cpp
Generated by
1.9.1