/core/externals/update-engine/Samples/Actions/AppController.h

http://macfuse.googlecode.com/ · C Header · 45 lines · 14 code · 7 blank · 24 comment · 0 complexity · 929afcd75f94647b3787a149fdfcfe8a MD5 · raw file

  1. // Copyright 2009 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. #import <Cocoa/Cocoa.h>
  15. @class KSActionProcessor;
  16. // AppController is the controller / kitchen-sink object for the Actions
  17. // sample, which manages the window the user can play with. When the user
  18. // clicks a Start button, it kicks off an action processor to download
  19. // a catalog file of images from the internets, filter the catalog based
  20. // on a predicate, and then download and display the images in the catalog.
  21. //
  22. @interface AppController : NSObject {
  23. @private
  24. // Window UI controls.
  25. IBOutlet NSTextField *catalogURLField_;
  26. IBOutlet NSTextField *predicateField_;
  27. IBOutlet NSTextView *statusTextView_;
  28. IBOutlet NSTableView *imageTableView_;
  29. // Images downloaded by actions, displayed in the table view.
  30. NSMutableArray *images_;
  31. // Parallel array. Names of the images.
  32. NSMutableArray *names_;
  33. // Runs the actions that do the real work.
  34. KSActionProcessor *actionProcessor_;
  35. }
  36. // Start off the processing.
  37. - (IBAction)start:(id)sender;
  38. @end // AppController