PageRenderTime 24ms CodeModel.GetById 2ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 1ms

/core/externals/update-engine/externals/gdata-objectivec-client/Examples/BooksSample/BooksSampleWindowController.h

http://macfuse.googlecode.com/
C++ Header | 110 lines | 51 code | 20 blank | 39 comment | 0 complexity | e0e74a794e8c5888c02b02e5c6b8037b MD5 | raw file
  1/* Copyright (c) 2008 Google Inc.
  2*
  3* Licensed under the Apache License, Version 2.0 (the "License");
  4* you may not use this file except in compliance with the License.
  5* You may obtain a copy of the License at
  6*
  7*     http://www.apache.org/licenses/LICENSE-2.0
  8*
  9* Unless required by applicable law or agreed to in writing, software
 10* distributed under the License is distributed on an "AS IS" BASIS,
 11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12* See the License for the specific language governing permissions and
 13* limitations under the License.
 14*/
 15
 16//
 17//  BooksSampleWindowController.h
 18//
 19
 20//
 21// IMPORTANT:
 22//
 23// The XML-based API for Google Books has been replaced with a more efficient
 24// and easier-to-use JSON API.  The new API is documented at
 25//
 26//   https://developers.google.com/books/
 27//
 28// See the new Objective-C client library and sample code at
 29//   http://code.google.com/p/google-api-objectivec-client/
 30//
 31// This sample application and library support for the XML-based Books
 32// API will eventually be removed.
 33//
 34
 35#import <Cocoa/Cocoa.h>
 36#import <WebKit/WebKit.h>
 37
 38#import "GData/GDataBooks.h"
 39
 40@interface BooksSampleWindowController : NSWindowController {
 41
 42  IBOutlet NSButton *mGetVolumesButton;
 43  IBOutlet NSTextField *mUsernameField;
 44  IBOutlet NSSecureTextField *mPasswordField;
 45
 46  IBOutlet NSButton *mSearchButton;
 47  IBOutlet NSPopUpButton *mViewabilityPopUp;
 48  IBOutlet NSTextField *mSearchField;
 49
 50  IBOutlet NSTableView *mVolumesTable;
 51  IBOutlet NSProgressIndicator *mVolumesProgressIndicator;
 52  IBOutlet NSTextView *mVolumesResultTextField;
 53  IBOutlet NSButton *mVolumesCancelButton;
 54  IBOutlet NSImageView *mVolumeImageView;
 55
 56  IBOutlet NSSegmentedControl *mUserFeedTypeSegments;
 57  IBOutlet NSPopUpButton *mCollectionPopup;
 58  IBOutlet NSProgressIndicator *mCollectionProgressIndicator;
 59
 60  IBOutlet NSSegmentedControl *mWebViewSegments;
 61  IBOutlet WebView *mWebView;
 62
 63  IBOutlet NSProgressIndicator *mAnnotationsProgressIndicator;
 64  IBOutlet NSButton *mAnnotationsCancelButton;
 65
 66  IBOutlet NSTextField *mLabelField;
 67  IBOutlet NSButton *mAddLabelButton;
 68  IBOutlet NSPopUpButton *mRatingPopup;
 69  IBOutlet NSTextField *mAverageRatingField;
 70  IBOutlet NSTextField *mReviewField;
 71  IBOutlet NSButton *mSaveReviewButton;
 72
 73  // the volumes feed is returned from a fetch of the user's library
 74  // or annotations, or from a search
 75  GDataFeedVolume *mVolumesFeed;
 76  GDataServiceTicket *mVolumesFetchTicket;
 77  NSError *mVolumesFetchError;
 78
 79  // feed of user's collections
 80  GDataFeedCollection *mCollectionsFeed;
 81  GDataServiceTicket *mCollectionsFetchTicket;
 82  NSError *mCollectionsFetchError;
 83
 84  // the annotations fetch is for setting rating, review, or label
 85  // on a volume entry
 86  GDataServiceTicket *mAnnotationsFetchTicket;
 87
 88  // we retain the currently-displayed book thumbnail or web page
 89  // so we can determine if they've changed as the user's selections
 90  // change
 91  NSString *mVolumeImageURLString;
 92  NSString *mVolumeWebURLString;
 93}
 94
 95+ (BooksSampleWindowController *)sharedBooksSampleWindowController;
 96
 97- (IBAction)getVolumesClicked:(id)sender;
 98- (IBAction)collectionPopupClicked:(id)sender;
 99- (IBAction)searchClicked:(id)sender;
100
101- (IBAction)cancelVolumeFetchClicked:(id)sender;
102- (IBAction)userFeedTypeSegmentClicked:(id)sender;
103- (IBAction)webViewSegmentClicked:(id)sender;
104- (IBAction)addLabelClicked:(id)sender;
105- (IBAction)ratingPopupClicked:(id)sender;
106- (IBAction)saveReviewClicked:(id)sender;
107- (IBAction)cancelAnnotationsFetchClicked:(id)sender;
108
109- (IBAction)loggingCheckboxClicked:(id)sender;
110@end