2 * Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Ingo Weinhold <ingo_weinhold@gmx.de>
22 Package
* FindPackage(const char* name
) const;
23 Package
* FindPackage(const node_ref
& nodeRef
) const;
25 PackageFileNameHashTable::Iterator
ByFileNameIterator() const;
26 PackageNodeRefHashTable::Iterator
ByNodeRefIterator() const;
28 void AddPackage(Package
* package
);
29 void RemovePackage(Package
* package
);
31 void SetPackageActive(Package
* package
, bool active
);
33 void ActivationChanged(
34 const PackageSet
& activatedPackage
,
35 const PackageSet
& deactivatePackages
);
37 VolumeState
* Clone() const;
40 void _RemovePackage(Package
* package
);
43 PackageFileNameHashTable fPackagesByFileName
;
44 PackageNodeRefHashTable fPackagesByNodeRef
;
49 VolumeState::FindPackage(const char* name
) const
51 return fPackagesByFileName
.Lookup(name
);
56 VolumeState::FindPackage(const node_ref
& nodeRef
) const
58 return fPackagesByNodeRef
.Lookup(nodeRef
);
62 inline PackageFileNameHashTable::Iterator
63 VolumeState::ByFileNameIterator() const
65 return fPackagesByFileName
.GetIterator();
69 inline PackageNodeRefHashTable::Iterator
70 VolumeState::ByNodeRefIterator() const
72 return fPackagesByNodeRef
.GetIterator();
76 #endif // VOLUME_STATE_H