Add ChangeCallStatus services
parent
4b6263ca1a
commit
dc6cbdd188
@ -1,15 +0,0 @@
|
|||||||
package com.example.doctor_app_flutter.Service;
|
|
||||||
|
|
||||||
import com.example.doctor_app_flutter.Model.GetSessionStatusModel;
|
|
||||||
import com.example.doctor_app_flutter.Model.SessionStatusModel;
|
|
||||||
|
|
||||||
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.http.Body;
|
|
||||||
import retrofit2.http.POST;
|
|
||||||
|
|
||||||
public interface SessionStatusAPI {
|
|
||||||
|
|
||||||
@POST("LiveCareApi/DoctorApp/GetSessionStatus")
|
|
||||||
Call<SessionStatusModel> getSessionStatusModelData(@Body GetSessionStatusModel getSessionStatusModel);
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package com.example.doctor_app_flutter.ui;
|
|
||||||
|
|
||||||
import com.example.doctor_app_flutter.Model.GetSessionStatusModel;
|
|
||||||
import com.example.doctor_app_flutter.Model.SessionStatusModel;
|
|
||||||
|
|
||||||
public interface VideoCallContract {
|
|
||||||
|
|
||||||
interface VideoCallView{
|
|
||||||
|
|
||||||
void onCallSuccessful(SessionStatusModel sessionStatusModel);
|
|
||||||
void onFailure();
|
|
||||||
}
|
|
||||||
|
|
||||||
interface VideoCallPresenter {
|
|
||||||
|
|
||||||
void callClintConnected(GetSessionStatusModel statusModel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
package com.hmg.hmgDr.Model;
|
||||||
|
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
public class ChangeCallStatusRequestModel implements Parcelable {
|
||||||
|
|
||||||
|
@SerializedName("CallStatus")
|
||||||
|
@Expose
|
||||||
|
private Integer callStatus;
|
||||||
|
@SerializedName("DoctorId")
|
||||||
|
@Expose
|
||||||
|
private Integer doctorId;
|
||||||
|
@SerializedName("generalid")
|
||||||
|
@Expose
|
||||||
|
private String generalid;
|
||||||
|
@SerializedName("TokenID")
|
||||||
|
@Expose
|
||||||
|
private String tokenID;
|
||||||
|
@SerializedName("VC_ID")
|
||||||
|
@Expose
|
||||||
|
private Integer vcId;
|
||||||
|
|
||||||
|
public ChangeCallStatusRequestModel(Integer callStatus, Integer doctorId, String generalid, String tokenID, Integer vcId) {
|
||||||
|
this.callStatus = callStatus;
|
||||||
|
this.doctorId = doctorId;
|
||||||
|
this.generalid = generalid;
|
||||||
|
this.tokenID = tokenID;
|
||||||
|
this.vcId = vcId;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ChangeCallStatusRequestModel(Parcel in) {
|
||||||
|
if (in.readByte() == 0) {
|
||||||
|
callStatus = null;
|
||||||
|
} else {
|
||||||
|
callStatus = in.readInt();
|
||||||
|
}
|
||||||
|
if (in.readByte() == 0) {
|
||||||
|
doctorId = null;
|
||||||
|
} else {
|
||||||
|
doctorId = in.readInt();
|
||||||
|
}
|
||||||
|
generalid = in.readString();
|
||||||
|
tokenID = in.readString();
|
||||||
|
if (in.readByte() == 0) {
|
||||||
|
vcId = null;
|
||||||
|
} else {
|
||||||
|
vcId = in.readInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<ChangeCallStatusRequestModel> CREATOR = new Creator<ChangeCallStatusRequestModel>() {
|
||||||
|
@Override
|
||||||
|
public ChangeCallStatusRequestModel createFromParcel(Parcel in) {
|
||||||
|
return new ChangeCallStatusRequestModel(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChangeCallStatusRequestModel[] newArray(int size) {
|
||||||
|
return new ChangeCallStatusRequestModel[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public Integer getCallStatus() {
|
||||||
|
return callStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCallStatus(Integer callStatus) {
|
||||||
|
this.callStatus = callStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDoctorId() {
|
||||||
|
return doctorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorId(Integer doctorId) {
|
||||||
|
this.doctorId = doctorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGeneralid() {
|
||||||
|
return generalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGeneralid(String generalid) {
|
||||||
|
this.generalid = generalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTokenID() {
|
||||||
|
return tokenID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTokenID(String tokenID) {
|
||||||
|
this.tokenID = tokenID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVcId() {
|
||||||
|
return vcId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVcId(Integer vcId) {
|
||||||
|
this.vcId = vcId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
|
if (callStatus == null) {
|
||||||
|
dest.writeByte((byte) 0);
|
||||||
|
} else {
|
||||||
|
dest.writeByte((byte) 1);
|
||||||
|
dest.writeInt(callStatus);
|
||||||
|
}
|
||||||
|
if (doctorId == null) {
|
||||||
|
dest.writeByte((byte) 0);
|
||||||
|
} else {
|
||||||
|
dest.writeByte((byte) 1);
|
||||||
|
dest.writeInt(doctorId);
|
||||||
|
}
|
||||||
|
dest.writeString(generalid);
|
||||||
|
dest.writeString(tokenID);
|
||||||
|
if (vcId == null) {
|
||||||
|
dest.writeByte((byte) 0);
|
||||||
|
} else {
|
||||||
|
dest.writeByte((byte) 1);
|
||||||
|
dest.writeInt(vcId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.example.doctor_app_flutter.Model;
|
package com.hmg.hmgDr.Model;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.example.doctor_app_flutter.Model;
|
package com.hmg.hmgDr.Model;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.example.doctor_app_flutter.Service;
|
package com.hmg.hmgDr.Service;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.hmg.hmgDr.Service;
|
||||||
|
|
||||||
|
import com.hmg.hmgDr.Model.ChangeCallStatusRequestModel;
|
||||||
|
import com.hmg.hmgDr.Model.GetSessionStatusModel;
|
||||||
|
import com.hmg.hmgDr.Model.SessionStatusModel;
|
||||||
|
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface SessionStatusAPI {
|
||||||
|
|
||||||
|
@POST("LiveCareApi/DoctorApp/GetSessionStatus")
|
||||||
|
Call<SessionStatusModel> getSessionStatusModelData(@Body GetSessionStatusModel getSessionStatusModel);
|
||||||
|
|
||||||
|
@POST("LiveCareApi/DoctorApp/ChangeCallStatus")
|
||||||
|
Call<SessionStatusModel> changeCallStatus(@Body ChangeCallStatusRequestModel changeCallStatusRequestModel);
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.hmg.hmgDr.ui;
|
||||||
|
|
||||||
|
import com.hmg.hmgDr.Model.ChangeCallStatusRequestModel;
|
||||||
|
import com.hmg.hmgDr.Model.GetSessionStatusModel;
|
||||||
|
import com.hmg.hmgDr.Model.SessionStatusModel;
|
||||||
|
|
||||||
|
public interface VideoCallContract {
|
||||||
|
|
||||||
|
interface VideoCallView {
|
||||||
|
|
||||||
|
void onCallSuccessful(SessionStatusModel sessionStatusModel);
|
||||||
|
|
||||||
|
void onCallChangeCallStatusSuccessful(SessionStatusModel sessionStatusModel);
|
||||||
|
|
||||||
|
void onFailure();
|
||||||
|
}
|
||||||
|
|
||||||
|
interface VideoCallPresenter {
|
||||||
|
|
||||||
|
void callClintConnected(GetSessionStatusModel statusModel);
|
||||||
|
|
||||||
|
void callChangeCallStatus(ChangeCallStatusRequestModel statusModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue