Пример #1
0
        static IntPtr n_Play_Ljava_lang_String_Lcom_spotify_android_appremote_api_PlayerApi_StreamType_(IntPtr jnienv, IntPtr native__this, IntPtr native_uri, IntPtr native_streamType)
        {
            global::Com.Spotify.Android.Appremote.Internal.PlayerApiImpl __this = global::Java.Lang.Object.GetObject <global::Com.Spotify.Android.Appremote.Internal.PlayerApiImpl> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            string uri = JNIEnv.GetString(native_uri, JniHandleOwnership.DoNotTransfer);

            global::Com.Spotify.Android.Appremote.Api.PlayerApiStreamType streamType = global::Java.Lang.Object.GetObject <global::Com.Spotify.Android.Appremote.Api.PlayerApiStreamType> (native_streamType, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.Play(uri, streamType));

            return(__ret);
        }
        static IntPtr n_Play_Ljava_lang_String_Lcom_spotify_android_appremote_api_PlayerApi_StreamType_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
        {
            global::Com.Spotify.Android.Appremote.Api.IPlayerApi __this = global::Java.Lang.Object.GetObject <global::Com.Spotify.Android.Appremote.Api.IPlayerApi> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            string p0 = JNIEnv.GetString(native_p0, JniHandleOwnership.DoNotTransfer);

            global::Com.Spotify.Android.Appremote.Api.PlayerApiStreamType p1 = global::Java.Lang.Object.GetObject <global::Com.Spotify.Android.Appremote.Api.PlayerApiStreamType> (native_p1, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.Play(p0, p1));

            return(__ret);
        }
        public unsafe global::Com.Spotify.Protocol.Client.CallResult Play(string p0, global::Com.Spotify.Android.Appremote.Api.PlayerApiStreamType p1)
        {
            if (id_play_Ljava_lang_String_Lcom_spotify_android_appremote_api_PlayerApi_StreamType_ == IntPtr.Zero)
            {
                id_play_Ljava_lang_String_Lcom_spotify_android_appremote_api_PlayerApi_StreamType_ = JNIEnv.GetMethodID(class_ref, "play", "(Ljava/lang/String;Lcom/spotify/android/appremote/api/PlayerApi$StreamType;)Lcom/spotify/protocol/client/CallResult;");
            }
            IntPtr  native_p0 = JNIEnv.NewString(p0);
            JValue *__args    = stackalloc JValue [2];

            __args [0] = new JValue(native_p0);
            __args [1] = new JValue((p1 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p1).Handle);
            global::Com.Spotify.Protocol.Client.CallResult __ret = global::Java.Lang.Object.GetObject <global::Com.Spotify.Protocol.Client.CallResult> (JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_play_Ljava_lang_String_Lcom_spotify_android_appremote_api_PlayerApi_StreamType_, __args), JniHandleOwnership.TransferLocalRef);
            JNIEnv.DeleteLocalRef(native_p0);
            return(__ret);
        }
Пример #4
0
        public virtual unsafe global::Com.Spotify.Protocol.Client.CallResult Play(string uri, global::Com.Spotify.Android.Appremote.Api.PlayerApiStreamType streamType)
        {
            const string __id       = "play.(Ljava/lang/String;Lcom/spotify/android/appremote/api/PlayerApi$StreamType;)Lcom/spotify/protocol/client/CallResult;";
            IntPtr       native_uri = JNIEnv.NewString(uri);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue(native_uri);
                __args [1] = new JniArgumentValue((streamType == null) ? IntPtr.Zero : ((global::Java.Lang.Object)streamType).Handle);
                var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);
                return(global::Java.Lang.Object.GetObject <global::Com.Spotify.Protocol.Client.CallResult> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
                JNIEnv.DeleteLocalRef(native_uri);
            }
        }