repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haikudepot / ui / MessagePackageListener.h
blob935ec1f13eccd7fdba74c726b9679c84a54b9b8a
1 /*
2 * Copyright 2013-2014, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5 #ifndef MESSAGE_PACKAGE_LISTENER_H
6 #define MESSAGE_PACKAGE_LISTENER_H
9 #include "PackageInfoListener.h"
12 enum {
13 MSG_UPDATE_PACKAGE = 'updp'
16 class BHandler;
19 class MessagePackageListener : public PackageInfoListener {
20 public:
21 MessagePackageListener(BHandler* target);
22 virtual ~MessagePackageListener();
24 virtual void PackageChanged(const PackageInfoEvent& event);
26 void SetChangesMask(uint32 mask);
28 private:
29 BHandler* fTarget;
30 uint32 fChangesMask;
34 class OnePackageMessagePackageListener : public MessagePackageListener {
35 public:
36 OnePackageMessagePackageListener(
37 BHandler* target);
38 virtual ~OnePackageMessagePackageListener();
40 void SetPackage(const PackageInfoRef& package);
41 const PackageInfoRef& Package() const;
43 private:
44 PackageInfoRef fPackage;
48 #endif // MESSAGE_PACKAGE_LISTENER_H