Commit Graph

62 Commits

Author SHA1 Message Date
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
Tyler Dauwalder
baa326e0ec Implemented Get/SetSnifferRule()
Added SetSupportedTypes() documentation
Removed a few unnecessary BMessage copies in a couple of functions


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-09 07:59:25 +00:00
Tyler Dauwalder
94fb5d4096 Added fullSync parameter to SetSupportedTypes()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-28 23:53:22 +00:00
Ingo Weinhold
98da112cca Complete implementation. The 'supporting types' methods are untested as they need BMimeType/registar support. SetSupportedTypes() may need some adjustions when that is available.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-25 22:49:22 +00:00
Ingo Weinhold
3d4a601414 BMimeType's got a new friend: BAppFileInfo.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-25 22:48:10 +00:00
Tyler Dauwalder
e20a514ae9 After implementing the BMimeType::GetInstalled[Super]Types()
functionality, it became apparent that some restructuring was
needed if I wanted to keep things clean and managble.
storage/MimeDatabase.{h,cpp} have been broken into:

storage/mime/database_support.{h,cpp}
+ MIME database constants
+ high-level database access functions like open_type(),
  read_mime_attr(), etc.

storage/mime/database_access.{h,cpp}
+ atomic read functions
+ is_installed()
+ get_icon_data()

storage/mime/Database.{h,cpp}
+ Mime::Database class, which is responsible for all write,
  non-atomic read, and mime monitor functionality.

storage/mime/InstalledTypes.{h,cpp}
+ Helper class for Mime::Database::GetInstalled[Super]Types()

storage/mime/Supertype.{h,cpp}
+ Helper class for Mime::InstalledTypes

I haven't merged my intial, somewhat cludgy GetInstalled[Super]Types
implementation into the new setup yet. That comes next, and it ought
to be a more graceful implementation now.

I also implemented BMimeType::Get/SetSupportingTypes(), though
they haven't been tested yet (sorry).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-24 05:04:02 +00:00
Tyler Dauwalder
3155eae222 + Added code/updated tests for
- AttrInfo
  - FileExtensions
+ Updated Delete() code to send monitor updates
+ Tenatively added "be:action" field to monitor messages
+ Added data type constants


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-21 10:55:20 +00:00
Tyler Dauwalder
1ed04c7ce3 Added code for:
+ {Get,Set}IconForType()
+ Delete*() functions


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-20 09:37:04 +00:00
Ingo Weinhold
d6b205f306 Added BAppFileInfo header, empty implementation with doxygen comments.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-17 23:59:41 +00:00