vfs: check userland buffers before reading them.
[haiku.git] / src / apps / haikudepot / ui / PackageContentsView.h
blob136a53c4593fbb63509703427c438d63414374d5
1 /*
2 * Copyright 2015, TigerKid001.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5 #ifndef PACKAGE_CONTENTS_VIEW_H
6 #define PACKAGE_CONTENTS_VIEW_H
8 #include <Locker.h>
9 #include <View.h>
11 #include "PackageInfo.h"
13 class BOutlineListView;
16 class PackageContentsView : public BView {
17 public:
18 PackageContentsView(const char* name);
19 virtual ~PackageContentsView();
21 virtual void AttachedToWindow();
22 virtual void AllAttached();
24 void SetPackage(const PackageInfoRef& package);
25 void Clear();
27 private:
28 void _InitContentPopulator();
29 static int32 _ContentPopulatorThread(void* arg);
30 bool _PopuplatePackageContens(
31 const PackageInfo& package);
32 int32 _InstallLocation(
33 const PackageInfo& package) const;
35 private:
36 BOutlineListView* fContentListView;
38 thread_id fContentPopulator;
39 sem_id fContentPopulatorSem;
40 BLocker fPackageLock;
41 PackageInfoRef fPackage;
42 PackageState fLastPackageState;
45 #endif // PACKAGE_CONTENTS_VIEW_H