本文整理汇总了C++中Parcel::readExceptionCode方法的典型用法代码示例。如果您正苦于以下问题:C++ Parcel::readExceptionCode方法的具体用法?C++ Parcel::readExceptionCode怎么用?C++ Parcel::readExceptionCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parcel
的用法示例。
在下文中一共展示了Parcel::readExceptionCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onTransact
status_t BnCameraDeviceCallbacks::onTransact(
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
ALOGV("onTransact - code = %d", code);
switch(code) {
case CAMERA_ERROR: {
ALOGV("onDeviceError");
CHECK_INTERFACE(ICameraDeviceCallbacks, data, reply);
CameraErrorCode errorCode =
static_cast<CameraErrorCode>(data.readInt32());
onDeviceError(errorCode);
data.readExceptionCode();
return NO_ERROR;
} break;
case CAMERA_IDLE: {
ALOGV("onDeviceIdle");
CHECK_INTERFACE(ICameraDeviceCallbacks, data, reply);
onDeviceIdle();
data.readExceptionCode();
return NO_ERROR;
} break;
case CAPTURE_STARTED: {
ALOGV("onCaptureStarted");
CHECK_INTERFACE(ICameraDeviceCallbacks, data, reply);
int32_t requestId = data.readInt32();
int64_t timestamp = data.readInt64();
onCaptureStarted(requestId, timestamp);
data.readExceptionCode();
return NO_ERROR;
} break;
case RESULT_RECEIVED: {
ALOGV("onResultReceived");
CHECK_INTERFACE(ICameraDeviceCallbacks, data, reply);
int32_t requestId = data.readInt32();
CameraMetadata result;
if (data.readInt32() != 0) {
result.readFromParcel(const_cast<Parcel*>(&data));
} else {
ALOGW("No metadata object is present in result");
}
onResultReceived(requestId, result);
data.readExceptionCode();
return NO_ERROR;
} break;
default:
return BBinder::onTransact(code, data, reply, flags);
}
}
示例2: onTransact
status_t BnPeriperalManagerCb::onTransact(uint32_t code, const Parcel &data,
Parcel *reply, uint32_t flags) {
switch (code) {
case NOTIFY_CALLBACK: {
CHECK_INTERFACE(IPeriperalManagerCb, data, reply);
int32_t event = data.readInt32();
notifyCallback(event);
data.readExceptionCode();
return NO_ERROR;
}
break;
default:
return BBinder::onTransact(code, data, reply, flags);
}
}