From 265298113636bda5a6fbc9c23ff4fd3505286f39 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 22 Aug 2007 21:22:29 +0000 Subject: [PATCH] Added Supports[Content]Name() methods. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22044 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/storage/DiskSystem.h | 2 ++ src/kits/storage/DiskSystem.cpp | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/headers/private/storage/DiskSystem.h b/headers/private/storage/DiskSystem.h index 1b5e95b8c6..d8cec285f6 100644 --- a/headers/private/storage/DiskSystem.h +++ b/headers/private/storage/DiskSystem.h @@ -29,6 +29,8 @@ public: bool SupportsResizingChild() const; bool SupportsMoving(bool *whileMounted) const; bool SupportsMovingChild() const; + bool SupportsName() const; + bool SupportsContentName() const; bool SupportsSettingName() const; bool SupportsSettingContentName(bool *whileMounted) const; bool SupportsSettingType() const; diff --git a/src/kits/storage/DiskSystem.cpp b/src/kits/storage/DiskSystem.cpp index 1c5056324f..9cc380479c 100644 --- a/src/kits/storage/DiskSystem.cpp +++ b/src/kits/storage/DiskSystem.cpp @@ -140,6 +140,22 @@ BDiskSystem::SupportsMovingChild() const && (fFlags & B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD)); } +// SupportsName +bool +BDiskSystem::SupportsName() const +{ + return (InitCheck() == B_OK && IsPartitioningSystem() + && (fFlags & B_DISK_SYSTEM_SUPPORTS_NAME)); +} + +// SupportsContentName +bool +BDiskSystem::SupportsContentName() const +{ + return (InitCheck() == B_OK + && (fFlags & B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME)); +} + // SupportsSettingName bool BDiskSystem::SupportsSettingName() const