3#ifndef OCPP_WEBSOCKET_URI_HPP
4#define OCPP_WEBSOCKET_URI_HPP
9#include <websocketpp_utils/uri.hpp>
13typedef ocpp::uri ev_uri;
35 this->secure = secure;
38 std::string get_hostname() {
41 std::string get_chargepoint_id() {
42 return this->chargepoint_id;
45 std::string get_path() {
46 return this->path_without_chargepoint_id;
53 std::string string() {
54 auto uri = get_websocketpp_uri();
58 ev_uri get_websocketpp_uri() {
59 return ev_uri(this->secure, this->host, this->port,
60 this->path_without_chargepoint_id + this->chargepoint_id);
64 Uri(
bool secure,
const std::string& host, uint16_t port,
const std::string& path_without_chargepoint_id,
65 const std::string& chargepoint_id) :
69 path_without_chargepoint_id(path_without_chargepoint_id),
70 chargepoint_id(chargepoint_id) {
76 std::string path_without_chargepoint_id;
77 std::string chargepoint_id;
Definition: websocket_uri.hpp:14
void set_secure(bool secure)
set_secure defines if the connection is done via TLS
Definition: websocket_uri.hpp:34
static Uri parse_and_validate(std::string uri, std::string chargepoint_id, int security_profile)
parse_and_validate parses the uri and checks
Definition: websocket_uri.cpp:37