本文整理汇总了C++中remote函数的典型用法代码示例。如果您正苦于以下问题:C++ remote函数的具体用法?C++ remote怎么用?C++ remote使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了remote函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: acquireWakeLockWithUid
virtual status_t acquireWakeLockWithUid(int flags, const sp<IBinder>& lock, const String16& tag,
const String16& packageName, int uid, bool isOneWay)
{
Parcel data, reply;
data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor());
data.writeStrongBinder(lock);
data.writeInt32(flags);
data.writeString16(tag);
data.writeString16(packageName);
data.writeInt32(uid); // uid to blame for the work
return remote()->transact(ACQUIRE_WAKE_LOCK_UID, data, &reply,
isOneWay ? IBinder::FLAG_ONEWAY : 0);
}
开发者ID:ishantvivek,项目名称:android_frameworks_native-temasek,代码行数:14,代码来源:IPowerManager.cpp
示例2: dataCallback
// generic data callback from camera service to app with image data
void dataCallback(int32_t msgType, const sp<IMemory>& imageData,
camera_frame_metadata_t *metadata)
{
ALOGV("dataCallback");
Parcel data, reply;
data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor());
data.writeInt32(msgType);
data.writeStrongBinder(imageData->asBinder());
if (metadata) {
data.writeInt32(metadata->number_of_faces);
data.write(metadata->faces, sizeof(camera_face_t) * metadata->number_of_faces);
}
remote()->transact(DATA_CALLBACK, data, &reply, IBinder::FLAG_ONEWAY);
}
开发者ID:AOSP-Jaguar,项目名称:frameworks_av,代码行数:15,代码来源:ICameraClient.cpp
示例3: getStreamVolumeIndex
virtual status_t getStreamVolumeIndex(audio_stream_type_t stream,
int *index,
audio_devices_t device)
{
Parcel data, reply;
data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
data.writeInt32(static_cast <uint32_t>(stream));
data.writeInt32(static_cast <uint32_t>(device));
remote()->transact(GET_STREAM_VOLUME, data, &reply);
int lIndex = reply.readInt32();
if (index) *index = lIndex;
return static_cast <status_t> (reply.readInt32());
}
开发者ID:AospPlus,项目名称:android_frameworks_av,代码行数:14,代码来源:IAudioPolicyService.cpp
示例4: printf
int
BpCloudManager::add(int a, int b) {
printf("Client call server add method\n");
Parcel data, reply;
data.writeInterfaceToken(ICloudManager::getInterfaceDescriptor());
data.writeInt32(a);
data.writeInt32(b);
remote()->transact(ADD, data, &reply);
int code = reply.readExceptionCode();
int result;
reply.readInt32(&result);
printf("Server exepction code: %d\n", code);
return result;
}
开发者ID:cloudchou,项目名称:NativeBinderJavaClientDemo,代码行数:14,代码来源:TestClient.cpp
示例5: acquireBuffer
virtual status_t acquireBuffer(BufferItem *buffer, nsecs_t presentWhen) {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
data.writeInt64(presentWhen);
status_t result = remote()->transact(ACQUIRE_BUFFER, data, &reply);
if (result != NO_ERROR) {
return result;
}
result = reply.read(*buffer);
if (result != NO_ERROR) {
return result;
}
return reply.readInt32();
}
开发者ID:UbuntuSTE,项目名称:android_frameworks_native,代码行数:14,代码来源:IGraphicBufferConsumer.cpp
示例6: setCrop
virtual status_t setCrop(const Rect& reg) {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
data.writeFloat(reg.left);
data.writeFloat(reg.top);
data.writeFloat(reg.right);
data.writeFloat(reg.bottom);
status_t result = remote()->transact(SET_CROP, data, &reply);
if (result != NO_ERROR) {
return result;
}
result = reply.readInt32();
return result;
}
开发者ID:tempbottle,项目名称:InDashNet.Open.UN2000,代码行数:14,代码来源:IGraphicBufferProducer.cpp
示例7: takePicture
status_t takePicture(int msgType)
#endif
{
ALOGV("takePicture: 0x%x", msgType);
Parcel data, reply;
data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
data.writeInt32(msgType);
#ifdef OMAP_ENHANCEMENT_CPCAM
data.writeString8(params);
#endif
remote()->transact(TAKE_PICTURE, data, &reply);
status_t ret = reply.readInt32();
return ret;
}
开发者ID:qqedfr,项目名称:kitkat-2,代码行数:14,代码来源:ICamera.cpp
示例8: addResource
virtual void addResource(
int pid,
int64_t clientId,
const sp<IResourceManagerClient> client,
const Vector<MediaResource> &resources) {
Parcel data, reply;
data.writeInterfaceToken(IResourceManagerService::getInterfaceDescriptor());
data.writeInt32(pid);
data.writeInt64(clientId);
data.writeStrongBinder(IInterface::asBinder(client));
writeToParcel(&data, resources);
remote()->transact(ADD_RESOURCE, data, &reply);
}
开发者ID:Hazy-legacy-zf2,项目名称:platform_frameworks_av,代码行数:14,代码来源:IResourceManagerService.cpp
示例9: countdown
void ResourceCache::LoadBombResources(const TiXmlHandle& hndl)
{
const Size size = mAppConfig.GetCellSize();
const auto len = mAppConfig.GetBombLifetime();
BombResource countdown(BombType::Countdown);
countdown.SetFrames(len, LoadTextures(hndl, "Countdown", size));
BombResource remote(BombType::Remote);
remote.SetFrames(len, LoadTextures(hndl, "Remote", size));
mBombRes.insert({ countdown.GetType(), countdown });
mBombRes.insert({ remote.GetType(), remote });
}
开发者ID:vobject,项目名称:bomberperson,代码行数:14,代码来源:ResourceCache.cpp
示例10: releaseBuffer
virtual status_t releaseBuffer(int buf, uint64_t frameNumber,
EGLDisplay display, EGLSyncKHR fence,
const sp<Fence>& releaseFence) {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
data.writeInt32(buf);
data.writeInt64(frameNumber);
data.write(*releaseFence);
status_t result = remote()->transact(RELEASE_BUFFER, data, &reply);
if (result != NO_ERROR) {
return result;
}
return reply.readInt32();
}
开发者ID:UbuntuSTE,项目名称:android_frameworks_native,代码行数:14,代码来源:IGraphicBufferConsumer.cpp
示例11: queueBuffer
virtual status_t queueBuffer(int buf,
const QueueBufferInput& input, QueueBufferOutput* output) {
Parcel data, reply;
data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor());
data.writeInt32(buf);
memcpy(data.writeInplace(sizeof(input)), &input, sizeof(input));
status_t result = remote()->transact(QUEUE_BUFFER, data, &reply);
if (result != NO_ERROR) {
return result;
}
memcpy(output, reply.readInplace(sizeof(*output)), sizeof(*output));
result = reply.readInt32();
return result;
}
开发者ID:MTDEV-CM10,项目名称:android_frameworks_native,代码行数:14,代码来源:ISurfaceTexture.cpp
示例12: extractAlbumArt
sp<IMemory> extractAlbumArt()
{
Parcel data, reply;
data.writeInterfaceToken(IMediaMetadataRetriever::getInterfaceDescriptor());
#ifndef DISABLE_GROUP_SCHEDULE_HACK
sendSchedPolicy(data);
#endif
remote()->transact(EXTRACT_ALBUM_ART, data, &reply);
status_t ret = reply.readInt32();
if (ret != NO_ERROR) {
return NULL;
}
return interface_cast<IMemory>(reply.readStrongBinder());
}
开发者ID:Hazy-legacy-zf2,项目名称:platform_frameworks_av,代码行数:14,代码来源:IMediaMetadataRetriever.cpp
示例13: discardFreeBuffers
virtual status_t discardFreeBuffers() {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
status_t error = remote()->transact(DISCARD_FREE_BUFFERS, data, &reply);
if (error != NO_ERROR) {
return error;
}
int32_t result = NO_ERROR;
error = reply.readInt32(&result);
if (error != NO_ERROR) {
return error;
}
return result;
}
开发者ID:android-source,项目名称:platform_frameworks_native,代码行数:14,代码来源:IGraphicBufferConsumer.cpp
示例14: getReleasedBuffers
virtual status_t getReleasedBuffers(uint64_t* slotMask) {
Parcel data, reply;
if (slotMask == NULL) {
ALOGE("getReleasedBuffers: slotMask must not be NULL");
return BAD_VALUE;
}
data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
status_t result = remote()->transact(GET_RELEASED_BUFFERS, data, &reply);
if (result != NO_ERROR) {
return result;
}
*slotMask = static_cast<uint64_t>(reply.readInt64());
return reply.readInt32();
}
开发者ID:android-source,项目名称:platform_frameworks_native,代码行数:14,代码来源:IGraphicBufferConsumer.cpp
示例15: updateBuffersGeometry
virtual status_t updateBuffersGeometry(int w, int h, int f) {
Parcel data, reply;
data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor());
data.writeInt32(w);
data.writeInt32(h);
data.writeInt32(f);
status_t result = remote()->transact(UPDATE_BUFFERS_GEOMETRY,
data, &reply);
if (result != NO_ERROR) {
return result;
}
result = reply.readInt32();
return result;
}
开发者ID:3dsfr3ak,项目名称:android_frameworks_native,代码行数:14,代码来源:ISurfaceTexture.cpp
示例16: dataCallbackTimestamp
void dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& imageData)
#endif
{
LOGV("dataCallback");
Parcel data, reply;
data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor());
data.writeInt64(timestamp);
data.writeInt32(msgType);
#ifdef OMAP_ENHANCEMENT
data.writeInt32(offset);
data.writeInt32(stride);
#endif
data.writeStrongBinder(imageData->asBinder());
remote()->transact(DATA_CALLBACK_TIMESTAMP, data, &reply, IBinder::FLAG_ONEWAY);
}
开发者ID:joyfish,项目名称:andriod_device_coolpad_d530,代码行数:15,代码来源:ICameraClient.cpp
示例17: createStream
virtual status_t createStream(const OutputConfiguration& outputConfiguration)
{
Parcel data, reply;
data.writeInterfaceToken(ICameraDeviceUser::getInterfaceDescriptor());
if (outputConfiguration.getGraphicBufferProducer() != NULL) {
data.writeInt32(1); // marker that OutputConfiguration is not null. Mimic aidl behavior
outputConfiguration.writeToParcel(data);
} else {
data.writeInt32(0);
}
remote()->transact(CREATE_STREAM, data, &reply);
reply.readExceptionCode();
return reply.readInt32();
}
开发者ID:JishnuSur,项目名称:platform_frameworks_av,代码行数:15,代码来源:ICameraDeviceUser.cpp
示例18: connect
virtual status_t connect(const sp<IBinder>& token,
int api, bool producerControlledByApp, QueueBufferOutput* output) {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
data.writeStrongBinder(token);
data.writeInt32(api);
data.writeInt32(producerControlledByApp);
status_t result = remote()->transact(CONNECT, data, &reply);
if (result != NO_ERROR) {
return result;
}
memcpy(output, reply.readInplace(sizeof(*output)), sizeof(*output));
result = reply.readInt32();
return result;
}
开发者ID:tempbottle,项目名称:InDashNet.Open.UN2000,代码行数:15,代码来源:IGraphicBufferProducer.cpp
示例19: getSensorList
virtual Vector<Sensor> getSensorList()
{
Parcel data, reply;
data.writeInterfaceToken(ISensorServer::getInterfaceDescriptor());
remote()->transact(GET_SENSOR_LIST, data, &reply);
Sensor s;
Vector<Sensor> v;
int32_t n = reply.readInt32();
v.setCapacity(n);
while (n--) {
reply.read(s);
v.add(s);
}
return v;
}
开发者ID:3dsfr3ak,项目名称:android_frameworks_native,代码行数:15,代码来源:ISensorServer.cpp
示例20: getCameraInfo
// get information about a camera
virtual status_t getCameraInfo(int cameraId,
struct CameraInfo* cameraInfo) {
Parcel data, reply;
data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
data.writeInt32(cameraId);
remote()->transact(BnCameraService::GET_CAMERA_INFO, data, &reply);
if (readExceptionCode(reply)) return -EPROTO;
status_t result = reply.readInt32();
if (reply.readInt32() != 0) {
cameraInfo->facing = reply.readInt32();
cameraInfo->orientation = reply.readInt32();
}
return result;
}
开发者ID:AOSB,项目名称:android_frameworks_av,代码行数:16,代码来源:ICameraService.cpp
注:本文中的remote函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论