doc
 All Classes Functions Variables Properties
/Users/rburkes/Projects/mobile/branches/release-1-2/devices/iphone/core/src/EMLib/EMiPadStoreLocatorViewController.h
00001 /*
00002 Copyright 2001, 2012, Oracle and/or its affiliates. All rights reserved.
00003 Oracle and Java are registered trademarks of Oracle and/or its 
00004 affiliates. Other names may be trademarks of their respective owners.
00005 UNIX is a registered trademark of The Open Group.
00006 
00007 This software and related documentation are provided under a license 
00008 agreement containing restrictions on use and disclosure and are 
00009 protected by intellectual property laws. Except as expressly permitted 
00010 in your license agreement or allowed by law, you may not use, copy, 
00011 reproduce, translate, broadcast, modify, license, transmit, distribute, 
00012 exhibit, perform, publish, or display any part, in any form, or by any 
00013 means. Reverse engineering, disassembly, or decompilation of this 
00014 software, unless required by law for interoperability, is prohibited.
00015 The information contained herein is subject to change without notice 
00016 and is not warranted to be error-free. If you find any errors, please 
00017 report them to us in writing.
00018 U.S. GOVERNMENT END USERS: Oracle programs, including any operating 
00019 system, integrated software, any programs installed on the hardware, 
00020 and/or documentation, delivered to U.S. Government end users are 
00021 "commercial computer software" pursuant to the applicable Federal 
00022 Acquisition Regulation and agency-specific supplemental regulations. 
00023 As such, use, duplication, disclosure, modification, and adaptation 
00024 of the programs, including any operating system, integrated software, 
00025 any programs installed on the hardware, and/or documentation, shall be 
00026 subject to license terms and license restrictions applicable to the 
00027 programs. No other rights are granted to the U.S. Government.
00028 This software or hardware is developed for general use in a variety 
00029 of information management applications. It is not developed or 
00030 intended for use in any inherently dangerous applications, including 
00031 applications that may create a risk of personal injury. If you use 
00032 this software or hardware in dangerous applications, then you shall 
00033 be responsible to take all appropriate fail-safe, backup, redundancy, 
00034 and other measures to ensure its safe use. Oracle Corporation and its 
00035 affiliates disclaim any liability for any damages caused by use of this 
00036 software or hardware in dangerous applications.
00037 This software or hardware and documentation may provide access to or 
00038 information on content, products, and services from third parties. 
00039 Oracle Corporation and its affiliates are not responsible for and 
00040 expressly disclaim all warranties of any kind with respect to 
00041 third-party content, products, and services. Oracle Corporation and 
00042 its affiliates will not be responsible for any loss, costs, or damages 
00043 incurred due to your access to or use of third-party content, products, 
00044 or services.
00045 */
00046 
00047 
00048 #import <UIKit/UIKit.h>
00049 #import <MapKit/MapKit.h>
00050 #import <AddressBookUI/AddressBookUI.h>
00051 #import <Three20/Three20.h>
00052 #import <Three20/Three20+Additions.h>
00053 #import "EMMapAnnotation.h"
00054 #import "EMPageableDataSource.h"
00055 #import "EMStore.h"
00056 #import "EMStoreListTableView.h"
00057 #import "EMSearchTextField.h"
00058 #import "EMLoadingView.h"
00059 #import "EMSelectFromContacts.h"
00060 #import "EMStoreInfoController.h"
00061 #import "EMButton.h"
00062 
00068 @class EMiPadStoreLocatorViewController;
00069 
00070 @protocol EMiPadStoreLocatorViewControllerDelegate <NSObject>
00071 
00072 - (void) viewController:(UIViewController *)viewController didRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation;
00073 
00074 @end
00075 
00076 @interface EMiPadStoreLocatorViewController : UIViewController <MKMapViewDelegate,
00077 CLLocationManagerDelegate, EMPageableDataSourceDelegate, UITextFieldDelegate, 
00078 EMStoreListTableViewDelegate, EMStoreInfoControllerDelegate, EMSelectFromContactsDelegate,
00079 UIAlertViewDelegate, UIPopoverControllerDelegate> {
00080         MKMapView *_mapView;
00081         EMMapAnnotation* _annotation;
00082         EMSearchQueryDataSource *_dataSource;
00083         
00084         CLLocation *_location;
00085         
00086         //Endeca Property which corresponds to geocodes
00087         NSString *_geoFilterProperty;
00088         
00089         //Search radius
00090         CGFloat _searchRadius;
00091         
00092         //Flag for updating map location while moving
00093         //Default: NO, not implemented fully
00094         BOOL _shouldCenterToCurrentLocation;
00095         
00096         EMSearchTextField *_locationTextField;
00097 
00098         UIView *_searchBarContainer;
00099         
00100         NSString *_locationString;
00101         
00102         EMStoreListTableView *_storeListTableView;
00103         UIPopoverController *_storePopoverController;
00104         UIPopoverController *_filterPopoverController;
00105         EMButton *_filterButton;
00106         
00107         //Query Booleans
00108         BOOL _currentLocation, _currentMapArea;
00109         
00110         //Location Access
00111         BOOL _locationDenied;
00112         
00113         //Determine who is moving map, either programatically or user
00114         BOOL _programaticPan;
00115         //There are two calls to mapView region did change while initializing and
00116         //loading the view, the temporary solution to get
00117         //around this problem is a _hitTest that is init to 0 
00118         //and when >1 allows the desired function of mapView region did change
00119         //to take place
00120         //TODO:The container view should intercept user touch events and pass them
00121         //to the mapView.
00122         NSInteger _hitTest;
00123         
00124         // Need to keep track of whether the map has loaded
00125         BOOL _mapLoaded, _dataLoaded;                                                                                                                   
00126         
00127         //Sort Stuff
00128         NSMutableArray *_sortOptions;
00129         NSArray *_userSettableSortOptions;
00130         EMSort *_defaultCurrentMapAreaSort;
00131         BOOL _showSortBarAlways;
00132         TTView *_sortBar;
00133         UISegmentedControl *_sortControl;
00134         
00135         BOOL _showFilterButton;
00136     
00137     id<EMiPadStoreLocatorViewControllerDelegate> _delegate;
00138 }
00139 
00140 @property (nonatomic, assign) CGFloat searchRadius;
00141 @property (nonatomic, retain) NSString *geoFilterProperty;
00142 @property (nonatomic, retain) EMSearchQueryDataSource *dataSource;
00143 @property (nonatomic, retain) NSArray *sortOptions;
00144 @property (nonatomic, copy) EMSort *defaultCurrentMapAreaSort;
00145 @property (nonatomic, assign) BOOL showFilterButton;
00146 @property (nonatomic, retain) MKMapView *mapView;
00147 @property (nonatomic, retain) EMStoreListTableView *storeListTableView;
00148 @property (nonatomic, assign) id<EMiPadStoreLocatorViewControllerDelegate> delegate;
00149 
00150 
00151 @end
00152