doc
 All Classes Functions Variables Properties
/Users/rburkes/Projects/mobile/branches/release-1-2/devices/iphone/core/src/EMLib/EMSearchQueryInfiniteScrollController.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 <Foundation/Foundation.h>
00049 #import <Three20/Three20.h>
00050 #import "EMInfiniteScrollController.h"
00051 
00056 @class EMSearchBar, EMSearchQueryDataSource, EMTypeaheadDataSource, EMSearchQuery;
00057 
00061 @interface EMSearchQueryInfiniteScrollController : EMInfiniteScrollController<UITextFieldDelegate, UIAlertViewDelegate> {
00062         
00066         NSArray *_sortOptions;
00067         BOOL _showSortBarAlways;
00068         NSString *_searchKey;
00069         BOOL _searchWithin;
00070         BOOL _showSearchBar;
00071         BOOL _showBreadcrumbs;
00072         BOOL _showSearchBarCancelButton;
00073         BOOL _showSearchBarOnNavBar;
00074         BOOL _analyticsEnabled;
00075         BOOL _showResultsForEmptyQuery, _showFacetsForEmptyQuery;
00076         BOOL _pushDetailPageOnSingleResult;
00077 
00078         
00079         NSInteger _itemCellHeight;
00080 
00085         // This is expected to be set through overriding the keywordsSource method
00086         EMTypeaheadDataSource *_keywordsSource;
00087         
00088         
00092         BOOL _showingFilterView, _reloadTableData, _didAppear;
00093         BOOL _showingKeyboard, _cancellingKeyboard;
00094         
00095         NSString *_previousSearchBarText;
00096         
00100         TTView *_sortBar;
00101         UISegmentedControl *_sortControl;
00102         
00103         EMSearchBar *_searchBar;
00104         
00105         UIView *_emptyQueryOverlay, *_noResultsOverlay, *_noConnectionOverlay, *_loadingOverlay;
00106         UILabel *_errorLabel, *_noResultsLabel;
00107         
00108         BOOL _searchBarFirstResponderEnabled;
00109         
00110 }
00111 
00112 
00121 @property (nonatomic, retain) NSArray *sortOptions;
00122 
00130 @property (nonatomic, assign) BOOL showSortBarAlways;
00131 
00137 @property (nonatomic, retain) NSString *searchKey;
00138 
00145 @property (nonatomic, assign) BOOL searchWithin;
00146 
00150 @property (nonatomic, assign) BOOL showSearchBar;
00151 
00155 @property (nonatomic, assign) BOOL showBreadcrumbs;
00156 
00160 @property (nonatomic, assign) BOOL showSearchBarCancelButton;
00161 
00165 @property (nonatomic, assign) BOOL showSearchBarOnNavBar;
00166 
00170 @property (nonatomic, assign) BOOL analyticsEnabled;
00171 
00175 @property (nonatomic, assign) BOOL showResultsForEmptyQuery;
00176 
00180 @property (nonatomic, assign) BOOL showFacetsForEmptyQuery;
00181 
00185 @property (nonatomic, assign) BOOL pushDetailPageOnSingleResult;
00186 
00190 @property (nonatomic, readonly) EMSearchBar *searchBar;
00191 
00195 @property (nonatomic, readonly) UIView *emptyQueryOverlay, *noResultsOverlay, *noConnectionOverlay, *loadingOverlay;
00196 
00200 @property (nonatomic, retain) EMSearchQuery *query;
00201 
00205 @property (nonatomic, retain) EMSearchQueryDataSource *dataSource;
00206 
00211 @property (nonatomic, assign) BOOL searchBarFirstResponderEnabled;
00212 
00216 @property (nonatomic, assign) int itemCellHeight;
00217 
00218 
00219 - (id) initWithSearchQueryDataSource:(EMSearchQueryDataSource *)searchQueryDataSource 
00220                                                         maxItems:(int)maxItemsToLoad;
00221 
00222 
00223 - (void) showEmptyQueryOverlay:(BOOL)show;
00224 - (void) showNoResultsOverlay:(BOOL)show;
00225 - (void) showNoConnectionOverlay:(BOOL)show;
00226 - (void) showLoadingOverlay:(BOOL)show;
00227 
00232 - (void) adjustRightBarButtonItem;
00233 
00239 - (EMTypeaheadDataSource *) keywordsSource;
00240 
00246 - (UIViewController *) facetsController;
00247 
00248 @end
00249