| 70 | namespace uri { |
| 71 | |
| 72 | URI construct( |
| 73 | const string& scheme, |
| 74 | const string& path, |
| 75 | const Option<string>& host, |
| 76 | const Option<int>& port, |
| 77 | const Option<string>& query, |
| 78 | const Option<string>& fragment, |
| 79 | const Option<string>& user, |
| 80 | const Option<string>& password) |
| 81 | { |
| 82 | URI uri; |
| 83 | |
| 84 | uri.set_scheme(scheme); |
| 85 | uri.set_path(path); |
| 86 | |
| 87 | if (host.isSome()) { uri.set_host(host.get()); } |
| 88 | if (port.isSome()) { uri.set_port(port.get()); } |
| 89 | if (query.isSome()) { uri.set_query(query.get()); } |
| 90 | if (fragment.isSome()) { uri.set_fragment(fragment.get()); } |
| 91 | if (user.isSome()) { uri.set_user(user.get()); } |
| 92 | if (password.isSome()) { uri.set_password(password.get()); } |
| 93 | |
| 94 | return uri; |
| 95 | } |
| 96 | |
| 97 | } // namespace uri { |
| 98 | } // namespace mesos { |