Commit a4427e4e authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Workaround for XmlRpcArgType and XmlRpcStatus to be sub-enums of XmlRpcRequest

parent 0579b0db
...@@ -61,8 +61,8 @@ ENUMS_LIST = { ...@@ -61,8 +61,8 @@ ENUMS_LIST = {
'SubscribePolicy': 'Friend', 'SubscribePolicy': 'Friend',
'TransportType': 'Address', 'TransportType': 'Address',
'TunnelMode': 'Tunnel', 'TunnelMode': 'Tunnel',
'XmlRpcArgType': 'XmlRpcRequest', 'XmlRpcRequestArgType': 'XmlRpcRequest',
'XmlRpcStatus': 'XmlRpcRequest', 'XmlRpcRequestStatus': 'XmlRpcRequest',
} }
########################################################################## ##########################################################################
...@@ -572,11 +572,19 @@ class JavaEnum(object): ...@@ -572,11 +572,19 @@ class JavaEnum(object):
self._class = translator.translate_enum(_enum) self._class = translator.translate_enum(_enum)
self.packageName = package self.packageName = package
self.className = _enum.name.to_camel_case() self.className = _enum.name.to_camel_case()
if self.className == 'XmlRpcArgType':
self.className = 'XmlRpcRequestArgType'
elif self.className == 'XmlRpcStatus':
self.className = 'XmlRpcRequestStatus'
self.cPrefix = 'linphone_' + _enum.name.to_snake_case() self.cPrefix = 'linphone_' + _enum.name.to_snake_case()
self.filename = self.className + ".java" self.filename = self.className + ".java"
self.values = self._class['values'] self.values = self._class['values']
self.doc = self._class['doc'] self.doc = self._class['doc']
self.jniName = translator.translate_java_jni_enum_name(_enum) self.jniName = translator.translate_java_jni_enum_name(_enum)
if self.className == 'XmlRpcRequestArgType':
self.jniName = 'XmlRpcRequest$ArgType'
elif self.className == 'XmlRpcRequestStatus':
self.jniName = 'XmlRpcRequest$Status'
class JniInterface(object): class JniInterface(object):
def __init__(self, javaClass, apiClass): def __init__(self, javaClass, apiClass):
......
...@@ -38,6 +38,7 @@ eval "$SED_START 's/LogCollectionUploadState.LogCollectionUploadStateDelivered/L ...@@ -38,6 +38,7 @@ eval "$SED_START 's/LogCollectionUploadState.LogCollectionUploadStateDelivered/L
eval "$SED_START 's/LogCollectionUploadState.LogCollectionUploadStateNotDelivered/LogCollectionUploadState.NotDelivered/g' $SED_END" eval "$SED_START 's/LogCollectionUploadState.LogCollectionUploadStateNotDelivered/LogCollectionUploadState.NotDelivered/g' $SED_END"
eval "$SED_START 's/AccountCreator.RequestStatus/AccountCreator.Status/g' $SED_END" eval "$SED_START 's/AccountCreator.RequestStatus/AccountCreator.Status/g' $SED_END"
eval "$SED_START 's/RequestStatus/Status/g' $SED_END"
eval "$SED_START 's/AccountCreator.Status.Ok/AccountCreator.Status.RequestOk/g' $SED_END" eval "$SED_START 's/AccountCreator.Status.Ok/AccountCreator.Status.RequestOk/g' $SED_END"
eval "$SED_START 's/AccountCreator.PasswordCheck/AccountCreator.PasswordStatus/g' $SED_END" eval "$SED_START 's/AccountCreator.PasswordCheck/AccountCreator.PasswordStatus/g' $SED_END"
eval "$SED_START 's/AccountCreator.PhoneNumberCheck/AccountCreator.PhoneNumberStatus/g' $SED_END" eval "$SED_START 's/AccountCreator.PhoneNumberCheck/AccountCreator.PhoneNumberStatus/g' $SED_END"
...@@ -45,6 +46,7 @@ eval "$SED_START 's/AccountCreator.EmailCheck/AccountCreator.EmailStatus/g' $SED ...@@ -45,6 +46,7 @@ eval "$SED_START 's/AccountCreator.EmailCheck/AccountCreator.EmailStatus/g' $SED
eval "$SED_START 's/AccountCreator.UsernameCheck/AccountCreator.UsernameStatus/g' $SED_END" eval "$SED_START 's/AccountCreator.UsernameCheck/AccountCreator.UsernameStatus/g' $SED_END"
eval "$SED_START 's/AccountCreator.Status.Failed/AccountCreator.Status.RequestFailed/g' $SED_END" eval "$SED_START 's/AccountCreator.Status.Failed/AccountCreator.Status.RequestFailed/g' $SED_END"
eval "$SED_START 's/AccountCreator.Status.ErrorServer/AccountCreator.Status.ServerError/g' $SED_END" eval "$SED_START 's/AccountCreator.Status.ErrorServer/AccountCreator.Status.ServerError/g' $SED_END"
eval "$SED_START 's/PhoneNumberStatus.CountryCodeInvalid/PhoneNumberStatus.InvalidCountryCode/g' $SED_END"
eval "$SED_START 's/Reason.Media/Reason.NotAcceptable/g' $SED_END" eval "$SED_START 's/Reason.Media/Reason.NotAcceptable/g' $SED_END"
eval "$SED_START 's/Reason.BadCredentials/Reason.Forbidden/g' $SED_END" eval "$SED_START 's/Reason.BadCredentials/Reason.Forbidden/g' $SED_END"
...@@ -175,7 +177,8 @@ eval "$SED_START 's/VideoDefinition().toDisplayableString()/VideoDefinition().ge ...@@ -175,7 +177,8 @@ eval "$SED_START 's/VideoDefinition().toDisplayableString()/VideoDefinition().ge
eval "$SED_START 's/isAccountUsed/isAccountExist()/g' $SED_END" eval "$SED_START 's/isAccountUsed/isAccountExist()/g' $SED_END"
eval "$SED_START 's/loadXmlFile(/loadFromXmlFile(/g' $SED_END" eval "$SED_START 's/loadXmlFile(/loadFromXmlFile(/g' $SED_END"
eval "$SED_START 's/activatePhoneNumberLink()/activateAlias()/g' $SED_END" eval "$SED_START 's/activatePhoneNumberLink()/activateAlias()/g' $SED_END"
eval "$SED_START 's//g' $SED_END" eval "$SED_START 's/isPhoneNumberUsed()/isAliasUsed()/g' $SED_END"
eval "$SED_START 's/recoverPhoneAccount()/recoverAccount()/g' $SED_END"
# Removed methods # Removed methods
eval "$SED_START 's/.isRegistered()/.getState() == RegistrationState.Ok/g' $SED_END" eval "$SED_START 's/.isRegistered()/.getState() == RegistrationState.Ok/g' $SED_END"
......
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