diff options
author | Igor Khmurets <subzero@mapswithme.com> | 2014-10-10 18:05:32 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:30:41 +0300 |
commit | e5f65a930eec7fb48a6b24a055d3c78968d46d80 (patch) | |
tree | 3ffcb3adc7a522eecbffde1d3867240f526925c5 /iphone/Maps/Classes/MapsObservers.mm | |
parent | 545aaaafecb7c2add5029b7e4c635f2b6980ce6e (diff) |
[ios] Downloader UI
Diffstat (limited to 'iphone/Maps/Classes/MapsObservers.mm')
-rw-r--r-- | iphone/Maps/Classes/MapsObservers.mm | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/MapsObservers.mm b/iphone/Maps/Classes/MapsObservers.mm new file mode 100644 index 0000000000..4850f88b79 --- /dev/null +++ b/iphone/Maps/Classes/MapsObservers.mm @@ -0,0 +1,52 @@ + +#import <Foundation/Foundation.h> +#import "MapsObservers.h" + +ActiveMapsObserver::ActiveMapsObserver(id<ActiveMapsObserverProtocol> delegateObject) +: m_delegateObject(delegateObject) +{ +} + +void ActiveMapsObserver::CountryGroupChanged(ActiveMapsLayout::TGroup const & oldGroup, int oldPosition, + ActiveMapsLayout::TGroup const & newGroup, int newPosition) +{ + if ([m_delegateObject respondsToSelector:@selector(countryGroupChangedFromPosition:inGroup:toPosition:inGroup:)]) + [m_delegateObject countryGroupChangedFromPosition:oldPosition inGroup:oldGroup toPosition:newPosition inGroup:newGroup]; +} + +void ActiveMapsObserver::CountryStatusChanged(ActiveMapsLayout::TGroup const & group, int position, + TStatus const & oldStatus, TStatus const & newStatus) +{ + if ([m_delegateObject respondsToSelector:@selector(countryStatusChangedAtPosition:inGroup:)]) + [m_delegateObject countryStatusChangedAtPosition:position inGroup:group]; +} + +void ActiveMapsObserver::CountryOptionsChanged(ActiveMapsLayout::TGroup const & group, int position, TMapOptions const & oldOpt, TMapOptions const & newOpt) +{ + if ([m_delegateObject respondsToSelector:@selector(countryOptionsChangedAtPosition:inGroup:)]) + [m_delegateObject countryOptionsChangedAtPosition:position inGroup:group]; +} + +void ActiveMapsObserver::DownloadingProgressUpdate(ActiveMapsLayout::TGroup const & group, int position, LocalAndRemoteSizeT const & progress) +{ + if ([m_delegateObject respondsToSelector:@selector(countryDownloadingProgressChanged:atPosition:inGroup:)]) + [m_delegateObject countryDownloadingProgressChanged:progress atPosition:position inGroup:group]; +} + + +CountryTreeObserver::CountryTreeObserver(id<CountryTreeObserverProtocol> delegateObject) +: m_delegateObject(delegateObject) +{ +} + +void CountryTreeObserver::ItemStatusChanged(int childPosition) +{ + if ([m_delegateObject respondsToSelector:@selector(countryStatusChangedAtPositionInNode:)]) + [m_delegateObject countryStatusChangedAtPositionInNode:childPosition]; +} + +void CountryTreeObserver::ItemProgressChanged(int childPosition, storage::LocalAndRemoteSizeT const & sizes) +{ + if ([m_delegateObject respondsToSelector:@selector(countryDownloadingProgressChanged:atPositionInNode:)]) + [m_delegateObject countryDownloadingProgressChanged:sizes atPositionInNode:childPosition]; +}
\ No newline at end of file |