| 24 | } |
| 25 | |
| 26 | void ReadFunc(const Handle& handle, base::CBuffer* data, uint32_t len, uint32_t error) { |
| 27 | if (error != CEC_SUCCESS) { |
| 28 | std::cout << "something err while read : " << error << std::endl; |
| 29 | } else { |
| 30 | |
| 31 | std::cout << *(data) << std::endl; |
| 32 | data->Clear(); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | void ConnectFunc(const Handle& handle, uint32_t error) { |
| 37 | if (error != CEC_SUCCESS) { |