RemoteDrawingEngine: Reduce RP_READ_BITMAP result timeout.
[haiku.git] / src / apps / bootmanager / BootMenu.h
blob89191c78d974fc5a928b413d4d14549bad80a720
1 /*
2 * Copyright 2008-2011, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Michael Pfeiffer <laplace@users.sourceforge.net>
7 */
8 #ifndef BOOT_MENU_H
9 #define BOOT_MENU_H
12 #include <File.h>
13 #include <Message.h>
14 #include <ObjectList.h>
17 class BootDrive;
20 /* Setting BMessage Format:
22 "partition" array of BMessage:
23 "show" bool (flag if entry should be added to boot menu)
24 "name" String (the name as shown in boot menu)
25 "type" String (short name of file system: bfs, dos)
26 "path" String (path to partition in /dev/...)
27 "size" long (size of partition in bytes)
31 class BootMenu {
32 public:
33 BootMenu() {}
34 virtual ~BootMenu() {}
36 virtual bool IsInstalled(const BootDrive& drive) = 0;
37 virtual status_t CanBeInstalled(const BootDrive& drive) = 0;
39 virtual status_t CollectPartitions(const BootDrive& drive,
40 BMessage& settings) = 0;
42 virtual status_t Install(const BootDrive& drive,
43 BMessage& settings) = 0;
44 virtual status_t SaveMasterBootRecord(BMessage* settings,
45 BFile* file) = 0;
46 virtual status_t RestoreMasterBootRecord(BMessage* settings,
47 BFile* file) = 0;
49 // Converts the specified text into a text as it will be shown
50 // in the boot menu.
51 virtual status_t GetDisplayText(const char* text,
52 BString& displayText) = 0;
55 typedef BObjectList<BootMenu> BootMenuList;
58 #endif // BOOT_MENU_H