NetServices: Implement BHttpSession::Cancel()
Change-Id: Iff0a7726e57f3e6bd4e9d0ebac08a370d25a62d7
This commit is contained in:
@@ -183,6 +183,42 @@ namespace Network {
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BHttpSession::Cancel(int32 identifier)
|
||||
\brief Cancel a running request.
|
||||
|
||||
When a request that is scheduled or running is cancelled, its \ref BHttpResult object will
|
||||
be set to the \ref BNetworkRequestError exception with the \c Cancelled type.
|
||||
|
||||
There are three possible outcomes:
|
||||
1. If the request is not yet scheduled, then it will never start. The result will be set to
|
||||
the cancelled error state.
|
||||
2. If the request was started, then processing it will be terminated. The result will be set to
|
||||
the cancelled error state.
|
||||
3. If the request was already finished, then nothing happens. The result will keep the value it
|
||||
had assigned. The same if the request identifier is invalid.
|
||||
|
||||
\param identifier The identifier for the request to cancel.
|
||||
|
||||
\exception std::bad_alloc Error in case memory cannot be allocated.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BHttpSession::Cancel(const BHttpResult& request)
|
||||
\brief Cancel a running \a request.
|
||||
|
||||
See the \ref BHttpSession::Cancel(int32 identifier) method for more details on how this method
|
||||
works.
|
||||
|
||||
\exception std::bad_alloc Error in case memory cannot be allocated.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
} // namespace Network
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
Reference in New Issue
Block a user