Large documentation update:

- Add the beginnings of the documentation for the USB module
- Fix some mistakes here and there
- Almost finished the support kit. Tried to update everything to the standards

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20724 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Niels Sascha Reedijk
2007-04-16 09:28:29 +00:00
parent 3095921098
commit 81071f5e8a
21 changed files with 1687 additions and 554 deletions
+172
View File
@@ -0,0 +1,172 @@
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/Archivable.h rev 19972
* /trunk/src/kits/support/Archivable.cpp rev 19095
*/
/*!
\file Archivable.h
\brief Provides the BArchivable interface.
*/
/*!
\class BArchivable
\ingroup support
\ingroup libbe
\brief Interfaced for objects that can be archived into a BMessage.
BArchivable provides an interface for objects that can be archived into
messages and unarchived to objects in another location. By these means you
are able to send objects between applications, or even between computers over
networks.
BArchivable differs from BFlattenable in way that BFlattenable is designed to
store objects to flat streams of data, where the main objective is storing it
to disk. The objective of this interface is to archive objects that will be
restored as objects. To illustrate that point, BArchivable messages know how
to restore itself, whereas BFlattenables have a datatype which you manually
need to map to classes.
Archiving is done with the Archive() method. If your class support it, the
caller can request your class to to a deep archivation, which means that all
child objects should be stored. Unarchiving works with the Instantiate()
method, which is static. However, since the interface is designed to
unarchive objects without the caller knowing what kind of object it
actually is, the global function #instantiate_object() instantiates a message
without you manually having to determine the class the message is from. This
adds considerable flexibility and allows BArchivable to be used in
combination with add-ons.
To provide this interface in your classes, you should publicly inherit this
class. You should reimplement Archive() and Instantiate(), and provide one
constructor that takes one BMessage argument.
*/
/*!
\fn BArchivable::BArchivable(BMessage* from)
\brief Constructor. Does nothing.
If you inherit this interface, you should at least provide one constructor
that takes one BMessage argument.
*/
/*!
\fn BArchivable::BArchivable()
\brief Constructor. Does nothing.
*/
/*!
\fn BArchivable::~BArchivable()
\brief Destructor. Does nothing.
*/
/*!
\fn virtual status_t BArchivable::Archive(BMessage* into, bool deep = true) const
\brief Archive the object into a BMessage.
You should call this method from your derived implementation, as it finishes
the message to contain data to instantiate your object.
\param into The message you may store your object in.
\param deep If \c true, all child object of this object should be stored as
well. Naturally, only pay attention of this parameter if you actually have
child objects.
\retval B_OK The archiving succeeded.
\retval "error codes" The archiving did not succeed.
*/
/*!
\fn static BArchivable* BArchivable::Instantiate(BMessage* archive)
\brief Static member to restore objects from messages.
You should always check that the \a archive argument actually corresponds to
your class. The automatic functions, such as #instantiate_object() will not
choose the wrong class, but some manual calls to this member might be faulty.
\param archive The message with the data to restore an object.
\retval You should return a pointer to your object, or \c NULL if you
failed to succeed.
\warning The default implementation will always return \c NULL. Even though
it is possible to store plain BArchive objects, it is impossible to restore
them.
\see instantiate_object(BMessage *from)
*/
/*!
\fn virtual status_t BArchivable::Perform(perform_code d, void* arg)
\brief Internal method.
\internal This method is used to extend the API or to provide 'hidden'
features. Currently nothing of interest is implemented.
*/
///////////////////// Global methods
/*!
\addtogroup support_globals
@{
*/
/*!
\typedef typedef BArchivable* (*instantiation_func)(BMessage*)
\brief Internal definition of a function that can instantiate objects that
have been created with the BArchivable API.
*/
/*!
\fn BArchivable* instantiate_object(BMessage *from, image_id *id)
\brief Instantiate an archived object with the object being defined in a
different application or library.
This function is similar to instantiate_object(BMessage *from), except that
it takes the \a id argument that refers to an image where the object might
come from.
\note Images are names for executable files. Image ids refer to these
executable files that have been loaded by your application. Have a look
at the kernel API.
*/
/*!
\fn BArchivable* instantiate_object(BMessage *from)
\brief Instantiate an archived object.
This global function will determine the base class based on the \a from
argument, and it will call the Instantiate() function of that object to
restore it.
\param from The archived object.
\return The object returns a pointer to the instantiated object, or \c NULL
if the instantiation failed. The global \c errno variable will contain the
reason it failed.
\see instantiate_object(BMessage *from, image_id *id)
*/
/*!
\fn bool validate_instantiation(BMessage* from, const char* className)
\brief Internal function that checks if the \a className is the same as the
one stored in the \a from message.
*/
/*!
\fn instantiation_func find_instantiation_func(const char* className, const char* signature)
\brief Internal function that searches for the instantiation func with a
specific signature. Use instantiate_object() instead.
*/
/*!
\fn instantiation_func find_instantiation_func(const char* className)
\brief Internal function that searches for the instantiation func of a
specific class. Use instantiate_object() instead.
*/
/*!
\fn instantiation_func find_instantiation_func(BMessage* archive)
\brief Internal function that searches for the instantiation func that
works on the specified \a archive. Use instantiate_object() instead.
*/
//! @}
+51 -40
View File
@@ -1,26 +1,36 @@
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/Autolock.h rev 19972
*/
/*!
\file Autolock.h
\brief Implements a handy locking utility.
\file Autolock.h
\brief Implements a handy locking utility.
*/
/*!
\class BAutolock
\ingroup support
\ingroup libbe
\brief Convenient utility to make parts of your code thread-safe easily.
\class BAutolock
\ingroup support
\ingroup libbe
\brief Convenient utility to make parts of your code thread-safe easily.
The autolocker uses a BLooper or a BLocker in order to protect a part
of your code. This class is usually used in combination with a BLocker
that protects a certain part of your code and data that are being
accessed by multiple threads. While BAutolock does not add any features
to locking, it provides a mechanism to easily lock and protect a part of your
code.
The autolocker uses a BLooper or a BLocker in order to protect a part
of your code. This class is usually used in combination with a BLocker
that protects a certain part of your code and data that are being
accessed by multiple threads. While BAutolock does not add any features
to locking, it provides a mechanism to easily lock and protect a part of your
code.
Normally, when you need to protect data, you would have to make sure that
all your locks are paired with unlocks. Below is a simple example, but you
can imagine that there are more complex situations where you might spend a
lot of time debugging a hang because you didn't pair all the Lock()s with an
Unlock(). See the example:
Normally, when you need to protect data, you would have to make sure that
all your locks are paired with unlocks. Below is a simple example, but you
can imagine that there are more complex situations where you might spend a
lot of time debugging a hang because you didn't pair all the Lock()s with an
Unlock(). See the example:
\code
status_t
@@ -43,7 +53,8 @@ Receiver::HandleCall(Call *call)
}
\endcode
With the BAutolock this example can be rewritten as follows:
With the BAutolock this example can be rewritten as follows:
\code
status_t
Receiver::HandleCall(Call *call)
@@ -61,43 +72,43 @@ Receiver::HandleCall(Call *call)
}
\endcode
Since the object is created on stack, it is destroyed as soon as we leave
the function. Because the destruction of the object causes it to unlock
the BLocker or BLooper, you don't have to manually make sure that every
exit from the function is properly unlocked.
Since the object is created on stack, it is destroyed as soon as we leave
the function. Because the destruction of the object causes it to unlock
the BLocker or BLooper, you don't have to manually make sure that every
exit from the function is properly unlocked.
*/
/*!
\fn BAutolock::BAutolock(BLooper *looper)
\brief Create an object and lock the BLooper
\fn BAutolock::BAutolock(BLooper *looper)
\brief Create an object and lock the BLooper
*/
/*!
\fn BAutolock::BAutolock(BLocker *locker)
\brief Create an object and lock the BLocker
\fn BAutolock::BAutolock(BLocker *locker)
\brief Create an object and lock the BLocker
*/
/*!
\fn BAutolock::BAutolock(BLocker &locker)
\brief Create an object and lock the BLocker
\fn BAutolock::BAutolock(BLocker &locker)
\brief Create an object and lock the BLocker
*/
/*!
\fn BAutolock::~BAutolock()
\brief Destroy the object and unlock the associated BLocker or BLooper
\fn BAutolock::~BAutolock()
\brief Destroy the object and unlock the associated BLocker or BLooper
*/
/*!
\fn bool BAutolock::IsLocked(void)
\brief Verify whether the associated BLocker or BLooper are actually locked.
\fn bool BAutolock::IsLocked(void)
\brief Verify whether the associated BLocker or BLooper are actually locked.
Basically you may assume that when the object is created, you are
almost always sure the actual locking succeeds. It might fail if the
BLocker or BLooper are destroyed though. The semaphore will be
released and the Lock() call will fail.
Basically you may assume that when the object is created, you are
almost always sure the actual locking succeeds. It might fail if the
BLocker or BLooper are destroyed though. The semaphore will be
released and the Lock() call will fail.
If you expect this to happen, you can use this method to help you
protect yourself from any harm.
\retval true The lock was acquired.
\retval false Failed to acquire the lock.
If you expect this to happen, you can use this method to help you
protect yourself from any harm.
\retval true The lock was acquired.
\retval false Failed to acquire the lock.
*/
+43 -18
View File
@@ -1,32 +1,57 @@
/*!
\file Beep.h
\brief Functions to generate sounds from the computer.
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/Beep.h rev 19972
* /trunk/src/kits/support/Beep.cpp rev 20711
*/
/////!!!!!! Note that the workings of the beep still aren't completely clear
///// and not completely implemented, so this needs revision if everything
///// is finished.
/*!
\file Beep.h
\brief Functions to generate sounds from the computer.
*/
/*!
\addtogroup support_globals
@{
\addtogroup support_globals
*/
//! @{
/*!
\fn status_t beep()
\brief Invoke the standard system beep to alert users.
From Beep.h and in libbe.so.
\see system_beep() and add_system_beep_event()
*/
/*!
\fn status_t beep()
\brief TODO: Not implemented nor documented.
\fn status_t system_beep(const char* eventName)
\brief Invokes the sound for event \a eventName.
You can add the events using add_system_beep_event().
From Beep.h and in libbe.so.
From Beep.h and in libbe.so.
*/
/*!
\fn status_t system_beep(const char* eventName)
\brief TODO: Not implemented nor documented.
\fn status_t add_system_beep_event(const char* eventName, uint32 flags = 0)
\brief Adds an event to the media server.
Call this method to add a specific event to the media server.
From Beep.h and in libbe.so.
*/
/*!
\fn status_t add_system_beep_event(const char* eventName, uint32 flags = 0)
\brief TODO: Not implemented nor documented.
From Beep.h and in libbe.so.
From Beep.h and in libbe.so.
\param eventName The name of the event.
\param flags Currently unused. Pass \c 0.
*/
//! @}
+88 -75
View File
@@ -1,108 +1,121 @@
/*!
\file BlockCache.h
\brief Implements a mechanism to store and retrieve memory blocks
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/BlockCache.h rev 19972
* /trunk/src/kits/support/BlockCache.cpp rev 4568
*/
/*!
\file BlockCache.h
\brief Implements a mechanism to store and retrieve memory blocks
*/
/*!
\var B_OBJECT_CACHE
\brief Used in the constructor of BBlockCache. Determines that objects will
be created using \c new[] and \c delete[].
\var B_OBJECT_CACHE
\brief Used in the constructor of BBlockCache. Determines that objects will
be created using \c new[] and \c delete[].
*/
/*!
\var B_MALLOC_CACHE
\brief Used in the constructor of BBlockCache. Determines that objects will
be created using \c malloc() and \c free().
\var B_MALLOC_CACHE
\brief Used in the constructor of BBlockCache. Determines that objects will
be created using \c malloc() and \c free().
*/
/*!
\class BBlockCache
\ingroup support
\ingroup libbe
\brief A class that creates and maintains a pool of memory blocks.
\class BBlockCache
\ingroup support
\ingroup libbe
\brief A class that creates and maintains a pool of memory blocks.
In some performance critical code there might come a time where you
require a lot of little blocks of memory that you want to access and
dispose of continuously. Since allocating and freeing memory are an
'expensive' operation, it's better to have a pool of memory blocks at
your disposal. Luckily, the Haiku API provides a class that will act
as the administrator of your memory pool, so you won't have to reinvent
the wheel.
In some performance critical code there might come a time where you
require a lot of little blocks of memory that you want to access and
dispose of continuously. Since allocating and freeing memory are an
'expensive' operation, it's better to have a pool of memory blocks at
your disposal. Luckily, the Haiku API provides a class that will act
as the administrator of your memory pool, so you won't have to reinvent
the wheel.
The principle is easy. The constructor takes the number of blocks you
want to create beforehand, the size of the blocks and the method of
allocation. This can either be #B_OBJECT_CACHE or #B_MALLOC_CACHE.
The first uses C++ operators \c new[] and \c delete[], the second uses
\c malloc() and \c free(). Unless you have specific demands on performance
or you want to take care of freeing the objects yourself, either use is fine.
The principle is easy. The constructor takes the number of blocks you
want to create beforehand, the size of the blocks and the method of
allocation. This can either be #B_OBJECT_CACHE or #B_MALLOC_CACHE.
The first uses C++ operators \c new[] and \c delete[], the second uses
\c malloc() and \c free(). Unless you have specific demands on performance
or you want to take care of freeing the objects yourself, either use is fine.
As soon as you have the memory pool, you can Get() blocks. If the
pre-allocated memory blocks run out, BBlockCache will allocate
new ones, so you won't have to worry about availability. As soon as
you're done, you can Save() the memory back into the pool, though
BBlockCache will make sure that there won't be more blocks saved
than the initial number you said when you created the object.
As soon as you have the memory pool, you can Get() blocks. If the
pre-allocated memory blocks run out, BBlockCache will allocate
new ones, so you won't have to worry about availability. As soon as
you're done, you can Save() the memory back into the pool, though
BBlockCache will make sure that there won't be more blocks saved
than the initial number you said when you created the object.
As soon as you got a pointer from the Get() method, you own that
block of memory. This means that you have the liberty to dispose
of it yourself. It also means that when you delete your BBlockCache
instance, any blocks of memory that are checked out won't be destroyed.
In case you might want to delete your objects yourself, make sure you
use the proper way. If you created the object as #B_OBJECT_CACHE
use \c delete[] to free your object. If you created the object
as #B_MALLOC_CACHE, use \c free(). Please note that it defeats
the purpose of this class if your are going to free all the objects yourself,
since it basically means that when the pool runs out, Get() will be allocating
the objects itself.
As soon as you got a pointer from the Get() method, you own that
block of memory. This means that you have the liberty to dispose
of it yourself. It also means that when you delete your BBlockCache
instance, any blocks of memory that are checked out won't be destroyed.
In case you might want to delete your objects yourself, make sure you
use the proper way. If you created the object as #B_OBJECT_CACHE
use \c delete[] to free your object. If you created the object
as #B_MALLOC_CACHE, use \c free(). Please note that it defeats
the purpose of this class if your are going to free all the objects yourself,
since it basically means that when the pool runs out, Get() will be allocating
the objects itself.
\note BBlockCache is thread-safe.
\note BBlockCache is thread-safe.
*/
/*!
\fn BBlockCache::BBlockCache(uint32 blockCount, size_t blockSize, uint32 allocationType)
\brief Allocate a new memory pool.
\fn BBlockCache::BBlockCache(uint32 blockCount, size_t blockSize, uint32 allocationType)
\brief Allocate a new memory pool.
\param blockCount The number of free memory blocks you want to initially allocate.
This number is also used as a maximum number of free blocks that will be kept.
\param blockSize The size of the blocks.
\param allocationType Either #B_OBJECT_CACHE for using \c new[] and \c delete[]
or #B_MALLOC_CACHE for \c malloc() and \c free().
\param blockCount The number of free memory blocks you want to initially
allocate. This number is also used as a maximum number of free blocks that
will be kept.
\param blockSize The size of the blocks.
\param allocationType Either #B_OBJECT_CACHE for using \c new[] and
\c delete[] or #B_MALLOC_CACHE for \c malloc() and \c free().
*/
/*!
\fn BBlockCache::~BBlockCache()
\brief Destroy the empty blocks in the free list.
\fn BBlockCache::~BBlockCache()
\brief Destroy the empty blocks in the free list.
Note that the blocks you checked out with Get() and not checked back in with
Save() will not be freed, since ownership belongs to you. Make sure you clean up
after yourself.
Note that the blocks you checked out with Get() and not checked back in with
Save() will not be freed, since ownership belongs to you. Make sure you clean
up after yourself.
*/
/*!
\fn void *BBlockCache::Get(size_t blockSize)
\brief Get a block from the pool of free blocks.
\fn void *BBlockCache::Get(size_t blockSize)
\brief Get a block from the pool of free blocks.
If the pool runs out of free blocks, a new one will be allocated. Please note that
if the size given in the \c blockSize parameter is different from the size given
in the constructor, that a new block of memory will be created. Only sizes that
match the blocks in the memory pool will come from the pool.
If the pool runs out of free blocks, a new one will be allocated. Please note
that if the size given in the \c blockSize parameter is different from the
size given in the constructor, that a new block of memory will be created.
Only sizes that match the blocks in the memory pool will come from the pool.
\param blockSize The required size of the memory block.
\return Returns a pointer to a memory block, or \c NULL if locking the object
failed.
\param blockSize The required size of the memory block.
\return Returns a pointer to a memory block, or \c NULL if locking the object
failed.
*/
/*!
\fn void BBlockCache::Save(void *pointer, size_t blockSize)
\brief Save a block of memory to the memory pool.
\fn void BBlockCache::Save(void *pointer, size_t blockSize)
\brief Save a block of memory to the memory pool.
The block of memory will only be added to the pool if the \c blockSize is equal
to the size the object was created with, and if the maximum number free blocks
in the list won't be passed. Else the memory will be freeed.
The block of memory will only be added to the pool if the \c blockSize is
equal to the size the object was created with, and if the maximum number
free blocks in the list won't be passed. Else the memory will be freeed.
Note that it is perfectly valid to pass objects other than you got from Get(), but
please note that the way it was created confirms with the way memory is allocated
and freed in this pool. Thus, only feed blocks that were created with \c new[] if
the allocation type is #B_OBJECT_CACHE, likewise use only objects allocated
with \c malloc() when the allocation type is #B_MALLOC_CACHE.
Note that it is perfectly valid to pass objects other than you got from
Get(), but please note that the way it was created confirms with the way
memory is allocated and freed in this pool. Thus, only feed blocks that were
created with \c new[] if the allocation type is #B_OBJECT_CACHE, likewise
use only objects allocated with \c malloc() when the allocation type is
#B_MALLOC_CACHE.
*/
+10 -12
View File
@@ -1,15 +1,13 @@
//
// Copyright 2007, Haiku Inc. All Rights Reserved.
//
// Distributed under the terms of the MIT License.
//
//
// Documentation by:
// Niels Sascha Reedijk <[email protected]
// Corresponds to:
// /trunk/headers/os/support/List.h rev 19972
// /trunk/src/kits/support/List.cpp rev 18649
//
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/List.h rev 19972
* /trunk/src/kits/support/List.cpp rev 18649
*/
/*!
\file List.h
+10
View File
@@ -1,3 +1,13 @@
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/SupportDefs.h rev 19972
*/
/*!
\file SupportDefs.h
\ingroup support
+146 -128
View File
@@ -1,170 +1,188 @@
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Axel Dörfler
* Corresponds to:
* /trunk/headers/os/support/parsedate.h rev 19972
*/
/*!
\file parsedate.h
\ingroup support
\ingroup libroot
\brief Date parsing functions
\file parsedate.h
\ingroup support
\ingroup libroot
\brief Date parsing functions
This is a set a functions for parsing date strings in various formats.
It's mostly tailored for parsing user given data, although originally,
it was developed to parse the date strings found in usenet messages.
This is a set a functions for parsing date strings in various formats.
It's mostly tailored for parsing user given data, although originally,
it was developed to parse the date strings found in usenet messages.
The given date will be parsed relative to the specified time, and using
a predefined set of time/date formats.
The given date will be parsed relative to the specified time, and using
a predefined set of time/date formats.
\par Valid Input Strings
\par Valid Input Strings
The internal formats allow parsedate() to understand a wide range of
input strings. The format list is ought to be compiled from the Date:
line of 80.000 usenet messages.
The internal formats allow parsedate() to understand a wide range of
input strings. The format list is ought to be compiled from the Date:
line of 80.000 usenet messages.
But since this function is also used in end-user applications like the
Tracker's find panel, it's helpful to know what this function accepts
and what not.
But since this function is also used in end-user applications like the
Tracker's find panel, it's helpful to know what this function accepts
and what not.
Here are some examples of input strings that parsedate() will be able
to convert along with some notes:
- "last friday", "this wednesday", "next July"
"last", "next", and "this" refer to the week or year (depending
on the context). So "last friday" means last week's friday.
"This wednesday" is referring to this week's wednesday, no matter
if it has already passed or not.
"Next July" refers to next year's July. All of these dates are
parsed relative to the specified time (usually "now"), and will
be set to the first moment of that time span: "next monday" is
monday, 0:00:00, midnight.
- "now" just returns the time all calculations are relative to.
- "next 5 minutes", "5 minutes", "+5 mins" all mean the same thing,
that is, current time plus exactly 5 minutes.
- "5 weeks" means in 5 weeks from now on.
- "8/5/2003", "5.8.2003", "2003-08-05" are all referring to August
5th, 2003, again at 0:00 midnight.
- "Thursday 3:00" means this week's thursday, at 3 o'clock.
Here are some examples of input strings that parsedate() will be able
to convert along with some notes:
- "last friday", "this wednesday", "next July"
"last", "next", and "this" refer to the week or year (depending
on the context). So "last friday" means last week's friday.
"This wednesday" is referring to this week's wednesday, no matter
if it has already passed or not.
"Next July" refers to next year's July. All of these dates are
parsed relative to the specified time (usually "now"), and will
be set to the first moment of that time span: "next monday" is
monday, 0:00:00, midnight.
- "now" just returns the time all calculations are relative to.
- "next 5 minutes", "5 minutes", "+5 mins" all mean the same thing,
that is, current time plus exactly 5 minutes.
- "5 weeks" means in 5 weeks from now on.
- "8/5/2003", "5.8.2003", "2003-08-05" are all referring to August
5th, 2003, again at 0:00 midnight.
- "Thursday 3:00" means this week's thursday, at 3 o'clock.
\anchor parsedateFormats
\par Format Specifier
\anchor parsedateFormats
\par Format Specifier
While the get_dateformats() function allow you to retrieve the built-in
formats, you can also define your own and use set_dateformats() to let
parsedate() use them in all subsequent calls.
While the get_dateformats() function allow you to retrieve the built-in
formats, you can also define your own and use set_dateformats() to let
parsedate() use them in all subsequent calls.
The following is a list valid format specifiers and their meanings.
The following is a list valid format specifiers and their meanings.
- \b a/A weekday (Sunday, Monday, ...)
- \b d day of month (1-31)
- \b b/B month name (January, February, ...)
- \b month (1-12)
- \b y/Y year
- \b H/I hours (1-24)
- \b M minutes (0-60)
- \b S seconds (0-60)
- \b p meridian (am/pm)
- \b z/Z time zone (i.e. GMT)
- \b T time unit, like "last friday", "next 5 minutes", "-15 hours", etc.
- \b - dash or slash
- \b a/A weekday (Sunday, Monday, ...)
- \b d day of month (1-31)
- \b b/B month name (January, February, ...)
- \b month (1-12)
- \b y/Y year
- \b H/I hours (1-24)
- \b M minutes (0-60)
- \b S seconds (0-60)
- \b p meridian (am/pm)
- \b z/Z time zone (i.e. GMT)
- \b T time unit, like "last friday", "next 5 minutes", "-15 hours", etc.
- \b - dash or slash
Any of ",.:" is allowed and will be expected in the input string as is.
You can enclose a \b single field with "[]" to mark it as being optional.
A blank stands for white space. No other character is allowed.
An invalid format string won't do any harm, but of course, no input string
will ever match that format.
Any of ",.:" is allowed and will be expected in the input string as is.
You can enclose a \b single field with "[]" to mark it as being optional.
A blank stands for white space. No other character is allowed.
An invalid format string won't do any harm, but of course, no input string
will ever match that format.
For example, "H:M [p]" will match against "21:33", "4:12 am", but not "30:30 pm"
(hours out of range), "15:16 GMT" (this time zone is certainly not a valid
meridian specifier), or "4:66" (minutes out of range).
\par Note:
At the time of this writing, the parsedate() functions are not localized and
will only recognize English time specifications following the examples above.
For example, "H:M [p]" will match against "21:33", "4:12 am", but not
"30:30 pm" (hours out of range), "15:16 GMT" (this time zone is certainly
not a valid meridian specifier), or "4:66" (minutes out of range).
\par Note:
At the time of this writing, the parsedate() functions are not localized and
will only recognize English time specifications following the examples above.
*/
/** \def PARSEDATE_RELATIVE_TIME
\brief relative time
/*!
\def PARSEDATE_RELATIVE_TIME
\brief relative time
The time value was computed relative to the specified time.
The time value was computed relative to the specified time.
*/
/** \def PARSEDATE_DAY_RELATIVE_TIME
\brief day relative time
/*!
\def PARSEDATE_DAY_RELATIVE_TIME
\brief day relative time
The time value was computed relative to the specified time, and it would vary with
every day passed in the specified time.
The time value was computed relative to the specified time, and it would vary
with every day passed in the specified time.
*/
/** \def PARSEDATE_MINUTE_RELATIVE_TIME
\brief minute relative time
/*!
\def PARSEDATE_MINUTE_RELATIVE_TIME
\brief minute relative time
The time value was computed relative to the specified time, and it would vary with
every minute passed in the specified time.
The time value was computed relative to the specified time, and it would
vary with every minute passed in the specified time.
*/
/** \def PARSEDATE_INVALID_DATE
\brief invalid date string
/*!
\def PARSEDATE_INVALID_DATE
\brief invalid date string
This flag will be set if the specified date string could not be parsed correctly.
For example, this may happen if there are some unknown words in that string.
This flag will be set if the specified date string could not be parsed
correctly. For example, this may happen if there are some unknown words in
that string.
*/
/** \fn time_t parsedate(const char *dateString, time_t relativeTo)
\brief Parses <span class="var">dateString</span> relative to <span class="var">relativeTo</span>
/*!
\fn time_t parsedate(const char *dateString, time_t relativeTo)
\brief Parses \a dateString relative to \a relativeTo
Parses the given <span class="var">dateString</span> relative to the time
specified by <span class="var">relativeTo</span> using the internal formats
table.
Parses the given \a dateString relative to the time
specified by \a relativeTo using the internal formats
table.
\param dateString the date that should be parsed, i.e. "next thursday"
\param relativeTo all relative dates will be relative to this time, if -1 is passed, the current time will be used
\return the parsed time value or -1 if the <span class="var">dateString</span>
could not be parsed.
\param dateString the date that should be parsed, i.e. "next thursday".
\param relativeTo all relative dates will be relative to this time, if -1
is passed, the current time will be used.
\return the parsed time value or -1 if the \a dateString
could not be parsed.
*/
/** \fn time_t parsedate_etc(const char *dateString, time_t relativeTo, int *_storedFlags)
\brief Parses <span class="var">dateString</span> relative to <span class="var">relativeTo</span>
/*!
\fn time_t parsedate_etc(const char *dateString, time_t relativeTo, int *_storedFlags)
\brief Parses <span class="var">dateString</span> relative to <span class="var">relativeTo</span>
This does basically the same as parsedate(), but will set the following
flags in <span class="var">_storedFlags</span>:
\htmlonly
<table border=1>
<!-- ToDo: this certainly is a hack -->
<tr><th bgcolor="#eeeeee">Constant</th><th bgcolor="#eeeeee">Meaning</th></tr>
<tr><td class="mdname1">PARSEDATE_RELATIVE_TIME</td>
<td>\endhtmlonly \copydoc PARSEDATE_RELATIVE_TIME \htmlonly
</td></tr>
<tr><td class="mdname1">PARSEDATE_DAY_RELATIVE_TIME</td>
<td>\endhtmlonly \copydoc PARSEDATE_DAY_RELATIVE_TIME \htmlonly
</td></tr>
<tr><td class="mdname1">PARSEDATE_MINUTE_RELATIVE_TIME</td>
<td>\endhtmlonly \copydoc PARSEDATE_MINUTE_RELATIVE_TIME \htmlonly
</td></tr>
<tr><td class="mdname1">PARSEDATE_INVALID_DATE</td>
<td>
\endhtmlonly \copydoc PARSEDATE_INVALID_DATE \htmlonly
This flag will only be set if the function returns -1.
</td></tr>
</table>
\endhtmlonly
This does basically the same as parsedate(), but will set the following
flags in <span class="var">_storedFlags</span>:
\htmlonly
<table border=1>
<!-- ToDo: this certainly is a hack -->
<tr><th bgcolor="#eeeeee">Constant</th><th bgcolor="#eeeeee">Meaning</th></tr>
<tr><td class="mdname1">PARSEDATE_RELATIVE_TIME</td>
<td>\endhtmlonly \copydoc PARSEDATE_RELATIVE_TIME \htmlonly
</td></tr>
<tr><td class="mdname1">PARSEDATE_DAY_RELATIVE_TIME</td>
<td>\endhtmlonly \copydoc PARSEDATE_DAY_RELATIVE_TIME \htmlonly
</td></tr>
<tr><td class="mdname1">PARSEDATE_MINUTE_RELATIVE_TIME</td>
<td>\endhtmlonly \copydoc PARSEDATE_MINUTE_RELATIVE_TIME \htmlonly
</td></tr>
<tr><td class="mdname1">PARSEDATE_INVALID_DATE</td>
<td>
\endhtmlonly \copydoc PARSEDATE_INVALID_DATE \htmlonly
This flag will only be set if the function returns -1.
</td></tr>
</table>
\endhtmlonly
*/
/** \fn void set_dateformats(const char *formatTable[])
\brief sets the internal format table for parsedate()
This function let you set the format table which is used by parsedate().
When <span class="var">formatTable</span> is NULL, the standard built-in format table will be set again.
\param formatTable the NULL terminated formats list. This list must stay
valid when using parsedate() - it is not copied, but directly used.
\see
\ref parsedateFormats Format!
/*!
\fn void set_dateformats(const char *formatTable[])
\brief sets the internal format table for parsedate()
This function let you set the format table which is used by parsedate().
When <span class="var">formatTable</span> is NULL, the standard built-in format table will be set again.
\param formatTable the NULL terminated formats list. This list must stay
valid when using parsedate() - it is not copied, but directly used.
\see
\ref parsedateFormats Format!
*/
/** \fn const char **get_dateformats(void)
\brief returns the internal format table currently used by parsedate()
/*!
\fn const char **get_dateformats(void)
\brief returns the internal format table currently used by parsedate()
Returns the internal format table currently used by parsedate() - this is
either a pointer to the built-in one, or one that you have previously
set using set_dateformats().
Returns the internal format table currently used by parsedate() - this is
either a pointer to the built-in one, or one that you have previously
set using set_dateformats().
\see
\ref set_dateformats()
\see
\ref set_dateformats()
*/
+66 -48
View File
@@ -1,82 +1,100 @@
/*!
\file StopWatch.h
\brief Provides the BStopWatch class.
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation written by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/StopWatch.h rev 19972
* /trunk/src/kits/support/StopWatch.cpp rev 14204
*/
/*!
\file StopWatch.h
\brief Provides the BStopWatch class.
*/
/*!
\class BStopWatch
\ingroup support
\ingroup libbe
\brief A timer class.
\class BStopWatch
\ingroup support
\ingroup libbe
\brief A timer class.
This class provides method to time events. The interface is designed to behave like a physical stopwatch. It is especially useful for debugging certain parts of your code, since it can behave like a 'cheap' profiler.
This class provides method to time events. The interface is designed to
behave like a physical stopwatch. It is especially useful for debugging
certain parts of your code, since it can behave like a 'cheap' profiler.
*/
/*!
\fn BStopWatch::BStopWatch(const char *name, bool silent)
\brief Constructs a BStopWatch object and starts the timer.
\fn BStopWatch::BStopWatch(const char *name, bool silent)
\brief Construct a BStopWatch object and starts the timer.
The constructor creates a clean BStopWatch object. This object
can be given a name. As soon as the object is created, the time
will start ticking away. This class is designed to be usuable as a primitive profiling tool.
If you are profiling your code with this class, pass true as the
silentparameter. Whenever the object is destroyed, information on
the elapsed time will be streamed to standard output.
The constructor creates a clean BStopWatch object. This object
can be given a name. As soon as the object is created, the time
will start ticking away. This class is designed to be usuable as a primitive
profiling tool.
If you are profiling your code with this class, pass true as the
silentparameter. Whenever the object is destroyed, information on
the elapsed time will be streamed to standard output.
\param name The name you want to give this object. You may pass NULL.
\param silent Pass true if you want to use this object as a simple profiler.
\param name The name you want to give this object. You may pass NULL.
\param silent Pass true if you want to use this object as a simple profiler.
*/
/*!
\fn BStopWatch::~BStopWatch()
Destroys the object. If the object was constructed with the parameter
silent set t to false, this destructor will print
information on the elapsed time to standard output.
\fn BStopWatch::~BStopWatch()
\brief Destructor.
Destroys the object. If the object was constructed with the parameter
silent set t to false, this destructor will print information on the elapsed
time to standard output.
*/
/*!
\fn void BStopWatch::Resume()
\brief Resumes the timer when it is in a suspended state.
\sa Suspend()
\fn void BStopWatch::Resume()
\brief Resume the timer when it is in a suspended state.
\see Suspend()
*/
/*!
\fn void BStopWatch::Suspend()
\brief Suspend the timer.
\sa Resume()
\fn void BStopWatch::Suspend()
\brief Suspend the timer.
\see Resume()
*/
/*!
\fn bigtime_t BStopWatch::Lap()
\brief Start a new lap.
\fn bigtime_t BStopWatch::Lap()
\brief Start a new lap.
This method sets a lap. With the current implementation you are unable to actually
retrieve the timings of the laps. This is only printed to the standard output when the
object is destroyed. Thus making this tool only usuable for use when doing some
profiling.
This method sets a lap. With the current implementation you are unable to
actually retrieve the timings of the laps. This is only printed to the
standard output when the object is destroyed. Thus making this tool only
usuable for use when doing some profiling.
\attention Please note that the current implementation is limited to 10 laps. The value returned
is the time that has passed since the timer was started (and not the time that has
passed since the last lap). Any lap call beyond the 10th lap will overwrite the last
value. Note that if the timer is suspended, nothing happens and the method will return 0.
\attention Please note that the current implementation is limited to 10 laps.
The value returned is the time that has passed since the timer was started
(and not the time that has passed since the last lap). Any lap call beyond
the 10th lap will overwrite the last value. Note that if the timer is
suspended, nothing happens and the method will return 0.
*/
/*!
\fn bigtime_t BStopWatch::ElapsedTime() const
\brief Get the elapsed time the object has counted.
\return The elapsed time in microseconds.
\fn bigtime_t BStopWatch::ElapsedTime() const
\brief Get the elapsed time the object has counted.
\return The elapsed time in microseconds.
*/
/*!
\fn void BStopWatch::Reset()
\brief Restart the timer
\fn void BStopWatch::Reset()
\brief Restart the timer.
Resets the object: it clears the start time, it clears the stored laps and it restarts
the timer.
Resets the object: it clears the start time, it clears the stored laps and it
restarts the timer.
*/
/*!
\fn const char *BStopWatch::Name() const
\brief Get the name
\return the name given to the object at creation time.
\fn const char *BStopWatch::Name() const
\brief Get the name.
\return the name given to the object at creation time.
*/
+10 -12
View File
@@ -1,15 +1,13 @@
//
// Copyright 2007, Haiku Inc. All Rights Reserved.
//
// Distributed under the terms of the MIT License.
//
//
// Documentation by:
// Niels Sascha Reedijk <[email protected]>
// Corresponds to:
// /trunk/headers/os/support/String.h rev 19731
// /trunk/src/kits/support/String.cpp rev 19731
//
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/String.h rev 19731
* /trunk/src/kits/support/String.cpp rev 19731
*/
/*!
\file String.h
-7
View File
@@ -1,7 +0,0 @@
/*!
\page support_archiving Archiving and unarchiving objects.
This document is also in the original BeBook, where it describes:
-# How to archive and unarchive an object
-# How to create an archivable object.
*/
+11 -3
View File
@@ -1,3 +1,11 @@
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
*/
/*!
\page support_intro Introduction to the Support Kit
@@ -11,7 +19,7 @@
- BAutolock
- Thread Local Storage
- Archiving and IO:
- BArchivable (\link support_archiving tutorial\endlink)
- BArchivable
- BFlattenable
- BDataIO
- BPositionIO
@@ -34,8 +42,8 @@
// the todo list on this.
/*!
\addtogroup support
\addtogroup support
For a better overview, have a look at \ref support_intro .
For a better overview, have a look at \ref support_intro .
*/
+178 -113
View File
@@ -1,228 +1,293 @@
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation written by:
* Axel Dörfler
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/posix/syslog.h rev 6684
*/
/*!
\file syslog.h
\ingroup support
\ingroup libroot
\brief System logging capabilities
\file syslog.h
\ingroup support
\ingroup libroot
\brief System logging capabilities
The functions described here are interacting with the syslog_daemon, a server
that provides the system logging capabilities.
The log can be found in /var/log/syslog.
The functions described here are interacting with the syslog_daemon, a server
that provides the system logging capabilities.
The log can be found in /var/log/syslog.
*/
/*! \fn void closelog(void)
\brief Closes the current log session
/*!
\fn void closelog(void)
\brief Closes the current log session
*/
/*! \fn void openlog(const char *ident, int options, int facility)
\brief Starts a log session, and sets some output options
/*!
\fn void openlog(const char *ident, int options, int facility)
\brief Starts a log session, and sets some output options
Like openlog_thread() this function defines the log session in thread context; the
global options set by openlog_team() are not affected by this function.
Like openlog_thread() this function defines the log session in thread context; the
global options set by openlog_team() are not affected by this function.
*/
/*! \fn int setlogmask(int priorityMask)
\brief sets the logging priority mask
/*!
\fn int setlogmask(int priorityMask)
\brief sets the logging priority mask
*/
/*! \fn void syslog(int priority, const char *message, ...)
\brief sends a message to the system log
/*!
\fn void syslog(int priority, const char *message, ...)
\brief sends a message to the system log
*/
/*! \fn void closelog_team(void)
\brief Closes the log
/*!
\fn void closelog_team(void)
\brief Closes the log
*/
/*! \fn void openlog_team(const char *ident, int logopt, int facility)
\brief Starts a log session, and sets some output options
/*!
\fn void openlog_team(const char *ident, int logopt, int facility)
\brief Starts a log session, and sets some output options
This function defines the team-wide logging options. Thread local sessions
started with openlog() or openlog_thread() will inherit the options of the
global session.
This function defines the team-wide logging options. Thread local sessions
started with openlog() or openlog_thread() will inherit the options of the
global session.
*/
/*! \fn void log_team(int priority, const char *message, ...)
\brief sends a message to the system log
/*!
\fn void log_team(int priority, const char *message, ...)
\brief sends a message to the system log
*/
/*! \fn int setlogmask_team(int priorityMask)
\brief sets the logging priority mask
/*!
\fn int setlogmask_team(int priorityMask)
\brief sets the logging priority mask
*/
/*! \fn void closelog_thread(void)
\brief Closes the log
/*!
\fn void closelog_thread(void)
\brief Closes the log
*/
/*! \fn void openlog_thread(const char *ident, int logopt, int facility)
\brief Starts a log session, and sets some output options
/*!
\fn void openlog_thread(const char *ident, int logopt, int facility)
\brief Starts a log session, and sets some output options
*/
/*! \fn void log_thread(int priority, const char *message, ...)
\brief sends a message to the system log
/*!
\fn void log_thread(int priority, const char *message, ...)
\brief sends a message to the system log
*/
/*! \fn int setlogmask_thread(int priorityMask)
\brief sets the logging priority mask
/*!
\fn int setlogmask_thread(int priorityMask)
\brief sets the logging priority mask
*/
/*! @{
\name Options for openlog()
/*!
\name Options for openlog()
*/
/*! \def LOG_PID
\brief Log the process (thread/team) ID with each message
//! @{
/*!
\def LOG_PID
\brief Log the process (thread/team) ID with each message
*/
/*! \def LOG_CONS
\brief Log to the system console on error
/*!
\def LOG_CONS
\brief Log to the system console on error
*/
/*! \def LOG_ODELAY
\brief Delay open until syslog() is called
/*!
\def LOG_ODELAY
\brief Delay open until syslog() is called
*/
/*! \def LOG_NDELAY
\brief Connect to the syslog daemon immediately
/*!
\def LOG_NDELAY
\brief Connect to the syslog daemon immediately
*/
/*! \def LOG_SERIAL
\brief Dump to serial output as well.
\attention This is not yet implemented
/*!
\def LOG_SERIAL
\brief Dump to serial output as well.
\attention This is not yet implemented
*/
/*! \def LOG_PERROR
\brief Dump to stderr as well
/*!
\def LOG_PERROR
\brief Dump to stderr as well
*/
/*! \def LOG_NOWAIT
\brief Do not wait for child processes
/*!
\def LOG_NOWAIT
\brief Do not wait for child processes
*/
//! @}
/*! @{
/*!
\name Facilities for openlog()
*/
/*! \def LOG_KERN
\brief Reserved for messages generated by the kernel.
//! @{
/*!
\def LOG_KERN
\brief Reserved for messages generated by the kernel.
*/
/*! \def LOG_USER
\brief Reserved for messages generated by user processes.
/*!
\def LOG_USER
\brief Reserved for messages generated by user processes.
*/
/*! \def LOG_MAIL
\brief Standard (?) POSIX facility for messages by the mailing daemon.
/*!
\def LOG_MAIL
\brief Standard (?) POSIX facility for messages by the mailing daemon.
*/
/*! \def LOG_DAEMON
\brief Standard POSIX (?) facility for messages by daemons (and Haiku servers).
/*!
\def LOG_DAEMON
\brief Standard POSIX (?) facility for messages by daemons (and Haiku servers).
*/
/*! \def LOG_AUTH
\brief Standard POSIX facility(?) for messages by the authentication services.
/*!
\def LOG_AUTH
\brief Standard POSIX facility(?) for messages by the authentication services.
*/
/*! \def LOG_SYSLOG
\brief Reserved for messages generated by the syslog daemon.
/*!
\def LOG_SYSLOG
\brief Reserved for messages generated by the syslog daemon.
*/
/*! \def LOG_LPR
\brief Reserved for messages generated by the UNIX lpr printing tool.
/*!
\def LOG_LPR
\brief Reserved for messages generated by the UNIX lpr printing tool.
*/
/*! \def LOG_NEWS
\brief Reserved for messages generated by something UNIXy that does something with NEWS.
/*!
\def LOG_NEWS
\brief Reserved for messages generated by something UNIXy that does something with NEWS.
*/
/*! \def LOG_UUCP
\brief Reserved for messages generated by UUCP
/*!
\def LOG_UUCP
\brief Reserved for messages generated by UUCP
*/
/*! \def LOG_CRON
\brief Reserved for messages generated by the CRON daemon.
/*!
\def LOG_CRON
\brief Reserved for messages generated by the CRON daemon.
*/
/*! \def LOG_AUTHPRIV
\brief Reserved for private (?) messages that relate to authentication.
/*!
\def LOG_AUTHPRIV
\brief Reserved for private (?) messages that relate to authentication.
*/
/*! \def LOG_LOCAL0
\brief Use this for local use.
/*!
\def LOG_LOCAL0
\brief Use this for local use.
*/
/*! \def LOG_LOCAL1
\brief Use this for local use.
/*!
\def LOG_LOCAL1
\brief Use this for local use.
*/
/*! \def LOG_LOCAL2
\brief Use this for local use.
/*!
\def LOG_LOCAL2
\brief Use this for local use.
*/
/*! \def LOG_LOCAL3
\brief Use this for local use.
/*!
\def LOG_LOCAL3
\brief Use this for local use.
*/
/*! \def LOG_LOCAL4
\brief Use this for local use.
/*!
\def LOG_LOCAL4
\brief Use this for local use.
*/
/*! \def LOG_LOCAL5
\brief Use this for local use.
/*!
\def LOG_LOCAL5
\brief Use this for local use.
*/
/*! \def LOG_LOCAL6
\brief Use this for local use.
/*!
\def LOG_LOCAL6
\brief Use this for local use.
*/
/*! \def LOG_LOCAL7
\brief Use this for local use.
/*!
\def LOG_LOCAL7
\brief Use this for local use.
*/
//! @}
/*! @{
/*!
\name Priorities for syslog(), log_team() and log_thread()
*/
/*! \def LOG_EMERG
\brief A panic condition
//! @{
/*!
\def LOG_EMERG
\brief A panic condition
*/
/*! \def LOG_PANIC
\brief An alias for LOG_EMERG
/*!
\def LOG_PANIC
\brief An alias for LOG_EMERG
*/
/*! \def LOG_ALERT
\brief A condition to that should be corrected immediately
/*!
\def LOG_ALERT
\brief A condition to that should be corrected immediately
*/
/*! \def LOG_CRIT
\brief Critical conditions like hard drive errors
/*!
\def LOG_CRIT
\brief Critical conditions like hard drive errors
*/
/*! \def LOG_ERR
\brief Errors
/*!
\def LOG_ERR
\brief Errors
*/
/*! \def LOG_WARNING
\brief Warnings
/*!
\def LOG_WARNING
\brief Warnings
*/
/*! \def LOG_NOTICE
\brief Notices, instructions on how to use certain configuration options.
/*!
\def LOG_NOTICE
\brief Notices, instructions on how to use certain configuration options.
*/
/*! \def LOG_INFO
\brief Information, like versions and so.
/*!
\def LOG_INFO
\brief Information, like versions and so.
*/
/*! \def LOG_DEBUG
\brief Debug information.
/*!
\def LOG_DEBUG
\brief Debug information.
*/\
//! @}
/*! \def LOG_MASK
\brief Converts a priority definition for use in setlogmask()
/*!
\def LOG_MASK
\brief Converts a priority definition for use in setlogmask()
*/
+83 -71
View File
@@ -1,173 +1,185 @@
/*!
\file TypeConstants.h
\ingroup support
\brief Represents typecodes that are used in various part of the Haiku API.
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Niels Sascha Reedijk <[email protected]>
* Corresponds to:
* /trunk/headers/os/support/TypeConstants.h rev 20212
*/
The type codes all refer to a specified type, except one. B_ANY_TYPE can
refer to literaly any type. This type could be used in case you send or receive
data of which you don't know the type, but you want to send or receive it
anyway.
/*!
\file TypeConstants.h
\ingroup support
\brief Represents typecodes that are used in various part of the Haiku API.
The type codes all refer to a specified type, except one. B_ANY_TYPE can
refer to literaly any type. This type could be used in case you send or receive
data of which you don't know the type, but you want to send or receive it
anyway.
*/
/*!
\var B_ANY_TYPE
\brief General type when the exact contents is not yet known.
\var B_ANY_TYPE
\brief General type when the exact contents is not yet known.
*/
/*!
\var B_ATOM_TYPE
\brief Reference to a BAtomic class that was going to be in BeOS R6. Unused in Haiku.
\var B_ATOM_TYPE
\brief Reference to a BAtomic class that was going to be in BeOS R6. Unused in Haiku.
*/
/*!
\var B_ATOMREF_TYPE
\brief Reference to a BAtomic class that was going to be in BeOS R6. Unused in Haiku.
\var B_ATOMREF_TYPE
\brief Reference to a BAtomic class that was going to be in BeOS R6. Unused in Haiku.
*/
/*!
\var B_BOOL_TYPE
\brief Boolean value.
\var B_BOOL_TYPE
\brief Boolean value.
*/
/*!
\var B_CHAR_TYPE
\brief Represents the \c char type.
\var B_CHAR_TYPE
\brief Represents the \c char type.
*/
/*!
\var B_COLOR_8_BIT_TYPE
\brief Represents a one-byte colour.
\var B_COLOR_8_BIT_TYPE
\brief Represents a one-byte colour.
*/
/*!
\var B_DOUBLE_TYPE
\brief Represents the \c double type.
\var B_DOUBLE_TYPE
\brief Represents the \c double type.
*/
/*!
\var B_FLOAT_TYPE
\brief Represents the \c float type.
\var B_FLOAT_TYPE
\brief Represents the \c float type.
*/
/*!
\var B_GRAYSCALE_8_BIT_TYPE
\brief Represents a byte-long grayscale value.
\var B_GRAYSCALE_8_BIT_TYPE
\brief Represents a byte-long grayscale value.
*/
/*!
\var B_INT16_TYPE
\brief Represents a \c short type.
\var B_INT16_TYPE
\brief Represents a \c short type.
*/
/*!
\var B_INT32_TYPE
\brief Represents a \c long type.
\var B_INT32_TYPE
\brief Represents a \c long type.
*/
/*!
\var B_INT64_TYPE
\brief Represents a \c long \c long type.
\var B_INT64_TYPE
\brief Represents a \c long \c long type.
*/
/*!
\var B_INT8_TYPE
\brief Represents a \c char type used for integer storage.
\var B_INT8_TYPE
\brief Represents a \c char type used for integer storage.
*/
/*!
\var B_LARGE_ICON_TYPE
\brief Represents a large icon.
\var B_LARGE_ICON_TYPE
\brief Represents a large icon.
*/
/*!
\var B_MEDIA_PARAMETER_GROUP_TYPE
\brief Represents the BParameterGroup type from the media kit.
\var B_MEDIA_PARAMETER_GROUP_TYPE
\brief Represents the BParameterGroup type from the media kit.
*/
/*!
\var B_MEDIA_PARAMETER_TYPE
\brief Represents the BParameter type from the media kit.
\var B_MEDIA_PARAMETER_TYPE
\brief Represents the BParameter type from the media kit.
*/
/*!
\var B_MEDIA_PARAMETER_WEB_TYPE
\brief Represents the BParameterWeb type from the media kit.
\var B_MEDIA_PARAMETER_WEB_TYPE
\brief Represents the BParameterWeb type from the media kit.
*/
/*!
\var B_MESSAGE_TYPE
\brief Represents a BMessage type.
\var B_MESSAGE_TYPE
\brief Represents a BMessage type.
*/
/*!
\var B_MESSENGER_TYPE
\brief Represents a BMessenger type.
\var B_MESSENGER_TYPE
\brief Represents a BMessenger type.
*/
// Todo: the rest of the types
/*! @{
/*!
\name System-wide MIME types for handling URLs
*/
//! @{
/*!
\var B_URL_HTTP
\brief application/x-vnd.Be.URL.http
\var B_URL_HTTP
\brief application/x-vnd.Be.URL.http
*/
/*!
\var B_URL_HTTPS
\brief application/x-vnd.Be.URL.https
\var B_URL_HTTPS
\brief application/x-vnd.Be.URL.https
*/
/*!
\var B_URL_FTP
\brief application/x-vnd.Be.URL.ftp
\var B_URL_FTP
\brief application/x-vnd.Be.URL.ftp
*/
/*!
\var B_URL_GOPHER
\brief application/x-vnd.Be.URL.gopher
\var B_URL_GOPHER
\brief application/x-vnd.Be.URL.gopher
*/
/*!
\var B_URL_MAILTO
\brief application/x-vnd.Be.URL.mailto
\var B_URL_MAILTO
\brief application/x-vnd.Be.URL.mailto
*/
/*!
\var B_URL_NEWS
\brief application/x-vnd.Be.URL.news
\var B_URL_NEWS
\brief application/x-vnd.Be.URL.news
*/
/*!
\var B_URL_NNTP
\brief application/x-vnd.Be.URL.nntp
\var B_URL_NNTP
\brief application/x-vnd.Be.URL.nntp
*/
/*!
\var B_URL_TELNET
\brief application/x-vnd.Be.URL.telnet
\var B_URL_TELNET
\brief application/x-vnd.Be.URL.telnet
*/
/*!
\var B_URL_RLOGIN
\brief application/x-vnd.Be.URL.rlogin
\var B_URL_RLOGIN
\brief application/x-vnd.Be.URL.rlogin
*/
/*!
\var B_URL_TN3270
\brief application/x-vnd.Be.URL.tn3270
\var B_URL_TN3270
\brief application/x-vnd.Be.URL.tn3270
*/
/*!
\var B_URL_WAIS
\brief application/x-vnd.Be.URL.wais
\var B_URL_WAIS
\brief application/x-vnd.Be.URL.wais
*/
/*!
\var B_URL_FILE
\brief application/x-vnd.Be.URL.file
\var B_URL_FILE
\brief application/x-vnd.Be.URL.file
*/
//! @}