You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6 KiB
C++

/***************************************************************************
* Copyright (C) 2021 by gempa GmbH *
* *
* All Rights Reserved. *
* *
* NOTICE: All information contained herein is, and remains *
* the property of gempa GmbH and its suppliers, if any. The intellectual *
* and technical concepts contained herein are proprietary to gempa GmbH *
* and its suppliers. *
* Dissemination of this information or reproduction of this material *
* is strictly forbidden unless prior written permission is obtained *
* from gempa GmbH. *
***************************************************************************/
#ifndef GEMPA_CAPS_URL_H
#define GEMPA_CAPS_URL_H
#include <string>
namespace Gempa {
namespace CAPS {
struct Url {
Url();
/**
* @brief Reads url parameters from address string. The
* addr format is [[caps|capss]://][user:pass@]host[:port].
* @param address The address as string
* @param defaultPort Default port
* @return True if the address could be parsed
*/
bool parse(const std::string &address, uint16_t defaultPort = 18002);
std::string host;
uint16_t port;
std::string user;
std::string password;
std::string protocol;
std::string errorString;
};
}
}
#endif