mirror of
https://review.haiku-os.org/haiku
synced 2025-01-24 07:14:48 +01:00
e6216e372a
* Rename PackageDaemonDefs.h to DaemonDefs.h. * Replace the MESSAGE_GET_PACKAGES by the new B_MESSAGE_GET_INSTALLATION_LOCATION_INFO, which not only returns the packages, but also other information about the installation location. * daemon: Volume: Implement a change count which is bumped whenever packages are activated/deactivated/added/removed. Cache the reply for a location info request, using the change count to check whether it is still up-to-date. * Add private BDaemonClient for communication with the daemon. * BRoster: - Add GetInstallationLocationInfo() using BDaemonClient. - Reimplement GetActivePackages(), using GetInstallationLocationInfo().
50 lines
944 B
C++
50 lines
944 B
C++
/*
|
|
* Copyright 2013, Haiku, Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Ingo Weinhold <ingo_weinhold@gmx.de>
|
|
*/
|
|
#ifndef _PACKAGE__PRIVATE__DAEMON_CLIENT_H_
|
|
#define _PACKAGE__PRIVATE__DAEMON_CLIENT_H_
|
|
|
|
|
|
#include <Messenger.h>
|
|
#include <package/PackageDefs.h>
|
|
|
|
|
|
namespace BPackageKit {
|
|
|
|
|
|
class BInstallationLocationInfo;
|
|
class BPackageInfoSet;
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
|
|
class BDaemonClient {
|
|
public:
|
|
BDaemonClient();
|
|
~BDaemonClient();
|
|
|
|
status_t GetInstallationLocationInfo(
|
|
BPackageInstallationLocation location,
|
|
BInstallationLocationInfo& _info);
|
|
|
|
private:
|
|
status_t _InitMessenger();
|
|
status_t _ExtractPackageInfoSet(const BMessage& message,
|
|
const char* field, BPackageInfoSet& _infos);
|
|
|
|
private:
|
|
BMessenger fDaemonMessenger;
|
|
};
|
|
|
|
|
|
} // namespace BPrivate
|
|
} // namespace BPackageKit
|
|
|
|
|
|
#endif // _PACKAGE__PRIVATE__DAEMON_CLIENT_H_
|