Commit 99aa481b authored by Erwan Croze's avatar Erwan Croze 👋🏻
Browse files

Add new enum to account_creator

parent f1444513
...@@ -507,25 +507,25 @@ const char * linphone_account_creator_get_email(const LinphoneAccountCreator *cr ...@@ -507,25 +507,25 @@ const char * linphone_account_creator_get_email(const LinphoneAccountCreator *cr
return creator->email; return creator->email;
} }
LinphoneAccountCreatorStatus linphone_account_creator_set_domain(LinphoneAccountCreator *creator, const char *domain) { LinphoneAccountCreatorDomainStatus linphone_account_creator_set_domain(LinphoneAccountCreator *creator, const char *domain) {
if (domain && validate_uri(NULL, domain, NULL) != 0) { if (domain && validate_uri(NULL, domain, NULL) != 0) {
return LinphoneAccountCreatorStatusRequestFailed; return LinphoneAccountCreatorDomainInvalid;
} }
set_string(&creator->domain, domain, TRUE); set_string(&creator->domain, domain, TRUE);
return LinphoneAccountCreatorStatusRequestOk; return LinphoneAccountCreatorDomainOk;
} }
const char * linphone_account_creator_get_domain(const LinphoneAccountCreator *creator) { const char * linphone_account_creator_get_domain(const LinphoneAccountCreator *creator) {
return creator->domain; return creator->domain;
} }
LinphoneAccountCreatorStatus linphone_account_creator_set_transport(LinphoneAccountCreator *creator, LinphoneTransportType transport) { LinphoneAccountCreatorTransportStatus linphone_account_creator_set_transport(LinphoneAccountCreator *creator, LinphoneTransportType transport) {
if (!linphone_core_sip_transport_supported(creator->core, transport)) { if (!linphone_core_sip_transport_supported(creator->core, transport)) {
return LinphoneAccountCreatorStatusRequestFailed; return LinphoneAccountCreatorTransportUnsupported;
} }
creator->transport = transport; creator->transport = transport;
return LinphoneAccountCreatorStatusRequestOk; return LinphoneAccountCreatorTransportOk;
} }
LinphoneTransportType linphone_account_creator_get_transport(const LinphoneAccountCreator *creator) { LinphoneTransportType linphone_account_creator_get_transport(const LinphoneAccountCreator *creator) {
......
...@@ -277,9 +277,9 @@ LINPHONE_PUBLIC const char * linphone_account_creator_get_email(const LinphoneAc ...@@ -277,9 +277,9 @@ LINPHONE_PUBLIC const char * linphone_account_creator_get_email(const LinphoneAc
* Set the domain. * Set the domain.
* @param[in] creator LinphoneAccountCreator object * @param[in] creator LinphoneAccountCreator object
* @param[in] domain The domain to set * @param[in] domain The domain to set
* @return LinphoneAccountCreatorStatusRequestOk if everything is OK, or a specific error otherwise. * @return LinphoneAccountCreatorDomainOk if everything is OK, or a specific error otherwise.
**/ **/
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_domain(LinphoneAccountCreator *creator, const char *domain); LINPHONE_PUBLIC LinphoneAccountCreatorDomainStatus linphone_account_creator_set_domain(LinphoneAccountCreator *creator, const char *domain);
/** /**
* Get the domain. * Get the domain.
...@@ -292,9 +292,9 @@ LINPHONE_PUBLIC const char * linphone_account_creator_get_domain(const LinphoneA ...@@ -292,9 +292,9 @@ LINPHONE_PUBLIC const char * linphone_account_creator_get_domain(const LinphoneA
* Set Transport * Set Transport
* @param[in] creator LinphoneAccountCreator object * @param[in] creator LinphoneAccountCreator object
* @param[in] transport The transport to set * @param[in] transport The transport to set
* @return LinphoneAccountCreatorStatusRequestOk if everything is OK, or a specific error otherwise. * @return LinphoneAccountCreatorTransportOk if everything is OK, or a specific error otherwise.
**/ **/
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_transport(LinphoneAccountCreator *creator, LinphoneTransportType transport); LINPHONE_PUBLIC LinphoneAccountCreatorTransportStatus linphone_account_creator_set_transport(LinphoneAccountCreator *creator, LinphoneTransportType transport);
/** /**
* get Transport * get Transport
......
...@@ -117,6 +117,24 @@ typedef enum _LinphoneAccountCreatorActivationCodeStatus { ...@@ -117,6 +117,24 @@ typedef enum _LinphoneAccountCreatorActivationCodeStatus {
LinphoneAccountCreatorActivationCodeStatusInvalidCharacters /**< Contain invalid characters */ LinphoneAccountCreatorActivationCodeStatusInvalidCharacters /**< Contain invalid characters */
} LinphoneAccountCreatorActivationCodeStatus; } LinphoneAccountCreatorActivationCodeStatus;
/**
* Enum describing Domain checking
* @ingroup account_creator
**/
typedef enum _LinphoneAccountCreatorDomainStatus {
LinphoneAccountCreatorDomainOk, /**< Domain ok */
LinphoneAccountCreatorDomainInvalid /**< Domain invalid */
} LinphoneAccountCreatorDomainStatus;
/**
* Enum describing Transport checking
* @ingroup account_creator
**/
typedef enum _LinphoneAccountCreatorTransportStatus {
LinphoneAccountCreatorTransportOk, /**< Transport ok */
LinphoneAccountCreatorTransportUnsupported /**< Transport invalid */
} LinphoneAccountCreatorTransportStatus;
/** /**
* Enum describing the status of server request. * Enum describing the status of server request.
* @ingroup account_creator_request * @ingroup account_creator_request
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment