{
using OC::OCReflect::property_type;
using OC::OCReflect::property_binding;
- using namespace OC::OCReflect::to_OCStack;
+ using namespace OC::OCReflect::OCStack;
std::vector<std::string> reps { convert(properties) };
CXX_INC=-I../include/ -I./client/ -I../csdk/stack/include -I../csdk/ocsocket/include -I../csdk/ocrandom/include -I../csdk/logger/include
-LIB_SRC0=../OCLib/OCReflect.cpp ../OCLib/OCProperties.cpp ../OCLib/OCObserver.cpp ../OCLib/OCResource.cpp ./client/MyObserverHandler.cpp ../OCLib/OCServer.cpp
+# LIB_SRC0=../OCLib/OCReflect.cpp ../OCLib/OCProperties.cpp ../OCLib/OCObserver.cpp ../OCLib/OCResource.cpp ./client/MyObserverHandler.cpp ../OCLib/OCServer.cpp
+LIB_SRC0=../OCLib/OCReflect.cpp ../OCLib/OCProperties.cpp ../OCLib/OCObserver.cpp ../OCLib/OCResource.cpp ../OCLib/OCServer.cpp
LIB_SRC1=../OCLib/OCReflect.cpp ../OCLib/OCObserver.cpp ./client/MyObserverHandler.cpp ../OCLib/OCResource.cpp ../OCLib/OCSecurityModel.cpp ../OCLib/InProcClientWrapper.cpp ../OCLib/OCPlatform.cpp ../OCLib/InProcServerWrapper.cpp ../csdk/liboctbstack.a ../OCLib/OCServer.cpp
named_property_binding("power", property_type::integer),
};
- using namespace OC::OCReflect::to_OCStack;
+ using namespace OC::OCReflect::OCStack;
std::vector<std::string> reps { convert(sigs) };
server.bind(b_manufacturer);
*/
+/*
// The canonical way to bind a property to a server in one step:
bind_property(
server, // server to bind to
OC::OCReflect::property_type::string, // property
OC::OCReflect::property_attribute::r // type decoration
);
+*/
}
};
{
/*
We could typedef to simpler names! :)
- typedef named_property_binding_vector OCPropertyBindings;
- typedef named_property_binding OCPropertyBinding;
+ typedef property_binding_vector OCPropertyBindings;
+ typedef property_binding OCPropertyBinding;
OCPropertyBindings properties {
OCPropertyBinding("state", property_type::boolean),
*/
auto properties {
- named_property_binding{"state", property_type::boolean},
- named_property_binding{"power", property_type::integer}
+ property_binding{"state", property_type::boolean},
+ property_binding{"power", property_type::integer}
};
std::string resourceURI = "/a/light";