Documentation updates to HttpForm

Stub out missing method docs.
This commit is contained in:
John Scipione
2013-11-04 20:17:18 -05:00
parent c2c1ce1dc5
commit f8133e6de7
+317 -28
View File
@@ -1,25 +1,72 @@
/* /*
* Copyright 2013 Haiku, Inc. All rights reserved. * Copyright 2010-2013 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
* Adrien Destugues, [email protected] * Adrien Destugues, [email protected]
* John Scipione, [email protected]
* *
* Corresponds to: * Corresponds to:
* headers/os/net/HttpForm.h rev 39161 * headers/os/net/HttpForm.h hrev46314
* src/kits/network/libnetapi/HttpForm.cpp rev 39161 * src/kits/network/libnetapi/HttpForm.cpp hrev46314
*/ */
/*! /*!
\file HttpForm.h \file HttpForm.h
\ingroup network \ingroup network
\ingroup libbe
\brief Management of HTTP form data \brief Management of HTTP form data
*/ */
/*!
\enum form_type
\ingroup network
*/
/*!
\var form_type B_HTTP_FORM_URL_ENCODED
*/
/*!
\var form_type B_HTTP_FORM_MULTIPART
*/
/*!
\enum form_content_type
\ingroup network
*/
/*!
\var form_content_type B_HTTPFORM_UNKNOWN
*/
/*!
\var form_content_type B_HTTPFORM_STRING
*/
/*!
\var form_content_type B_HTTPFORM_FILE
*/
/*!
\var form_content_type B_HTTPFORM_BUFFER
*/
/*! /*!
\class BHttpFormData \class BHttpFormData
\ingroup network \ingroup network
\brief Stores aform data entry sent or received during an HTTP request. \ingroup libbe
\brief Stores a form data entry sent or received during an HTTP request.
Each element in a form is stored in an instance of this class. The values Each element in a form is stored in an instance of this class. The values
can be either strings, arbitrary binary buffers, or a pointer to a file. can be either strings, arbitrary binary buffers, or a pointer to a file.
@@ -28,82 +75,97 @@
the network, removing hte need to buffer the whole file contents in memory. the network, removing hte need to buffer the whole file contents in memory.
*/ */
/*! /*!
\fn BHttpFormData::BHttpFormData(const BString& name, const BString& value) \fn BHttpFormData::BHttpFormData(const BString& name, const BString& value)
\brief Construct a BHttpForlData with a string value. \brief Construct a BHttpFormData object with a string value.
*/ */
/*! /*!
\fn BHttpFormData::BHttpFormData(const BString& name, const BPath& value) \fn BHttpFormData::BHttpFormData(const BString& name, const BPath& value)
\brief Construct a BHttpForlData which value is a file contents \brief Construct a BHttpFormData object which value is a file contents
*/ */
/*! /*!
\fn BHttpFormData::BHttpFormData(const BString& name, const void* buffer, \fn BHttpFormData::BHttpFormData(const BString& name, const void* buffer,
ssize_t size) ssize_t size)
\brief Construct a BHttpForlData which value is a binary buffer. \brief Construct a BHttpFormData object which value is a binary buffer.
*/ */
/*! /*!
\fn bool BHttpFormData::InitCheck() const \fn bool BHttpFormData::InitCheck() const
\brief Checks the initialisation of the object \brief Checks the initialization of the object
\return false if attempting to construct a BHttpFormData with a NULL buffer \return \c false if attempting to construct a BHttpFormData with a \c NULL
buffer.
*/ */
/*! /*!
\fn const BString& BHttpFormData::Name() const \fn const BString& BHttpFormData::Name() const
\brief Get the form field name \brief Get the form field name
*/ */
/*! /*!
\fn const BString& String() const \fn const BString& BHttpFormData::String() const
\brief Get the string value of a form field. \brief Get the string value of a form field.
\returns an empty string for buffer and file based fields \return An empty string for buffer and file based fields.
*/ */
/*! /*!
\fn const BPath& File() const \fn const BPath& BHttpFormData::File() const
\brief Get the file path of a form field. \brief Get the file path of a form field.
\returns an empty string for buffer and string based fields \return An empty string for buffer and string based fields.
*/ */
/*! /*!
\fn const void* Buffer() const \fn const void* BHttpFormData::Buffer() const
\brief Get a pointer to the data of a form field. \brief Get a pointer to the data of a form field.
\returns an empty string for string and file based fields \return An empty string for string and file based fields
*/ */
/*! /*!
\fn ssize_t BufferSize() const; \fn ssize_t BHttpFormData::BufferSize() const;
\brief Get the buffer size \brief Get the buffer size
\return 0 for string and file based fields. \return 0 for string and file based fields.
*/ */
/*!
\fn bool IsFile() const
\return true if the field data is a file
*/
/*! /*!
\fn const BString& Filename() const; \fn bool BHttpFormData::IsFile() const
\return the name of the file, for file based fields \return \c true if the field data is a file.
*/ */
/*!
\fn const BString& MimeType() const
\return the data MIME type
*/
/*! /*!
\fn form_content_type Type() const \fn const BString& BHttpFormData::Filename() const;
\return the kind of field \return The name of the file, for file based fields.
*/ */
/*!
\fn const BString& BHttpFormData::MimeType() const
\return The MIME type of the data.
*/
/*!
\fn form_content_type BHttpFormData::Type() const
\return The kind of field.
*/
/*! /*!
\fn status_t BHttpFormData::CopyBuffer() \fn status_t BHttpFormData::CopyBuffer()
\brief Make a copy of the internal buffer \brief Make a copy of the internal buffer
@@ -113,8 +175,235 @@
this method so the buffer copies and releases it. this method so the buffer copies and releases it.
*/ */
/*!
\fn status_t BHttpFormData::MarkAsFile(const BString& filename,
const BString& mimeType)
\brief Mark a field as a file.
*/
/*!
\fn void BHttpFormData::UnmarkAsFile()
\brief Unmark a field as a file.
*/
/*!
\fn status_t BHttpFormData::CopyBuffer()
*/
/*!
\fn BHttpFormData& BHttpFormData::operator=(const BHttpFormData& other)
\brief Assignment operator.
*/
/*! /*!
\class BHttpForm \class BHttpForm
\ingroup network \ingroup network
\ingroup libbe
\brief Container for all the BHttpFormData instances making up an HTTP form contents. \brief Container for all the BHttpFormData instances making up an HTTP form contents.
*/ */
/*!
\fn BHttpForm::BHttpForm()
\brief Create a new form object.
*/
/*!
\fn BHttpForm::BHttpForm(const BHttpForm& other)
\brief Create a new form object as a copy of \a other.
*/
/*!
\fn BHttpForm::BHttpForm(const BString& formString)
\brief Create a new form object and parse the \a formString.
*/
/*!
\fn BHttpForm::~BHttpForm()
\brief Clear the form and destroy the form object.
*/
/*!
\fn void BHttpForm::ParseString(const BString& formString)
\brief Parse the \a formString.
*/
/*!
\fn BString BHttpForm::RawData() const
\brief Return the form's raw data as a BString.
*/
/*!
\fn status_t BHttpForm::AddString(const BString& fieldName,
const BString& value)
\brief Add a string to the form with the specified \a fieldName and \a value.
*/
/*!
\fn status_t BHttpForm::AddInt(const BString& fieldName, int32 value)
\brief Add an int to the form with the specified \a fieldName and \a value.
*/
/*!
\fn status_t BHttpForm::AddFile(const BString& fieldName, const BPath& file)
\brief Add a file to the form with the specified \a fieldName and \a value.
*/
/*!
\fn status_t BHttpForm::AddBuffer(const BString& fieldName,
const void* buffer, ssize_t size)
\brief Add a buffer to the form with the specified \a fieldName and \a buffer
and \a size.
*/
/*!
\fn status_t BHttpForm::AddBufferCopy(const BString& fieldName,
const void* buffer, ssize_t size)
*/
/*!
\fn void BHttpForm::MarkAsFile(const BString& fieldName,
const BString& filename, const BString& mimeType)
*/
/*!
\fn void BHttpForm::MarkAsFile(const BString& fieldName,
const BString& filename)
\brief Mark a field as a filename.
*/
/*!
\fn void BHttpForm::UnmarkAsFile(const BString& fieldName)
\brief Unmark a field as a filename.
*/
/*!
\fn void BHttpForm::SetFormType(form_type type)
\brief Change form type.
*/
/*!
\fn bool BHttpForm::HasField(const BString& name) const
\brief Returns whether or not a form has a field with the specified \a name.
*/
/*!
\fn BString BHttpForm::GetMultipartHeader(const BString& fieldName) const
*/
/*!
\fn form_type BHttpForm::GetFormType() const
*/
/*!
\fn const BString& BHttpForm::GetMultipartBoundary() const
*/
/*!
\fn BString BHttpForm::GetMultipartFooter() const
*/
/*!
\fn ssize_t BHttpForm::ContentLength() const
*/
/*!
\fn BHttpForm::Iterator BHttpForm::GetIterator()
*/
/*!
\fn void BHttpForm::Clear()
*/
/*!
\fn BHttpFormData& BHttpForm::operator[](const BString& name)
*/
/*!
\fn void BHttpForm::_ExtractNameValuePair(const BString& formString, int32* index)
*/
/*!
\fn void BHttpForm::_GenerateMultipartBoundary()
*/
/*!
\fn void BHttpForm::Clear()
*/
/*!
\class BHttpForm::Iterator
\ingroup network
\ingroup libbe
\brief Form Iterator.
*/
/*!
\fn BHttpForm::Iterator::Iterator(BHttpForm* form)
\brief Constructor.
*/
/*!
\fn BHttpForm::Iterator::Iterator(const Iterator& other);
\brief Copy contstructor.
*/
/*!
\fn bool BHttpForm::Iterator::HasNext() const
*/
/*!
\fn BHttpFormData* BHttpForm::Iterator::Next()
*/
/*!
\fn void BHttpForm::Iterator::Remove()
*/
/*!
\fn BString BHttpForm::Iterator::MultipartHeader()
*/
/*!
\fn BHttpForm::Iterator& BHttpForm::Iterator::operator=(const Iterator& other)
\brief Assignment operator.
*/