2 * Copyright 2017, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Brian Hill <supernova@tycho.email>
10 #include "WorkingLooper.h"
13 WorkingLooper::WorkingLooper(update_type action
, bool verbose
)
15 BLooper("WorkingLooper"),
18 fActionRequested(action
),
22 PostMessage(kMsgStart
);
26 WorkingLooper::~WorkingLooper()
34 WorkingLooper::MessageReceived(BMessage
* message
)
36 switch (message
->what
) {
39 if (fActionRequested
== UPDATE_CHECK_ONLY
) {
40 fCheckAction
= new CheckAction(fVerbose
);
41 fCheckAction
->Perform();
43 fUpdateAction
= new UpdateAction(fVerbose
);
44 fUpdateAction
->Perform(fActionRequested
);
50 BLooper::MessageReceived(message
);