typedef enum ResponseType{
OK = 200,
TRYING = 100,
RINGING = 180
} TResponseType;
However it is not so obvious in Java.
public enum ResponseType {
OK(200),
TRYING(100),
RINGING(180),
SESSION_PROGRESS(183),
BAD_REQUEST(400),
NOT_FOUND(404);
private int value;
ResponseType(int value){
this.value = value;
}
public int getValue() {
return value;
}
};
No comments:
Post a Comment