42 size_t decode_remain = m_event->payload_len;
43 const uint8_t *decode_ptr = m_event->payload;
46 bool has_name =
decode_bool(&decode_ptr, &decode_remain);
52 handle =
decode_i64(&decode_ptr, &decode_remain);
54 std::vector<String> attrs;
55 uint32_t attr_cnt =
decode_i32(&decode_ptr, &decode_remain);
56 attrs.reserve(attr_cnt);
57 while (attr_cnt-- > 0) {
58 const char *attr =
decode_vstr(&decode_ptr, &decode_remain);
59 attrs.push_back(attr);
61 m_master->attr_get(&cb, m_session_id, handle, name, attrs);
65 cb.
error(e.
code(),
"Error handling ATTRGET message");
char * decode_vstr(const uint8_t **bufp, size_t *remainp)
Decode a vstr (vint64, data, null).
Declarations for ResponseCallbackAttrGet.
uint32_t decode_i32(const uint8_t **bufp, size_t *remainp)
Decode a 32-bit integer in little-endian order.
virtual void run()
Carries out the request.
uint64_t decode_i64(const uint8_t **bufp, size_t *remainp)
Decode a 64-bit integer in little-endian order.
bool decode_bool(const uint8_t **bufp, size_t *remainp)
Decodes a boolean value from the given buffer.
Logging routines and macros.
Compatibility Macros for C/C++.
Sends back result of an attr_get request.
Functions to serialize/deserialize primitives to/from a memory buffer.
virtual int error(int error, const String &msg)
Sends a standard error response back to the client.
This is a generic exception class for Hypertable.
Declarations for ResponseCallback.
Error codes, Exception handling, error logging.
int code() const
Returns the error code.