package com.huawei.rtcdemo.activities;

import android.os.Bundle;
import android.util.DisplayMetrics;

import com.huawei.rtc.IRtcEngineEventHandler;
import com.huawei.rtc.models.LocalAudioStats;
import com.huawei.rtc.models.LocalVideoStats;
import com.huawei.rtc.models.RemoteAudioStats;
import com.huawei.rtc.models.RemoteVideoStats;
import com.huawei.rtc.models.StatsInfo;
import com.huawei.rtc.models.UserInfo;
import com.huawei.rtc.utils.RtcEnums;
import com.huawei.rtcdemo.utils.WindowUtil;

import java.util.List;

import androidx.appcompat.app.AppCompatActivity;


public class BaseActivity extends AppCompatActivity implements IRtcEngineEventHandler {
    protected DisplayMetrics mDisplayMetrics = new DisplayMetrics();
    protected int mStatusBarHeight;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        WindowUtil.hideWindowStatusBar(getWindow());
        initStatusBarHeight();
    }

    protected void onGlobalLayoutCompleted() {}

    private void initStatusBarHeight() {
        mStatusBarHeight = WindowUtil.getSystemStatusBarHeight(this);
    }


    @Override
    public void onWarning(int i, String s) {

    }

    @Override
    public void onError(int i, String s) {

    }

    @Override
    public void onJoinRoomSuccess(String s, String s1) {

    }

    @Override
    public void onJoinRoomFailure(int i, String s) {

    }

    @Override
    public void onLeaveRoom(String s, String s1, StatsInfo statsInfo) {

    }

    @Override
    public void onUserJoined(String s, String s1, String s2) {

    }

    @Override
    public void onUserOffline(String s, String s1, int i) {

    }

    @Override
    public void onFirstRemoteVideoDecoded(String s, String s1, int i, int i1) {

    }

    @Override
    public void onConnectionStateChange(RtcEnums.ConnStateTypes connStateTypes, RtcEnums.ConnChangeReason connChangeReason, String s) {

    }

    @Override
    public void onLogUploadResult(int i) {

    }

    @Override
    public void onLogUploadProgress(int i) {

    }

    @Override
    public void onAgreedStreamAvailable(String s, String s1, RtcEnums.StreamType streamType) {

    }

    @Override
    public void onUserRoleChanged(UserInfo.RoleType roleType, UserInfo.RoleType roleType1) {

    }

    @Override
    public void onAudioRouteChanged(RtcEnums.AudioRoute audioRoute) {

    }

    @Override
    public void onVideoStats(List<LocalVideoStats> list, List<RemoteVideoStats> list1) {

    }

    @Override
    public void onAudioStats(List<LocalAudioStats> list, List<RemoteAudioStats> list1) {

    }

    @Override
    public void onUserSubStreamAvailable(String s, String s1, boolean b) {

    }

    @Override
    public void onSubStreamStats(boolean b, LocalVideoStats lcoalStats, RemoteVideoStats remoteStats) {

    }
	
    @Override
    public void onRenderVideoFrame(String s, String s1, byte[] bytes, int i, int i1, int i2, int i3) {

    }

    @Override
    public void onPlaybackAudioFrame(String s, byte[] bytes, int i, int i1, int i2, int i3, int i4) {

    }

    @Override
    public void onPointerCaptureChanged(boolean hasCapture) {

    }
}
