Commit Graph

70 Commits

Author SHA1 Message Date
Stephan Aßmus e1f3108a60 Patch by Scott:
Make sure the comments are C style in headers that are included by POSIX
headers.

Thanks! Should fix #2870.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-10 23:50:42 +00:00
Axel Dörfler 057f999da6 * Added a flag B_DISK_SYSTEM_SUPPORTS_WRITING to determine whether or not a
file system can write to files before mounting.
* Set the flag for all file systems that actually can write.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 22:32:27 +00:00
Axel Dörfler 38bbc95758 * Made the use of file devices more convenient and complete by adding
the methods IsFile() and GetFilePath() to BDiskDevice, and
  BDiskDeviceRoster::GetFileDeviceForPath().
* Added new syscalls to implement this functionality.
* Added new flag B_DISK_DEVICE_IS_FILE.
* Fixed wrong operator precedence assumption in the BDiskDevice class at
  several places.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 21:51:43 +00:00
Axel Dörfler 8ce6cfc999 * Added two more public functions: get_named_icon().
* Implemented B_GET_ICON_NAME in get_device_icon().
* Comments welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 14:32:33 +00:00
Axel Dörfler 06ba3f0acb * Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
    a predefined location on disk (not yet implemented). This would also allow
    to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
    icons for those.
  - B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
  variants that can also retrieve the icon data directly (like
  BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
  Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
  special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 11:27:07 +00:00
Axel Dörfler 63c96ae5a5 * Added find directory constants B_{BEOS|COMMON|USER}_DATA_DIRECTORY, which
currently points to /etc for the system, and dedicated "data" directories
  for common/user (the system directory should get a dedicated "data", too,
  though).
* Added B_USER_CACHE_DIRECTORY (in config/cache).
* These additions were discussed some years ago, but I just had a good reason
  to use them :-)
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-16 11:05:59 +00:00
Stephan Aßmus 1dde19ddbc Fix the GCC version check for the virtual destructor. Thanks to Micheal for
showing how to do it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 07:01:48 +00:00
Stephan Aßmus 261a29594b Applied patch by Artur Wyszynski:
* Added virtual destructor to BRefFilter in case the GCC version is 3 or newer
  (can't do it for GCC 2.95.3, since that would break binary compatibility
  AFAIKT)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 20:11:54 +00:00
Axel Dörfler 351b7a2d24 * Added B_WATCH_INTERIM_STAT, and B_STAT_INTERIM_UPDATE definitions to
NodeMonitor.h.
* The latter will be set in "statFields" for interim updates when you have
  asked to get them via the former.
* BFS now uses the B_STAT_INTERIM_UPDATE flag for sending updates to actively
  written files.
* This makes us more compatible with BeOS again; if you only asked for
  B_WATCH_STAT, you will now only receive a notification if the file in
  question has been closed.
* Tracker now uses B_WATCH_INTERIM_STAT to always get all updates (ie.
  downloading a file will update its size and modification time in Tracker
  periodically during the download).
* Wether "needsTrimming" was true or not has no influence on wether or not
  the size index needs to be updated in BFS - only the actual file size is
  stored there, not the on-disk size.
* Added a TODO comment in Inode::WriteAt() that it would actually need to
  update the size index when changing the file size, not when the file has
  been closed (but that's probably too slow).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 13:54:30 +00:00
Stephan Aßmus 23108d8b57 * include StorageDefs.h for convenience, otherwise stuff like B_READ_ONLY
is not defined if you just include File.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-20 14:44:02 +00:00
Ingo Weinhold 53715fe060 * Got rid of the B_PARTITION_DESCENDANT_BUSY flag.
* Added CheckAndMarkBusy() and UnmarkBusy() methods to KPartition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-02 00:29:46 +00:00
Ingo Weinhold 25ab0d1a4a * Fixed typos in the disk device job constants.
* Added missing job classes (they don't do anything yet, though) and
  completed the implementation of the job generator.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-29 23:51:02 +00:00
Jérôme Duval f2e230ca88 fix a bit of gcc4 build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 22:35:52 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Ingo Weinhold 76a8ec23db * Added disk system flags for whether a partition name and partition
content name are supported.
* Added file_system_module_info::flags (analogously to
  partition_module_info::flags) which indicate which disk device
  features the FS supports.
* Replaced the
  file_system_module_info/partition_module_info::supports_*()
  hooks by a get_supported_operations() hook and for partitioning
  systems additionally a get_supported_child_operations() hook.
* Updated file and partitioning systems accordingly.
* Updated fs_shell accordingly.
* Updated the DDM accordingly. The syscall interface remains unchanged,
  though.
* _user_supports_initializing_partition() also checks whether the parent
  partitioning system is content now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 21:21:30 +00:00
Axel Dörfler 70fa61adbb * Removed the _IMPEXP* stuff from the headers Ingo clearly identified as ours.
* Removed storage/Alias.h as that stuff isn't even available on BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-06 10:35:17 +00:00
Axel Dörfler f9d99406ae Fixed build under Dano (and probably Zeta, too); our headers used entry_ref resp.
BDirectory without declaring it first. Since that's an actual bug, I made the
changes in the Haiku headers, and copied them back to the build headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 23:20:05 +00:00
Axel Dörfler ed1589a568 Fixed binary compatibility problem I introduced yesterday.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-05 05:46:08 +00:00
Axel Dörfler e5bc3cb9b4 Added virtual desctructor to calm down GCC 4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-04 16:59:23 +00:00
Stephan Aßmus c8a976202c * added new icon specific verions of GetIcon and SetIcon
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-16 00:12:15 +00:00
Axel Dörfler 8c34572bab Somehow the vector icon version of GetIconForType() was missing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-15 17:37:26 +00:00
Stephan Aßmus 7fb6186f3c * integration of vector icons with the registrar and the mime data base
* additional versions of SetIcon[ForType] and GetIcon[ForType] in BMimeType
  and BAppFileInfo, which handle flat vector icon data
* changes in Tracker to support scalable icons (currently broken for
non-vector icons and needs cleanup) and drawing icons correctly with alpha
channel (large parts of this work done by Michael Lotz)

If someone feels like looking over the changes, that would be much
appreciated! :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-29 17:06:23 +00:00
Axel Dörfler 7b3d36e5aa * BEntry::GetStat() and BNode::GetStat() used sizeof(struct stat) for the kernel
syscall, but they could not know if R5 code called them (in which case the stat
  size has a different size). We now always only return the R5 stat structure here.
  This fixes bug #420. We might want to find a different solution to this problem,
  though.
* Be got SYMLINK_MAX wrong - it's not the maximum number of links (that's SYMLOOP_MAX),
  but the maximum size of a symlink buffer. Added missing SYMLOOP_MAX and SYMLINK_MAX
  constants to limits.h.
* Fixes MAXSYMLINKS to use SYMLOOP_MAX, instead of SYMLINKS_MAX (which doesn't exist
  in POSIX specs, but we (intentionally) break source compatibility here).
* Reenabled the Haiku versions of stat(), fstat(), and lstat() when build for Haiku.
* Removed OpenBeOS namespace stuff from the files I touched.
* Removed superfluous StorageDefs.Private.h, whyever that ended up in a public header
  is beyond me.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-21 13:49:16 +00:00
Stephan Aßmus 39c991c0f3 Added BPositionIO::GetSize() and implemented it by means of Seek() and
Position(). This used up a virtual slot of BPositionIO. GetSize() needed to be
implemented in BFile, which uses the BStatable version as before. This should
hopefully be binary compatible. The only problem could be in source
compatibility when there are classes inheriting from BPositionIO implementing
their own GetSize().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-26 13:27:53 +00:00
Axel Dörfler 3c4cc54948 disk_device_manager.h no longer includes a private header - ie. that header
is public now, even if it may not yet be public and fixed API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 00:29:07 +00:00
Axel Dörfler e389ac9d78 * Removed superfluous Delete*() methods.
* Invocations like SetShortDescription("") will now remove the description as
  well, not only SetShortDescription(NULL).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 10:57:47 +00:00
Axel Dörfler 7500f29455 CreateAppMetaMimeThread::DoMimeUpdate() now also updates the supported types
of an application as well as the their icons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-28 01:27:22 +00:00
Axel Dörfler f8499e9aac * added missing version_variety enumeration (this fixes the FileTypes build).
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-16 13:46:07 +00:00
Ingo Weinhold 1cac47bfa9 Added a few more constructors and initialization methods. Among them two
SetToImage() variants for initializing the object to the resources of
the shared object file belonging to a loaded image. Should be handy for
libraries and add-ons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 00:15:01 +00:00
Ingo Weinhold 15424f3d37 Finally fixed update_mime_info(). As Be's version it understands two
different "force" levels now and updates the app file info attributes
for shared object files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 19:41:07 +00:00
Axel Dörfler 02e5c93fd6 Rewrote FilePanel.h, cleanup.
Removed public functions run_open_panel() and run_save_panel() - they are deprecated
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 15:53:46 +00:00
Ingo Weinhold 4b9ec73e99 We need to override the virtual close_fd() in BFile for binary compatibility
(bug #43).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-12 09:26:59 +00:00
Ingo Weinhold 13bbbbf5dc The curse of aging... a trembling hand. ;-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 14:26:42 +00:00
Ingo Weinhold 95bac3fda5 Haiku will provide more information for B_ATTR_CHANGED and B_STAT_CHANGED events.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 14:19:26 +00:00
Ingo Weinhold db10640de9 Got rid of the Storage Kit's kernel abstraction layer, which was
unfortunately quite slow and made some things more complicated than they
needed to be.
Implemented a few missing things (e.g. BSymLink and node locking).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 20:14:46 +00:00
Axel Dörfler e5430a086c Exports the userland C++ API only when included for userland usage.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 02:25:02 +00:00
Ingo Weinhold d749688652 * Moved to the private headers.
* The CreateEditor() methods now get a BSession* respectively BPartition*
  instead of the low-level structures.
* Added EditingDone() hook to the editor class.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-22 23:45:47 +00:00
Ingo Weinhold 7c44680a36 Renamed the private virtual slots back to their original (R5) names. We would break binary compatibility otherwise, or at least had to do some additional work to maintain nevertheless.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-11 18:17:25 +00:00
Ingo Weinhold ae17e5046d Added a C++ version of get_device_icon() using a BBitmap.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-08 00:38:15 +00:00
Ingo Weinhold 38f832c7eb Removed Identifier() and FileSystem() methods. ShortName() shall return the respective identifier.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-26 15:03:48 +00:00
Ingo Weinhold 89b1309d57 This is the (first draft of the) API for userland GUI settings disk_scanner add-ons.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-19 22:50:20 +00:00
Axel Dörfler 39de200904 Now you can really include it from the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-17 18:28:09 +00:00
Axel Dörfler 31f5d420ed Redone the NodeMonitor.h header file to suit our needs (it can now also be
included from standard C).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-17 17:43:31 +00:00
Ingo Weinhold 2807c36668 Changed to OT style, some aesthetically adjustions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-09 12:45:59 +00:00
Tyler Dauwalder c698a51ee0 Removed "see also" reference from BStatable doxumentation, as it
was gunking up an otherwise nice looking Compound List page.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 18:42:52 +00:00
Tyler Dauwalder 32b8ee2e94 Renamed reserved functions to match those in R5, due to linking
incompatibilities that appear to possibly be due to R5 versions
of tests in libstoragetest_r5.so being compiled with our headers...

At any rate, this appears to fix the BQuery linking problems.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-27 02:38:39 +00:00
beveloper 23d36867f6 fixed BFile
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 13:51:09 +00:00
beveloper d734a8ce5a some header files to be R5 compatible
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 13:54:44 +00:00
beveloper d7e489f80a modified to provider better R5 compatibility
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 13:45:47 +00:00
Tyler Dauwalder 1bd963b6c2 + Added file-extension based mime type guessing
+ Added sniffer rule based mime type guessing
+ Added get_device_icon()
+ Added complete (synchronous, asynchronous; recursive,
  non-recursive; forcing, non-forcing; you name it we got it :-)
  update_mime_info() implementation.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-24 05:36:03 +00:00