-
-
Save chinnurtb/10076127 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "rtbkit/plugins/exchange/http_exchange_connector.h" | |
namespace RTBKIT { | |
struct SmaatoExchangeConnector : public HttpExchangeConnector { | |
SmaatoExchangeConnector(ServiceBase & owner, const std::string & name); | |
SmaatoExchangeConnector(const std::string & name, | |
std::shared_ptr<ServiceProxies> proxies); | |
static std::string exchangeNameString() { | |
return "smaato"; | |
} | |
virtual std::string exchangeName() const { | |
return exchangeNameString(); | |
} | |
/*virtual double | |
getTimeAvailableMs(HttpAuctionHandler & connection, | |
const HttpHeader & header, | |
const std::string & payload); | |
*/ | |
double getTimeAvailableMs(HttpAuctionHandler & handler, | |
const HttpHeader & header, | |
const std::string & payload) { | |
return 35.0; | |
} | |
double getRoundTripTimeMs(HttpAuctionHandler & handler, | |
const HttpHeader & header) { | |
return 5.0; | |
} | |
virtual std::shared_ptr<BidRequest> | |
parseBidRequest(HttpAuctionHandler & connection, | |
const HttpHeader & header, | |
const std::string & payload); | |
virtual HttpResponse | |
getResponse(const HttpAuctionHandler & connection, | |
const HttpHeader & requestHeader, | |
const Auction & auction) const; | |
virtual ExchangeConnector::ExchangeCompatibility | |
getCampaignCompatibility(const AgentConfig & config, | |
bool includeReasons) const; | |
virtual ExchangeCompatibility | |
getCreativeCompatibility(const Creative & creative, bool includeReasons) const; | |
private: | |
virtual void setSeatBid(Auction const & auction, | |
int spotNum, | |
OpenRTB::BidResponse & response) const; | |
}; | |
} // namespace RTBKit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment