17 #ifndef DEFAULTBOOTSTRAPCHANNEL_HPP_
18 #define DEFAULTBOOTSTRAPCHANNEL_HPP_
22 #ifdef KAA_DEFAULT_BOOTSTRAP_HTTP_CHANNEL
28 class DefaultBootstrapChannel :
public AbstractHttpChannel {
30 DefaultBootstrapChannel(IKaaChannelManager *channelManager,
const KeyPair& clientKeys) : AbstractHttpChannel(channelManager, clientKeys) { }
31 virtual ~DefaultBootstrapChannel() { }
33 virtual const std::string& getId()
const {
return CHANNEL_ID; }
34 virtual const std::map<TransportType, ChannelDirection>& getSupportedTransportTypes()
const {
return SUPPORTED_TYPES; }
37 virtual std::shared_ptr<IHttpRequest> createRequest(IPTransportInfoPtr server,
const std::vector<std::uint8_t>& body)
39 HttpDataProcessor *processor = getHttpDataProcessor();
40 auto request = processor->createBootstrapRequest(server->getURL() + getURLSuffix(), body);
44 virtual std::string retrieveResponse(
const IHttpResponse& response)
46 return getHttpDataProcessor()->retrieveBootstrapResponse(response);
54 virtual std::string getURLSuffix() {
59 static const std::string CHANNEL_ID;
60 static const std::map<TransportType, ChannelDirection> SUPPORTED_TYPES;