haiku/headers/private/storage/DiskSystemAddOnManager.h
Bryce Groff 2f3ce2bf7e DriveSetup:
- File system is now only displayed when the partition actually has a filesystem.
- Now checks if the DiskSystem supports initializing.
- Updated the *ParamsPanels, as well as, the Disk System add-ons to use the new storage api changes (see below).

Storage Kit:
- Simplified the parameters editor system. Now all parameter editor requests go through a single function, GetParameterEditor, and pass a B_PARAMETER_EDITOR_TYPE to request a particular parameter editor.
- Moved DiskDeviceAddOnManager.h to the headers directory, as it is now required by InitParamsPanel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 03:39:19 +00:00

68 lines
1.3 KiB
C++

/*
* Copyright 2007, Ingo Weinhold, bonefish@users.sf.net.
* Distributed under the terms of the MIT License.
*/
#ifndef _DISK_SYSTEM_ADD_ON_MANAGER_H
#define _DISK_SYSTEM_ADD_ON_MANAGER_H
#include <FindDirectory.h>
#include <List.h>
#include <Locker.h>
class BDiskSystemAddOn;
namespace BPrivate {
class DiskSystemAddOnManager {
public:
static DiskSystemAddOnManager* Default();
bool Lock();
void Unlock();
// load/unload all disk system add-ons
status_t LoadDiskSystems();
void UnloadDiskSystems();
// manager must be locked
int32 CountAddOns() const;
BDiskSystemAddOn* AddOnAt(int32 index) const;
// manager will be locked
BDiskSystemAddOn* GetAddOn(const char* name);
void PutAddOn(BDiskSystemAddOn* addOn);
private:
struct AddOnImage;
struct AddOn;
struct StringSet;
DiskSystemAddOnManager();
static void _InitSingleton();
AddOn* _AddOnAt(int32 index) const;
void _PutAddOn(int32 index);
status_t _LoadAddOns(StringSet& alreadyLoaded,
directory_which directory);
private:
mutable BLocker fLock;
BList fAddOns;
BList fAddOnsToBeUnloaded;
int32 fLoadCount;
static DiskSystemAddOnManager* sManager;
};
} // namespace BPrivate
using BPrivate::DiskSystemAddOnManager;
#endif // _DISK_SYSTEM_ADD_ON_MANAGER_H