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
#define WPP_BINDING_TCP
Definition: WppBindings.h:7
#define WPP_BINDING_SMS
Definition: WppBindings.h:8
#define WPP_BINDING_UDP
Definition: WppBindings.h:6
#define WPP_BINDING_NON_IP
Definition: WppBindings.h:9
The WppConnection class represents a connection interface for the Wpp library.
Definition: WppClient.cpp:14
bool wppBindingValidate(const STRING_T &binding)
Definition: WppBindings.cpp:6
std::string STRING_T
Definition: WppTypes.h:45