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"; }
bool getNextProtocol(ServiceIterator *iter, ServiceIterator::ErrorType reason, const URI &uri, URI &outURI, ServiceParams ¶ms, 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; }