Code style correction by Barret, ticket #7453. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41263 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
22c7e6324c
commit
e1b526b95a
@ -5,21 +5,24 @@
|
||||
|
||||
#include "AddOnImage.h"
|
||||
|
||||
|
||||
// constructor
|
||||
AddOnImage::AddOnImage()
|
||||
: fID(-1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
AddOnImage::~AddOnImage()
|
||||
{
|
||||
Unload();
|
||||
}
|
||||
|
||||
|
||||
// Load
|
||||
status_t
|
||||
AddOnImage::Load(const char *path)
|
||||
AddOnImage::Load(const char* path)
|
||||
{
|
||||
Unload();
|
||||
status_t error = (path ? B_OK : B_BAD_VALUE);
|
||||
@ -33,6 +36,7 @@ AddOnImage::Load(const char *path)
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// Unload
|
||||
void
|
||||
AddOnImage::Unload()
|
||||
@ -43,6 +47,7 @@ AddOnImage::Unload()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// SetID
|
||||
void
|
||||
AddOnImage::SetID(image_id id)
|
||||
@ -51,4 +56,3 @@ AddOnImage::SetID(image_id id)
|
||||
if (id >= 0)
|
||||
fID = id;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ public:
|
||||
AddOnImage();
|
||||
~AddOnImage();
|
||||
|
||||
status_t Load(const char *path);
|
||||
status_t Load(const char* path);
|
||||
void Unload();
|
||||
|
||||
void SetID(image_id id);
|
||||
|
@ -213,7 +213,7 @@ AddOnMonitorHandler::EntryRemoved(const char* name, ino_t directory,
|
||||
|
||||
|
||||
void
|
||||
AddOnMonitorHandler::EntryMoved(const char *name, const char *fromName,
|
||||
AddOnMonitorHandler::EntryMoved(const char* name, const char* fromName,
|
||||
ino_t fromDirectory, ino_t toDirectory, dev_t device, ino_t node,
|
||||
dev_t nodeDevice)
|
||||
{
|
||||
|
@ -26,17 +26,17 @@
|
||||
using namespace std;
|
||||
|
||||
// attributes
|
||||
static const char *kTypeAttribute = "BEOS:TYPE";
|
||||
static const char *kSignatureAttribute = "BEOS:APP_SIG";
|
||||
static const char *kAppFlagsAttribute = "BEOS:APP_FLAGS";
|
||||
static const char *kSupportedTypesAttribute = "BEOS:FILE_TYPES";
|
||||
static const char *kVersionInfoAttribute = "BEOS:APP_VERSION";
|
||||
static const char *kMiniIconAttribute = "BEOS:M:";
|
||||
static const char *kLargeIconAttribute = "BEOS:L:";
|
||||
static const char *kIconAttribute = "BEOS:";
|
||||
static const char *kStandardIconType = "STD_ICON";
|
||||
static const char *kIconType = "ICON";
|
||||
static const char *kCatalogEntryAttribute = "SYS:NAME";
|
||||
static const char* kTypeAttribute = "BEOS:TYPE";
|
||||
static const char* kSignatureAttribute = "BEOS:APP_SIG";
|
||||
static const char* kAppFlagsAttribute = "BEOS:APP_FLAGS";
|
||||
static const char* kSupportedTypesAttribute = "BEOS:FILE_TYPES";
|
||||
static const char* kVersionInfoAttribute = "BEOS:APP_VERSION";
|
||||
static const char* kMiniIconAttribute = "BEOS:M:";
|
||||
static const char* kLargeIconAttribute = "BEOS:L:";
|
||||
static const char* kIconAttribute = "BEOS:";
|
||||
static const char* kStandardIconType = "STD_ICON";
|
||||
static const char* kIconType = "ICON";
|
||||
static const char* kCatalogEntryAttribute = "SYS:NAME";
|
||||
|
||||
// resource IDs
|
||||
static const int32 kTypeResourceID = 2;
|
||||
@ -75,11 +75,13 @@ const uint32 LARGE_ICON_TYPE = 'ICON';
|
||||
/*! \brief Creates an uninitialized BAppFileInfo object.
|
||||
*/
|
||||
BAppFileInfo::BAppFileInfo()
|
||||
: fResources(NULL),
|
||||
:
|
||||
fResources(NULL),
|
||||
fWhere(B_USE_BOTH_LOCATIONS)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// constructor
|
||||
/*! \brief Creates an BAppFileInfo object and initializes it to the supplied
|
||||
file.
|
||||
@ -90,13 +92,15 @@ BAppFileInfo::BAppFileInfo()
|
||||
|
||||
\param file The file the object shall be initialized to.
|
||||
*/
|
||||
BAppFileInfo::BAppFileInfo(BFile *file)
|
||||
: fResources(NULL),
|
||||
BAppFileInfo::BAppFileInfo(BFile* file)
|
||||
:
|
||||
fResources(NULL),
|
||||
fWhere(B_USE_BOTH_LOCATIONS)
|
||||
{
|
||||
SetTo(file);
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
/*! \brief Frees all resources associated with this object.
|
||||
|
||||
@ -107,6 +111,7 @@ BAppFileInfo::~BAppFileInfo()
|
||||
delete fResources;
|
||||
}
|
||||
|
||||
|
||||
// SetTo
|
||||
/*! \brief Initializes the BAppFileInfo to the supplied file.
|
||||
|
||||
@ -174,6 +179,7 @@ BAppFileInfo::SetTo(BFile *file)
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// GetType
|
||||
/*! \brief Gets the file's MIME type.
|
||||
|
||||
@ -213,6 +219,7 @@ BAppFileInfo::GetType(char *type) const
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// SetType
|
||||
/*! \brief Sets the file's MIME type.
|
||||
|
||||
@ -228,7 +235,7 @@ BAppFileInfo::GetType(char *type) const
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::SetType(const char *type)
|
||||
BAppFileInfo::SetType(const char* type)
|
||||
{
|
||||
// check initialization
|
||||
status_t error = B_OK;
|
||||
@ -251,6 +258,7 @@ BAppFileInfo::SetType(const char *type)
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// GetSignature
|
||||
/*! \brief Gets the file's application signature.
|
||||
|
||||
@ -268,7 +276,7 @@ BAppFileInfo::SetType(const char *type)
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::GetSignature(char *signature) const
|
||||
BAppFileInfo::GetSignature(char* signature) const
|
||||
{
|
||||
// check param and initialization
|
||||
status_t error = (signature ? B_OK : B_BAD_VALUE);
|
||||
@ -278,8 +286,8 @@ BAppFileInfo::GetSignature(char *signature) const
|
||||
size_t read = 0;
|
||||
if (error == B_OK) {
|
||||
error = _ReadData(kSignatureAttribute, kSignatureResourceID,
|
||||
B_MIME_STRING_TYPE, signature, B_MIME_TYPE_LENGTH,
|
||||
read);
|
||||
B_MIME_STRING_TYPE, signature,
|
||||
B_MIME_TYPE_LENGTH, read);
|
||||
}
|
||||
// check the read data -- null terminate the string
|
||||
if (error == B_OK && signature[read - 1] != '\0') {
|
||||
@ -291,6 +299,7 @@ BAppFileInfo::GetSignature(char *signature) const
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// SetSignature
|
||||
/*! \brief Sets the file's application signature.
|
||||
|
||||
@ -306,7 +315,7 @@ BAppFileInfo::GetSignature(char *signature) const
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::SetSignature(const char *signature)
|
||||
BAppFileInfo::SetSignature(const char* signature)
|
||||
{
|
||||
// check initialization
|
||||
status_t error = B_OK;
|
||||
@ -388,7 +397,7 @@ BAppFileInfo::GetCatalogEntry(char *catalogEntry) const
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::SetCatalogEntry(const char *catalogEntry)
|
||||
BAppFileInfo::SetCatalogEntry(const char* catalogEntry)
|
||||
{
|
||||
if (InitCheck() != B_OK)
|
||||
return B_NO_INIT;
|
||||
@ -420,7 +429,7 @@ BAppFileInfo::SetCatalogEntry(const char *catalogEntry)
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::GetAppFlags(uint32 *flags) const
|
||||
BAppFileInfo::GetAppFlags(uint32* flags) const
|
||||
{
|
||||
// check param and initialization
|
||||
status_t error = (flags ? B_OK : B_BAD_VALUE);
|
||||
@ -439,6 +448,7 @@ BAppFileInfo::GetAppFlags(uint32 *flags) const
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// SetAppFlags
|
||||
/*! \brief Sets the file's application flags.
|
||||
\param flags The application flags to be assigned to the file.
|
||||
@ -462,6 +472,7 @@ BAppFileInfo::SetAppFlags(uint32 flags)
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// RemoveAppFlags
|
||||
/*! \brief Removes the file's application flags.
|
||||
\return
|
||||
@ -483,6 +494,7 @@ BAppFileInfo::RemoveAppFlags()
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// GetSupportedTypes
|
||||
/*! \brief Gets the MIME types supported by the application.
|
||||
|
||||
@ -501,7 +513,7 @@ BAppFileInfo::RemoveAppFlags()
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::GetSupportedTypes(BMessage *types) const
|
||||
BAppFileInfo::GetSupportedTypes(BMessage* types) const
|
||||
{
|
||||
// check param and initialization
|
||||
status_t error = (types ? B_OK : B_BAD_VALUE);
|
||||
@ -522,6 +534,7 @@ BAppFileInfo::GetSupportedTypes(BMessage *types) const
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// SetSupportedTypes
|
||||
/*! \brief Sets the MIME types supported by the application.
|
||||
|
||||
@ -549,7 +562,7 @@ BAppFileInfo::GetSupportedTypes(BMessage *types) const
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
|
||||
BAppFileInfo::SetSupportedTypes(const BMessage* types, bool syncAll)
|
||||
{
|
||||
// check initialization
|
||||
status_t error = B_OK;
|
||||
@ -562,7 +575,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
|
||||
error = B_OK;
|
||||
if (types) {
|
||||
// check param -- supported types must be valid
|
||||
const char *type;
|
||||
const char* type;
|
||||
for (int32 i = 0;
|
||||
error == B_OK && types->FindString("types", i, &type) == B_OK;
|
||||
i++) {
|
||||
@ -577,7 +590,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
|
||||
error = size;
|
||||
}
|
||||
// allocate a buffer for the flattened data
|
||||
char *buffer = NULL;
|
||||
char* buffer = NULL;
|
||||
if (error == B_OK) {
|
||||
buffer = new(nothrow) char[size];
|
||||
if (!buffer)
|
||||
@ -603,6 +616,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// SetSupportedTypes
|
||||
/*! \brief Sets the MIME types supported by the application.
|
||||
|
||||
@ -617,11 +631,12 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::SetSupportedTypes(const BMessage *types)
|
||||
BAppFileInfo::SetSupportedTypes(const BMessage* types)
|
||||
{
|
||||
return SetSupportedTypes(types, false);
|
||||
}
|
||||
|
||||
|
||||
// IsSupportedType
|
||||
/*! \brief Returns whether the application supports the supplied MIME type.
|
||||
|
||||
@ -633,7 +648,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types)
|
||||
the application, \c false otherwise.
|
||||
*/
|
||||
bool
|
||||
BAppFileInfo::IsSupportedType(const char *type) const
|
||||
BAppFileInfo::IsSupportedType(const char* type) const
|
||||
{
|
||||
status_t error = (type ? B_OK : B_BAD_VALUE);
|
||||
// get the supported types
|
||||
@ -647,7 +662,7 @@ BAppFileInfo::IsSupportedType(const char *type) const
|
||||
// iterate through the supported types
|
||||
bool found = false;
|
||||
if (error == B_OK) {
|
||||
const char *supportedType;
|
||||
const char* supportedType;
|
||||
for (int32 i = 0;
|
||||
!found && types.FindString("types", i, &supportedType) == B_OK;
|
||||
i++) {
|
||||
@ -658,6 +673,7 @@ BAppFileInfo::IsSupportedType(const char *type) const
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
// Supports
|
||||
/*! \brief Returns whether the application supports the supplied MIME type
|
||||
explicitly.
|
||||
@ -671,7 +687,7 @@ BAppFileInfo::IsSupportedType(const char *type) const
|
||||
supported by the application, \c false otherwise.
|
||||
*/
|
||||
bool
|
||||
BAppFileInfo::Supports(BMimeType *type) const
|
||||
BAppFileInfo::Supports(BMimeType* type) const
|
||||
{
|
||||
status_t error = (type && type->InitCheck() == B_OK ? B_OK : B_BAD_VALUE);
|
||||
// get the supported types
|
||||
@ -681,7 +697,7 @@ BAppFileInfo::Supports(BMimeType *type) const
|
||||
// iterate through the supported types
|
||||
bool found = false;
|
||||
if (error == B_OK) {
|
||||
const char *supportedType;
|
||||
const char* supportedType;
|
||||
for (int32 i = 0;
|
||||
!found && types.FindString("types", i, &supportedType) == B_OK;
|
||||
i++) {
|
||||
@ -691,6 +707,7 @@ BAppFileInfo::Supports(BMimeType *type) const
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
// GetIcon
|
||||
/*! \brief Gets the file's icon.
|
||||
\param icon A pointer to a pre-allocated BBitmap of the correct dimension
|
||||
@ -706,11 +723,12 @@ BAppFileInfo::Supports(BMimeType *type) const
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::GetIcon(BBitmap *icon, icon_size which) const
|
||||
BAppFileInfo::GetIcon(BBitmap* icon, icon_size which) const
|
||||
{
|
||||
return GetIconForType(NULL, icon, which);
|
||||
}
|
||||
|
||||
|
||||
// GetIcon
|
||||
/*! \brief Gets the file's icon.
|
||||
\param data The pointer in which the flat icon data will be returned.
|
||||
@ -727,6 +745,7 @@ BAppFileInfo::GetIcon(uint8** data, size_t* size) const
|
||||
return GetIconForType(NULL, data, size);
|
||||
}
|
||||
|
||||
|
||||
// SetIcon
|
||||
/*! \brief Sets the file's icon.
|
||||
|
||||
@ -744,11 +763,12 @@ BAppFileInfo::GetIcon(uint8** data, size_t* size) const
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::SetIcon(const BBitmap *icon, icon_size which)
|
||||
BAppFileInfo::SetIcon(const BBitmap* icon, icon_size which)
|
||||
{
|
||||
return SetIconForType(NULL, icon, which);
|
||||
}
|
||||
|
||||
|
||||
// SetIcon
|
||||
/*! \brief Sets the file's icon.
|
||||
|
||||
@ -769,6 +789,7 @@ BAppFileInfo::SetIcon(const uint8* data, size_t size)
|
||||
return SetIconForType(NULL, data, size);
|
||||
}
|
||||
|
||||
|
||||
// GetVersionInfo
|
||||
/*! \brief Gets the file's version info.
|
||||
\param info A pointer to a pre-allocated version_info structure into which
|
||||
@ -784,7 +805,7 @@ BAppFileInfo::SetIcon(const uint8* data, size_t size)
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::GetVersionInfo(version_info *info, version_kind kind) const
|
||||
BAppFileInfo::GetVersionInfo(version_info* info, version_kind kind) const
|
||||
{
|
||||
// check params and initialization
|
||||
if (!info)
|
||||
@ -829,6 +850,7 @@ BAppFileInfo::GetVersionInfo(version_info *info, version_kind kind) const
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
// SetVersionInfo
|
||||
/*! \brief Sets the file's version info.
|
||||
|
||||
@ -845,7 +867,7 @@ BAppFileInfo::GetVersionInfo(version_info *info, version_kind kind) const
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::SetVersionInfo(const version_info *info, version_kind kind)
|
||||
BAppFileInfo::SetVersionInfo(const version_info* info, version_kind kind)
|
||||
{
|
||||
// check initialization
|
||||
status_t error = B_OK;
|
||||
@ -897,6 +919,7 @@ BAppFileInfo::SetVersionInfo(const version_info *info, version_kind kind)
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// GetIconForType
|
||||
/*! \brief Gets the icon the application provides for a given MIME type.
|
||||
|
||||
@ -1039,6 +1062,7 @@ BAppFileInfo::GetIconForType(const char* type, BBitmap* icon,
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// GetIconForType
|
||||
/*! \brief Gets the icon the application provides for a given MIME type.
|
||||
|
||||
@ -1056,7 +1080,7 @@ BAppFileInfo::GetIconForType(const char* type, BBitmap* icon,
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::GetIconForType(const char *type, uint8** data,
|
||||
BAppFileInfo::GetIconForType(const char* type, uint8** data,
|
||||
size_t* size) const
|
||||
{
|
||||
if (InitCheck() != B_OK)
|
||||
@ -1089,6 +1113,7 @@ BAppFileInfo::GetIconForType(const char *type, uint8** data,
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
// SetIconForType
|
||||
/*! \brief Sets the icon the application provides for a given MIME type.
|
||||
|
||||
@ -1113,7 +1138,7 @@ BAppFileInfo::GetIconForType(const char *type, uint8** data,
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::SetIconForType(const char *type, const BBitmap *icon,
|
||||
BAppFileInfo::SetIconForType(const char* type, const BBitmap* icon,
|
||||
icon_size which)
|
||||
{
|
||||
status_t error = B_OK;
|
||||
@ -1154,7 +1179,7 @@ BAppFileInfo::SetIconForType(const char *type, const BBitmap *icon,
|
||||
} else
|
||||
attributeString += kStandardIconType;
|
||||
}
|
||||
const char *attribute = attributeString.String();
|
||||
const char* attribute = attributeString.String();
|
||||
// check parameter and initialization
|
||||
if (error == B_OK && icon
|
||||
&& (icon->InitCheck() != B_OK || icon->Bounds() != bounds)) {
|
||||
@ -1193,6 +1218,7 @@ BAppFileInfo::SetIconForType(const char *type, const BBitmap *icon,
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// SetIconForType
|
||||
/*! \brief Sets the icon the application provides for a given MIME type.
|
||||
|
||||
@ -1234,7 +1260,7 @@ BAppFileInfo::SetIconForType(const char* type, const uint8* data,
|
||||
} else
|
||||
attributeString += kIconType;
|
||||
|
||||
const char *attribute = attributeString.String();
|
||||
const char* attribute = attributeString.String();
|
||||
|
||||
status_t error;
|
||||
// write/remove the attribute
|
||||
@ -1254,6 +1280,7 @@ BAppFileInfo::SetIconForType(const char* type, const uint8* data,
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// SetInfoLocation
|
||||
/*! \brief Specifies the location where the meta data shall be stored.
|
||||
|
||||
@ -1286,6 +1313,7 @@ BAppFileInfo::IsUsingAttributes() const
|
||||
return (fWhere & B_USE_ATTRIBUTES) != 0;
|
||||
}
|
||||
|
||||
|
||||
// IsUsingResources
|
||||
/*! \brief Returns whether the object stores the meta data (also) in the
|
||||
file's resources.
|
||||
@ -1298,11 +1326,13 @@ BAppFileInfo::IsUsingResources() const
|
||||
return (fWhere & B_USE_RESOURCES) != 0;
|
||||
}
|
||||
|
||||
|
||||
// FBC
|
||||
void BAppFileInfo::_ReservedAppFileInfo1() {}
|
||||
void BAppFileInfo::_ReservedAppFileInfo2() {}
|
||||
void BAppFileInfo::_ReservedAppFileInfo3() {}
|
||||
|
||||
|
||||
// =
|
||||
/*! \brief Privatized assignment operator to prevent usage.
|
||||
*/
|
||||
@ -1312,6 +1342,7 @@ BAppFileInfo::operator=(const BAppFileInfo &)
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
/*! \brief Privatized copy constructor to prevent usage.
|
||||
*/
|
||||
@ -1319,6 +1350,7 @@ BAppFileInfo::BAppFileInfo(const BAppFileInfo &)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// GetMetaMime
|
||||
/*! \brief Initializes a BMimeType to the file's signature.
|
||||
|
||||
@ -1335,7 +1367,7 @@ BAppFileInfo::BAppFileInfo(const BAppFileInfo &)
|
||||
- other error codes
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::GetMetaMime(BMimeType *meta) const
|
||||
BAppFileInfo::GetMetaMime(BMimeType* meta) const
|
||||
{
|
||||
char signature[B_MIME_TYPE_LENGTH];
|
||||
status_t error = GetSignature(signature);
|
||||
@ -1348,6 +1380,7 @@ BAppFileInfo::GetMetaMime(BMimeType *meta) const
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// _ReadData
|
||||
/*! \brief Reads data from an attribute or resource.
|
||||
|
||||
@ -1371,9 +1404,9 @@ BAppFileInfo::GetMetaMime(BMimeType *meta) const
|
||||
- error code
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::_ReadData(const char *name, int32 id, type_code type,
|
||||
void *buffer, size_t bufferSize,
|
||||
size_t &bytesRead, void **allocatedBuffer) const
|
||||
BAppFileInfo::_ReadData(const char* name, int32 id, type_code type,
|
||||
void* buffer, size_t bufferSize,
|
||||
size_t &bytesRead, void** allocatedBuffer) const
|
||||
{
|
||||
status_t error = B_OK;
|
||||
|
||||
@ -1443,7 +1476,7 @@ BAppFileInfo::_ReadData(const char *name, int32 id, type_code type,
|
||||
error = B_BAD_VALUE;
|
||||
|
||||
// load resource
|
||||
const void *resourceData = NULL;
|
||||
const void* resourceData = NULL;
|
||||
if (error == B_OK) {
|
||||
resourceData = fResources->LoadResource(type, name, &bytesRead);
|
||||
if (resourceData && sizeFound == bytesRead)
|
||||
@ -1465,6 +1498,7 @@ BAppFileInfo::_ReadData(const char *name, int32 id, type_code type,
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
// _WriteData
|
||||
/*! \brief Writes data to an attribute or resource.
|
||||
|
||||
@ -1486,8 +1520,8 @@ BAppFileInfo::_ReadData(const char *name, int32 id, type_code type,
|
||||
- error code
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::_WriteData(const char *name, int32 id, type_code type,
|
||||
const void *buffer, size_t bufferSize, bool findID)
|
||||
BAppFileInfo::_WriteData(const char* name, int32 id, type_code type,
|
||||
const void* buffer, size_t bufferSize, bool findID)
|
||||
{
|
||||
if (!IsUsingAttributes() && !IsUsingResources())
|
||||
return B_NO_INIT;
|
||||
@ -1535,7 +1569,7 @@ BAppFileInfo::_WriteData(const char *name, int32 id, type_code type,
|
||||
- error code
|
||||
*/
|
||||
status_t
|
||||
BAppFileInfo::_RemoveData(const char *name, type_code type)
|
||||
BAppFileInfo::_RemoveData(const char* name, type_code type)
|
||||
{
|
||||
if (!IsUsingAttributes() && !IsUsingResources())
|
||||
return B_NO_INIT;
|
||||
|
@ -643,7 +643,7 @@ BEntry::GetParent(BDirectory* dir) const
|
||||
- "error code" - Failure
|
||||
*/
|
||||
status_t
|
||||
BEntry::GetName(char *buffer) const
|
||||
BEntry::GetName(char* buffer) const
|
||||
{
|
||||
status_t result = B_ERROR;
|
||||
|
||||
@ -681,7 +681,7 @@ BEntry::GetName(char *buffer) const
|
||||
|
||||
*/
|
||||
status_t
|
||||
BEntry::Rename(const char *path, bool clobber)
|
||||
BEntry::Rename(const char* path, bool clobber)
|
||||
{
|
||||
// check parameter and initialization
|
||||
if (path == NULL)
|
||||
@ -780,7 +780,7 @@ BEntry::Remove()
|
||||
\c false - The BEntry objects refer to different entries
|
||||
*/
|
||||
bool
|
||||
BEntry::operator==(const BEntry &item) const
|
||||
BEntry::operator==(const BEntry& item) const
|
||||
{
|
||||
// First check statuses
|
||||
if (this->InitCheck() != B_OK && item.InitCheck() != B_OK) {
|
||||
@ -951,7 +951,7 @@ BEntry::_SetTo(int dirFD, const char* path, bool traverse)
|
||||
// if no directory was given, we need to open the current dir
|
||||
// now
|
||||
if (dirFD < 0) {
|
||||
char *cwd = getcwd(tmpPath, B_PATH_NAME_LENGTH);
|
||||
char* cwd = getcwd(tmpPath, B_PATH_NAME_LENGTH);
|
||||
if (!cwd)
|
||||
return B_ERROR;
|
||||
dirFD = _kern_open_dir(-1, cwd);
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <EntryList.h>
|
||||
|
||||
|
||||
// constructor
|
||||
//! Creates a BEntryList.
|
||||
/*! Does nothing at this time.
|
||||
@ -17,6 +18,7 @@ BEntryList::BEntryList()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
//! Frees all resources associated with this BEntryList.
|
||||
/*! Does nothing at this time.
|
||||
@ -25,6 +27,7 @@ BEntryList::~BEntryList()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// GetNextEntry
|
||||
/*! \fn status_t BEntryList::GetNextEntry(BEntry *entry, bool traverse)
|
||||
\brief Returns the BEntryList's next entry as a BEntry.
|
||||
@ -104,7 +107,3 @@ void BEntryList::_ReservedEntryList5() {}
|
||||
void BEntryList::_ReservedEntryList6() {}
|
||||
void BEntryList::_ReservedEntryList7() {}
|
||||
void BEntryList::_ReservedEntryList8() {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ BFile::BFile()
|
||||
/*! If \a file is uninitialized, the newly constructed BFile will be, too.
|
||||
\param file the BFile object to be copied
|
||||
*/
|
||||
BFile::BFile(const BFile &file)
|
||||
BFile::BFile(const BFile& file)
|
||||
:
|
||||
fMode(0)
|
||||
{
|
||||
@ -48,7 +48,7 @@ BFile::BFile(const BFile &file)
|
||||
\param openMode the mode in which the file should be opened
|
||||
\see SetTo() for values for \a openMode
|
||||
*/
|
||||
BFile::BFile(const entry_ref *ref, uint32 openMode)
|
||||
BFile::BFile(const entry_ref* ref, uint32 openMode)
|
||||
:
|
||||
fMode(0)
|
||||
{
|
||||
@ -62,7 +62,7 @@ BFile::BFile(const entry_ref *ref, uint32 openMode)
|
||||
\param openMode the mode in which the file should be opened
|
||||
\see SetTo() for values for \a openMode
|
||||
*/
|
||||
BFile::BFile(const BEntry *entry, uint32 openMode)
|
||||
BFile::BFile(const BEntry* entry, uint32 openMode)
|
||||
:
|
||||
fMode(0)
|
||||
{
|
||||
@ -76,7 +76,7 @@ BFile::BFile(const BEntry *entry, uint32 openMode)
|
||||
\param openMode the mode in which the file should be opened
|
||||
\see SetTo() for values for \a openMode
|
||||
*/
|
||||
BFile::BFile(const char *path, uint32 openMode)
|
||||
BFile::BFile(const char* path, uint32 openMode)
|
||||
:
|
||||
fMode(0)
|
||||
{
|
||||
@ -93,7 +93,7 @@ BFile::BFile(const char *path, uint32 openMode)
|
||||
\param openMode the mode in which the file should be opened
|
||||
\see SetTo() for values for \a openMode
|
||||
*/
|
||||
BFile::BFile(const BDirectory *dir, const char *path, uint32 openMode)
|
||||
BFile::BFile(const BDirectory *dir, const char* path, uint32 openMode)
|
||||
:
|
||||
fMode(0)
|
||||
{
|
||||
@ -143,7 +143,7 @@ BFile::~BFile()
|
||||
- \c B_NO_MORE_FDS: The application has run out of file descriptors.
|
||||
*/
|
||||
status_t
|
||||
BFile::SetTo(const entry_ref *ref, uint32 openMode)
|
||||
BFile::SetTo(const entry_ref* ref, uint32 openMode)
|
||||
{
|
||||
Unset();
|
||||
|
||||
@ -188,7 +188,7 @@ BFile::SetTo(const entry_ref *ref, uint32 openMode)
|
||||
to reimplement!
|
||||
*/
|
||||
status_t
|
||||
BFile::SetTo(const BEntry *entry, uint32 openMode)
|
||||
BFile::SetTo(const BEntry* entry, uint32 openMode)
|
||||
{
|
||||
Unset();
|
||||
|
||||
@ -229,7 +229,7 @@ BFile::SetTo(const BEntry *entry, uint32 openMode)
|
||||
- \c B_NO_MORE_FDS: The application has run out of file descriptors.
|
||||
*/
|
||||
status_t
|
||||
BFile::SetTo(const char *path, uint32 openMode)
|
||||
BFile::SetTo(const char* path, uint32 openMode)
|
||||
{
|
||||
Unset();
|
||||
|
||||
@ -271,7 +271,7 @@ BFile::SetTo(const char *path, uint32 openMode)
|
||||
to reimplement!
|
||||
*/
|
||||
status_t
|
||||
BFile::SetTo(const BDirectory *dir, const char *path, uint32 openMode)
|
||||
BFile::SetTo(const BDirectory* dir, const char* path, uint32 openMode)
|
||||
{
|
||||
Unset();
|
||||
|
||||
@ -326,7 +326,7 @@ BFile::IsWritable() const
|
||||
\return the number of bytes actually read or an error code
|
||||
*/
|
||||
ssize_t
|
||||
BFile::Read(void *buffer, size_t size)
|
||||
BFile::Read(void* buffer, size_t size)
|
||||
{
|
||||
if (InitCheck() != B_OK)
|
||||
return InitCheck();
|
||||
@ -343,7 +343,7 @@ BFile::Read(void *buffer, size_t size)
|
||||
\return the number of bytes actually read or an error code
|
||||
*/
|
||||
ssize_t
|
||||
BFile::ReadAt(off_t location, void *buffer, size_t size)
|
||||
BFile::ReadAt(off_t location, void* buffer, size_t size)
|
||||
{
|
||||
if (InitCheck() != B_OK)
|
||||
return InitCheck();
|
||||
@ -360,7 +360,7 @@ BFile::ReadAt(off_t location, void *buffer, size_t size)
|
||||
\return the number of bytes actually written or an error code
|
||||
*/
|
||||
ssize_t
|
||||
BFile::Write(const void *buffer, size_t size)
|
||||
BFile::Write(const void* buffer, size_t size)
|
||||
{
|
||||
if (InitCheck() != B_OK)
|
||||
return InitCheck();
|
||||
@ -377,7 +377,7 @@ BFile::Write(const void *buffer, size_t size)
|
||||
\return the number of bytes actually written or an error code
|
||||
*/
|
||||
ssize_t
|
||||
BFile::WriteAt(off_t location, const void *buffer, size_t size)
|
||||
BFile::WriteAt(off_t location, const void* buffer, size_t size)
|
||||
{
|
||||
if (InitCheck() != B_OK)
|
||||
return InitCheck();
|
||||
|
@ -28,7 +28,7 @@ BFileDescriptorIO::~BFileDescriptorIO()
|
||||
|
||||
|
||||
ssize_t
|
||||
BFileDescriptorIO::Read(void *buffer, size_t size)
|
||||
BFileDescriptorIO::Read(void* buffer, size_t size)
|
||||
{
|
||||
ssize_t bytesRead = read(fFD, buffer, size);
|
||||
return bytesRead >= 0 ? bytesRead : errno;
|
||||
@ -36,7 +36,7 @@ BFileDescriptorIO::Read(void *buffer, size_t size)
|
||||
|
||||
|
||||
ssize_t
|
||||
BFileDescriptorIO::Write(const void *buffer, size_t size)
|
||||
BFileDescriptorIO::Write(const void* buffer, size_t size)
|
||||
{
|
||||
ssize_t bytesWritten = write(fFD, buffer, size);
|
||||
return bytesWritten >= 0 ? bytesWritten : errno;
|
||||
@ -44,7 +44,7 @@ BFileDescriptorIO::Write(const void *buffer, size_t size)
|
||||
|
||||
|
||||
ssize_t
|
||||
BFileDescriptorIO::ReadAt(off_t position, void *buffer, size_t size)
|
||||
BFileDescriptorIO::ReadAt(off_t position, void* buffer, size_t size)
|
||||
{
|
||||
ssize_t bytesRead = pread(fFD, buffer, size, position);
|
||||
return bytesRead >= 0 ? bytesRead : errno;
|
||||
@ -52,7 +52,7 @@ BFileDescriptorIO::ReadAt(off_t position, void *buffer, size_t size)
|
||||
|
||||
|
||||
ssize_t
|
||||
BFileDescriptorIO::WriteAt(off_t position, const void *buffer, size_t size)
|
||||
BFileDescriptorIO::WriteAt(off_t position, const void* buffer, size_t size)
|
||||
{
|
||||
ssize_t bytesWritten = pwrite(fFD, buffer, size, position);
|
||||
return bytesWritten >= 0 ? bytesWritten : errno;
|
||||
|
@ -26,7 +26,7 @@ BFileIO::~BFileIO()
|
||||
|
||||
|
||||
ssize_t
|
||||
BFileIO::Read(void *buffer, size_t size)
|
||||
BFileIO::Read(void* buffer, size_t size)
|
||||
{
|
||||
errno = B_OK;
|
||||
ssize_t bytesRead = fread(buffer, 1, size, fFile);
|
||||
@ -35,7 +35,7 @@ BFileIO::Read(void *buffer, size_t size)
|
||||
|
||||
|
||||
ssize_t
|
||||
BFileIO::Write(const void *buffer, size_t size)
|
||||
BFileIO::Write(const void* buffer, size_t size)
|
||||
{
|
||||
errno = B_OK;
|
||||
ssize_t bytesRead = fwrite(buffer, 1, size, fFile);
|
||||
@ -44,7 +44,7 @@ BFileIO::Write(const void *buffer, size_t size)
|
||||
|
||||
|
||||
ssize_t
|
||||
BFileIO::ReadAt(off_t position, void *buffer, size_t size)
|
||||
BFileIO::ReadAt(off_t position, void* buffer, size_t size)
|
||||
{
|
||||
// save the old position and seek to the requested one
|
||||
off_t oldPosition = _Seek(position, SEEK_SET);
|
||||
@ -62,7 +62,7 @@ BFileIO::ReadAt(off_t position, void *buffer, size_t size)
|
||||
|
||||
|
||||
ssize_t
|
||||
BFileIO::WriteAt(off_t position, const void *buffer, size_t size)
|
||||
BFileIO::WriteAt(off_t position, const void* buffer, size_t size)
|
||||
{
|
||||
// save the old position and seek to the requested one
|
||||
off_t oldPosition = _Seek(position, SEEK_SET);
|
||||
|
@ -25,8 +25,8 @@
|
||||
- another error code
|
||||
*/
|
||||
status_t
|
||||
find_directory(directory_which which, BPath *path, bool createIt,
|
||||
BVolume *volume)
|
||||
find_directory(directory_which which, BPath* path, bool createIt,
|
||||
BVolume* volume)
|
||||
{
|
||||
if (path == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
@ -47,7 +47,8 @@
|
||||
/*! \brief Creates an uninitialized BDiskDevice object.
|
||||
*/
|
||||
BDiskDevice::BDiskDevice()
|
||||
: fDeviceData(NULL)
|
||||
:
|
||||
fDeviceData(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
@ -223,12 +224,12 @@ BDiskDevice::IsModified() const
|
||||
return false;
|
||||
|
||||
struct IsModifiedVisitor : public BDiskDeviceVisitor {
|
||||
virtual bool Visit(BDiskDevice *device)
|
||||
virtual bool Visit(BDiskDevice* device)
|
||||
{
|
||||
return Visit(device, 0);
|
||||
}
|
||||
|
||||
virtual bool Visit(BPartition *partition, int32 level)
|
||||
virtual bool Visit(BPartition* partition, int32 level)
|
||||
{
|
||||
return partition->_IsModified();
|
||||
}
|
||||
|
@ -11,8 +11,9 @@
|
||||
// constructor
|
||||
DiskDeviceJob::DiskDeviceJob(PartitionReference* partition,
|
||||
PartitionReference* child)
|
||||
: fPartition(partition),
|
||||
fChild(child)
|
||||
:
|
||||
fPartition(partition),
|
||||
fChild(child)
|
||||
{
|
||||
if (fPartition)
|
||||
fPartition->AcquireReference();
|
||||
|
@ -14,35 +14,35 @@
|
||||
|
||||
// Device Types
|
||||
|
||||
const char *kDeviceTypeFloppyDisk = FLOPPY_DEVICE_NAME;
|
||||
const char *kDeviceTypeHardDisk = HARD_DISK_DEVICE_NAME;
|
||||
const char *kDeviceTypeOptical = OPTICAL_DEVICE_NAME;
|
||||
const char* kDeviceTypeFloppyDisk = FLOPPY_DEVICE_NAME;
|
||||
const char* kDeviceTypeHardDisk = HARD_DISK_DEVICE_NAME;
|
||||
const char* kDeviceTypeOptical = OPTICAL_DEVICE_NAME;
|
||||
|
||||
// Partition types
|
||||
|
||||
const char *kPartitionTypeUnrecognized = UNRECOGNIZED_PARTITION_NAME;
|
||||
const char* kPartitionTypeUnrecognized = UNRECOGNIZED_PARTITION_NAME;
|
||||
|
||||
const char *kPartitionTypeMultisession = MULTISESSION_PARTITION_NAME;
|
||||
const char *kPartitionTypeAudioSession = AUDIO_SESSION_PARTITION_NAME;
|
||||
const char *kPartitionTypeDataSession = DATA_SESSION_PARTITION_NAME;
|
||||
const char* kPartitionTypeMultisession = MULTISESSION_PARTITION_NAME;
|
||||
const char* kPartitionTypeAudioSession = AUDIO_SESSION_PARTITION_NAME;
|
||||
const char* kPartitionTypeDataSession = DATA_SESSION_PARTITION_NAME;
|
||||
|
||||
const char *kPartitionTypeAmiga = AMIGA_PARTITION_NAME;
|
||||
const char *kPartitionTypeApple = APPLE_PARTITION_NAME;
|
||||
const char *kPartitionTypeEFI = EFI_PARTITION_NAME;
|
||||
const char *kPartitionTypeIntel = INTEL_PARTITION_NAME;
|
||||
const char *kPartitionTypeIntelExtended = INTEL_EXTENDED_PARTITION_NAME;
|
||||
const char *kPartitionTypeVMDK = VMDK_PARTITION_NAME;
|
||||
const char* kPartitionTypeAmiga = AMIGA_PARTITION_NAME;
|
||||
const char* kPartitionTypeApple = APPLE_PARTITION_NAME;
|
||||
const char* kPartitionTypeEFI = EFI_PARTITION_NAME;
|
||||
const char* kPartitionTypeIntel = INTEL_PARTITION_NAME;
|
||||
const char* kPartitionTypeIntelExtended = INTEL_EXTENDED_PARTITION_NAME;
|
||||
const char* kPartitionTypeVMDK = VMDK_PARTITION_NAME;
|
||||
|
||||
const char *kPartitionTypeAmigaFFS = AMIGA_FFS_NAME;
|
||||
const char *kPartitionTypeBFS = BFS_NAME;
|
||||
const char *kPartitionTypeBTRFS = BTRFS_NAME;
|
||||
const char *kPartitionTypeEXFAT = EXFAT_FS_NAME;
|
||||
const char *kPartitionTypeEXT2 = EXT2_FS_NAME;
|
||||
const char *kPartitionTypeEXT3 = EXT3_FS_NAME;
|
||||
const char *kPartitionTypeFAT12 = FAT12_FS_NAME;
|
||||
const char *kPartitionTypeFAT32 = FAT32_FS_NAME;
|
||||
const char *kPartitionTypeHFS = HFS_NAME;
|
||||
const char *kPartitionTypeHFSPlus = HFS_PLUS_NAME;
|
||||
const char *kPartitionTypeISO9660 = ISO9660_FS_NAME;
|
||||
const char *kPartitionTypeReiser = REISER_FS_NAME;
|
||||
const char *kPartitionTypeUDF = UDF_FS_NAME;
|
||||
const char* kPartitionTypeAmigaFFS = AMIGA_FFS_NAME;
|
||||
const char* kPartitionTypeBFS = BFS_NAME;
|
||||
const char* kPartitionTypeBTRFS = BTRFS_NAME;
|
||||
const char* kPartitionTypeEXFAT = EXFAT_FS_NAME;
|
||||
const char* kPartitionTypeEXT2 = EXT2_FS_NAME;
|
||||
const char* kPartitionTypeEXT3 = EXT3_FS_NAME;
|
||||
const char* kPartitionTypeFAT12 = FAT12_FS_NAME;
|
||||
const char* kPartitionTypeFAT32 = FAT32_FS_NAME;
|
||||
const char* kPartitionTypeHFS = HFS_NAME;
|
||||
const char* kPartitionTypeHFSPlus = HFS_PLUS_NAME;
|
||||
const char* kPartitionTypeISO9660 = ISO9660_FS_NAME;
|
||||
const char* kPartitionTypeReiser = REISER_FS_NAME;
|
||||
const char* kPartitionTypeUDF = UDF_FS_NAME;
|
||||
|
@ -15,6 +15,7 @@ BDiskScannerPartitionAddOn::BDiskScannerPartitionAddOn()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
/*! \brief Frees all resources associated with this object.
|
||||
*/
|
||||
@ -71,6 +72,7 @@ BDiskScannerFSAddOn::BDiskScannerFSAddOn()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
/*! \brief Frees all resources associated with this object.
|
||||
*/
|
||||
@ -128,6 +130,7 @@ BDiskScannerParameterEditor::BDiskScannerParameterEditor()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
/*! \brief Frees all resources associated with this object.
|
||||
*/
|
||||
@ -135,6 +138,7 @@ BDiskScannerParameterEditor::~BDiskScannerParameterEditor()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Returns a view containing the controls needed for editing the
|
||||
parameters.
|
||||
|
||||
@ -155,6 +159,7 @@ BDiskScannerParameterEditor::View()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
// EditingDone
|
||||
/*! \brief Called when the user finishes editing the parameters.
|
||||
|
||||
@ -174,6 +179,7 @@ BDiskScannerParameterEditor::EditingDone()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Returns the edited parameters.
|
||||
|
||||
To be overridden by derived classes.
|
||||
|
@ -14,8 +14,9 @@
|
||||
|
||||
// constructor
|
||||
BDiskSystemAddOn::BDiskSystemAddOn(const char* name, uint32 flags)
|
||||
: fName(name),
|
||||
fFlags(flags)
|
||||
:
|
||||
fName(name),
|
||||
fFlags(flags)
|
||||
{
|
||||
}
|
||||
|
||||
@ -98,7 +99,8 @@ BDiskSystemAddOn::IsSubSystemFor(const BMutablePartition* child)
|
||||
|
||||
// constructor
|
||||
BPartitionHandle::BPartitionHandle(BMutablePartition* partition)
|
||||
: fPartition(partition)
|
||||
:
|
||||
fPartition(partition)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -21,10 +21,11 @@
|
||||
|
||||
// constructor
|
||||
BPartition::Delegate::Delegate(BPartition* partition)
|
||||
: fPartition(partition),
|
||||
fMutablePartition(this),
|
||||
fDiskSystem(NULL),
|
||||
fPartitionHandle(NULL)
|
||||
:
|
||||
fPartition(partition),
|
||||
fMutablePartition(this),
|
||||
fDiskSystem(NULL),
|
||||
fPartitionHandle(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
@ -359,8 +360,8 @@ BPartition::Delegate::SetParameters(Delegate* child, const char* parameters)
|
||||
|
||||
// GetNextSupportedChildType
|
||||
status_t
|
||||
BPartition::Delegate::GetNextSupportedChildType(Delegate* child, int32 *cookie,
|
||||
BString* type) const
|
||||
BPartition::Delegate::GetNextSupportedChildType(Delegate* child,
|
||||
int32* cookie, BString* type) const
|
||||
{
|
||||
TRACE("%p->BPartition::Delegate::GetNextSupportedChildType(child: %p, "
|
||||
"cookie: %ld)\n", this, child, *cookie);
|
||||
@ -377,7 +378,8 @@ BPartition::Delegate::GetNextSupportedChildType(Delegate* child, int32 *cookie,
|
||||
|
||||
// IsSubSystem
|
||||
bool
|
||||
BPartition::Delegate::IsSubSystem(Delegate* child, const char* diskSystem) const
|
||||
BPartition::Delegate::IsSubSystem(Delegate* child,
|
||||
const char* diskSystem) const
|
||||
{
|
||||
// get the disk system add-on
|
||||
DiskSystemAddOnManager* manager = DiskSystemAddOnManager::Default();
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
B_PARAMETER_EDITOR_TYPE type,
|
||||
BPartitionParameterEditor** editor) const;
|
||||
status_t GetNextSupportedChildType(Delegate* child,
|
||||
int32 *cookie, BString* type) const;
|
||||
int32* cookie, BString* type) const;
|
||||
bool IsSubSystem(Delegate* child,
|
||||
const char* diskSystem) const;
|
||||
|
||||
|
@ -28,10 +28,11 @@ using namespace std;
|
||||
|
||||
// constructor
|
||||
BPartitioningInfo::BPartitioningInfo()
|
||||
: fPartitionID(-1),
|
||||
fSpaces(NULL),
|
||||
fCount(0),
|
||||
fCapacity(0)
|
||||
:
|
||||
fPartitionID(-1),
|
||||
fSpaces(NULL),
|
||||
fCount(0),
|
||||
fCapacity(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -188,7 +189,7 @@ BPartitioningInfo::PartitionID() const
|
||||
|
||||
// GetPartitionableSpaceAt
|
||||
status_t
|
||||
BPartitioningInfo::GetPartitionableSpaceAt(int32 index, off_t *offset,
|
||||
BPartitioningInfo::GetPartitionableSpaceAt(int32 index, off_t* offset,
|
||||
off_t *size) const
|
||||
{
|
||||
if (!fSpaces)
|
||||
|
@ -12,8 +12,9 @@
|
||||
|
||||
// constructor
|
||||
RepairJob::RepairJob(PartitionReference* partition, bool checkOnly)
|
||||
: DiskDeviceJob(partition),
|
||||
fCheckOnly(checkOnly)
|
||||
:
|
||||
DiskDeviceJob(partition),
|
||||
fCheckOnly(checkOnly)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -14,9 +14,10 @@
|
||||
// constructor
|
||||
ResizeJob::ResizeJob(PartitionReference* partition, PartitionReference* child,
|
||||
off_t size, off_t contentSize)
|
||||
: DiskDeviceJob(partition, child),
|
||||
fSize(size),
|
||||
fContentSize(contentSize)
|
||||
:
|
||||
DiskDeviceJob(partition, child),
|
||||
fSize(size),
|
||||
fContentSize(contentSize)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user