com.bugvm.apple.gamekit.GKVoiceChatService Maven / Gradle / Ivy
The newest version!
/*
* Copyright (C) 2013-2015 RoboVM AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bugvm.apple.gamekit;
/**/
import java.io.*;
import java.nio.*;
import java.util.*;
import com.bugvm.objc.*;
import com.bugvm.objc.annotation.*;
import com.bugvm.objc.block.*;
import com.bugvm.rt.*;
import com.bugvm.rt.annotation.*;
import com.bugvm.rt.bro.*;
import com.bugvm.rt.bro.annotation.*;
import com.bugvm.rt.bro.ptr.*;
import com.bugvm.apple.foundation.*;
import com.bugvm.apple.uikit.*;
/* */
/**/
/**
* @since Available in iOS 3.0 and later.
* @deprecated Deprecated in iOS 7.0.
*/
@Deprecated
/* */
/**/@Library("GameKit") @NativeClass/* */
/**/public/* */ class /**/GKVoiceChatService/* */
extends /**/NSObject/* */
/**//* */ {
/**/public static class GKVoiceChatServicePtr extends Ptr {}/* */
/**/static { ObjCRuntime.bind(GKVoiceChatService.class); }/* */
/**//* */
/**/
public GKVoiceChatService() {}
protected GKVoiceChatService(SkipInit skipInit) { super(skipInit); }
/* */
/**/
@Property(selector = "client")
public native GKVoiceChatClient getClient();
@Property(selector = "setClient:", strongRef = true)
public native void setClient(GKVoiceChatClient v);
@Property(selector = "isMicrophoneMuted")
public native boolean isMicrophoneMuted();
@Property(selector = "setMicrophoneMuted:")
public native void setMicrophoneMuted(boolean v);
@Property(selector = "remoteParticipantVolume")
public native float getRemoteParticipantVolume();
@Property(selector = "setRemoteParticipantVolume:")
public native void setRemoteParticipantVolume(float v);
@Property(selector = "isOutputMeteringEnabled")
public native boolean isOutputMeteringEnabled();
@Property(selector = "setOutputMeteringEnabled:")
public native void setOutputMeteringEnabled(boolean v);
@Property(selector = "isInputMeteringEnabled")
public native boolean isInputMeteringEnabled();
@Property(selector = "setInputMeteringEnabled:")
public native void setInputMeteringEnabled(boolean v);
@Property(selector = "outputMeterLevel")
public native float getOutputMeterLevel();
@Property(selector = "inputMeterLevel")
public native float getInputMeterLevel();
/* */
/**//* */
/**/
public boolean startVoiceChat(String participantID) throws NSErrorException {
NSError.NSErrorPtr ptr = new NSError.NSErrorPtr();
boolean result = startVoiceChat(participantID, ptr);
if (ptr.get() != null) { throw new NSErrorException(ptr.get()); }
return result;
}
@Method(selector = "startVoiceChatWithParticipantID:error:")
private native boolean startVoiceChat(String participantID, NSError.NSErrorPtr error);
@Method(selector = "stopVoiceChatWithParticipantID:")
public native void stopVoiceChat(String participantID);
public boolean acceptCallID(@MachineSizedSInt long callID) throws NSErrorException {
NSError.NSErrorPtr ptr = new NSError.NSErrorPtr();
boolean result = acceptCallID(callID, ptr);
if (ptr.get() != null) { throw new NSErrorException(ptr.get()); }
return result;
}
@Method(selector = "acceptCallID:error:")
private native boolean acceptCallID(@MachineSizedSInt long callID, NSError.NSErrorPtr error);
@Method(selector = "denyCallID:")
public native void denyCallID(@MachineSizedSInt long callID);
@Method(selector = "receivedRealTimeData:fromParticipantID:")
public native void receivedRealTimeData(NSData audio, String participantID);
@Method(selector = "receivedData:fromParticipantID:")
public native void receivedData(NSData arbitraryData, String participantID);
@Method(selector = "defaultVoiceChatService")
public static native GKVoiceChatService getDefaultVoiceChatService();
@Method(selector = "isVoIPAllowed")
public static native boolean isVoIPAllowed();
/* */
}