Commit f3856c45 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Android build fixes

parent 7e5d9f5f
Pipeline #263 failed with stage
in 0 seconds
......@@ -258,7 +258,7 @@ long long DbSession::resolveId (const soci::row &row, int col) const {
time_t DbSession::getTime (const soci::row &row, int col) const {
L_D();
tm t = row.get<tm>(col);
tm t = row.get<tm>((size_t)col);
switch (d->backend) {
case DbSessionPrivate::Backend::Mysql:
return mktime(&t); // Local time to UTC. For Mysql the local time is used, not a problem.
......
......@@ -176,6 +176,7 @@ class JavaTranslator(object):
methodDict['return_keyword'] = ''
methodDict['convertInputClassArrayToLongArray'] = False
methodDict['name'] = name
methodDict['name_native'] = name
methodDict['exception'] = False
methodDict['enumCast'] = False
methodDict['classCast'] = False
......@@ -212,6 +213,11 @@ class JavaTranslator(object):
methodDict['convertInputClassArrayToLongArray'] = False
methodDict['name'] = _method.name.to_camel_case(lower=True)
methodDict['name_native'] = methodDict['name']
if _method.name.to_c() == 'linphone_core_get_chat_room_2':
methodDict['name_native'] += "2"
methodDict['isNotGetCore'] = not methodDict['name'] == 'getCore'
methodDict['hasCoreAccessor'] = _hasCoreAccessor
methodDict['exception'] = self.throws_exception(_method.returnType)
......@@ -254,6 +260,9 @@ class JavaTranslator(object):
methodDict['name'] = 'Java_' + self.jni_package + className + 'Impl_' + _method.name.translate(self.nameTranslator)
methodDict['notStatic'] = not static
if _method.name.to_c() == 'linphone_core_get_chat_room_2':
methodDict['name'] += "2"
if _method.name.to_c() == 'linphone_factory_create_core':
methodDict['c_name'] = 'linphone_factory_create_core_3'
elif _method.name.to_c() == 'linphone_factory_create_core_with_config':
......
......@@ -192,11 +192,11 @@ class {{classImplName}} {{#isLinphoneFactory}}extends{{/isLinphoneFactory}}{{#is
{{/isLinphoneFactory}}
{{#methods}}
private native {{return_native}} {{name}}({{native_params}});
private native {{return_native}} {{name_native}}({{native_params}});
@Override
synchronized public {{return}} {{name}}({{params}}) {{#exception}}throws CoreException{{/exception}} {
{{#hasCoreAccessor}}{{#isNotGetCore}}synchronized(core) { {{/isNotGetCore}}{{/hasCoreAccessor}}
{{#exception}}int exceptionResult = {{/exception}}{{return_keyword}}{{#enumCast}}{{return}}.fromInt({{/enumCast}}{{#classCast}}({{return}}){{/classCast}}{{name}}({{native_params_impl}}){{#enumCast}}){{/enumCast}};{{#exception}}
{{#exception}}int exceptionResult = {{/exception}}{{return_keyword}}{{#enumCast}}{{return}}.fromInt({{/enumCast}}{{#classCast}}({{return}}){{/classCast}}{{name_native}}({{native_params_impl}}){{#enumCast}}){{/enumCast}};{{#exception}}
if (exceptionResult != 0) throw new CoreException("{{name}} returned value " + exceptionResult);{{/exception}}{{#hasCoreAccessor}}{{#isNotGetCore}}
}{{/isNotGetCore}}{{/hasCoreAccessor}}
}
......
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