[booking] filter refactoring

This commit is contained in:
Arsentiy Milchakov 2018-05-23 20:03:52 +03:00 committed by Vlad Mihaylenko
parent 2d8d84a2b6
commit acab617963
28 changed files with 508 additions and 265 deletions

View file

@ -489,17 +489,17 @@ void OnBookmarksSearchResults(search::BookmarksSearchParams::Results const & res
env->CallVoidMethod(g_javaListener, method, jResults.get(), static_cast<jlong>(timestamp));
}
void OnBookingFilterResults(booking::AvailabilityParams const & params,
void OnBookingFilterResults(std::shared_ptr<booking::ParamsBase> const & params,
vector<FeatureID> const & featuresSorted)
{
// Ignore obsolete booking filter results.
if (params != g_lastBookingFilterParams)
if (!g_lastBookingFilterParams.Equals(*params))
return;
JNIEnv * env = jni::GetEnv();
jni::TScopedLocalObjectArrayRef jResults(env,
usermark_helper::ToFeatureIdArray(env, featuresSorted));
env->CallVoidMethod(g_javaListener, g_onFilterAvailableHotelsId, jResults.get());
JNIEnv * env = jni::GetEnv();
jni::TScopedLocalObjectArrayRef jResults(env,
usermark_helper::ToFeatureIdArray(env, featuresSorted));
env->CallVoidMethod(g_javaListener, g_onFilterAvailableHotelsId, jResults.get());
}
} // namespace
@ -571,8 +571,8 @@ extern "C"
params.m_onResults = bind(&OnResults, _1, _2, timestamp, false, hasPosition, lat, lon);
params.m_hotelsFilter = g_hotelsFilterBuilder.Build(env, hotelsFilter);
g_lastBookingFilterParams = g_bookingAvailabilityParamsBuilder.Build(env, bookingFilterParams);
params.m_bookingFilterParams.m_params = g_lastBookingFilterParams;
params.m_bookingFilterParams.m_params =
std::make_shared<booking::AvailabilityParams>(g_lastBookingFilterParams);
params.m_bookingFilterParams.m_callback = bind(&OnBookingFilterResults, _1, _2);
bool const searchStarted = g_framework->NativeFramework()->SearchEverywhere(params);
@ -590,7 +590,8 @@ extern "C"
vparams.m_inputLocale = jni::ToNativeString(env, lang);
vparams.m_hotelsFilter = g_hotelsFilterBuilder.Build(env, hotelsFilter);
g_lastBookingFilterParams = g_bookingAvailabilityParamsBuilder.Build(env, bookingFilterParams);
vparams.m_bookingFilterParams.m_params = g_lastBookingFilterParams;
vparams.m_bookingFilterParams.m_params =
std::make_shared<booking::AvailabilityParams>(g_lastBookingFilterParams);
vparams.m_bookingFilterParams.m_callback = bind(&OnBookingFilterResults, _1, _2);
// TODO (@alexzatsepin): set up vparams.m_onCompleted here and use
@ -605,7 +606,8 @@ extern "C"
eparams.m_onResults = bind(&OnResults, _1, _2, timestamp, isMapAndTable,
false /* hasPosition */, 0.0 /* lat */, 0.0 /* lon */);
eparams.m_hotelsFilter = vparams.m_hotelsFilter;
eparams.m_bookingFilterParams.m_params = g_lastBookingFilterParams;
eparams.m_bookingFilterParams.m_params =
std::make_shared<booking::AvailabilityParams>(g_lastBookingFilterParams);
eparams.m_bookingFilterParams.m_callback = bind(&OnBookingFilterResults, _1, _2);
if (g_framework->NativeFramework()->SearchEverywhere(eparams))

View file

@ -102,9 +102,10 @@ using Observers = NSHashTable<Observer>;
};
m_everywhereParams.m_bookingFilterParams.m_callback =
[self](booking::AvailabilityParams const & params,
[self](shared_ptr<booking::ParamsBase> const & params,
std::vector<FeatureID> const & sortedFeatures) {
if (self->m_everywhereParams.m_bookingFilterParams.m_params != params)
auto const & p = self->m_everywhereParams.m_bookingFilterParams;
if (p.m_params->IsEmpty() || !p.m_params->Equals(*params))
return;
self->m_bookingAvailableFeatureIDs = sortedFeatures;
[self onSearchResultsUpdated];
@ -134,7 +135,7 @@ using Observers = NSHashTable<Observer>;
m_everywhereParams.m_hotelsFilter = hotelsRules;
auto const availabilityParams =
self.filter ? [self.filter availabilityParams] : booking::filter::availability::Params();
self.filter ? [self.filter availabilityParams] : booking::filter::Params();
m_viewportParams.m_bookingFilterParams = availabilityParams;
m_everywhereParams.m_bookingFilterParams = availabilityParams;
}
@ -262,7 +263,7 @@ using Observers = NSHashTable<Observer>;
m_viewportResults.Clear();
m_bookingAvailableFeatureIDs.clear();
auto const availabilityParams = booking::filter::availability::Params();
auto const availabilityParams = booking::filter::Params();
m_viewportParams.m_bookingFilterParams = availabilityParams;
m_everywhereParams.m_bookingFilterParams = availabilityParams;

View file

@ -1,6 +1,6 @@
#import "MWMViewController.h"
#include "map/booking_filter_availability_params.hpp"
#include "map/booking_filter_params.hpp"
#include "std/shared_ptr.hpp"
@ -17,7 +17,7 @@ struct Rule;
+ (MWMSearchFilterViewController *)controller;
- (shared_ptr<search::hotels_filter::Rule>)rules;
- (booking::filter::availability::Params)availabilityParams;
- (booking::filter::Params)availabilityParams;
- (void)reset;
@end

View file

@ -18,7 +18,7 @@
- (void)mwm_refreshUI { [self.view mwm_refreshUI]; }
- (shared_ptr<search::hotels_filter::Rule>)rules { return nullptr; }
- (booking::filter::availability::Params)availabilityParams { return {}; }
- (booking::filter::Params)availabilityParams { return {}; }
- (void)reset {}
@end

View file

@ -326,14 +326,14 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
return And(And(ratingRule, priceRule), typeRule);
}
- (booking::filter::availability::Params)availabilityParams
- (booking::filter::Params)availabilityParams
{
using Clock = booking::AvailabilityParams::Clock;
booking::filter::availability::Params params;
params.m_params.m_rooms = {{kAdultsCount, kAgeOfChild}};
params.m_params.m_checkin = Clock::from_time_t(self.checkInDate.timeIntervalSince1970);
params.m_params.m_checkout = Clock::from_time_t(self.checkOutDate.timeIntervalSince1970);
return params;
booking::AvailabilityParams params;
params.m_rooms = {{kAdultsCount, kAgeOfChild}};
params.m_checkin = Clock::from_time_t(self.checkInDate.timeIntervalSince1970);
params.m_checkout = Clock::from_time_t(self.checkOutDate.timeIntervalSince1970);
return { make_shared<booking::AvailabilityParams>(params), {} };
}
#pragma mark - MWMFilterCheckCellDelegate

View file

@ -15,11 +15,14 @@ set(
api_mark_point.hpp
benchmark_tools.hpp
benchmark_tools.cpp
booking_filter.cpp
booking_availability_filter.cpp
booking_availability_filter.hpp
booking_filter.hpp
booking_filter_availability_params.hpp
booking_filter_cache.cpp
booking_filter_cache.hpp
booking_filter_params.hpp
booking_filter_processor.cpp
booking_filter_processor.hpp
bookmark.cpp
bookmark.hpp
bookmark_catalog.cpp

View file

@ -1,15 +1,14 @@
#include "map/booking_filter.hpp"
#include "partners_api/booking_api.hpp"
#include "map/booking_availability_filter.hpp"
#include "search/result.hpp"
#include "partners_api/booking_api.hpp"
#include "indexer/feature_decl.hpp"
#include "indexer/index.hpp"
#include "platform/platform.hpp"
#include "base/stl_add.hpp"
#include <algorithm>
#include <utility>
#include <vector>
@ -114,10 +113,10 @@ void PrepareData(Index const & index, search::Results const & results,
}
auto it = std::find_if(hotelToResults.begin(), hotelToResults.end(),
[&featureId](HotelToResult const & item)
{
return item.m_result.GetFeatureID() == featureId;
});
[&featureId](HotelToResult const & item)
{
return item.m_result.GetFeatureID() == featureId;
});
ASSERT(it != hotelToResults.cend(), ());
FeatureType ft;
@ -141,10 +140,69 @@ void PrepareData(Index const & index, search::Results const & results,
p.m_hotelIds.push_back(std::move(hotelId));
}
}
} // namespace
void GetAvailableFeaturesFromCacheImpl(Index const & index, search::Results const & results,
availability::Cache & cache,
std::vector<FeatureID> & sortedResults)
namespace booking
{
namespace filter
{
AvailabilityFilter::AvailabilityFilter(Delegate const & d) : FilterBase(d) {}
void AvailabilityFilter::ApplyFilter(search::Results const & results, ParamsInternal const & params)
{
ASSERT(params.m_params, ());
auto const & p = *params.m_params;
auto const & cb = params.m_callback;
UpdateParams(p);
m_params.m_hotelIds.clear();
HotelToResults hotelToResults;
PrepareData(GetDelegate().GetIndex(), results, hotelToResults, *m_cache, m_params);
if (m_params.m_hotelIds.empty())
{
search::Results result;
FillResults(std::move(hotelToResults), {}, *m_cache, result);
cb(result);
return;
}
auto availabilityCache = m_cache;
auto const apiCallback =
[cb, hotelToResults, availabilityCache](std::vector<std::string> hotelIds) mutable
{
GetPlatform().RunTask(Platform::Thread::File,
[cb, hotelToResults, availabilityCache, hotelIds]() mutable
{
search::Results results;
std::sort(hotelIds.begin(), hotelIds.end());
UpdateCache(hotelToResults, hotelIds, *availabilityCache);
FillResults(std::move(hotelToResults), hotelIds, *availabilityCache,
results);
cb(results);
});
};
GetDelegate().GetApi().GetHotelAvailability(m_params, apiCallback);
m_cache->RemoveOutdated();
}
void AvailabilityFilter::UpdateParams(ParamsBase const & params)
{
if (m_params.Equals(params))
return;
m_params.Set(params);
m_cache = std::make_shared<availability::Cache>();
}
void AvailabilityFilter::GetFeaturesFromCache(search::Results const & results,
std::vector<FeatureID> & sortedResults)
{
std::vector<FeatureID> features;
@ -164,7 +222,8 @@ void GetAvailableFeaturesFromCacheImpl(Index const & index, search::Results cons
{
if (mwmId != featureId.m_mwmId)
{
guard = my::make_unique<Index::FeaturesLoaderGuard>(index, featureId.m_mwmId);
guard = my::make_unique<Index::FeaturesLoaderGuard>(GetDelegate().GetIndex(),
featureId.m_mwmId);
mwmId = featureId.m_mwmId;
}
@ -177,89 +236,9 @@ void GetAvailableFeaturesFromCacheImpl(Index const & index, search::Results cons
auto const & hotelId = ft.GetMetadata().Get(feature::Metadata::FMD_SPONSORED_ID);
if (cache.Get(hotelId) == availability::Cache::HotelStatus::Available)
if (m_cache->Get(hotelId) == availability::Cache::HotelStatus::Available)
sortedResults.push_back(featureId);
}
}
} // namespace
namespace booking
{
namespace filter
{
Filter::Filter(Index const & index, booking::Api const & api) : m_index(index), m_api(api) {}
void Filter::FilterAvailability(search::Results const & results,
availability::internal::Params const & params)
{
GetPlatform().RunTask(Platform::Thread::File, [this, results, params]()
{
auto const & cb = params.m_callback;
ASSERT(params.m_params.m_hotelIds.empty(), ());
m_currentParams.m_hotelIds.clear();
UpdateAvailabilityParams(std::move(params.m_params));
HotelToResults hotelToResults;
PrepareData(m_index, results, hotelToResults, *m_availabilityCache, m_currentParams);
if (m_currentParams.m_hotelIds.empty())
{
search::Results result;
FillResults(std::move(hotelToResults), {}, *m_availabilityCache, result);
cb(result);
return;
}
auto availabilityCache = m_availabilityCache;
auto const apiCallback =
[cb, hotelToResults, availabilityCache](std::vector<std::string> hotelIds) mutable
{
GetPlatform().RunTask(Platform::Thread::File,
[cb, hotelToResults, availabilityCache, hotelIds]() mutable
{
search::Results results;
std::sort(hotelIds.begin(), hotelIds.end());
UpdateCache(hotelToResults, hotelIds, *availabilityCache);
FillResults(std::move(hotelToResults), hotelIds, *availabilityCache, results);
cb(results);
});
};
m_api.GetHotelAvailability(m_currentParams, apiCallback);
m_availabilityCache->RemoveOutdated();
});
}
void Filter::OnParamsUpdated(AvailabilityParams const & params)
{
GetPlatform().RunTask(Platform::Thread::File, [this, params]()
{
UpdateAvailabilityParams(std::move(params));
});
}
void Filter::GetAvailableFeaturesFromCache(search::Results const & results,
FillSearchMarksCallback const & callback)
{
GetPlatform().RunTask(Platform::Thread::File, [this, results, callback]()
{
std::vector<FeatureID> resultSorted;
GetAvailableFeaturesFromCacheImpl(m_index, results, *m_availabilityCache, resultSorted);
callback(resultSorted);
});
}
void Filter::UpdateAvailabilityParams(AvailabilityParams params)
{
if (m_currentParams == params)
return;
m_currentParams = std::move(params);
m_availabilityCache = std::make_shared<availability::Cache>();
}
} // namespace filter
} // namespace booking
} // namespace filter

View file

@ -0,0 +1,37 @@
#pragma once
#include "partners_api/booking_availability_params.hpp"
#include "map/booking_filter.hpp"
#include "map/booking_filter_cache.hpp"
#include "map/booking_filter_params.hpp"
#include <memory>
namespace search
{
class Results;
}
namespace booking
{
namespace filter
{
class AvailabilityFilter : public FilterBase
{
public:
explicit AvailabilityFilter(Delegate const & d);
void ApplyFilter(search::Results const & results, ParamsInternal const & params) override;
void GetFeaturesFromCache(search::Results const & results,
std::vector<FeatureID> & sortedResults) override;
void UpdateParams(ParamsBase const & params) override;
private:
using CachePtr = std::shared_ptr<availability::Cache>;
CachePtr m_cache = std::make_shared<availability::Cache>();
AvailabilityParams m_params;
};
} // namespace filter
} // namespace booking

View file

@ -1,14 +1,12 @@
#pragma once
#include "map/booking_filter_availability_params.hpp"
#include "map/booking_filter_cache.hpp"
#include "map/booking_filter_params.hpp"
#include "base/macros.hpp"
#include <functional>
#include <memory>
#include <vector>
struct FeatureID;
class Index;
namespace search
@ -22,36 +20,35 @@ class Api;
namespace filter
{
using FillSearchMarksCallback = platform::SafeCallback<void(std::vector<FeatureID> availableHotelsSorted)>;
class Filter
class FilterBase
{
public:
Filter(Index const & index, booking::Api const & api);
class Delegate
{
public:
virtual ~Delegate() = default;
void FilterAvailability(search::Results const & results,
availability::internal::Params const & params);
virtual Index const & GetIndex() const = 0;
virtual Api const & GetApi() const = 0;
};
void OnParamsUpdated(AvailabilityParams const & params);
explicit FilterBase(Delegate const & d) : m_delegate(d) {}
virtual ~FilterBase() = default;
void GetAvailableFeaturesFromCache(search::Results const & results,
FillSearchMarksCallback const & callback);
virtual void ApplyFilter(search::Results const & results, ParamsInternal const & params) = 0;
virtual void GetFeaturesFromCache(search::Results const & results,
std::vector<FeatureID> & sortedResults) = 0;
virtual void UpdateParams(ParamsBase const & params) = 0;
Delegate const & GetDelegate() const
{
return m_delegate;
}
private:
void UpdateAvailabilityParams(AvailabilityParams params);
Index const & m_index;
Api const & m_api;
using CachePtr = std::shared_ptr<availability::Cache>;
CachePtr m_availabilityCache = std::make_shared<availability::Cache>();
AvailabilityParams m_currentParams;
DISALLOW_COPY_AND_MOVE(Filter);
Delegate const & m_delegate;
};
using FilterPtr = std::unique_ptr<FilterBase>;
} // namespace filter
} // namespace booking

View file

@ -1,45 +0,0 @@
#pragma once
#include "partners_api/booking_availability_params.hpp"
#include "platform/safe_callback.hpp"
#include "indexer/feature_decl.hpp"
#include <vector>
namespace search
{
class Results;
}
namespace booking
{
namespace filter
{
namespace availability
{
using Results = platform::SafeCallback<void(AvailabilityParams const & params,
std::vector<FeatureID> const & sortedFeatures)>;
struct Params
{
bool IsEmpty() const { return m_params.IsEmpty(); }
AvailabilityParams m_params;
Results m_callback;
};
namespace internal
{
using ResultsUnsafe = std::function<void(search::Results const & results)>;
struct Params
{
AvailabilityParams m_params;
ResultsUnsafe m_callback;
};
} // namespace internal
} // namespace availability
} // namespace filter
} // namespace booking

View file

@ -0,0 +1,47 @@
#pragma once
#include "partners_api/booking_availability_params.hpp"
#include "partners_api/booking_params_base.hpp"
#include "platform/safe_callback.hpp"
#include "indexer/feature_decl.hpp"
#include <functional>
#include <memory>
#include <utility>
#include <vector>
namespace search
{
class Results;
}
namespace booking
{
namespace filter
{
using Results = platform::SafeCallback<void(std::shared_ptr<ParamsBase> const & params,
std::vector<FeatureID> const & sortedFeatures)>;
using ResultsUnsafe = std::function<void(search::Results const & results)>;
template <typename R>
struct ParamsImpl
{
ParamsImpl() = default;
ParamsImpl(std::shared_ptr<ParamsBase> params, R const & cb)
: m_params(move(params))
, m_callback(cb)
{
}
bool IsEmpty() const { return !m_params || m_params->IsEmpty(); }
std::shared_ptr<ParamsBase> m_params;
R m_callback;
};
using Params = ParamsImpl<Results>;
using ParamsInternal = ParamsImpl<ResultsUnsafe>;
} // namespace filter
} // namespace booking

View file

@ -0,0 +1,76 @@
#include "map/booking_filter_processor.hpp"
#include "map/booking_availability_filter.hpp"
#include "search/result.hpp"
namespace booking
{
namespace filter
{
FilterProcessor::FilterProcessor(Index const & index, booking::Api const & api)
: m_index(index)
, m_api(api)
{
m_filters.emplace(Type::Deals, std::make_unique<AvailabilityFilter>(*this));
m_filters.emplace(Type::Availability, std::make_unique<AvailabilityFilter>(*this));
}
void FilterProcessor::ApplyFilters(search::Results const & results,
std::vector<FilterTask> && tasks)
{
GetPlatform().RunTask(Platform::Thread::File, [this, results, tasks = std::move(tasks)]() mutable
{
CHECK(!tasks.empty(), ());
// Run provided filters consecutively.
for (size_t i = tasks.size() - 1; i > 0; --i)
{
auto const & cb = tasks[i - 1].m_params.m_callback;
tasks[i - 1].m_params.m_callback =
[this, cb, nextTask = std::move(tasks[i])](search::Results const & results) mutable
{
cb(results);
// Run the next filter with obtained results from the previous one.
// Post different task on the file thread to increase granularity.
GetPlatform().RunTask(Platform::Thread::File, [this, results, nextTask = std::move(nextTask)]()
{
m_filters.at(nextTask.m_type)->ApplyFilter(results, nextTask.m_params);
});
};
}
// Run first filter.
m_filters.at(tasks.front().m_type)->ApplyFilter(results, tasks.front().m_params);
});
}
void FilterProcessor::OnParamsUpdated(Type const type, std::shared_ptr<ParamsBase> const & params)
{
GetPlatform().RunTask(Platform::Thread::File, [this, type, params = std::move(params)]() mutable
{
m_filters.at(type)->UpdateParams(*params);
});
}
void FilterProcessor::GetFeaturesFromCache(Type const type, search::Results const & results,
FillSearchMarksCallback const & callback)
{
GetPlatform().RunTask(Platform::Thread::File, [this, type, results, callback]()
{
std::vector<FeatureID> resultSorted;
m_filters.at(type)->GetFeaturesFromCache(results, resultSorted);
callback(resultSorted);
});
}
Index const & FilterProcessor::GetIndex() const
{
return m_index;
}
Api const & FilterProcessor::GetApi() const
{
return m_api;
}
} // namespace filter
} // namespace booking

View file

@ -0,0 +1,73 @@
#pragma once
#include "map/booking_filter.hpp"
#include "map/booking_filter_params.hpp"
#include "indexer/feature_decl.hpp"
#include "platform/safe_callback.hpp"
#include "base/macros.hpp"
#include <unordered_map>
#include <vector>
class Index;
namespace search
{
class Results;
}
namespace booking
{
class Api;
namespace filter
{
enum class Type
{
Deals,
Availability
};
struct FilterTask
{
FilterTask(Type const type, ParamsInternal && params)
: m_type(type)
, m_params(std::move(params))
{
}
Type const m_type;
ParamsInternal m_params;
};
using FillSearchMarksCallback = platform::SafeCallback<void(std::vector<FeatureID> availableHotelsSorted)>;
class FilterProcessor : public FilterBase::Delegate
{
public:
FilterProcessor(Index const & index, booking::Api const & api);
void ApplyFilters(search::Results const & results, std::vector<FilterTask> && tasks);
void OnParamsUpdated(Type const type, std::shared_ptr<ParamsBase> const & params);
void GetFeaturesFromCache(Type const type, search::Results const & results,
FillSearchMarksCallback const & callback);
// FilterInterface::Delegate overrides:
Index const & GetIndex() const override;
Api const & GetApi() const override;
private:
Index const & m_index;
Api const & m_api;
std::unordered_map<Type, FilterPtr> m_filters;
DISALLOW_COPY_AND_MOVE(FilterProcessor);
};
} // namespace filter
} // namespace booking

View file

@ -1,6 +1,6 @@
#pragma once
#include "map/booking_filter_availability_params.hpp"
#include "map/booking_filter_params.hpp"
#include "search/everywhere_search_callback.hpp"
#include "search/hotels_filter.hpp"
@ -18,7 +18,7 @@ struct EverywhereSearchParams
std::string m_query;
std::string m_inputLocale;
std::shared_ptr<hotels_filter::Rule> m_hotelsFilter;
booking::filter::availability::Params m_bookingFilterParams;
booking::filter::Params m_bookingFilterParams;
EverywhereSearchCallback::OnResults m_onResults;
};

View file

@ -369,7 +369,7 @@ Framework::Framework(FrameworkParams const & params)
static_cast<RoutingManager::Delegate &>(*this))
, m_trafficManager(bind(&Framework::GetMwmsByRect, this, _1, false /* rough */),
kMaxTrafficCacheSizeBytes, m_routingManager.RoutingSession())
, m_bookingFilter(m_model.GetIndex(), *m_bookingApi)
, m_bookingFilterProcessor(m_model.GetIndex(), *m_bookingApi)
, m_displacementModeManager([this](bool show) {
int const mode = show ? dp::displacement::kHotelMode : dp::displacement::kDefaultMode;
if (m_drapeEngine != nullptr)
@ -3151,7 +3151,8 @@ void Framework::ShowViewportSearchResults(bool clear, search::Results::ConstIter
FillSearchResultsMarks(clear, results.begin(), results.end(), postProcessing);
};
m_bookingFilter.GetAvailableFeaturesFromCache(results, fillCallback);
m_bookingFilterProcessor.GetFeaturesFromCache(booking::filter::Type::Availability,
results, fillCallback);
}
void Framework::ClearViewportSearchResults()
@ -3396,14 +3397,14 @@ ugc::Reviews Framework::FilterUGCReviews(ugc::Reviews const & reviews) const
return result;
}
void Framework::FilterSearchResultsOnBooking(booking::filter::availability::Params const & params,
void Framework::FilterSearchResultsOnBooking(booking::filter::Params const & params,
search::Results const & results, bool inViewport)
{
using namespace booking::filter;
auto const & p = params.m_params;
auto const & cb = params.m_callback;
availability::internal::Params paramsInternal
ParamsInternal paramsInternal
{
p,
[this, p, cb, inViewport](search::Results const & results)
@ -3431,11 +3432,11 @@ void Framework::FilterSearchResultsOnBooking(booking::filter::availability::Para
}
};
m_bookingFilter.FilterAvailability(results, paramsInternal);
m_bookingFilterProcessor.ApplyFilters(results, {{Type::Availability, std::move(paramsInternal)}});
}
void Framework::OnBookingFilterParamsUpdate(booking::AvailabilityParams const & params)
void Framework::OnBookingAvailabilityParamsUpdate(std::shared_ptr<booking::ParamsBase> const & params)
{
m_bookingAvailabilityParams = params;
m_bookingFilter.OnParamsUpdated(params);
m_bookingAvailabilityParams.Set(*params);
m_bookingFilterProcessor.OnParamsUpdated(booking::filter::Type::Availability, params);
}

View file

@ -1,7 +1,7 @@
#pragma once
#include "map/api_mark_point.hpp"
#include "map/booking_filter.hpp"
#include "map/booking_filter_processor.hpp"
#include "map/bookmark.hpp"
#include "map/bookmark_manager.hpp"
#include "map/discovery/discovery_manager.hpp"
@ -211,7 +211,7 @@ protected:
User m_user;
booking::filter::Filter m_bookingFilter;
booking::filter::FilterProcessor m_bookingFilterProcessor;
booking::AvailabilityParams m_bookingAvailabilityParams;
/// This function will be called by m_storage when latest local files
@ -841,9 +841,9 @@ private:
ugc::Reviews FilterUGCReviews(ugc::Reviews const & reviews) const;
public:
void FilterSearchResultsOnBooking(booking::filter::availability::Params const & params,
void FilterSearchResultsOnBooking(booking::filter::Params const & params,
search::Results const & results, bool inViewport) override;
void OnBookingFilterParamsUpdate(booking::AvailabilityParams const & params) override;
void OnBookingAvailabilityParamsUpdate(std::shared_ptr<booking::ParamsBase> const & params) override;
private:
// m_discoveryManager must be bellow m_searchApi, m_viatorApi, m_localsApi

View file

@ -3,7 +3,7 @@
#include "generator/generator_tests_support/test_feature.hpp"
#include "indexer/indexer_tests_support/test_with_custom_mwms.hpp"
#include "map/booking_filter.hpp"
#include "map/booking_availability_filter.hpp"
#include "partners_api/booking_api.hpp"
@ -23,7 +23,19 @@ using namespace generator::tests_support;
namespace
{
class TestMwmEnvironment : public indexer::tests_support::TestWithCustomMwms
, public FilterBase::Delegate
{
public:
Index const & GetIndex() const override
{
return m_index;
}
booking::Api const & GetApi() const override
{
return m_api;
}
protected:
TestMwmEnvironment()
{
@ -43,12 +55,12 @@ protected:
private:
storage::CountryInfoGetterForTesting m_infoGetter;
Platform::ThreadRunner m_runner;
booking::Api m_api;
};
UNIT_CLASS_TEST(TestMwmEnvironment, BookingFilter_AvailabilitySmoke)
{
booking::Api api;
Filter filter(m_index, api);
AvailabilityFilter filter(*this);
std::vector<std::string> const kHotelIds = {"10623", "10624", "10625"};
@ -81,15 +93,16 @@ UNIT_CLASS_TEST(TestMwmEnvironment, BookingFilter_AvailabilitySmoke)
expectedResults.AddResult(std::move(copy));
},
rect, scales::GetUpperScale());
availability::internal::Params params;
ParamsInternal params;
search::Results filteredResults;
params.m_params = make_shared<booking::AvailabilityParams>();
params.m_callback = [&filteredResults](search::Results const & results)
{
filteredResults = results;
testing::Notify();
};
filter.FilterAvailability(results, params);
filter.ApplyFilter(results, params);
testing::Wait();

View file

@ -152,7 +152,7 @@ void SearchAPI::OnViewportChanged(m2::RectD const & viewport)
bool SearchAPI::SearchEverywhere(EverywhereSearchParams const & params)
{
UpdateSponsoredMode(params.m_query, params.m_bookingFilterParams);
UpdateSponsoredMode(params);
SearchParams p;
p.m_query = params.m_query;
@ -173,7 +173,7 @@ bool SearchAPI::SearchEverywhere(EverywhereSearchParams const & params)
RunUITask([params, results, productInfo] {
params.m_onResults(results, productInfo);
});
if (results.IsEndedNormal() && !params.m_bookingFilterParams.IsEmpty())
if (results.IsEndedNormal() && m_sponsoredMode == SponsoredMode::Booking)
{
m_delegate.FilterSearchResultsOnBooking(params.m_bookingFilterParams, results,
false /* inViewport */);
@ -181,14 +181,14 @@ bool SearchAPI::SearchEverywhere(EverywhereSearchParams const & params)
});
if (m_sponsoredMode == SponsoredMode::Booking)
m_delegate.OnBookingFilterParamsUpdate(params.m_bookingFilterParams.m_params);
m_delegate.OnBookingAvailabilityParamsUpdate(params.m_bookingFilterParams.m_params);
return Search(p, true /* forceSearch */);
}
bool SearchAPI::SearchInViewport(ViewportSearchParams const & params)
{
UpdateSponsoredMode(params.m_query, params.m_bookingFilterParams);
UpdateSponsoredMode(params);
SearchParams p;
p.m_query = params.m_query;
@ -212,7 +212,7 @@ bool SearchAPI::SearchInViewport(ViewportSearchParams const & params)
[this, params](Results const & results) {
if (results.IsEndMarker() && params.m_onCompleted)
RunUITask([params, results] { params.m_onCompleted(results); });
if (results.IsEndedNormal() && !params.m_bookingFilterParams.IsEmpty())
if (results.IsEndedNormal() && m_sponsoredMode == SponsoredMode::Booking)
{
m_delegate.FilterSearchResultsOnBooking(params.m_bookingFilterParams, results,
true /* inViewport */);
@ -220,7 +220,7 @@ bool SearchAPI::SearchInViewport(ViewportSearchParams const & params)
});
if (m_sponsoredMode == SponsoredMode::Booking)
m_delegate.OnBookingFilterParamsUpdate(params.m_bookingFilterParams.m_params);
m_delegate.OnBookingAvailabilityParamsUpdate(params.m_bookingFilterParams.m_params);
return Search(p, false /* forceSearch */);
}
@ -328,12 +328,12 @@ void SearchAPI::CancelSearch(Mode mode)
if (mode == Mode::Viewport)
{
m_sponsoredMode = SponsoredMode::None;
m_delegate.ClearViewportSearchResults();
m_delegate.SetSearchDisplacementModeEnabled(false /* enabled */);
}
m_sponsoredMode = SponsoredMode::None;
auto & intent = m_searchIntents[static_cast<size_t>(mode)];
intent.m_params.Clear();
CancelQuery(intent.m_handle);
@ -462,11 +462,11 @@ bool SearchAPI::QueryMayBeSkipped(SearchParams const & prevParams,
return true;
}
void SearchAPI::UpdateSponsoredMode(string const & query,
booking::filter::availability::Params const & params)
template <typename T>
void SearchAPI::UpdateSponsoredMode(T const & searchParams)
{
m_sponsoredMode = SponsoredMode::None;
if (!params.IsEmpty())
if (!searchParams.m_bookingFilterParams.IsEmpty())
m_sponsoredMode = SponsoredMode::Booking;
}

View file

@ -1,6 +1,7 @@
#pragma once
#include "map/bookmark.hpp"
#include "map/booking_filter_params.hpp"
#include "search/downloader_search_callback.hpp"
#include "search/engine.hpp"
@ -39,18 +40,6 @@ class Storage;
struct DownloaderSearchParams;
}
namespace booking
{
struct AvailabilityParams;
namespace filter
{
namespace availability
{
struct Params;
}
}
}
class SearchAPI : public search::DownloaderSearchCallback::Delegate,
public search::EverywhereSearchCallback::Delegate,
public search::ViewportSearchCallback::Delegate
@ -86,12 +75,12 @@ public:
virtual double GetMinDistanceBetweenResults() const { return 0.0; };
virtual void FilterSearchResultsOnBooking(booking::filter::availability::Params const & params,
virtual void FilterSearchResultsOnBooking(booking::filter::Params const & params,
search::Results const & results, bool inViewport)
{
}
virtual void OnBookingFilterParamsUpdate(booking::AvailabilityParams const & params) {}
virtual void OnBookingAvailabilityParamsUpdate(std::shared_ptr<booking::ParamsBase> const & params) {}
virtual search::ProductInfo GetProductInfo(search::Result const & result) const { return {}; };
};
@ -161,8 +150,8 @@ private:
bool QueryMayBeSkipped(search::SearchParams const & prevParams,
search::SearchParams const & currParams) const;
void UpdateSponsoredMode(std::string const & query,
booking::filter::availability::Params const & params);
template <typename T>
void UpdateSponsoredMode(T const & searchParams);
Index & m_index;
storage::Storage const & m_storage;

View file

@ -1,6 +1,6 @@
#pragma once
#include "map/booking_filter_availability_params.hpp"
#include "map/booking_filter_params.hpp"
#include "search/hotels_filter.hpp"
@ -20,7 +20,7 @@ struct ViewportSearchParams
std::string m_query;
std::string m_inputLocale;
std::shared_ptr<hotels_filter::Rule> m_hotelsFilter;
booking::filter::availability::Params m_bookingFilterParams;
booking::filter::Params m_bookingFilterParams;
OnStarted m_onStarted;
OnCompleted m_onCompleted;

View file

@ -13,6 +13,7 @@ set(
booking_api.hpp
booking_availability_params.cpp
booking_availability_params.hpp
booking_params_base.hpp
facebook_ads.cpp
facebook_ads.hpp
google_ads.cpp

View file

@ -38,13 +38,13 @@ string const kSearchBaseUrl = "https://www.booking.com/search.html";
string const kDeepLinkBaseUrl = "booking://hotel/";
string g_BookingUrlForTesting = "";
booking::AvailabilityParams::Filter const kAvailabilityParamsForUniversalLink =
booking::AvailabilityParams::UrlFilter const kAvailabilityParamsForUniversalLink =
{
"checkin",
"checkout",
"room"
};
booking::AvailabilityParams::Filter const kAvailabilityParamsForDeepLink =
booking::AvailabilityParams::UrlFilter const kAvailabilityParamsForDeepLink =
{
"checkin",
"checkout"
@ -372,7 +372,7 @@ string Api::GetSearchUrl(string const & city, string const & name) const
return resultStream.str();
}
string Api::ApplyAvailabilityParams(string const & url, AvailabilityParams const & params)
string Api::ApplyAvailabilityParams(string const & url, AvailabilityParams const & params) const
{
ASSERT(!url.empty(), ());

View file

@ -63,6 +63,8 @@ using GetHotelInfoCallback = platform::SafeCallback<void(HotelInfo const & hotel
// NOTE: this callback will be called on the network thread.
using GetHotelAvailabilityCallback = std::function<void(std::vector<std::string> hotelIds)>;
/// This is a lightweight class but methods are non-static in order to support the NetworkPolicy
/// restrictions.
/// Callbacks will be called in the same order as methods are called.
class Api
{
@ -72,7 +74,7 @@ public:
std::string GetDescriptionUrl(std::string const & baseUrl) const;
std::string GetHotelReviewsUrl(std::string const & hotelId, std::string const & baseUrl) const;
std::string GetSearchUrl(std::string const & city, std::string const & name) const;
std::string ApplyAvailabilityParams(std::string const & url, AvailabilityParams const & params);
std::string ApplyAvailabilityParams(std::string const & url, AvailabilityParams const & params) const;
/// Real-time information methods (used for retrieving rapidly changing information).
/// These methods send requests directly to Booking.

View file

@ -14,7 +14,7 @@ std::string FormatTime(booking::AvailabilityParams::Time p)
return partners_api::FormatTime(p, "%Y-%m-%d");
}
bool IsAcceptedByFilter(booking::AvailabilityParams::Filter const & filter,
bool IsAcceptedByFilter(booking::AvailabilityParams::UrlFilter const & filter,
std::string const & value)
{
if (filter.empty())
@ -73,7 +73,7 @@ bool AvailabilityParams::Room::operator==(AvailabilityParams::Room const & rhs)
return !this->operator!=(rhs);
}
url::Params AvailabilityParams::Get(Filter const & filter /* = {} */) const
url::Params AvailabilityParams::Get(UrlFilter const & filter /* = {} */) const
{
url::Params result;
@ -106,13 +106,19 @@ bool AvailabilityParams::IsEmpty() const
return m_checkin == Time() || m_checkout == Time() || m_rooms.empty();
}
bool AvailabilityParams::operator!=(AvailabilityParams const & rhs) const
bool AvailabilityParams::Equals(ParamsBase const & rhs) const
{
return m_checkin != rhs.m_checkin || m_checkout != rhs.m_checkout || m_rooms != rhs.m_rooms ||
m_minReviewScore != rhs.m_minReviewScore || m_stars != rhs.m_stars;
return rhs.Equals(*this);
}
bool AvailabilityParams::operator==(AvailabilityParams const & rhs) const
bool AvailabilityParams::Equals(AvailabilityParams const & rhs) const
{
return !(*this != rhs);
return m_checkin == rhs.m_checkin && m_checkout == rhs.m_checkout && m_rooms == rhs.m_rooms &&
m_minReviewScore == rhs.m_minReviewScore && m_stars == rhs.m_stars;
}
void AvailabilityParams::Set(ParamsBase const & src)
{
src.CopyTo(*this);
}
} // namespace booking

View file

@ -1,5 +1,7 @@
#pragma once
#include "partners_api/booking_params_base.hpp"
#include "base/url_helpers.hpp"
#include <chrono>
@ -11,7 +13,7 @@ namespace booking
{
/// Params for checking availability of hotels.
/// [m_hotelIds], [m_checkin], [m_checkout], [m_rooms] are required.
struct AvailabilityParams
struct AvailabilityParams : ParamsBase
{
struct Room
{
@ -41,12 +43,14 @@ struct AvailabilityParams
using Rooms = std::vector<Room>;
using Stars = std::vector<std::string>;
using Filter = std::unordered_set<std::string>;
using UrlFilter = std::unordered_set<std::string>;
base::url::Params Get(UrlFilter const & filter = {}) const;
base::url::Params Get(Filter const & filter = {}) const;
bool IsEmpty() const;
bool operator!=(AvailabilityParams const & rhs) const;
bool operator==(AvailabilityParams const & rhs) const;
// ParamsBase overrides:
bool IsEmpty() const override;
bool Equals(ParamsBase const & rhs) const override;
bool Equals(AvailabilityParams const & rhs) const override;
void Set(ParamsBase const & src) override;
/// Limit the result list to the specified hotels where they have availability for the
/// specified guests and dates.

View file

@ -0,0 +1,41 @@
#pragma once
#include "base/macros.hpp"
#include <exception>
#include <type_traits>
namespace booking
{
struct AvailabilityParams;
struct ParamsBase
{
virtual ~ParamsBase() = default;
virtual bool IsEmpty() const = 0;
virtual bool Equals(ParamsBase const & rhs) const = 0;
virtual void Set(ParamsBase const & src) = 0;
virtual bool Equals(AvailabilityParams const & lhs) const
{
return false;
}
template <typename T>
void CopyTo(T & dest) const
{
if (Equals(dest))
return;
try
{
dest = dynamic_cast<T const &>(*this);
}
catch (std::bad_cast const & ex)
{
CHECK(false, ("Cannot cast ParamsBase to child type"));
}
}
};
} // namespace booking

View file

@ -30,12 +30,15 @@
3D47B2C81F20EF06000828D2 /* displayed_categories_modifiers.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D47B2C61F20EF06000828D2 /* displayed_categories_modifiers.hpp */; };
3D4E99821FB462B60025B48C /* everywhere_search_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D4E99801FB462B60025B48C /* everywhere_search_params.hpp */; };
3D4E99831FB462B60025B48C /* viewport_search_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D4E99811FB462B60025B48C /* viewport_search_params.hpp */; };
3D4E99851FB469DD0025B48C /* booking_filter_availability_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D4E99841FB469DD0025B48C /* booking_filter_availability_params.hpp */; };
3D4E99A21FB4A6410025B48C /* booking_filter_cache.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D4E999E1FB4A6400025B48C /* booking_filter_cache.hpp */; };
3D4E99A31FB4A6410025B48C /* booking_filter_cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D4E999F1FB4A6400025B48C /* booking_filter_cache.cpp */; };
3D4E99A41FB4A6410025B48C /* booking_filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D4E99A01FB4A6410025B48C /* booking_filter.cpp */; };
3D4E99A51FB4A6410025B48C /* booking_filter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D4E99A11FB4A6410025B48C /* booking_filter.hpp */; };
3D74ABBE1EA76F1D0063A898 /* local_ads_supported_types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D74ABBD1EA76F1D0063A898 /* local_ads_supported_types.cpp */; };
3DA5713F20B5CC80007BDE27 /* booking_availability_filter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5713A20B5CC7F007BDE27 /* booking_availability_filter.hpp */; };
3DA5714020B5CC80007BDE27 /* booking_filter_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5713B20B5CC7F007BDE27 /* booking_filter_params.hpp */; };
3DA5714120B5CC80007BDE27 /* booking_availability_filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA5713C20B5CC7F007BDE27 /* booking_availability_filter.cpp */; };
3DA5714220B5CC80007BDE27 /* booking_filter_processor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA5713D20B5CC7F007BDE27 /* booking_filter_processor.cpp */; };
3DA5714320B5CC80007BDE27 /* booking_filter_processor.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5713E20B5CC7F007BDE27 /* booking_filter_processor.hpp */; };
45201E931CE4AC90008A4842 /* api_mark_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45201E921CE4AC90008A4842 /* api_mark_point.cpp */; };
454523A9202A0068009275C1 /* cloud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 454523A7202A0067009275C1 /* cloud.cpp */; };
454523AA202A0068009275C1 /* cloud.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 454523A8202A0067009275C1 /* cloud.hpp */; };
@ -199,12 +202,15 @@
3D47B2C61F20EF06000828D2 /* displayed_categories_modifiers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = displayed_categories_modifiers.hpp; sourceTree = "<group>"; };
3D4E99801FB462B60025B48C /* everywhere_search_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = everywhere_search_params.hpp; sourceTree = "<group>"; };
3D4E99811FB462B60025B48C /* viewport_search_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = viewport_search_params.hpp; sourceTree = "<group>"; };
3D4E99841FB469DD0025B48C /* booking_filter_availability_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_filter_availability_params.hpp; sourceTree = "<group>"; };
3D4E999E1FB4A6400025B48C /* booking_filter_cache.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_filter_cache.hpp; sourceTree = "<group>"; };
3D4E999F1FB4A6400025B48C /* booking_filter_cache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = booking_filter_cache.cpp; sourceTree = "<group>"; };
3D4E99A01FB4A6410025B48C /* booking_filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = booking_filter.cpp; sourceTree = "<group>"; };
3D4E99A11FB4A6410025B48C /* booking_filter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_filter.hpp; sourceTree = "<group>"; };
3D74ABBD1EA76F1D0063A898 /* local_ads_supported_types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = local_ads_supported_types.cpp; sourceTree = "<group>"; };
3DA5713A20B5CC7F007BDE27 /* booking_availability_filter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_availability_filter.hpp; sourceTree = "<group>"; };
3DA5713B20B5CC7F007BDE27 /* booking_filter_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_filter_params.hpp; sourceTree = "<group>"; };
3DA5713C20B5CC7F007BDE27 /* booking_availability_filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = booking_availability_filter.cpp; sourceTree = "<group>"; };
3DA5713D20B5CC7F007BDE27 /* booking_filter_processor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = booking_filter_processor.cpp; sourceTree = "<group>"; };
3DA5713E20B5CC7F007BDE27 /* booking_filter_processor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_filter_processor.hpp; sourceTree = "<group>"; };
45201E921CE4AC90008A4842 /* api_mark_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = api_mark_point.cpp; sourceTree = "<group>"; };
454523A7202A0067009275C1 /* cloud.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cloud.cpp; sourceTree = "<group>"; };
454523A8202A0067009275C1 /* cloud.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cloud.hpp; sourceTree = "<group>"; };
@ -530,15 +536,18 @@
675345BD1A4054AD00A0A8C3 /* map */ = {
isa = PBXGroup;
children = (
3DA5713C20B5CC7F007BDE27 /* booking_availability_filter.cpp */,
3DA5713A20B5CC7F007BDE27 /* booking_availability_filter.hpp */,
3DA5713B20B5CC7F007BDE27 /* booking_filter_params.hpp */,
3DA5713D20B5CC7F007BDE27 /* booking_filter_processor.cpp */,
3DA5713E20B5CC7F007BDE27 /* booking_filter_processor.hpp */,
675345CB1A4054E800A0A8C3 /* address_finder.cpp */,
45201E921CE4AC90008A4842 /* api_mark_point.cpp */,
34921F611BFA0A6900737D6E /* api_mark_point.hpp */,
45580ABC1E2CBD5E00CD535D /* benchmark_tools.cpp */,
45580ABD1E2CBD5E00CD535D /* benchmark_tools.hpp */,
3D4E99841FB469DD0025B48C /* booking_filter_availability_params.hpp */,
3D4E999F1FB4A6400025B48C /* booking_filter_cache.cpp */,
3D4E999E1FB4A6400025B48C /* booking_filter_cache.hpp */,
3D4E99A01FB4A6410025B48C /* booking_filter.cpp */,
3D4E99A11FB4A6410025B48C /* booking_filter.hpp */,
4564FA81209497A70043CCFB /* bookmark_catalog.cpp */,
4564FA80209497A60043CCFB /* bookmark_catalog.hpp */,
@ -667,8 +676,10 @@
675346751A4054E800A0A8C3 /* mwm_url.hpp in Headers */,
6753464B1A4054E800A0A8C3 /* bookmark.hpp in Headers */,
4564FA82209497A70043CCFB /* bookmark_catalog.hpp in Headers */,
3DA5714020B5CC80007BDE27 /* booking_filter_params.hpp in Headers */,
3D47B2941F054BC5000828D2 /* taxi_delegate.hpp in Headers */,
3D47B2C81F20EF06000828D2 /* displayed_categories_modifiers.hpp in Headers */,
3DA5713F20B5CC80007BDE27 /* booking_availability_filter.hpp in Headers */,
454523AA202A0068009275C1 /* cloud.hpp in Headers */,
BB4E5F271FCC664A00A77250 /* transit_reader.hpp in Headers */,
348AB57D1D7EE0C6009F8301 /* chart_generator.hpp in Headers */,
@ -677,13 +688,13 @@
BBFC7E3B202D29C000531BE7 /* user_mark_layer.hpp in Headers */,
3D4E99A51FB4A6410025B48C /* booking_filter.hpp in Headers */,
675346491A4054E800A0A8C3 /* bookmark_manager.hpp in Headers */,
3DA5714320B5CC80007BDE27 /* booking_filter_processor.hpp in Headers */,
F6B2830A1C1B03320081957A /* gps_track.hpp in Headers */,
3D4E99A21FB4A6410025B48C /* booking_filter_cache.hpp in Headers */,
F6D67CE32063F4980032FD38 /* framework_light.hpp in Headers */,
45F6EE9D1FB1C77600019892 /* search_api.hpp in Headers */,
F6FC3CB51FC323430001D929 /* discovery_client_params.hpp in Headers */,
0831F23C200E53600034C365 /* bookmarks_search_params.hpp in Headers */,
3D4E99851FB469DD0025B48C /* booking_filter_availability_params.hpp in Headers */,
0C2B73DF1E92AB9900530BB8 /* local_ads_manager.hpp in Headers */,
675346631A4054E800A0A8C3 /* feature_vec_model.hpp in Headers */,
F6FC3CB71FC323430001D929 /* discovery_manager.hpp in Headers */,
@ -802,17 +813,18 @@
files = (
456E1B3A1F9A3C2A009C32E1 /* search_mark.cpp in Sources */,
4564FA83209497A70043CCFB /* bookmark_catalog.cpp in Sources */,
3DA5714120B5CC80007BDE27 /* booking_availability_filter.cpp in Sources */,
F6B283051C1B03320081957A /* gps_track_filter.cpp in Sources */,
675346481A4054E800A0A8C3 /* bookmark_manager.cpp in Sources */,
45F6EE9F1FB1C77600019892 /* search_api.cpp in Sources */,
BB4E5F251FCC664A00A77250 /* transit_display.cpp in Sources */,
3D47B2931F054BC5000828D2 /* taxi_delegate.cpp in Sources */,
675346741A4054E800A0A8C3 /* mwm_url.cpp in Sources */,
3DA5714220B5CC80007BDE27 /* booking_filter_processor.cpp in Sources */,
347B60761DD9926D0050FA24 /* traffic_manager.cpp in Sources */,
BBFC7E3A202D29C000531BE7 /* user_mark_layer.cpp in Sources */,
F6B283091C1B03320081957A /* gps_track.cpp in Sources */,
34583BCF1C88556800F94664 /* place_page_info.cpp in Sources */,
3D4E99A41FB4A6410025B48C /* booking_filter.cpp in Sources */,
F6B283031C1B03320081957A /* gps_track_collection.cpp in Sources */,
3D4E99A31FB4A6410025B48C /* booking_filter_cache.cpp in Sources */,
6753469B1A4054E800A0A8C3 /* track.cpp in Sources */,

View file

@ -39,6 +39,7 @@
3D4E997D1FB439260025B48C /* booking_availability_params.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D4E997B1FB439260025B48C /* booking_availability_params.cpp */; };
3D4E997F1FB439300025B48C /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D4E997E1FB439300025B48C /* utils.cpp */; };
3D7815761F3A14910068B6AC /* async_gui_thread.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D7815751F3A14910068B6AC /* async_gui_thread.hpp */; };
3DA5713420B57358007BDE27 /* booking_params_base.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5713320B57358007BDE27 /* booking_params_base.hpp */; };
3DBC1C541E4B14920016897F /* facebook_ads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DBC1C521E4B14920016897F /* facebook_ads.cpp */; };
3DBC1C551E4B14920016897F /* facebook_ads.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DBC1C531E4B14920016897F /* facebook_ads.hpp */; };
3DF01C2D20652463005DDF8C /* taxi_places.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DF01C2A20652462005DDF8C /* taxi_places.cpp */; };
@ -115,6 +116,7 @@
3D4E997B1FB439260025B48C /* booking_availability_params.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = booking_availability_params.cpp; sourceTree = "<group>"; };
3D4E997E1FB439300025B48C /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utils.cpp; sourceTree = "<group>"; };
3D7815751F3A14910068B6AC /* async_gui_thread.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = async_gui_thread.hpp; sourceTree = "<group>"; };
3DA5713320B57358007BDE27 /* booking_params_base.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_params_base.hpp; sourceTree = "<group>"; };
3DBC1C501E4B14810016897F /* facebook_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = facebook_tests.cpp; sourceTree = "<group>"; };
3DBC1C521E4B14920016897F /* facebook_ads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = facebook_ads.cpp; sourceTree = "<group>"; };
3DBC1C531E4B14920016897F /* facebook_ads.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = facebook_ads.hpp; sourceTree = "<group>"; };
@ -216,6 +218,7 @@
F6B5363B1DA520B20067EEA5 /* partners_api */ = {
isa = PBXGroup;
children = (
3DA5713320B57358007BDE27 /* booking_params_base.hpp */,
346E888F1E9D087400D4CE9B /* ads_base.cpp */,
346E88901E9D087400D4CE9B /* ads_base.hpp */,
346E88911E9D087400D4CE9B /* ads_engine.cpp */,
@ -322,6 +325,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
3DA5713420B57358007BDE27 /* booking_params_base.hpp in Headers */,
346E88971E9D087400D4CE9B /* ads_base.hpp in Headers */,
3D7815761F3A14910068B6AC /* async_gui_thread.hpp in Headers */,
F67E75261DB8F06F00D6741F /* opentable_api.hpp in Headers */,