summaryrefslogtreecommitdiffabout
path: root/include/opkele/discovery.h
blob: 7865fb213e7f9d497732dd2913939975fcfc5ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef __OPKELE_DISCOVERY_H
#define __OPKELE_DISCOVERY_H

#include <string>
#include <opkele/types.h>

namespace opkele {
    using std::string;

    struct idiscovery_t;

    void idiscover(idiscovery_t& result,const string& identity);

    struct idiscovery_t {
	bool xri_identity;
	string normalized_id;
	string canonicalized_id;
	xrd::XRD_t xrd;

	idiscovery_t(const string& i) {
	    idiscover(*this,i);
	}
	idiscovery_t(const char *i) {
	    idiscover(*this,i);
	}

	void clear() {
	    normalized_id.clear(); canonicalized_id.clear();
	    xrd.clear();
	}
    };
}

#endif /* __OPKELE_DISCOVERY_H */