2 * Copyright (c) 2007, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
6 * Ćukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
8 #ifndef INSTALLED_PACKAGE_INFO_H
9 #define INSTALLED_PACKAGE_INFO_H
17 #define P_BUSY_TRIES 10
20 P_PACKAGE_INFO
= 'ppki'
23 extern const char * kPackagesDir
;
26 // Useful function for fetching the package name and version without parsing all
28 status_t
info_get_package_name(const char* filename
, BString
& name
);
29 status_t
info_get_package_version(const char* filename
, BString
& name
);
32 class InstalledPackageInfo
{
34 InstalledPackageInfo();
35 InstalledPackageInfo(const char* packageName
,
36 const char* version
= NULL
,
38 ~InstalledPackageInfo();
41 status_t
SetTo(const char* packageName
,
42 const char* version
= NULL
,
45 void SetName(const char* name
)
48 { return fName
.String(); }
49 void SetDescription(const char* description
)
50 { fDescription
= description
; }
51 const char* Description()
52 { return fDescription
.String(); }
54 { return fVersion
.String(); }
55 void SetSpaceNeeded(uint64 size
)
56 { fSpaceNeeded
= size
; }
58 { return fSpaceNeeded
; }
60 status_t
AddItem(const char* itemName
);
66 void _ClearItemList();
77 BList fInstalledItems
;
83 #endif // INSTALLED_PACKAGE_INFO_H