/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. // BooksSampleWindowController.h
  17. //
  18. //
  19. // IMPORTANT:
  20. //
  21. // The XML-based API for Google Books has been replaced with a more efficient
  22. // and easier-to-use JSON API. The new API is documented at
  23. //
  24. // https://developers.google.com/books/
  25. //
  26. // See the new Objective-C client library and sample code at
  27. // http://code.google.com/p/google-api-objectivec-client/
  28. //
  29. // This sample application and library support for the XML-based Books
  30. // API will eventually be removed.
  31. //
  32. #import <Cocoa/Cocoa.h>
  33. #import <WebKit/WebKit.h>
  34. #import "GData/GDataBooks.h"
  35. @interface BooksSampleWindowController : NSWindowController {
  36. IBOutlet NSButton *mGetVolumesButton;
  37. IBOutlet NSTextField *mUsernameField;
  38. IBOutlet NSSecureTextField *mPasswordField;
  39. IBOutlet NSButton *mSearchButton;
  40. IBOutlet NSPopUpButton *mViewabilityPopUp;
  41. IBOutlet NSTextField *mSearchField;
  42. IBOutlet NSTableView *mVolumesTable;
  43. IBOutlet NSProgressIndicator *mVolumesProgressIndicator;
  44. IBOutlet NSTextView *mVolumesResultTextField;
  45. IBOutlet NSButton *mVolumesCancelButton;
  46. IBOutlet NSImageView *mVolumeImageView;
  47. IBOutlet NSSegmentedControl *mUserFeedTypeSegments;
  48. IBOutlet NSPopUpButton *mCollectionPopup;
  49. IBOutlet NSProgressIndicator *mCollectionProgressIndicator;
  50. IBOutlet NSSegmentedControl *mWebViewSegments;
  51. IBOutlet WebView *mWebView;
  52. IBOutlet NSProgressIndicator *mAnnotationsProgressIndicator;
  53. IBOutlet NSButton *mAnnotationsCancelButton;
  54. IBOutlet NSTextField *mLabelField;
  55. IBOutlet NSButton *mAddLabelButton;
  56. IBOutlet NSPopUpButton *mRatingPopup;
  57. IBOutlet NSTextField *mAverageRatingField;
  58. IBOutlet NSTextField *mReviewField;
  59. IBOutlet NSButton *mSaveReviewButton;
  60. // the volumes feed is returned from a fetch of the user's library
  61. // or annotations, or from a search
  62. GDataFeedVolume *mVolumesFeed;
  63. GDataServiceTicket *mVolumesFetchTicket;
  64. NSError *mVolumesFetchError;
  65. // feed of user's collections
  66. GDataFeedCollection *mCollectionsFeed;
  67. GDataServiceTicket *mCollectionsFetchTicket;
  68. NSError *mCollectionsFetchError;
  69. // the annotations fetch is for setting rating, review, or label
  70. // on a volume entry
  71. GDataServiceTicket *mAnnotationsFetchTicket;
  72. // we retain the currently-displayed book thumbnail or web page
  73. // so we can determine if they've changed as the user's selections
  74. // change
  75. NSString *mVolumeImageURLString;
  76. NSString *mVolumeWebURLString;
  77. }
  78. + (BooksSampleWindowController *)sharedBooksSampleWindowController;
  79. - (IBAction)getVolumesClicked:(id)sender;
  80. - (IBAction)collectionPopupClicked:(id)sender;
  81. - (IBAction)searchClicked:(id)sender;
  82. - (IBAction)cancelVolumeFetchClicked:(id)sender;
  83. - (IBAction)userFeedTypeSegmentClicked:(id)sender;
  84. - (IBAction)webViewSegmentClicked:(id)sender;
  85. - (IBAction)addLabelClicked:(id)sender;
  86. - (IBAction)ratingPopupClicked:(id)sender;
  87. - (IBAction)saveReviewClicked:(id)sender;
  88. - (IBAction)cancelAnnotationsFetchClicked:(id)sender;
  89. - (IBAction)loggingCheckboxClicked:(id)sender;
  90. @end