Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
a4427e4e
Commit
a4427e4e
authored
Oct 13, 2017
by
Sylvain Berfini
🐮
Browse files
Workaround for XmlRpcArgType and XmlRpcStatus to be sub-enums of XmlRpcRequest
parent
0579b0db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
wrappers/java/genwrapper.py
wrappers/java/genwrapper.py
+10
-2
wrappers/java/migration.sh
wrappers/java/migration.sh
+4
-1
No files found.
wrappers/java/genwrapper.py
View file @
a4427e4e
...
...
@@ -61,8 +61,8 @@ ENUMS_LIST = {
'SubscribePolicy'
:
'Friend'
,
'TransportType'
:
'Address'
,
'TunnelMode'
:
'Tunnel'
,
'XmlRpcArgType'
:
'XmlRpcRequest'
,
'XmlRpcStatus'
:
'XmlRpcRequest'
,
'XmlRpc
Request
ArgType'
:
'XmlRpcRequest'
,
'XmlRpc
Request
Status'
:
'XmlRpcRequest'
,
}
##########################################################################
...
...
@@ -572,11 +572,19 @@ class JavaEnum(object):
self
.
_class
=
translator
.
translate_enum
(
_enum
)
self
.
packageName
=
package
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
.
filename
=
self
.
className
+
".java"
self
.
values
=
self
.
_class
[
'values'
]
self
.
doc
=
self
.
_class
[
'doc'
]
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
):
def
__init__
(
self
,
javaClass
,
apiClass
):
...
...
wrappers/java/migration.sh
View file @
a4427e4e
...
...
@@ -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/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.PasswordCheck/AccountCreator.PasswordStatus/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
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.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.BadCredentials/Reason.Forbidden/g'
$SED_END
"
...
...
@@ -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/loadXmlFile(/loadFromXmlFile(/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
eval
"
$SED_START
's/.isRegistered()/.getState() == RegistrationState.Ok/g'
$SED_END
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment