/core/externals/update-engine/Core/KSSilentUpdateAction.h

http://macfuse.googlecode.com/ · C Header · 55 lines · 5 code · 5 blank · 45 comment · 0 complexity · f46436516bab3ab8d1108b411ccd1048 MD5 · raw file

  1. // Copyright 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. #import <Foundation/Foundation.h>
  15. #import "KSMultiUpdateAction.h"
  16. @class KSUpdateEngine, KSActionProcessor;
  17. // KSSilentUpdateAction
  18. //
  19. // This concrete KSMultiAction subclass that takes input from its inPipe, which
  20. // must be an array of product dictionaries (see KSUpdateInfo.h for more details
  21. // on the format), and messages the engine_'s delegate to find out which of
  22. // the products in the array should be installed. Based on the response from the
  23. // delegate, KSUpdateActions will be created and run on an internal
  24. // KSActionProcessor. This action never adds any actions to the processor on
  25. // which it itself is running. This action finishes once all of its subactions
  26. // (if any) complete.
  27. //
  28. // Upon completion, this action's outPipe will contain the number of
  29. // KSUpdateActions enqueued, wrapped in an NSNumber.
  30. //
  31. // Sample code to create a checker and a prompt connected via a pipe.
  32. //
  33. // KSActionProcessor *ap = ...
  34. // KSUpdateCheckAction *checker = ...
  35. //
  36. // KSAction *update = [KSSilentUpdateActionactionWithEngine:engine_];
  37. //
  38. // KSActionPipe *pipe = [KSActionPipe pipe];
  39. // [checker setOutPipe:pipe];
  40. // [update setInPipe:pipe];
  41. //
  42. // [ap enqueueAction:checker];
  43. // [ap enqueueAction:update];
  44. //
  45. // [ap startProcessing];
  46. //
  47. // See KSUpdateEngine.m for another example of using KSSilentUpdateAction.
  48. @interface KSSilentUpdateAction : KSMultiUpdateAction
  49. // See KSMutliUpdateAction's interface
  50. @end