PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

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

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