summaryrefslogtreecommitdiffabout
path: root/include/opkele
Side-by-side diff
Diffstat (limited to 'include/opkele') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/discovery.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/opkele/discovery.h b/include/opkele/discovery.h
index ab4b9d9..677d7bb 100644
--- a/include/opkele/discovery.h
+++ b/include/opkele/discovery.h
@@ -22,33 +22,41 @@ namespace opkele {
public:
inline _DT& add(long priority,const _DT& d) {
return insert(typename map_type::value_type(priority,d))->second;
}
bool has_value(const _DT& d) const {
for(typename map_type::const_iterator i=this->begin();i!=this->end();++i)
if(i->second==d) return true;
return false;
}
};
typedef priority_map<string> canonical_ids_t;
typedef priority_map<string> local_ids_t;
typedef set<string> types_t;
- typedef priority_map<string> uris_t;
+ struct uri_t {
+ string uri;
+ string append;
+
+ uri_t() { }
+ uri_t(const string& u) : uri(u) { }
+ uri_t(const string& u,const string& a) : uri(u), append(a) { }
+ };
+ typedef priority_map<uri_t> uris_t;
class service_t {
public:
types_t types;
uris_t uris;
local_ids_t local_ids;
string provider_id;
void clear() {
types.clear();
uris.clear(); local_ids.clear();
provider_id.clear();
}
};
typedef priority_map<service_t> services_t;