PageRenderTime 10ms CodeModel.GetById 6ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://macfuse.googlecode.com/
C++ Header | 51 lines | 14 code | 11 blank | 26 comment | 0 complexity | e037ae7f895339b6da1779fe5c44d346 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 "KSMultiAction.h"
17
18@class KSUpdateEngine;
19
20// KSMultiUpdateAction
21//
22// Abstract action that encapsulates running multiple sub-KSUpdateActions. Two
23// concrete subclasses of this class are KSSilentUpdateAction and
24// KSPromptAction, each of which differ only in how they figure out which of
25// the available updates should be installed.
26@interface KSMultiUpdateAction : KSMultiAction {
27 @private
28  KSUpdateEngine *engine_;
29}
30
31// Returns an autoreleased action associated with the given |engine|
32+ (id)actionWithEngine:(KSUpdateEngine *)engine;
33
34// Designated initializer. Returns an action associated with |engine|
35- (id)initWithEngine:(KSUpdateEngine *)engine;
36
37// Returns the KSUpdateEngine instance for this KSMultiUpdateAction
38- (KSUpdateEngine *)engine;
39
40@end
41
42
43// These methods MUST be implemented by subclasses. These methods are called
44// from the -performAction method and are required.
45@interface KSMultiUpdateAction (PureVirtualMethods)
46
47// Given an array of KSUpdateInfos. Returns an array of KSUpdateInfos for the
48// products that should be updated.
49- (NSArray *)productsToUpdateFromAvailable:(NSArray *)availableUpdates;
50
51@end