2 * Copyright 2013, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
7 #include <package/GlobalWritableFileInfo.h>
9 #include <package/hpkg/PackageInfoAttributeValue.h>
12 namespace BPackageKit
{
15 BGlobalWritableFileInfo::BGlobalWritableFileInfo()
18 fUpdateType(B_WRITABLE_FILE_UPDATE_TYPE_ENUM_COUNT
)
23 BGlobalWritableFileInfo::BGlobalWritableFileInfo(
24 const BHPKG::BGlobalWritableFileInfoData
& infoData
)
27 fUpdateType(infoData
.updateType
),
28 fIsDirectory(infoData
.isDirectory
)
33 BGlobalWritableFileInfo::BGlobalWritableFileInfo(const BString
& path
,
34 BWritableFileUpdateType updateType
, bool isDirectory
)
37 fUpdateType(updateType
),
38 fIsDirectory(isDirectory
)
43 BGlobalWritableFileInfo::~BGlobalWritableFileInfo()
49 BGlobalWritableFileInfo::InitCheck() const
58 BGlobalWritableFileInfo::Path() const
65 BGlobalWritableFileInfo::IsIncluded() const
67 return fUpdateType
!= B_WRITABLE_FILE_UPDATE_TYPE_ENUM_COUNT
;
71 BWritableFileUpdateType
72 BGlobalWritableFileInfo::UpdateType() const
79 BGlobalWritableFileInfo::IsDirectory() const
86 BGlobalWritableFileInfo::SetTo(const BString
& path
,
87 BWritableFileUpdateType updateType
, bool isDirectory
)
90 fUpdateType
= updateType
;
91 fIsDirectory
= isDirectory
;
95 } // namespace BPackageKit