hrev53451 adds 3 changesets to branch 'master'
old head: 0cacf937a08ef42b79a45eae505c6b9e228c2d47
new head: 03b52202d15def20288e2b5d0d5f930e75d167f7
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=03b52202d15d+%5E0cacf937a08e
----------------------------------------------------------------------------
a72f3582be00: API Docs: Add placeholder for Key.h, KeyStore.h and Notification.h
5b2a8e3aef33: API Docs: Add new methods to BMessage
03b52202d15d: API Docs: various AppKit improvements
[ Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx> ]
----------------------------------------------------------------------------
8 files changed, 2548 insertions(+), 127 deletions(-)
docs/user/app/Application.dox | 64 +-
docs/user/app/Cursor.dox | 12 +-
docs/user/app/Invoker.dox | 12 +-
docs/user/app/Key.dox | 422 +++++++++++
docs/user/app/KeyStore.dox | 390 ++++++++++
docs/user/app/Looper.dox | 11 +-
docs/user/app/Message.dox | 1434 +++++++++++++++++++++++++++++++++---
docs/user/app/Notification.dox | 330 +++++++++
############################################################################
Commit: a72f3582be00f2151800fa7da036d7adc14e3272
URL: https://git.haiku-os.org/haiku/commit/?id=a72f3582be00
Author: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx>
Date: Sun Sep 1 15:09:54 2019 UTC
API Docs: Add placeholder for Key.h, KeyStore.h and Notification.h
----------------------------------------------------------------------------
diff --git a/docs/user/app/Key.dox b/docs/user/app/Key.dox
new file mode 100644
index 0000000000..46a7ea56fa
--- /dev/null
+++ b/docs/user/app/Key.dox
@@ -0,0 +1,422 @@
+/*
+ * Copyright 2019 Haiku, Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ * Authors:
+ * Niels Sascha Reedijk, niels.reedijk@xxxxxxxxx
+ *
+ * Corresponds to:
+ * headers/os/app/Key.h hrev45343
+ * src/kits/app/Key.cpp hrev45343
+ */
+
+
+ /*!
+ \file Key.h
+ \ingroup app
+ \ingroup libbe
+ \brief Provides BKey and BPasswordKey classes, as well as BKeyPurpose
and
+ BKeyType enums.
+*/
+
+
+ ///// BKeyPurpose enum /////
+
+
+/*!
+ \enum BKeyPurpose
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyPurpose::B_KEY_PURPOSE_ANY
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyPurpose::B_KEY_PURPOSE_GENERIC
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyPurpose::B_KEY_PURPOSE_KEYRING
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyPurpose::B_KEY_PURPOSE_WEB
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyPurpose::B_KEY_PURPOSE_NETWORK
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyPurpose::B_KEY_PURPOSE_VOLUME
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+ ///// BKeyType enum /////
+
+
+/*!
+ \enum BKeyType
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyType::B_KEY_TYPE_ANY
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyType::B_KEY_TYPE_GENERIC
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyType::B_KEY_TYPE_PASSWORD
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var BKeyType::B_KEY_TYPE_CERTIFICATE
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+///// BKey class /////
+
+
+/*!
+ \class BKey
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BKey::BKey();
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BKey::BKey(BKeyPurpose purpose, const char* identifier,
+ const char* secondaryIdentifier = NULL, const uint8* data = NULL,
+ size_t length = 0)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BKey::BKey(BKey& other)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual BKey::~BKey()
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual BKeyType BKey::Type() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BKey::Unset()
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKey::SetTo(BKeyPurpose purpose, const char* identifier,
+ const char* secondaryIdentifier = NULL, const uint8* data =
NULL,
+ size_t length = 0)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BKey::SetPurpose(BKeyPurpose purpose)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BKeyPurpose BKey::Purpose() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BKey::SetIdentifier(const char* identifier)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BKey::Identifier() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BKey::SetSecondaryIdentifier(const char* identifier)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BKey::SecondaryIdentifier() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKey::SetData(const uint8* data, size_t length)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn size_t BKey::DataLength() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const uint8* BKey::Data() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKey::GetData(uint8* buffer, size_t bufferSize) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BKey::Owner() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn bigtime_t BKey::CreationTime() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual status_t BKey::Flatten(BMessage& message) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual status_t BKey::Unflatten(const BMessage& message)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BKey& BKey::operator=(const BKey& other)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn bool BKey::operator==(const BKey& other) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn bool BKey::operator!=(const BKey& other) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual void BKey::PrintToStream();
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+///// BPasswordKey class /////
+
+
+
+/*!
+ \class BPasswordKey
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+/*!
+ \fn BPasswordKey::BPasswordKey()
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BPasswordKey::BPasswordKey(const char* password, BKeyPurpose
purpose,
+ const char* identifier, const char* secondaryIdentifier = NULL)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BPasswordKey::BPasswordKey(BPasswordKey& other)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual BPasswordKey::~BPasswordKey()
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual BKeyType BPasswordKey::Type() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BPasswordKey::SetTo(const char* password, BKeyPurpose
purpose,
+ const char* identifier, const char* secondaryIdentifier = NULL)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BPasswordKey::SetPassword(const char* password)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BPasswordKey::Password() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual void BPasswordKey::PrintToStream()
+ \brief Undocumented
+
+ \since Haiku R1
+*/
diff --git a/docs/user/app/KeyStore.dox b/docs/user/app/KeyStore.dox
new file mode 100644
index 0000000000..288d3f5075
--- /dev/null
+++ b/docs/user/app/KeyStore.dox
@@ -0,0 +1,390 @@
+/*
+ * Copyright 2019 Haiku, Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ * Authors:
+ * Niels Sascha Reedijk, niels.reedijk@xxxxxxxxx
+ *
+ * Corresponds to:
+ * headers/os/app/KeyStore.h hrev45434
+ * src/kits/app/KeyStore.cpp hrev45434
+ */
+
+
+ /*!
+ \file KeyStore.h
+ \ingroup app
+ \ingroup libbe
+ \brief Provides BKeyStore class.
+*/
+
+
+/*!
+ \class BKeyStore
+ \ingroup app
+ \ingroup libbe
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BKeyStore::BKeyStore()
+ \brief undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual BKeyStore::~BKeyStore()
+ \brief undocumented
+
+ \since Haiku R1
+*/
+
+/*!
+ \name Key Management
+*/
+
+
+//! @{
+
+
+/*!
+ \fn status_t BKeyStore::GetKey(BKeyType type, const char* identifier,
+ BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetKey(BKeyType type, const char* identifier,
+ const char* secondaryIdentifier, BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetKey(BKeyType type, const char* identifier,
+ const char* secondaryIdentifier, bool
secondaryIdentifierOptional,
+ BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetKey(const char* keyring, BKeyType type,
+ const char* identifier, BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetKey(const char* keyring, BKeyType type,
+ const char* identifier, const char* secondaryIdentifier, BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetKey(const char* keyring, BKeyType type,
+ const char* identifier, const char* secondaryIdentifier,
+ bool secondaryIdentifierOptional, BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::AddKey(const BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::AddKey(const char* keyring, const BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::RemoveKey(const BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::RemoveKey(const char* keyring, const BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetNextKey(uint32& cookie, BKey& key);
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetNextKey(BKeyType type, BKeyPurpose purpose,
+ uint32& cookie, BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetNextKey(const char* keyring, uint32& cookie,
+ BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetNextKey(const char* keyring, BKeyType type,
+ BKeyPurpose purpose, uint32& cookie, BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+//! @}
+
+
+/*!
+ \name Keyrings
+*/
+
+
+//! @{
+
+
+/*!
+ \fn status_t BKeyStore::AddKeyring(const char* keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::RemoveKeyring(const char* keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetNextKeyring(uint32& cookie, BString& keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::SetUnlockKey(const char* keyring, const BKey&
key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::RemoveUnlockKey(const char* keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+//! @}
+
+
+/*!
+ \name Master keyring
+*/
+
+
+//! @{
+
+
+/*!
+ \fn status_t BKeyStore::SetMasterUnlockKey(const BKey& key)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::RemoveMasterUnlockKey()
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::AddKeyringToMaster(const char* keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::RemoveKeyringFromMaster(const char* keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetNextMasterKeyring(uint32& cookie,
+ BString& keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+//! @}
+
+
+/*!
+ \name Locking
+*/
+
+
+//! @{
+
+
+/*!
+ \fn bool BKeyStore::IsKeyringUnlocked(const char* keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::LockKeyring(const char* keyring)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::LockMasterKeyring()
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+//! @}
+
+
+/*!
+ \name Applications
+*/
+
+
+//! @{
+
+
+/*!
+ \fn status_t BKeyStore::GetNextApplication(uint32& cookie,
+ BString& signature) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::GetNextApplication(const char* keyring,
+ uint32& cookie, BString& signature) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::RemoveApplication(const char* signature)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BKeyStore::RemoveApplication(const char* keyring,
+ const char* signature)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+//! @}
+
+
+/*!
+ \name Service Functions
+*/
+
+
+//! @{
+
+
+/*!
+ \fn status_t BKeyStore::GeneratePassword(BPasswordKey& password,
+ size_t length, uint32 flags)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn float BKeyStore::PasswordStrength(const char* password)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+//! @}
diff --git a/docs/user/app/Notification.dox b/docs/user/app/Notification.dox
new file mode 100644
index 0000000000..e57f807786
--- /dev/null
+++ b/docs/user/app/Notification.dox
@@ -0,0 +1,330 @@
+/*
+ * Copyright 2019 Haiku, Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ * Authors:
+ * Niels Sascha Reedijk, niels.reedijk@xxxxxxxxx
+ *
+ * Corresponds to:
+ * headers/os/app/Notification.h hrev51445
+ * src/kits/app/Notification.cpp hrev52287
+ */
+
+
+ /*!
+ \file Notification.h
+ \ingroup app
+ \ingroup libbe
+ \brief Provides BNotification class and the notification_type enum.
+*/
+
+
+///// notification_type enum /////
+
+
+/*!
+ \enum notification_type
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var notification_type::B_INFORMATION_NOTIFICATION
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var notification_type::B_IMPORTANT_NOTIFICATION
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var notification_type::B_ERROR_NOTIFICATION
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \var notification_type::B_PROGRESS_NOTIFICATION
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+///// BNotification class /////
+
+
+/*!
+ \class BNotification
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BNotification::BNotification(notification_type type)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn BNotification::BNotification(BMessage* archive)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual BNotification::~BNotification()
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BNotification::InitCheck() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn static BArchivable* BNotification::Instantiate(BMessage* archive)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn virtual status_t BNotification::Archive(BMessage* archive,
+ bool deep = true) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BNotification::SourceSignature() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BNotification::SourceName() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn notification_type BNotification::Type() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BNotification::Group() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BNotification::SetGroup(const BString& group)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BNotification::Title() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BNotification::SetTitle(const BString& title)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BNotification::Content() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BNotification::SetContent(const BString& content)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BNotification::MessageID() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BNotification::SetMessageID(const BString& id)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn float BNotification::Progress() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BNotification::SetProgress(float progress)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BNotification::OnClickApp() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BNotification::SetOnClickApp(const BString& app)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const entry_ref* BNotification::OnClickFile() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BNotification::SetOnClickFile(const entry_ref* file)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BNotification::AddOnClickRef(const entry_ref* ref)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn int32 BNotification::CountOnClickRefs() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const entry_ref* BNotification::OnClickRefAt(int32 index) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BNotification::AddOnClickArg(const BString& arg)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn int32 BNotification::CountOnClickArgs() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const char* BNotification::OnClickArgAt(int32 index) const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn const BBitmap* BNotification::Icon() const
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BNotification::SetIcon(const BBitmap* icon)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BNotification::Send(bigtime_t timeout = -1)
+ \brief Undocumented
+
+ \since Haiku R1
+*/
############################################################################
Commit: 5b2a8e3aef332e873511cbc455f17f439516c9cc
URL: https://git.haiku-os.org/haiku/commit/?id=5b2a8e3aef33
Author: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx>
Date: Mon Sep 2 05:57:37 2019 UTC
API Docs: Add new methods to BMessage
----------------------------------------------------------------------------
diff --git a/docs/user/app/Message.dox b/docs/user/app/Message.dox
index c6204ddb6b..cb97649b92 100644
--- a/docs/user/app/Message.dox
+++ b/docs/user/app/Message.dox
@@ -1,5 +1,5 @@
/*
- * Copyright 2007-2014 Haiku, Inc. All rights reserved.
+ * Copyright 2007-2014, 2019 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -7,8 +7,8 @@
* John Scipione, jscpione@xxxxxxxxx
*
* Corresponds to:
- * headers/os/app/Message.h hrev47355
- * src/kits/app/Message.cpp hrev47355
+ * headers/os/app/Message.h hrev51780
+ * src/kits/app/Message.cpp hrev53160
*/
@@ -303,6 +303,21 @@
*/
+/*!
+ \fn status_t BMessage::GetInfo(const char* name, type_code* typeFound,
+ int32* countFound, bool* fixedSize) const
+ \brief Retrieve the type and whether or not the size of the data is
fixed
+ associated with a \a name.
+
+ This method is the same as GetInfo(const char*, type_code*, int32*)
const,
+ with the difference that you can find out whether or not the size of the
+ data associated with the \a name is fixed. You will get this value
+ in the variable you passed as \a fixedSize parameter.
+
+ \since BeOS R4
+*/
+
+
/*!
\fn int32 BMessage::CountNames(type_code type) const
\brief Count the number of names of a certain \a type.
@@ -900,6 +915,27 @@
*/
+/*!
+ \fn status_t BMessage::AddAlignment(const char* name,
+ const BAlignment& alignment)
+ \brief Convenience method to add a BAlignment to the label \a name.
+
+ This method calls AddData() with the \c B_ALIGNMENT_TYPE \a type.
+
+ \param name The label to associate the data with.
+ \param alignment The alignment to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+
+ \see AddData() for a more detailed overview of the inner workings.
+ \see FindAlignment()
+ \see GetAlignment()
+ \see ReplaceAlignment()
+
+ \since Haiku R1
+*/
+
+
/*!
\fn status_t BMessage::AddRect(const char* name, BRect aRect)
\brief Convenience method to add a BRect to the label \a name.
@@ -940,6 +976,26 @@
*/
+/*!
+ \fn status_t BMessage::AddSize(const char* name, BSize size)
+ \brief Convenience method to add a BSize to the label \a name.
+
+ This method calls AddData() with the \c B_SIZE_TYPE \a type.
+
+ \param name The label to associate the data with.
+ \param size The BSize to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+
+ \see AddData() for a more detailed overview of the inner workings.
+ \see FindSize()
+ \see GetSize()
+ \see ReplaceSize()
+
+ \since Haiku R1
+*/
+
+
/*!
\fn status_t BMessage::AddString(const char* name, const char* aString)
\brief Convenience method to add a C-string to the label \a name.
@@ -980,6 +1036,28 @@
*/
+/*!
+ \fn status_t BMessage::AddStrings(const char* name,
+ const BStringList& list)
+ \brief Convenience method to add list of strings to the label \a name.
+
+ This method calls AddData() with the \c B_STRING_TYPE \a type for each
+ string in the BStringList.
+
+ \param name The label to associate the data with.
+ \param list The list of strings to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+
+ \see AddData() for a more detailed overview of the inner workings.
+ \see FindStrings()
+ \see GetStrings()
+ \see ReplaceStrings()
+
+ \since Haiku R1
+*/
+
+
/*!
\fn status_t BMessage::AddInt8(const char* name, int8 value)
\brief Convenience method to add an \c int8 to the label \a name.
@@ -1000,6 +1078,26 @@
*/
+/*!
+ \fn status_t BMessage::AddUInt8(const char* name, uint8 value)
+ \brief Convenience method to add an \c uint8 to the label \a name.
+
+ This method calls AddData() with the \c B_UINT8_TYPE \a type.
+
+ \param name The label to associate the data with.
+ \param value The value to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+
+ \see AddData() for a more detailed overview of the inner workings.
+ \see FindUInt8()
+ \see GetUInt8()
+ \see ReplaceUInt8()
+
+ \since BeOS R3
+*/
+
+
/*!
\fn status_t BMessage::AddInt16(const char* name, int16 value)
\brief Convenience method to add an \c int16 to the label \a name.
@@ -1020,6 +1118,26 @@
*/
+/*!
+ \fn status_t BMessage::AddUInt16(const char* name, uint16 value)
+ \brief Convenience method to add an \c uint16 to the label \a name.
+
+ This method calls AddData() with the \c B_UINT16_TYPE \a type.
+
+ \param name The label to associate the data with.
+ \param value The value to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+
+ \see AddData() for a more detailed overview of the inner workings.
+ \see FindUInt16()
+ \see GetUInt16()
+ \see ReplaceUInt16()
+
+ \since BeOS R3
+*/
+
+
/*!
\fn status_t BMessage::AddInt32(const char* name, int32 value)
\brief Convenience method to add an \c int32 to the label \a name.
@@ -1040,6 +1158,26 @@
*/
+/*!
+ \fn status_t BMessage::AddUInt32(const char* name, uint32 value)
+ \brief Convenience method to add an \c uint32 to the label \a name.
+
+ This method calls AddData() with the \c B_UINT32_TYPE \a type.
+
+ \param name The label to associate the data with.
+ \param value The value to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+
+ \see AddData() for a more detailed overview of the inner workings.
+ \see FindUInt32()
+ \see GetUInt32()
+ \see ReplaceUInt32()
+
+ \since BeOS R3
+*/
+
+
/*!
\fn status_t BMessage::AddInt64(const char* name, int64 value)
\brief Convenience method to add an \c int64 to the label \a name.
@@ -1060,6 +1198,26 @@
*/
+/*!
+ \fn status_t BMessage::AddUInt64(const char* name, uint64 value)
+ \brief Convenience method to add an \c uint64 to the label \a name.
+
+ This method calls AddData() with the \c B_UINT64_TYPE \a type.
+
+ \param name The label to associate the data with.
+ \param value The value to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+
+ \see AddData() for a more detailed overview of the inner workings.
+ \see FindUInt64()
+ \see GetUInt64()
+ \see ReplaceUInt64()
+
+ \since BeOS R3
+*/
+
+
/*!
\fn status_t BMessage::AddBool(const char* name, bool aBoolean)
\brief Convenience method to add a \c bool to the label \a name.
@@ -1230,6 +1388,18 @@
int32 count = 1)
\brief Convenience method to add a flattenable to the label \a name.
+ \deprecated This method is deprecated. Use
+ AddFlat(const char*, const BFlattenable*, int32) instead
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::AddFlat(const char* name,
+ const BFlattenable* object, int32 count = 1)
+ \brief Convenience method to add a flattenable to the label \a name.
+
This method uses BFlattenable::TypeCode() to determine the type. It also
uses BFlattenable::IsFixedSize() to determine whether or not the size of
the object is supposedly always the same. You can specify a
@@ -1247,10 +1417,28 @@
\see FindFlat()
\see ReplaceFlat()
- \since BeOS R3
+ \since Haiku R1
*/
+/*!
+ \fn status_t BMessage::Append(const BMessage& message)
+ \brief Append the data of another \a message to this message.
+
+ This copies all the data of the \a message to this message. If an item
+ already exists with a given name, and the incoming data is of the same
+ type, the new items will be added to that label. If the item exists but
+ has a different type, then the call will fail. This might leave your
+ message in an incomplete state, because data is processed field by
field,
+ so it could be that some data was copied succesfully. After
encountering an
+ incompatible data type, any data after that field will not be processed.
+
+ \param message The message with the data you want to append. This
message
+ will not be modified.
+
+ \returns A status code, \c B_OK on success or an error code.
+*/
+
//! @}
@@ -1399,6 +1587,40 @@
*/
+/*!
+ \fn status_t BMessage::FindAlignment(const char* name,
+ BAlignment* alignment) const
+ \brief Find an alignment at the label \a name.
+
+ This is an overloaded version of
+ FindAlignment(const char*, int32, BAlignment*) const
+ where the data is sought at \a index \c 0.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BMessage::FindAlignment(const char* name, int32 index,
+ BAlignment* alignment) const
+ \brief Find an alignment at the label \a name at an \a index.
+
+ This method looks for the data with the \c B_ALIGNMENT_TYPE, and copies
+ it into a provided buffer.
+
+ \param name The label to which the data is associated.
+ \param index The index from which the data should be copied.
+ \param alignment The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_BAD_INDEX The \a index does not exist.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see FindAlignment(const char*, BAlignment*) const
+
+ \since Haiku R1
+*/
/*!
\fn status_t BMessage::FindRect(const char* name, BRect* rect) const
\brief Find a rectangle at the label \a name.
@@ -1469,6 +1691,41 @@
*/
+/*!
+ \fn status_t BMessage::FindSize(const char* name, BSize* size) const
+ \brief Find a size at the label \a name.
+
+ This is an overloaded version of
+ FindSize(const char*, int32, BSize*) const
+ where the data is sought at \a index \c 0.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BMessage::FindSize(const char* name, int32 index,
+ BSize* size) const
+ \brief Find a size at the label \a name at an \a index.
+
+ This method looks for the data with the \c B_SIZE_TYPE, and copies it
into
+ a provided buffer.
+
+ \param name The label to which the data is associated.
+ \param index The index from which the data should be copied.
+ \param size The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_BAD_INDEX The \a index does not exist.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see FindSize(const char*, BSize*) const
+
+ \since Haiku R1
+*/
+
+
/*!
\fn status_t BMessage::FindString(const char* name,
const char** string) const
@@ -1543,6 +1800,18 @@
*/
+/*!
+ \fn status_t BMessage::FindStrings(const char* name,
+ BStringList* list) const
+ \brief Find all the strings at the label \a name.
+
+ This method fetches all the strings that are stored at label \a name,
and
+ copies all the entries into the \a list.
+
+ \since Haiku R1
+*/
+
+
/*!
\fn status_t BMessage::FindInt8(const char* name, int8* value) const
\brief Find an integer at the label \a name.
@@ -1579,29 +1848,23 @@
/*!
- \fn status_t BMessage::FindInt16(const char* name, int16* value) const
+ \fn status_t BMessage::FindUInt8(const char* name, uint8* value) const
\brief Find an integer at the label \a name.
- This is an overloaded version of FindInt8(const char*, int32, int16*)
const
+ This is an overloaded version of
+ FindUInt8(const char*, int32, uint8*) const
where the data is sought at \a index \c 0.
- \param name The label to which the data is associated.
- \param value The object in which the data should be copied.
-
- \returns A status code, \c B_OK on success or an error code.
- \retval B_OK The object now contains the requested data.
- \retval B_NAME_NOT_FOUND There is no field with this \a name.
-
\since BeOS R3
*/
/*!
- \fn status_t BMessage::FindInt16(const char* name, int32 index,
- int16* value) const
+ \fn status_t BMessage::FindUInt8(const char* name, int32 index,
+ uint8* value) const
\brief Find an integer at the label \a name at an \a index.
- This method looks for the data with the \c B_INT16_TYPE, and copies it
into
+ This method looks for the data with the \c B_UINT8_TYPE, and copies it
into
a provided buffer.
\param name The label to which the data is associated.
@@ -1613,18 +1876,17 @@
\retval B_BAD_INDEX The \a index does not exist.
\retval B_NAME_NOT_FOUND There is no field with this \a name.
- \see FindInt16(const char*, int16*) const
+ \see FindUInt8(const char*, uint8*) const
\since BeOS R3
*/
/*!
- \fn status_t BMessage::FindInt32(const char* name, int32* value) const
+ \fn status_t BMessage::FindInt16(const char* name, int16* value) const
\brief Find an integer at the label \a name.
- This is an overloaded version of
- FindInt32(const char*, int32, int32*) const
+ This is an overloaded version of FindInt16(const char*, int32, int16*)
const
where the data is sought at \a index \c 0.
\param name The label to which the data is associated.
@@ -1639,12 +1901,12 @@
/*!
- \fn status_t BMessage::FindInt32(const char* name, int32 index,
- int32* value) const
+ \fn status_t BMessage::FindInt16(const char* name, int32 index,
+ int16* value) const
\brief Find an integer at the label \a name at an \a index.
- This method looks for the data with the \c B_INT32_TYPE, and copies
- it into a provided buffer.
+ This method looks for the data with the \c B_INT16_TYPE, and copies it
into
+ a provided buffer.
\param name The label to which the data is associated.
\param index The index from which the data should be copied.
@@ -1655,18 +1917,17 @@
\retval B_BAD_INDEX The \a index does not exist.
\retval B_NAME_NOT_FOUND There is no field with this \a name.
- \see FindInt32(const char*, int32*) const
+ \see FindInt16(const char*, int16*) const
\since BeOS R3
*/
/*!
- \fn status_t BMessage::FindInt64(const char* name, int64* value) const
+ \fn status_t BMessage::FindUInt16(const char* name, uint16* value) const
\brief Find an integer at the label \a name.
- This is an overloaded version of
- FindInt64(const char*, int32, int64*) const
+ This is an overloaded version of FindUInt16(const char*, int32,
uint16*) const
where the data is sought at \a index \c 0.
\param name The label to which the data is associated.
@@ -1681,12 +1942,12 @@
/*!
- \fn status_t BMessage::FindInt64(const char* name, int32 index,
- int64* value) const
+ \fn status_t BMessage::FindUInt16(const char* name, int32 index,
+ uint16* value) const
\brief Find an integer at the label \a name at an \a index.
- This method looks for the data with the \c B_INT64_TYPE, and copies
- it into a provided buffer.
+ This method looks for the data with the \c B_UINT16_TYPE, and copies it
+ into a provided buffer.
\param name The label to which the data is associated.
\param index The index from which the data should be copied.
@@ -1697,18 +1958,18 @@
\retval B_BAD_INDEX The \a index does not exist.
\retval B_NAME_NOT_FOUND There is no field with this \a name.
- \see FindInt64(const char*, int64*) const
+ \see FindUInt16(const char*, uint16*) const
\since BeOS R3
*/
/*!
- \fn status_t BMessage::FindBool(const char* name, bool* value) const
- \brief Find a boolean at the label \a name.
+ \fn status_t BMessage::FindInt32(const char* name, int32* value) const
+ \brief Find an integer at the label \a name.
This is an overloaded version of
- FindBool(const char*, int32, bool*) const
+ FindInt32(const char*, int32, int32*) const
where the data is sought at \a index \c 0.
\param name The label to which the data is associated.
@@ -1723,12 +1984,12 @@
/*!
- \fn status_t BMessage::FindBool(const char* name, int32 index,
- bool* value) const
- \brief Find a boolean at the label \a name at an \a index.
+ \fn status_t BMessage::FindInt32(const char* name, int32 index,
+ int32* value) const
+ \brief Find an integer at the label \a name at an \a index.
- This method looks for the data with the \c B_BOOL_TYPE, and copies it
into
- a provided buffer.
+ This method looks for the data with the \c B_INT32_TYPE, and copies
+ it into a provided buffer.
\param name The label to which the data is associated.
\param index The index from which the data should be copied.
@@ -1739,18 +2000,18 @@
\retval B_BAD_INDEX The \a index does not exist.
\retval B_NAME_NOT_FOUND There is no field with this \a name.
- \see FindBool(const char*, bool*) const
+ \see FindInt32(const char*, int32*) const
\since BeOS R3
*/
/*!
- \fn status_t BMessage::FindFloat(const char* name, float* value) const
- \brief Find a float at the label \a name.
+ \fn status_t BMessage::FindUInt32(const char* name, uint32* value) const
+ \brief Find an integer at the label \a name.
This is an overloaded version of
- FindFloat(const char*, int32, float*) const
+ FindUInt32(const char*, int32, uint32*) const
where the data is sought at \a index \c 0.
\param name The label to which the data is associated.
@@ -1765,11 +2026,11 @@
/*!
- \fn status_t BMessage::FindFloat(const char* name, int32 index,
- float* value) const
- \brief Find a float at the label \a name at an \a index.
+ \fn status_t BMessage::FindUInt32(const char* name, int32 index,
+ uint32* value) const
+ \brief Find an integer at the label \a name at an \a index.
- This method looks for the data with the \c B_FLOAT_TYPE, and copies
+ This method looks for the data with the \c B_UINT32_TYPE, and copies
it into a provided buffer.
\param name The label to which the data is associated.
@@ -1781,18 +2042,18 @@
\retval B_BAD_INDEX The \a index does not exist.
\retval B_NAME_NOT_FOUND There is no field with this \a name.
- \see FindFloat(const char*, float*) const
+ \see FindUInt32(const char*, uint32*) const
\since BeOS R3
*/
/*!
- \fn status_t BMessage::FindDouble(const char* name, double* value) const
- \brief Find a double at the label \a name.
+ \fn status_t BMessage::FindInt64(const char* name, int64* value) const
+ \brief Find an integer at the label \a name.
This is an overloaded version of
- FindDouble(const char*, int32, double*) const
+ FindInt64(const char*, int32, int64*) const
where the data is sought at \a index \c 0.
\param name The label to which the data is associated.
@@ -1807,10 +2068,178 @@
/*!
- \fn status_t BMessage::FindDouble(const char* name, int32 index,
- double* value) const
- \brief Find a double at the label \a name at an \a index.
-
+ \fn status_t BMessage::FindInt64(const char* name, int32 index,
+ int64* value) const
+ \brief Find an integer at the label \a name at an \a index.
+
+ This method looks for the data with the \c B_INT64_TYPE, and copies
+ it into a provided buffer.
+
+ \param name The label to which the data is associated.
+ \param index The index from which the data should be copied.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_BAD_INDEX The \a index does not exist.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see FindInt64(const char*, int64*) const
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::FindUInt64(const char* name, uint64* value) const
+ \brief Find an integer at the label \a name.
+
+ This is an overloaded version of
+ FindUInt64(const char*, int32, uint64*) const
+ where the data is sought at \a index \c 0.
+
+ \param name The label to which the data is associated.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::FindUInt64(const char* name, int32 index,
+ uint64* value) const
+ \brief Find an integer at the label \a name at an \a index.
+
+ This method looks for the data with the \c B_UINT64_TYPE, and copies
+ it into a provided buffer.
+
+ \param name The label to which the data is associated.
+ \param index The index from which the data should be copied.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_BAD_INDEX The \a index does not exist.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see FindUInt64(const char*, uint64*) const
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::FindBool(const char* name, bool* value) const
+ \brief Find a boolean at the label \a name.
+
+ This is an overloaded version of
+ FindBool(const char*, int32, bool*) const
+ where the data is sought at \a index \c 0.
+
+ \param name The label to which the data is associated.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::FindBool(const char* name, int32 index,
+ bool* value) const
+ \brief Find a boolean at the label \a name at an \a index.
+
+ This method looks for the data with the \c B_BOOL_TYPE, and copies it
into
+ a provided buffer.
+
+ \param name The label to which the data is associated.
+ \param index The index from which the data should be copied.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_BAD_INDEX The \a index does not exist.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see FindBool(const char*, bool*) const
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::FindFloat(const char* name, float* value) const
+ \brief Find a float at the label \a name.
+
+ This is an overloaded version of
+ FindFloat(const char*, int32, float*) const
+ where the data is sought at \a index \c 0.
+
+ \param name The label to which the data is associated.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::FindFloat(const char* name, int32 index,
+ float* value) const
+ \brief Find a float at the label \a name at an \a index.
+
+ This method looks for the data with the \c B_FLOAT_TYPE, and copies
+ it into a provided buffer.
+
+ \param name The label to which the data is associated.
+ \param index The index from which the data should be copied.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_BAD_INDEX The \a index does not exist.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see FindFloat(const char*, float*) const
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::FindDouble(const char* name, double* value) const
+ \brief Find a double at the label \a name.
+
+ This is an overloaded version of
+ FindDouble(const char*, int32, double*) const
+ where the data is sought at \a index \c 0.
+
+ \param name The label to which the data is associated.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::FindDouble(const char* name, int32 index,
+ double* value) const
+ \brief Find a double at the label \a name at an \a index.
+
This method looks for the data with the \c B_DOUBLE_TYPE, and copies it
into
a provided buffer.
@@ -2159,6 +2588,50 @@
*/
+/*!
+ \fn status_t BMessage::ReplaceAlignment(const char* name,
+ const BAlignment& alignment)
+ \brief Replace an alignment at the label \a name.
+
+ This method is an overloaded method of
+ ReplaceAlignment(const char*, int32, const BAlignment&).
+ It replaces the data at \a index \c 0.
+
+ \param name The name associated with the data to replace.
+ \param alignment The object to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceAlignment(const char* name, int32 index,
+ const BAlignment& alignment)
+ \brief Replace an alignment at the label \a name at a specified
+ \a index.
+
+ The data at the specified \a name and \a index will be replaced, if it
+ matches the \c B_ALIGNMENT_TYPE.
+
+ \param name The name associated with the data to replace.
+ \param index The index in the array to replace.
+ \param alignment The object to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_BAD_INDEX The index was out of range.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see ReplaceAlignment(const char*, const BAlignment&)
+
+ \since Haiku R1
+*/
+
+
/*!
\fn status_t BMessage::ReplaceRect(const char* name, BRect aRect)
\brief Replace a rectangle at the label \a name.
@@ -2239,12 +2712,55 @@
\retval B_BAD_INDEX The index was out of range.
\retval B_NAME_NOT_FOUND There is no field with this \a name.
- \see ReplacePoint(const char*, aPoint)
+ \see ReplacePoint(const char*, BPoint)
\since BeOS R3
*/
+/*!
+ \fn status_t BMessage::ReplaceSize(const char* name, BSize aSize)
+ \brief Replace a size at the label \a name.
+
+ This method is an overloaded method of
+ ReplaceSize(const char*, int32, BSize).
+ It replaces the data at \a index \c 0.
+
+ \param name The name associated with the data to replace.
+ \param aSize The object to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceSize(const char* name, int32 index,
+ BSize aSize)
+ \brief Replace a size at the label \a name at a specified
+ \a index.
+
+ The data at the specified \a name and \a index will be replaced, if it
+ matches the \c B_SIZE_TYPE.
+
+ \param name The name associated with the data to replace.
+ \param index The index in the array to replace.
+ \param aSize The object to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_BAD_INDEX The index was out of range.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see ReplaceSize(const char*, BSize)
+
+ \since Haiku R1
+*/
+
+
/*!
\fn status_t BMessage::ReplaceString(const char* name, const char*
aString)
\brief Replace a string at the label \a name.
@@ -2376,11 +2892,11 @@
/*!
- \fn status_t BMessage::ReplaceInt16(const char* name, int16 value)
+ \fn status_t BMessage::ReplaceUInt8(const char* name, uint8 value)
\brief Replace an integer at the label \a name.
This method is an overloaded method of
- ReplaceInt16(const char*, int32, int16).
+ ReplaceUInt8(const char*, int32, uint8).
It replaces the data at \a index \c 0.
\param name The name associated with the data to replace.
@@ -2395,13 +2911,13 @@
/*!
- \fn status_t BMessage::ReplaceInt16(const char* name, int32 index,
- int16 value)
+ \fn status_t BMessage::ReplaceUInt8(const char* name, int32 index,
+ uint8 value)
\brief Replace an integer at the label \a name at a specified
\a index.
The data at the specified \a name and \a index will be replaced, if it
- matches the \c B_INT16_TYPE.
+ matches the \c B_UINT8_TYPE.
\param name The name associated with the data to replace.
\param index The index in the array to replace.
@@ -2412,18 +2928,18 @@
\retval B_BAD_INDEX The index was out of range.
\retval B_NAME_NOT_FOUND There is no field with this \a name.
- \see ReplaceInt16(const char*, int16)
+ \see ReplaceUInt8(const char*, uint8)
\since BeOS R3
*/
/*!
- \fn status_t BMessage::ReplaceInt32(const char* name, int32 value)
+ \fn status_t BMessage::ReplaceInt16(const char* name, int16 value)
\brief Replace an integer at the label \a name.
This method is an overloaded method of
- ReplaceInt8(const char*, int32, int32).
+ ReplaceInt16(const char*, int32, int16).
It replaces the data at \a index \c 0.
\param name The name associated with the data to replace.
@@ -2438,35 +2954,35 @@
/*!
- \fn status_t BMessage::ReplaceInt32(const char* name, int32 index,
- int32 value)
+ \fn status_t BMessage::ReplaceInt16(const char* name, int32 index,
+ int16 value)
\brief Replace an integer at the label \a name at a specified
\a index.
The data at the specified \a name and \a index will be replaced, if it
- matches the \c B_INT32_TYPE.
+ matches the \c B_INT16_TYPE.
\param name The name associated with the data to replace.
\param index The index in the array to replace.
- \param value The object to store in the message.
+ \param value Where to store in the message.
\returns A status code, \c B_OK on success or an error code.
\retval B_OK The operation succeeded.
\retval B_BAD_INDEX The index was out of range.
\retval B_NAME_NOT_FOUND There is no field with this \a name.
- \see ReplaceInt32(const char*, int32)
+ \see ReplaceInt16(const char*, int16)
\since BeOS R3
*/
/*!
- \fn status_t BMessage::ReplaceInt64(const char* name, int64 value)
+ \fn status_t BMessage::ReplaceUInt16(const char* name, uint16 value)
\brief Replace an integer at the label \a name.
This method is an overloaded method of
- ReplaceInt8(const char*, int32, int64).
+ ReplaceUInt16(const char*, int32, uint16).
It replaces the data at \a index \c 0.
\param name The name associated with the data to replace.
@@ -2481,17 +2997,146 @@
/*!
- \fn status_t BMessage::ReplaceInt64(const char* name, int32 index,
- int64 value)
+ \fn status_t BMessage::ReplaceUInt16(const char* name, int32 index,
+ uint16 value)
\brief Replace an integer at the label \a name at a specified
\a index.
The data at the specified \a name and \a index will be replaced, if it
- matches the \c B_INT64_TYPE.
+ matches the \c B_UINT16_TYPE.
\param name The name associated with the data to replace.
\param index The index in the array to replace.
- \param value The object to store in the message.
+ \param value Where to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_BAD_INDEX The index was out of range.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see ReplaceUInt16(const char*, uint16)
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceInt32(const char* name, int32 value)
+ \brief Replace an integer at the label \a name.
+
+ This method is an overloaded method of
+ ReplaceInt32(const char*, int32, int32).
+ It replaces the data at \a index \c 0.
+
+ \param name The name associated with the data to replace.
+ \param value Where to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceInt32(const char* name, int32 index,
+ int32 value)
+ \brief Replace an integer at the label \a name at a specified
+ \a index.
+
+ The data at the specified \a name and \a index will be replaced, if it
+ matches the \c B_INT32_TYPE.
+
+ \param name The name associated with the data to replace.
+ \param index The index in the array to replace.
+ \param value The object to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_BAD_INDEX The index was out of range.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see ReplaceInt32(const char*, int32)
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceUInt32(const char* name, uint32 value)
+ \brief Replace an integer at the label \a name.
+
+ This method is an overloaded method of
+ ReplaceUInt32(const char*, int32, uint32).
+ It replaces the data at \a index \c 0.
+
+ \param name The name associated with the data to replace.
+ \param value Where to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceUInt32(const char* name, int32 index,
+ uint32 value)
+ \brief Replace an integer at the label \a name at a specified
+ \a index.
+
+ The data at the specified \a name and \a index will be replaced, if it
+ matches the \c B_UINT32_TYPE.
+
+ \param name The name associated with the data to replace.
+ \param index The index in the array to replace.
+ \param value The object to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_BAD_INDEX The index was out of range.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see ReplaceUInt32(const char*, uint32)
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceInt64(const char* name, int64 value)
+ \brief Replace an integer at the label \a name.
+
+ This method is an overloaded method of
+ ReplaceInt64(const char*, int32, int64).
+ It replaces the data at \a index \c 0.
+
+ \param name The name associated with the data to replace.
+ \param value Where to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceInt64(const char* name, int32 index,
+ int64 value)
+ \brief Replace an integer at the label \a name at a specified
+ \a index.
+
+ The data at the specified \a name and \a index will be replaced, if it
+ matches the \c B_INT64_TYPE.
+
+ \param name The name associated with the data to replace.
+ \param index The index in the array to replace.
+ \param value The object to store in the message.
\returns A status code, \c B_OK on success or an error code.
\retval B_OK The operation succeeded.
@@ -2504,6 +3149,49 @@
*/
+/*!
+ \fn status_t BMessage::ReplaceUInt64(const char* name, uint64 value)
+ \brief Replace an integer at the label \a name.
+
+ This method is an overloaded method of
+ ReplaceUInt64(const char*, int32, uint64).
+ It replaces the data at \a index \c 0.
+
+ \param name The name associated with the data to replace.
+ \param value Where to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since BeOS R3
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceUInt64(const char* name, int32 index,
+ uint64 value)
+ \brief Replace an integer at the label \a name at a specified
+ \a index.
+
+ The data at the specified \a name and \a index will be replaced, if it
+ matches the \c B_UINT64_TYPE.
+
+ \param name The name associated with the data to replace.
+ \param index The index in the array to replace.
+ \param value The object to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_BAD_INDEX The index was out of range.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see ReplaceUInt64(const char*, uint64)
+
+ \since BeOS R3
+*/
+
+
/*!
\fn status_t BMessage::ReplaceBool(const char* name, bool aBoolean)
\brief Replace a boolean at the label \a name.
@@ -2899,10 +3587,7 @@
/*!
- \name Operators
-
- The new and delete operators are deprecated and are only provided for
- backwards compatibility.
+ \name Message comparison
*/
@@ -2910,29 +3595,68 @@
/*!
- \fn BMessage& BMessage::operator=(const BMessage& other)
- \brief Copy one message into another.
+ \fn bool BMessage::HasSameData(const BMessage& other,
+ bool ignoreFieldOrder = true, bool deep = false) const
+ \brief Experimental method to compare two messages
- See the copy constructor, BMessage(const BMessage& other), for details
on
- what is copied, and what isn't.
+ This helper method will compare the data of this message to another
+ message. The name if the fields, and the contents of the fields are
+ compared. Metadata (like the delivery status) and the BMessage::what
+ field are not compared.
- \since BeOS R3
+ The order of the fields is determined by the order that the fields are
+ added. You may use the \a ignoreFieldOrder argument to tweak whether you
+ care that not only the data is identical, but also the ordering of the
+ data.
+
+ When there are BMessages attached to this message, you might want to use
+ this algorithm to compare them as well (as to ignore non-data fields of
the
+ \a other message or the ordering of fields during the comparison).
Setting
+ the \a deep parameter will cause any data of the \c B_MESSAGE_TYPE to be
+ compared using this method, thus ignoring non-data differences. If you
set
+ \a deep to \c false, the data will be compared on a byte by byte basis
and
+ these differences in the non-data fields will not be ignored.
+
+ \param other The other message to compare to.
+ \param ignoreFieldOrder Whether you want to see if the field order is
the
+ same.
+ \param deep Whether you want to recursively inspect BMessages embedded
in
+ this message.
+
+ \returns \c true if the data is the same, \c false otherwise
+
+ \since Haiku R1
*/
+//! @}
+
+
/*!
- \fn void* BMessage::operator new(size_t size)
- \brief Allocates \a size bytes of memory for a BMessage.
+ \name Deprecated Methods
+
+ These methods are likely to disappear as they have been replaced by
safer
+ and more powerful methods but are implemented for the purpose of binary
+ compatibility.
+*/
+
+
+//! @{
+
+
+/*!
+ \fn bool BMessage::HasAlignment(const char*, int32) const
+ \brief Deprecated.
\warning This method is deprecated, do not use.
- \since BeOS R3
+ \since Haiku R1
*/
/*!
- \fn void* BMessage::operator new(size_t, void* pointer)
- \brief Allocates \a size bytes of memory for a BMessage.
+ \fn bool BMessage::HasRect(const char*, int32) const
+ \brief Deprecated.
\warning This method is deprecated, do not use.
@@ -2941,32 +3665,47 @@
/*!
- \fn void BMessage::operator delete(void* pointer, size_t size)
- \brief Frees memory allocated by new.
+ \fn bool BMessage::HasPoint(const char*, int32) const
+ \brief Deprecated.
\warning This method is deprecated, do not use.
- \since BeOS R5
+ \since BeOS R3
*/
-//! @}
+/*!
+ \fn bool BMessage::HasSize(const char*, int32) const
+ \brief Deprecated.
+
+ \warning This method is deprecated, do not use.
+
+ \since Haiku R1
+*/
/*!
- \name Deprecated Methods
+ \fn bool BMessage::HasString(const char*, int32) const
+ \brief Deprecated.
- These methods are likely to disappear as they have been replaced by
safer
- and more powerful methods but are implemented for the purpose of binary
- compatibility.
+ \warning This method is deprecated, do not use.
+
+ \since BeOS R3
*/
-//! @{
+/*!
+ \fn bool BMessage::HasInt8(const char*, int32) const
+ \brief Deprecated.
+
+ \warning This method is deprecated, do not use.
+
+ \since BeOS R3
+*/
/*!
- \fn bool BMessage::HasRect(const char*, int32) const
+ \fn bool BMessage::HasUInt8(const char*, int32) const
\brief Deprecated.
[ *** diff truncated: 565 lines dropped *** ]
############################################################################
Revision: hrev53451
Commit: 03b52202d15def20288e2b5d0d5f930e75d167f7
URL: https://git.haiku-os.org/haiku/commit/?id=03b52202d15d
Author: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx>
Date: Mon Sep 2 05:58:44 2019 UTC
API Docs: various AppKit improvements
----------------------------------------------------------------------------