2 * Copyright 2013-2017, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Ingo Weinhold <ingo_weinhold@gmx.de>
7 * Rene Gollent <rene@gollent.com>
8 * Brian Hill <supernova@tycho.email>
10 #ifndef CHECK_MANAGER_H
11 #define CHECK_MANAGER_H
16 #include <package/DaemonClient.h>
17 #include <package/manager/PackageManager.h>
19 #include "constants.h"
20 #include "SoftwareUpdaterWindow.h"
24 //using namespace BPackageKit;
25 using BPackageKit::BPackageInstallationLocation
;
26 using BPackageKit::BPrivate::BDaemonClient
;
27 using BPackageKit::BManager::BPrivate::BPackageManager
;
30 class CheckManager
: public BPackageManager
,
31 private BPackageManager::UserInteractionHandler
{
34 BPackageInstallationLocation location
,
37 void CheckNetworkConnection();
38 virtual void JobFailed(BSupportKit::BJob
* job
);
39 virtual void JobAborted(BSupportKit::BJob
* job
);
40 void NoUpdatesNotification();
43 // UserInteractionHandler
44 virtual void HandleProblems();
45 virtual void ConfirmChanges(bool fromMostSpecific
);
46 virtual void Warn(status_t error
, const char* format
, ...);
48 virtual void ProgressPackageDownloadStarted(
49 const char* packageName
);
50 virtual void ProgressPackageDownloadActive(
51 const char* packageName
,
52 float completionPercentage
,
53 off_t bytes
, off_t totalBytes
);
54 virtual void ProgressPackageDownloadComplete(
55 const char* packageName
);
56 virtual void ProgressPackageChecksumStarted(
57 const char* packageName
);
58 virtual void ProgressPackageChecksumComplete(
59 const char* packageName
);
62 void _CountUpdates(InstalledRepository
&
63 installationRepository
,
65 void _SendNotification(const char* title
,
69 BPackageManager::ClientInstallationInterface
70 fClientInstallationInterface
;
72 ProblemWindow
* fProblemWindow
;
74 BString fNotificationId
;
75 BString fHeaderChecking
;
76 BString fTextContacting
;
80 #endif // CHECK_MANAGER_H