Esempio n. 1
0
 bool isNameURI(const URI &check) const {
         std::string::size_type length = check.proto().length();
         if (length < 4) {
                 return false;
         }
         return check.proto().substr(length-4,4) == "hash";
 }
Esempio n. 2
0
	bool getNextProtocol(ServiceIterator *iter, ServiceIterator::ErrorType reason, const URI &uri,
			URI &outURI, ServiceParams &params, typename ProtoReg::HandlerPtr &protoHandler) const {
		bool ret;
		do {
			outURI = uri;
			ret = iter->tryNext(reason, outURI, params);
			if (!ret) {
				return false;
			}
			outURI.getContext().setProto(getHandler(outURI.proto(), protoHandler));
			if (!protoHandler) {
				reason = ServiceIterator::UNSUPPORTED;
			}
		} while(!protoHandler && ret);
		return true;
	}