Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mopub_ads.cpp « partners_api - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d424061cc6009e53bf6eaf6b55e6ddbcab71c945 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include "partners_api/mopub_ads.hpp"
#include "partners_api/partners.hpp"

#include "private.h"

namespace
{
#if defined(OMIM_OS_IPHONE)
  auto const kTourismPlacementId = "29c1bc85b46442b5a370552916aa6822";
  auto const kNavigationPlacementId = "00af522ea7f94b77b6c671c7e1b13c3f";
  auto const kNonTourismPlacementId = "67ebcbd0af8345f18cccfb230ca08a17";
  auto const kSponsoredBannerPlacementId = "e0c1d4d9c88c4670b9541116bcb75c5f";
#else
  auto const kTourismPlacementId = "d298f205fb8a47aaafb514d2b5b8cf55";
  auto const kNavigationPlacementId = "fbd54c31a20347a6b5d6654510c542a4";
  auto const kNonTourismPlacementId = "94b8d70370a643929aa4c8c764d25e5b";
  auto const kSponsoredBannerPlacementId = "2bab47102d38485996788ab9b602ce2c";
#endif
}  // namespace

namespace ads
{
Mopub::Mopub()
{
  AppendEntry({{"amenity", "cafe"},       // food
               {"amenity", "fast_food"},
               {"amenity", "restaurant"},
               {"amenity", "bar"},
               {"amenity", "pub"},
               {"shop"},                  // shops
               {"amenity", "marketplace"},
               {"tourism", "zoo"},        // sights
               {"tourism", "artwork"},
               {"tourism", "information"},
               {"tourism", "attraction"},
               {"tourism", "viewpoint"},
               {"tourism", "museum"},
               {"amenity", "fountain"},
               {"amenity", "townhall"},
               {"historic"},
               {"amenity", "cinema"},     // entertainment
               {"amenity", "brothel"},
               {"amenity", "casino"},
               {"amenity", "nightclub"},
               {"amenity", "theatre"},
               {"boundary", "national_park"},
               {"leisure"}},
              kTourismPlacementId);

  AppendEntry({{"building"},              // building
               {"place"},                 // large toponyms
               {"aerialway"},             // city transport
               {"highway", "bus_stop"},
               {"highway", "speed_camera"},
               {"public_transport"},
               {"aeroway"},               // global transport
               {"railway"},
               {"man_made", "pier"}},
              kNavigationPlacementId);

  AppendEntry({{"amenity", "dentist"},    // health
               {"amenity", "doctors"},
               {"amenity", "clinic"},
               {"amenity", "hospital"},
               {"amenity", "pharmacy"},
               {"amenity", "veterinary"},
               {"amenity", "bank"},       // financial
               {"amenity", "atm"},
               {"amenity", "bureau_de_change"}},
              kNonTourismPlacementId);

  AppendEntry({{"sponsored", "banner"}}, kSponsoredBannerPlacementId);

  for (auto const & p : GetPartners())
  {
    auto const & placementId = p.GetBannerPlacementId();
    if (!placementId.empty())
      AppendEntry({{"sponsored", p.m_type.c_str()}}, placementId);
  }
}

std::string Mopub::GetBannerIdForOtherTypes() const
{
  return kNonTourismPlacementId;
}

// static
std::string Mopub::InitializationBannerId()
{
  return kSponsoredBannerPlacementId;
}
}  // namespace ads