Source: subscriptionstate.js

/* Wrapper generated by lp-gen-wrappers, do not edit*/

var linphone = linphone || {};
/**
 * Enum for subscription states. 
 * @readonly
 * @enum {number}
**/
linphone.SubscriptionState = {
	/**
	 * Initial state, should not be used. 
	*/
	None : 0,
	/**
	 * An outgoing subcription was sent 
	*/
	OutgoingProgress : 1,
	/**
	 * An incoming subcription is received 
	*/
	IncomingReceived : 2,
	/**
	 * Subscription is pending, waiting for user approval 
	*/
	Pending : 3,
	/**
	 * Subscription is accepted. 
	*/
	Active : 4,
	/**
	 * Subscription is terminated normally 
	*/
	Terminated : 5,
	/**
	 * Subscription encountered an error, indicated by 
	*/
	Error : 6,
	/**
	 * Subscription is about to expire, only sent if [sip]->refresh_generic_subscribe property is set to 0. 
	*/
	Expiring : 7
};
/**
 * Get the name of a value of the SubscriptionState enum as a string.
 * @function linphone#getSubscriptionStateText
 * @param { number } value - One of the values of the SubscriptionState enum.
**/
linphone.getSubscriptionStateText = function(value) {
	switch (value) {
	case linphone.SubscriptionState.None:
		return "None";
	case linphone.SubscriptionState.OutgoingProgress:
		return "OutgoingProgress";
	case linphone.SubscriptionState.IncomingReceived:
		return "IncomingReceived";
	case linphone.SubscriptionState.Pending:
		return "Pending";
	case linphone.SubscriptionState.Active:
		return "Active";
	case linphone.SubscriptionState.Terminated:
		return "Terminated";
	case linphone.SubscriptionState.Error:
		return "Error";
	case linphone.SubscriptionState.Expiring:
		return "Expiring";
	default:
		return "?";
	}
};