- constexpr unsigned int LIMITNUMBER = std::numeric_limits<unsigned int>::max();;
- constexpr unsigned int INTERVALTIME = 60000;
+ constexpr unsigned int POLLING_INTERVAL_TIME = 60000;
+
+ std::string makeResourceId(const std::shared_ptr< OIC::Service::PrimitiveResource >& resource)
+ {
+ return resource->getSid() + resource->getUri();
+ }
+
+ void validateTypes(const std::vector< std::string >& resourceTypes) {
+ if (resourceTypes.size() == 1) return;
+
+ for (const auto& type : resourceTypes)
+ {
+ if (type == OIC::Service::RCSDiscoveryManagerImpl::ALL_RESOURCE_TYPE)
+ {
+ throw OIC::Service::RCSBadRequestException{
+ "resource types must have no empty string!" };
+ }
+ }
+ }