Loading...
Searching...
No Matches
XrdCl::UnpackXAttr Class Reference

Helper class for unpacking single XAttr from bulk response. More...

`#include <XrdClOperationHandlers.hh>`

Inheritance diagram for XrdCl::UnpackXAttr:
Collaboration diagram for XrdCl::UnpackXAttr:

## Public Member Functions

| UnpackXAttr (ResponseHandler *handler)
void | HandleResponse (XRootDStatus *status, AnyObject *response)
| Callback method.
Public Member Functions inherited from XrdCl::ResponseHandler
virtual | ~ResponseHandler ()
virtual void | HandleResponseWithHosts (XRootDStatus *status, AnyObject *response, HostList *hostList)

## Additional Inherited Members

Static Public Member Functions inherited from XrdCl::ResponseHandler
static ResponseHandler * | Wrap (std::function< void(XRootDStatus &, AnyObject &)> func)
static ResponseHandler * | Wrap (std::function< void(XRootDStatus *, AnyObject *)> func)

## Detailed Description

Helper class for unpacking single XAttr from bulk response.

Definition at line 78 of file XrdClOperationHandlers.hh.

## Constructor & Destructor Documentation

## UnpackXAttr()

XrdCl::UnpackXAttr::UnpackXAttr | ( | ResponseHandler * | handler | ) |

inline

Definition at line 82 of file XrdClOperationHandlers.hh.

: handler( handler )
{
}

## Member Function Documentation

## HandleResponse()

void XrdCl::UnpackXAttr::HandleResponse | ( | XRootDStatus * | status,
|  | AnyObject * | response )

inline virtual

Callback method.

Reimplemented from XrdCl::ResponseHandler.

Definition at line 89 of file XrdClOperationHandlers.hh.

{
// status is always OK for bulk response
std::vector<XAttr> *bulk = nullptr;
response->Get( bulk );
if (bulk && !bulk->empty()) {
if (status)
*status = bulk->front().status;
std::string *rsp = new std::string(std::move(bulk->front().value));
response->Set( rsp );
}
delete bulk;
handler->HandleResponse( status, response );
}

References XrdCl::AnyObject::Get(), and XrdCl::AnyObject::Set().

Here is the call graph for this function:

The documentation for this class was generated from the following file:

- XrdClOperationHandlers.hh