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

MapsObservers.h « Classes « Maps « iphone - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6b16be5478a154cafe122f965dc71936881662be (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

#include "Framework.h"
#include "../../storage/storage_defines.hpp"

using namespace storage;

@protocol ActiveMapsObserverProtocol <NSObject>

- (void)countryStatusChangedAtPosition:(int)position inGroup:(ActiveMapsLayout::TGroup const &)group;

@optional
- (void)countryGroupChangedFromPosition:(int)oldPosition inGroup:(ActiveMapsLayout::TGroup const &)oldGroup toPosition:(int)newPosition inGroup:(ActiveMapsLayout::TGroup const &)newGroup;
- (void)countryOptionsChangedAtPosition:(int)position inGroup:(ActiveMapsLayout::TGroup const &)group;
- (void)countryDownloadingProgressChanged:(LocalAndRemoteSizeT const &)progress atPosition:(int)position inGroup:(ActiveMapsLayout::TGroup const &)group;

@end

@protocol CountryTreeObserverProtocol <NSObject>

- (void)countryStatusChangedAtPositionInNode:(int)position;
- (void)countryDownloadingProgressChanged:(LocalAndRemoteSizeT const &)progress atPositionInNode:(int)position;

@end

@class MWMWatchNotification;

class ActiveMapsObserver : public ActiveMapsLayout::ActiveMapsListener
{
public:
  ActiveMapsObserver(id<ActiveMapsObserverProtocol> delegateObject);
  virtual ~ActiveMapsObserver();

  virtual void CountryGroupChanged(ActiveMapsLayout::TGroup const & oldGroup, int oldPosition,
                                   ActiveMapsLayout::TGroup const & newGroup, int newPosition);
  virtual void CountryStatusChanged(ActiveMapsLayout::TGroup const & group, int position,
                                    TStatus const & oldStatus, TStatus const & newStatus);
  virtual void CountryOptionsChanged(ActiveMapsLayout::TGroup const & group, int position,
                                     MapOptions const & oldOpt, MapOptions const & newOpt);
  virtual void DownloadingProgressUpdate(ActiveMapsLayout::TGroup const & group, int position, LocalAndRemoteSizeT const & progress);

private:
  id<ActiveMapsObserverProtocol> m_delegateObject;
  MWMWatchNotification * m_notificationCenter;
};


class CountryTreeObserver : public CountryTree::CountryTreeListener
{
public:
  CountryTreeObserver(id<CountryTreeObserverProtocol> delegateObject);

  virtual void ItemStatusChanged(int childPosition);
  virtual void ItemProgressChanged(int childPosition, LocalAndRemoteSizeT const & sizes);

private:
  id<CountryTreeObserverProtocol> m_delegateObject;
};