Created
July 17, 2014 02:07
-
-
Save Gocrazy/026d517d52eb4019aa30 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 std::shared_ptr<BidRequest> parseBidRequest(HttpAuctionHandler & handler, | |
| Datacratic::HttpHeader const & header, | |
| std::string const & payload); | |
| virtual double getTimeAvailableMs(HttpAuctionHandler & handler, | |
| const HttpHeader & header, | |
| const std::string & payload); | |
| virtual double getRoundTripTimeMs(HttpAuctionHandler & handler, | |
| const HttpHeader & header); | |
| virtual HttpResponse | |
| getResponse(const HttpAuctionHandler & connection, | |
| const HttpHeader & requestHeader, | |
| const Auction & auction) const; | |
| virtual HttpResponse | |
| getErrorResponse(const HttpAuctionHandler & connection, | |
| const std::string & errorMessage) const; | |
| virtual HttpResponse | |
| getDroppedAuctionResponse(const HttpAuctionHandler & connection, | |
| const std::string & reason) const; | |
| struct CampaignInfo { | |
| Id seat; ///< ID of the exchange seat | |
| }; | |
| struct CreativeInfo { | |
| Id adid; ///< ID for ad to be service if bid wins | |
| std::string adm; ///< Actual XHTML ad markup | |
| std::string nurl; ///< Win notice URL | |
| }; | |
| 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