当前位置: 首页>>代码示例>>C++>>正文


C++ Parcel::writeInterfaceToken方法代码示例

本文整理汇总了C++中Parcel::writeInterfaceToken方法的典型用法代码示例。如果您正苦于以下问题:C++ Parcel::writeInterfaceToken方法的具体用法?C++ Parcel::writeInterfaceToken怎么用?C++ Parcel::writeInterfaceToken使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parcel的用法示例。


在下文中一共展示了Parcel::writeInterfaceToken方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getParameter

 status_t getParameter(int key, Parcel *reply)
 {
     Parcel data;
     data.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor());
     data.writeInt32(key);
     return remote()->transact(GET_PARAMETER, data, reply);
 }
开发者ID:28vicky,项目名称:platform_frameworks_base,代码行数:7,代码来源:IMediaPlayer.cpp

示例2: resume

    status_t resume() {
        Parcel request;
        request.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor());

        Parcel reply;
        remote()->transact(RESUME, request, &reply);

        return reply.readInt32();
    }
开发者ID:DongheonKim,项目名称:android_frameworks_base,代码行数:9,代码来源:IMediaPlayer.cpp

示例3: suspend

    status_t suspend() {
        Parcel request;
        request.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor());

        Parcel reply;
        remote()->transact(SUSPEND, request, &reply);

        return reply.readInt32();
    }
开发者ID:DongheonKim,项目名称:android_frameworks_base,代码行数:9,代码来源:IMediaPlayer.cpp

示例4: getMetadata

 status_t getMetadata(bool update_only, bool apply_filter, Parcel *reply)
 {
     Parcel request;
     request.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor());
     // TODO: Burning 2 ints for 2 boolean. Should probably use flags in an int here.
     request.writeInt32(update_only);
     request.writeInt32(apply_filter);
     remote()->transact(GET_METADATA, request, reply);
     return reply->readInt32();
 }
开发者ID:DongheonKim,项目名称:android_frameworks_base,代码行数:10,代码来源:IMediaPlayer.cpp

示例5: android_os_Parcel_writeInterfaceToken

static void android_os_Parcel_writeInterfaceToken(JNIEnv* env, jclass clazz, jint nativePtr,
                                                  jstring name)
{
    Parcel* parcel = reinterpret_cast<Parcel*>(nativePtr);
    if (parcel != NULL) {
        // In the current implementation, the token is just the serialized interface name that
        // the caller expects to be invoking
        const jchar* str = env->GetStringCritical(name, 0);
        if (str != NULL) {
            parcel->writeInterfaceToken(String16((const char16_t*)str, env->GetStringLength(name)));
            env->ReleaseStringCritical(name, str);
        }
    }
}
开发者ID:DroidTh3ory,项目名称:frameworks_base,代码行数:14,代码来源:android_os_Parcel.cpp

示例6: pullBatteryData

 virtual status_t pullBatteryData(Parcel* reply) {
     Parcel data;
     data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor());
     return remote()->transact(PULL_BATTERY_DATA, data, reply);
 }
开发者ID:AospPlus,项目名称:android_frameworks_av,代码行数:5,代码来源:IMediaPlayerService.cpp


注:本文中的Parcel::writeInterfaceToken方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。