From 07a0c183d07a80b90668bda3d6993b1d8c00b397 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 21 Jan 2013 11:29:26 +0100 Subject: [PATCH 01/13] Update ms2 submodule for TCP/TLS keepalive configuration. --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index ade529b01..622af47cb 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit ade529b01ce4d8554635781846c8dc029426b49b +Subproject commit 622af47cb2f519b832a72049ddd2fdc4ea32cce4 From 1322562fb5be74efa4cf7b29ddd702d8814f04b1 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 22 Jan 2013 12:13:21 +0100 Subject: [PATCH 02/13] Added back X264 compilation as default --- Makefile | 2 +- res/layout/main.xml | 4 ++-- src/org/linphone/LinphoneManager.java | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 48c0055f4..59bc3cf05 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ LINPHONE_VERSION=$(shell cd submodules/linphone && git describe) LINPHONE_ANDROID_DEBUG_VERSION=$(shell git describe) ANDROID_MOST_RECENT_TARGET=$(shell android list target -c | grep android | tail -n1) -BUILD_X264=0 +BUILD_X264=1 BUILD_AMRNB=full # 0, light or full BUILD_AMRWB=0 BUILD_GPLV3_ZRTP=0 diff --git a/res/layout/main.xml b/res/layout/main.xml index 42f657cea..5d2482705 100644 --- a/res/layout/main.xml +++ b/res/layout/main.xml @@ -109,7 +109,7 @@ android:layout_alignParentTop="true" android:background="@drawable/missed_calls_bg" android:gravity="center" - android:textSize="20dp" + android:textSize="20sp" android:visibility="gone" /> @@ -143,7 +143,7 @@ android:layout_alignParentTop="true" android:background="@drawable/missed_calls_bg" android:gravity="center" - android:textSize="20dp" + android:textSize="20sp" android:visibility="gone" /> diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index e158e332e..771742dbd 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -161,7 +161,6 @@ public final class LinphoneManager implements LinphoneCoreListener { videoInitiator = b; } - private LinphoneManager(final Context c, LinphoneServiceListener listener) { sExited=false; mServiceContext = c; From c89b3a8d327c485255934098d53f7056d8789848 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 23 Jan 2013 12:30:16 +0100 Subject: [PATCH 03/13] Update linphone submodule. --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 622af47cb..39bbe2656 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 622af47cb2f519b832a72049ddd2fdc4ea32cce4 +Subproject commit 39bbe2656bec0e51b8b0c7cffd92faf38de2cd7a From 9ecc101f04dfe6240401eeaf6e92175d79c2c347 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 23 Jan 2013 12:30:35 +0100 Subject: [PATCH 04/13] Prevent sending a re-invite when we have accepted a re-invite to enable/disable video. --- src/org/linphone/InCallActivity.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/org/linphone/InCallActivity.java b/src/org/linphone/InCallActivity.java index 994262ebb..5c56d344c 100644 --- a/src/org/linphone/InCallActivity.java +++ b/src/org/linphone/InCallActivity.java @@ -323,7 +323,7 @@ public class InCallActivity extends FragmentActivity implements if (id == R.id.video) { isVideoEnabled = !isVideoEnabled; - switchVideo(isVideoEnabled); + switchVideo(isVideoEnabled, true); } else if (id == R.id.micro) { toggleMicro(); @@ -386,7 +386,7 @@ public class InCallActivity extends FragmentActivity implements }); } - private void switchVideo(final boolean displayVideo) { + private void switchVideo(final boolean displayVideo, final boolean isInitiator) { final LinphoneCall call = LinphoneManager.getLc().getCalls()[0]; if (call == null) { return; @@ -396,10 +396,11 @@ public class InCallActivity extends FragmentActivity implements @Override public void run() { if (!displayVideo) { - LinphoneCallParams params = call.getCurrentParamsCopy(); - params.setVideoEnabled(false); - LinphoneManager.getLc().updateCall(call, params); - + if (isInitiator) { + LinphoneCallParams params = call.getCurrentParamsCopy(); + params.setVideoEnabled(false); + LinphoneManager.getLc().updateCall(call, params); + } showAudioView(); } else { if (!call.getRemoteParams().isLowBandwidthEnabled()) { @@ -965,7 +966,7 @@ public class InCallActivity extends FragmentActivity implements boolean isVideoEnabledInCall = call.getCurrentParamsCopy().getVideoEnabled(); if (isVideoEnabledInCall != isVideoEnabled) { isVideoEnabled = isVideoEnabledInCall; - switchVideo(isVideoEnabled); + switchVideo(isVideoEnabled, false); } // The following should not be needed except some devices need it (e.g. Galaxy S). From 9df7aba8b64778af8f1597fb3e2c8086d56e7e68 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 23 Jan 2013 12:31:31 +0100 Subject: [PATCH 05/13] Remove useless code. --- src/org/linphone/LinphoneManager.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 771742dbd..76d2615c6 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -139,7 +139,6 @@ public final class LinphoneManager implements LinphoneCoreListener { private String lastLcStatusMessage; private String basePath; private static boolean sExited; - private boolean videoInitiator = false; private WakeLock mIncallWakeLock; @@ -152,14 +151,6 @@ public final class LinphoneManager implements LinphoneCoreListener { public static void removeListener(LinphoneSimpleListener listener) { simpleListeners.remove(listener); } - - public boolean isVideoInitiator() { - return videoInitiator; - } - - public void setVideoInitiator(boolean b) { - videoInitiator = b; - } private LinphoneManager(final Context c, LinphoneServiceListener listener) { sExited=false; @@ -1254,7 +1245,6 @@ public final class LinphoneManager implements LinphoneCoreListener { public boolean addVideo() { LinphoneCall call = mLc.getCurrentCall(); enableCamera(call, true); - setVideoInitiator(true); return reinviteWithVideo(); } @@ -1415,7 +1405,6 @@ public final class LinphoneManager implements LinphoneCoreListener { public void onCallStateChanged(LinphoneCall call, State state, String message) { if (state == State.OutgoingInit || state == State.IncomingReceived) { - setVideoInitiator(state == State.OutgoingInit); boolean sendCamera = mLc.getConferenceSize() == 0; enableCamera(call, sendCamera); } From 596250313ad51b2bf31ffa03b13b589acd379abd Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 28 Jan 2013 14:14:08 +0100 Subject: [PATCH 06/13] Update linphone submodule. --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 39bbe2656..2ffe75737 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 39bbe2656bec0e51b8b0c7cffd92faf38de2cd7a +Subproject commit 2ffe75737083f1a813a54d783ab5a8ccc8f606a7 From 35728354be6dfbba0b56f119019c516412949f8d Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 29 Jan 2013 09:39:49 +0100 Subject: [PATCH 07/13] Updated russian translation thanks to Maxim Solodovnik --- res/values-RU/strings.xml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/res/values-RU/strings.xml b/res/values-RU/strings.xml index afc5572aa..46f4640d8 100755 --- a/res/values-RU/strings.xml +++ b/res/values-RU/strings.xml @@ -64,8 +64,8 @@ Положить трубку Объединить Перевести - Видео + Клавиатура Конференция @@ -259,7 +259,7 @@ В процессе регистрации Ошибка регистрации - Номер адреса + Номер или Адрес Конференция Входящий звонок Черновик @@ -321,8 +321,8 @@ Помощник Настройки учётной записи Этот помощник поможет Вам настроить учётную запись SIP для звонков. Создать учётную запись на linphone.org - У меня уже есть учётная запись на linphone.org - У меня уже есть учётная запись SIP + Существующая учётная запись на linphone.org + Существующая учётная запись SIP Введите имя пользователя и пароль учётной записи linphone.org Введите имя пользователя, пароль и сервер учётной записи SIP Применить @@ -411,7 +411,12 @@ Пользователь не найден Несовместимые параметры потока У ваш собеседника низкая скорость подключения, видео не может быть использовано + Сеть недоступна Сегодня Вчера + + Пропущенный + Исходящий + Входящий From 79a6e9c9be954781f95019a6d5996d06453a3cba Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 29 Jan 2013 13:59:07 +0100 Subject: [PATCH 08/13] Increased socket progress timeout from 1s to 5s in exosip + remove -D from Makefile --- submodules/externals/build/exosip/Android.mk | 2 -- submodules/externals/exosip | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/submodules/externals/build/exosip/Android.mk b/submodules/externals/build/exosip/Android.mk index 761e2ef2c..f218b562d 100755 --- a/submodules/externals/build/exosip/Android.mk +++ b/submodules/externals/build/exosip/Android.mk @@ -51,14 +51,12 @@ LOCAL_SRC_FILES += \ src/eXrefer_api.c \ src/jpublish.c \ src/sdp_offans.c -#SOCKET_PROGRESS_TIMEOUT=1000 to take care of edge network LOCAL_CFLAGS += \ -UHAVE_CONFIG_H \ -include $(LOCAL_PATH)/../build/exosip/libeXosip2_AndroidConfig.h \ -DOSIP_MT \ -DENABLE_TRACE \ -DSOCKET_TIMEOUT=50 \ - -DSOCKET_PROGRESS_TIMEOUT=1000 \ -include $(LOCAL_PATH)/include/eXosip2/eXosip_transport_hook.h diff --git a/submodules/externals/exosip b/submodules/externals/exosip index 73097acf6..c76a9d434 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit 73097acf6afaef4827e6fe39214e77e53a1fbfd4 +Subproject commit c76a9d4340f436d2f61f8b031d46bc511776b136 From 481790d2f9c3977d93a3773f475418ff96623eaa Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 29 Jan 2013 17:49:29 +0100 Subject: [PATCH 09/13] Exit button replaced by background mode advanced setting (back when on dialer to exit) + top bar can be scrolled again --- res/layout/status.xml | 13 ------------- res/values-FR/strings.xml | 2 ++ res/values/non_localizable_custom.xml | 2 +- res/values/non_localizable_defaults.xml | 1 + res/values/non_localizable_strings.xml | 1 + res/values/strings.xml | 2 ++ res/xml/preferences.xml | 5 +++++ src/org/linphone/LinphoneActivity.java | 11 ++++++++++- src/org/linphone/StatusFragment.java | 16 +--------------- 9 files changed, 23 insertions(+), 30 deletions(-) diff --git a/res/layout/status.xml b/res/layout/status.xml index 356aa4c41..fab32ec51 100644 --- a/res/layout/status.xml +++ b/res/layout/status.xml @@ -216,19 +216,6 @@ android:adjustViewBounds="true" android:visibility="gone" android:layout_alignParentRight="true" /> - - diff --git a/res/values-FR/strings.xml b/res/values-FR/strings.xml index 592f64ae7..172868bc6 100644 --- a/res/values-FR/strings.xml +++ b/res/values-FR/strings.xml @@ -372,4 +372,6 @@ Manqué Émis Reçu + + Actif en arrière plan diff --git a/res/values/non_localizable_custom.xml b/res/values/non_localizable_custom.xml index ca264ee07..96e14b649 100644 --- a/res/values/non_localizable_custom.xml +++ b/res/values/non_localizable_custom.xml @@ -32,7 +32,7 @@ false true - true + false true true true diff --git a/res/values/non_localizable_defaults.xml b/res/values/non_localizable_defaults.xml index c74e03e9b..0f9820618 100644 --- a/res/values/non_localizable_defaults.xml +++ b/res/values/non_localizable_defaults.xml @@ -61,4 +61,5 @@ false true + true \ No newline at end of file diff --git a/res/values/non_localizable_strings.xml b/res/values/non_localizable_strings.xml index 78ed6a0bc..71b2c25e0 100644 --- a/res/values/non_localizable_strings.xml +++ b/res/values/non_localizable_strings.xml @@ -92,6 +92,7 @@ none srtp zrtp + pref_background_mode_key push_reg_id_key push_sender_id_key diff --git a/res/values/strings.xml b/res/values/strings.xml index 7a16ad8eb..e27b7bf64 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -419,4 +419,6 @@ Missed Outgoing Incoming + + Background mode diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index e75359ed2..6977ce381 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -283,6 +283,11 @@ android:title="@string/pref_debug" android:defaultValue="@bool/pref_debug_default"/> + + 0) { @@ -1360,7 +1365,11 @@ public class LinphoneActivity extends FragmentActivity implements public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { if (currentFragment == FragmentsAvailable.DIALER) { - if (LinphoneUtils.onKeyBackGoHome(this, keyCode, event)) { + boolean isBackgroundModeActive = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(getString(R.string.pref_background_mode_key), getResources().getBoolean(R.bool.pref_background_mode_default)); + if (!isBackgroundModeActive) { + stopService(new Intent(Intent.ACTION_MAIN).setClass(this, LinphoneService.class)); + finish(); + } else if (LinphoneUtils.onKeyBackGoHome(this, keyCode, event)) { return true; } } else if (!isTablet()) { diff --git a/src/org/linphone/StatusFragment.java b/src/org/linphone/StatusFragment.java index 77a4dc801..52f7d94a1 100644 --- a/src/org/linphone/StatusFragment.java +++ b/src/org/linphone/StatusFragment.java @@ -43,7 +43,6 @@ import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.view.Gravity; import android.view.LayoutInflater; -import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; @@ -61,7 +60,7 @@ import android.widget.Toast; public class StatusFragment extends Fragment { private Handler mHandler = new Handler(); private Handler refreshHandler = new Handler(); - private TextView statusText, exit; + private TextView statusText; private ImageView statusLed, callQuality, encryption, background; private ListView sliderContentAccounts; private TableLayout callStats; @@ -98,17 +97,6 @@ public class StatusFragment extends Fragment { }); sliderContentAccounts = (ListView) view.findViewById(R.id.accounts); - - exit = (TextView) view.findViewById(R.id.exit); - exit.setOnTouchListener(new View.OnTouchListener() { - @Override - public boolean onTouch(View v, MotionEvent event) { - if (LinphoneActivity.isInstanciated()) { - LinphoneActivity.instance().exit(); - } - return true; - } - }); // We create it once to not delay the first display populateSliderContent(); @@ -330,7 +318,6 @@ public class StatusFragment extends Fragment { refreshStatusItems(call, call.getCurrentParamsCopy().getVideoEnabled()); } - exit.setVisibility(View.GONE); statusText.setVisibility(View.GONE); encryption.setVisibility(View.VISIBLE); @@ -338,7 +325,6 @@ public class StatusFragment extends Fragment { statusLed.setImageResource(R.drawable.led_connected); statusText.setText(getString(R.string.status_connected)); } else { - exit.setVisibility(View.VISIBLE); statusText.setVisibility(View.VISIBLE); background.setVisibility(View.VISIBLE); encryption.setVisibility(View.GONE); From cb1c4b791ad8024439d6d8c0bd0b0204bd8d8ec6 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 30 Jan 2013 09:18:30 +0100 Subject: [PATCH 10/13] Updated Russian translation thanks to Maxim Solodovnik --- res/values-RU/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/res/values-RU/strings.xml b/res/values-RU/strings.xml index 46f4640d8..8e399dde9 100755 --- a/res/values-RU/strings.xml +++ b/res/values-RU/strings.xml @@ -321,8 +321,8 @@ Помощник Настройки учётной записи Этот помощник поможет Вам настроить учётную запись SIP для звонков. Создать учётную запись на linphone.org - Существующая учётная запись на linphone.org - Существующая учётная запись SIP + Уже есть учётная запись на linphone.org + Уже есть учётная запись SIP Введите имя пользователя и пароль учётной записи linphone.org Введите имя пользователя, пароль и сервер учётной записи SIP Применить @@ -419,4 +419,6 @@ Пропущенный Исходящий Входящий + + Фоновый режим From e3bb3b72e18f1df14f00fe7bddd9e531166bf38a Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 30 Jan 2013 13:56:35 +0100 Subject: [PATCH 11/13] fix incorrect state name update linphone submodule --- src/org/linphone/LinphoneUtils.java | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/linphone/LinphoneUtils.java b/src/org/linphone/LinphoneUtils.java index ed4b7911e..822a3fbe7 100644 --- a/src/org/linphone/LinphoneUtils.java +++ b/src/org/linphone/LinphoneUtils.java @@ -262,7 +262,7 @@ public final class LinphoneUtils { LinphoneCall.State state = call.getState(); return state == LinphoneCall.State.Connected || - state == LinphoneCall.State.CallUpdated || + state == LinphoneCall.State.CallUpdating || state == LinphoneCall.State.CallUpdatedByRemote || state == LinphoneCall.State.StreamsRunning || state == LinphoneCall.State.Resuming; diff --git a/submodules/linphone b/submodules/linphone index 2ffe75737..77a03fbdb 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 2ffe75737083f1a813a54d783ab5a8ccc8f606a7 +Subproject commit 77a03fbdb1ee31de5203aced075271ed0f9273c7 From fedf522fcdd54eb8575e06ee45da9f74a98d42d0 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 31 Jan 2013 11:53:44 +0100 Subject: [PATCH 12/13] Fix account list in status bar when at least one is disabled --- src/org/linphone/StatusFragment.java | 61 ++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/src/org/linphone/StatusFragment.java b/src/org/linphone/StatusFragment.java index 52f7d94a1..8f27c5e3b 100644 --- a/src/org/linphone/StatusFragment.java +++ b/src/org/linphone/StatusFragment.java @@ -540,8 +540,30 @@ public class StatusFragment extends Fragment { CheckBox checkBox = (CheckBox) v; if (checkBox.isChecked()) { SharedPreferences.Editor editor = prefs.edit(); - int selectedPosition = (Integer) checkBox.getTag(); - editor.putInt(getString(R.string.pref_default_account_key), selectedPosition); + String tag = (String) checkBox.getTag(); + String sipAddress = tag.split(":")[0]; + int accountPosition = Integer.parseInt(tag.split(":")[1]); + + int nbAccounts = prefs.getInt(getString(R.string.pref_extra_accounts), 0); + int accountIndex = 0; + for (int i = 0; i < nbAccounts; i++) + { + String keyUsername = getString(R.string.pref_username_key); + String keyDomain = getString(R.string.pref_domain_key); + if (i > 0) { + keyUsername += i + ""; + keyDomain += i + ""; + } + String username = prefs.getString(keyUsername, ""); + String domain = prefs.getString(keyDomain, ""); + String identity = username + "@" + domain; + if (identity.equals(sipAddress)) { + accountIndex = i; + break; + } + } + + editor.putInt(getString(R.string.pref_default_account_key), accountIndex); editor.commit(); for (CheckBox cb : checkboxes) { @@ -552,7 +574,7 @@ public class StatusFragment extends Fragment { checkBox.setEnabled(false); LinphoneCore lc = LinphoneManager.getLc(); - lc.setDefaultProxyConfig((LinphoneProxyConfig) getItem(selectedPosition)); + lc.setDefaultProxyConfig((LinphoneProxyConfig) getItem(accountPosition)); if (lc.isNetworkReachable()) { lc.refreshRegisters(); } @@ -602,17 +624,40 @@ public class StatusFragment extends Fragment { CheckBox isDefault = (CheckBox) view.findViewById(R.id.Default); checkboxes.add(isDefault); - isDefault.setTag(position); + isDefault.setTag(sipAddress + ":" + position); isDefault.setChecked(false); isDefault.setEnabled(true); - if (prefs != null && prefs.getInt(getString(R.string.pref_default_account_key), 0) == position) { - isDefault.setChecked(true); - isDefault.setEnabled(false); - status.setImageResource(getStatusIconResource(lpc.getState(), true)); + if (prefs != null) { + int nbAccounts = prefs.getInt(getString(R.string.pref_extra_accounts), 0); + int accountIndex = 0; + for (int i = 0; i < nbAccounts; i++) + { + String keyUsername = getString(R.string.pref_username_key); + String keyDomain = getString(R.string.pref_domain_key); + if (i > 0) { + keyUsername += i + ""; + keyDomain += i + ""; + } + String username = prefs.getString(keyUsername, ""); + String domain = prefs.getString(keyDomain, ""); + String id = username + "@" + domain; + if (id.equals(sipAddress)) { + accountIndex = i; + break; + } + } + if (prefs.getInt(getString(R.string.pref_default_account_key), 0) == accountIndex) { + isDefault.setChecked(true); + isDefault.setEnabled(false); + status.setImageResource(getStatusIconResource(lpc.getState(), true)); + } else { + status.setImageResource(getStatusIconResource(lpc.getState(), false)); + } } else { status.setImageResource(getStatusIconResource(lpc.getState(), false)); } + isDefault.setOnClickListener(defaultListener); return view; From 2f6a101e54f6df39857196012d67d60b40ed0ce1 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 5 Feb 2013 10:04:00 +0100 Subject: [PATCH 13/13] Add xml2lpc/lpc2xml support and remote provisioning --- .gitmodules | 3 + Makefile | 3 +- custom_rules.xml | 15 + default.properties | 1 + jni/Android.mk | 4 + jni/Application.mk | 5 + project.properties | 2 +- res/values/non_localizable_defaults.xml | 1 + res/values/non_localizable_strings.xml | 1 + res/values/strings.xml | 1 + res/xml/preferences.xml | 5 + src/org/linphone/LinphoneManager.java | 15 +- src/org/linphone/RemoteProvisioning.java | 112 +++++ submodules/externals/build/libxml2/Android.mk | 68 +++ submodules/externals/build/libxml2/config.h | 311 ++++++++++++ .../build/libxml2/libxml/xmlversion.h | 476 ++++++++++++++++++ submodules/externals/libxml2 | 1 + submodules/linphone | 2 +- 18 files changed, 1022 insertions(+), 4 deletions(-) create mode 100644 src/org/linphone/RemoteProvisioning.java create mode 100644 submodules/externals/build/libxml2/Android.mk create mode 100644 submodules/externals/build/libxml2/config.h create mode 100644 submodules/externals/build/libxml2/libxml/xmlversion.h create mode 160000 submodules/externals/libxml2 diff --git a/.gitmodules b/.gitmodules index a21a0a5c3..1067b54f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,3 +58,6 @@ [submodule "submodules/externals/webrtc"] path = submodules/externals/webrtc url = git://git.linphone.org/webrtc.git +[submodule "submodules/externals/libxml2"] + path = submodules/externals/libxml2 + url = git://git.gnome.org/libxml2 diff --git a/Makefile b/Makefile index 59bc3cf05..e557ad0b6 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ LINPHONE_VERSION=$(shell cd submodules/linphone && git describe) LINPHONE_ANDROID_DEBUG_VERSION=$(shell git describe) ANDROID_MOST_RECENT_TARGET=$(shell android list target -c | grep android | tail -n1) +BUILD_REMOTE_PROVISIONING=1 BUILD_X264=1 BUILD_AMRNB=full # 0, light or full BUILD_AMRWB=0 @@ -87,7 +88,7 @@ prepare-mediastreamer2: prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-srtp prepare-mediastreamer2 generate-libs: - $(NDK_PATH)/ndk-build LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_X264=$(BUILD_X264) BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_FOR_X86=$(BUILD_FOR_X86) USE_JAVAH=$(USE_JAVAH) -j$(NUMCPUS) + $(NDK_PATH)/ndk-build LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_REMOTE_PROVISIONING=$(BUILD_REMOTE_PROVISIONING) BUILD_X264=$(BUILD_X264) BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_FOR_X86=$(BUILD_FOR_X86) USE_JAVAH=$(USE_JAVAH) -j$(NUMCPUS) update-project: $(SDK_PATH)/android update project --path . --target $(ANDROID_MOST_RECENT_TARGET) diff --git a/custom_rules.xml b/custom_rules.xml index 20abc8648..cda9d1e46 100644 --- a/custom_rules.xml +++ b/custom_rules.xml @@ -6,6 +6,9 @@ + @@ -35,6 +38,18 @@ + + + + + + + + + + + + diff --git a/default.properties b/default.properties index e69de29bb..a4c4c0dea 100644 --- a/default.properties +++ b/default.properties @@ -0,0 +1 @@ +version.name=1.2.2.2-822-gfedf522 diff --git a/jni/Android.mk b/jni/Android.mk index 300f025e0..5b86fbfa3 100755 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -36,6 +36,10 @@ SRTP_C_INCLUDE= \ endif #endif +#libxml2 +ifeq ($(BUILD_REMOTE_PROVISIONING),1) +include $(linphone-root-dir)/submodules/externals/build/libxml2/Android.mk +endif # Speex ifeq ($(wildcard $(linphone-root-dir)/submodules/externals/prebuilts/speex.mk),) diff --git a/jni/Application.mk b/jni/Application.mk index 224f4faa8..44edcd6af 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -2,6 +2,11 @@ APP_PROJECT_PATH := $(call my-dir)/../ APP_MODULES :=libspeex libgsm libortp libosip2 libeXosip2 libmediastreamer2 liblinphone liblinphonenoneon libneon APP_STL := stlport_static +#remote provisioning +ifeq ($(BUILD_REMOTE_PROVISIONING),1) +APP_MODULES += libxml2 libxml2lpc liblpc2xml +endif + #default values ifeq ($(BUILD_AMRNB),) BUILD_AMRNB=light diff --git a/project.properties b/project.properties index 6eb97abcb..019cc5583 100644 --- a/project.properties +++ b/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-16 +target=android-17 android.library=false diff --git a/res/values/non_localizable_defaults.xml b/res/values/non_localizable_defaults.xml index 0f9820618..5af444e96 100644 --- a/res/values/non_localizable_defaults.xml +++ b/res/values/non_localizable_defaults.xml @@ -51,6 +51,7 @@ false 30 https://www.linphone.org:444/upload.php + 0 3600 Linphone Android diff --git a/res/values/non_localizable_strings.xml b/res/values/non_localizable_strings.xml index 71b2c25e0..cf20690e0 100644 --- a/res/values/non_localizable_strings.xml +++ b/res/values/non_localizable_strings.xml @@ -100,6 +100,7 @@ pref_auto_accept_friends_key pref_image_sharing_server_key + pref_remote_provisioning_key pref_video_port_key pref_audio_port_key diff --git a/res/values/strings.xml b/res/values/strings.xml index e27b7bf64..26560350a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -392,6 +392,7 @@ wants to share it\'s presence status with you and be aware of yours. Echo canceller calibration in progress Sharing server + Remote provisioning Delete contact SIP address diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 6977ce381..16c231ede 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -315,6 +315,11 @@ android:title="@string/pref_image_sharing_server_title" android:defaultValue="@string/pref_image_sharing_server_default" /> + + diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 76d2615c6..4eed24eb2 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -157,6 +157,7 @@ public final class LinphoneManager implements LinphoneCoreListener { mServiceContext = c; mListenerDispatcher = new ListenerDispatcher(listener); basePath = c.getFilesDir().getAbsolutePath(); + mLPConfigXsd = basePath + "/lpconfig.xsd"; mLinphoneInitialConfigFile = basePath + "/linphonerc"; mLinphoneConfigFile = basePath + "/.linphonerc"; mLinphoneRootCaFile = basePath + "/rootca.pem"; @@ -176,6 +177,7 @@ public final class LinphoneManager implements LinphoneCoreListener { private static final int LINPHONE_VOLUME_STREAM = STREAM_VOICE_CALL; private static final int dbStep = 4; /** Called when the activity is first created. */ + private final String mLPConfigXsd; private final String mLinphoneInitialConfigFile; private final String mLinphoneRootCaFile; private final String mLinphoneConfigFile; @@ -245,6 +247,10 @@ public final class LinphoneManager implements LinphoneCoreListener { public static synchronized final LinphoneCore getLc() { return getInstance().mLc; } + + public String getLPConfigXsdPath() { + return mLPConfigXsd; + } public void newOutgoingCall(AddressType address) { String to = address.getText().toString(); @@ -407,9 +413,15 @@ public final class LinphoneManager implements LinphoneCoreListener { copyAssetsFromPackage(); //traces alway start with traces enable to not missed first initialization - boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && getPrefBoolean(R.string.pref_debug_key, mR.getBoolean(R.bool.pref_debug_default)); + boolean isDebugLogEnabled = true;//!(mR.getBoolean(R.bool.disable_every_log)) && getPrefBoolean(R.string.pref_debug_key, mR.getBoolean(R.bool.pref_debug_default)); LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name)); + // Try to get remote provisioning + String remote_provisioning = (getPrefString(R.string.pref_remote_provisioning_key, mR.getString(R.string.pref_remote_provisioning_default))); + if(remote_provisioning != null && remote_provisioning.length() > 0 && RemoteProvisioning.isAvailable()) { + RemoteProvisioning.download(remote_provisioning, mLinphoneConfigFile); + } + mLc = LinphoneCoreFactory.instance().createLinphoneCore(this, mLinphoneConfigFile, mLinphoneInitialConfigFile, null); mLc.getConfig().setInt("sip", "store_auth_info", 0); mLc.setContext(c); @@ -462,6 +474,7 @@ public final class LinphoneManager implements LinphoneCoreListener { copyIfNotExist(R.raw.ringback,mRingbackSoundFile); copyIfNotExist(R.raw.toy_mono,mPauseSoundFile); copyFromPackage(R.raw.linphonerc, new File(mLinphoneInitialConfigFile).getName()); + copyIfNotExist(R.raw.lpconfig, new File(mLPConfigXsd).getName()); copyIfNotExist(R.raw.rootca, new File(mLinphoneRootCaFile).getName()); } private void copyIfNotExist(int ressourceId,String target) throws IOException { diff --git a/src/org/linphone/RemoteProvisioning.java b/src/org/linphone/RemoteProvisioning.java new file mode 100644 index 000000000..44cc2f48e --- /dev/null +++ b/src/org/linphone/RemoteProvisioning.java @@ -0,0 +1,112 @@ +package org.linphone; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; + +import org.linphone.core.LinphoneCoreFactory; +import org.linphone.core.LpConfig; +import org.linphone.mediastream.Log; +import org.linphone.tools.Xml2Lpc; + + + +public class RemoteProvisioning { + static private class RemoteProvisioningThread extends Thread { + String mRPAddress; + String mSchema; + String mLocalLP; + + public RemoteProvisioningThread(final String RPAddress, final String LocalLP, final String schema) { + this.mRPAddress = RPAddress; + this.mLocalLP = LocalLP; + this.mSchema = schema; + } + + public void run() { + try { + Log.i("Download remote provisioning file from " + mRPAddress); + URL url = new URL(mRPAddress); + URLConnection ucon = url.openConnection(); + InputStream is = ucon.getInputStream(); + BufferedInputStream bis = new BufferedInputStream(is); + byte[] contents = new byte[1024]; + + int bytesRead = 0; + String strFileContents = ""; + while( (bytesRead = bis.read(contents)) != -1){ + strFileContents = new String(contents, 0, bytesRead); + } + Log.i("Download Success"); + + // Initialize converter + LpConfig lp = LinphoneCoreFactory.instance().createLpConfig(mLocalLP); + Xml2Lpc x2l = new Xml2Lpc(); + if(x2l.setXmlString(strFileContents) != 0) { + Log.e("Error during remote provisioning file parsing"); + return; + } + + // Check if needed + if(mSchema != null) { + if(x2l.setXsdFile(mSchema) != 0) { + Log.e("Error during schema file parsing"); + } + if(x2l.validate() != 0) { + Log.e("Can't validate the schema of remote provisioning file"); + return; + } + } + + // Convert + if(x2l.convert(lp) != 0) { + Log.e("Can't convert remote provisioning file to LinphoneConfig"); + return; + } + Log.i("Remote provisioning ok"); + } catch (MalformedURLException e) { + Log.e("Invalid remote provisioning url: " + e.getLocalizedMessage()); + } catch (IOException e) { + Log.e(e); + } finally { + synchronized(this) { + this.notify(); + } + } + } + }; + + static void download(String address, String lpfile, boolean check) { + try { + String schema = null; + if(check) { + schema = LinphoneManager.getInstance().getLPConfigXsdPath(); + } + RemoteProvisioningThread thread = new RemoteProvisioningThread(address, lpfile, schema); + synchronized(thread) { + thread.start(); + thread.wait(); + } + } catch (InterruptedException e) { + Log.e(e); + } + } + + static void download(String address, String lpfile) { + download(address, lpfile, true); + } + + static boolean isAvailable() { + if(Xml2Lpc.isAvailable()) { + Log.i("RemoteProvisioning is available"); + return true; + } else { + Log.i("RemoteProvisioning is NOT available"); + return false; + } + } + +} diff --git a/submodules/externals/build/libxml2/Android.mk b/submodules/externals/build/libxml2/Android.mk new file mode 100644 index 000000000..98ea6d108 --- /dev/null +++ b/submodules/externals/build/libxml2/Android.mk @@ -0,0 +1,68 @@ +LOCAL_PATH:= $(call my-dir)/../../libxml2 + +# We need to build this for both the device (as a shared library) +# and the host (as a static library for tools to use). + +common_SRC_FILES := \ + SAX.c \ + entities.c \ + encoding.c \ + error.c \ + parserInternals.c \ + parser.c \ + tree.c \ + hash.c \ + list.c \ + xmlIO.c \ + xmlmemory.c \ + uri.c \ + valid.c \ + xlink.c \ + HTMLparser.c \ + HTMLtree.c \ + debugXML.c \ + xpath.c \ + xpointer.c \ + xinclude.c \ + nanohttp.c \ + nanoftp.c \ + DOCBparser.c \ + catalog.c \ + globals.c \ + threads.c \ + c14n.c \ + xmlstring.c \ + xmlregexp.c \ + xmlschemas.c \ + xmlschemastypes.c \ + xmlunicode.c \ + xmlreader.c \ + relaxng.c \ + dict.c \ + SAX2.c \ + legacy.c \ + chvalid.c \ + pattern.c \ + xmlsave.c \ + xmlmodule.c \ + xmlwriter.c \ + schematron.c + +common_C_INCLUDES += \ + $(LOCAL_PATH)/include \ + $(LOCAL_PATH)/../build/libxml2 \ + +# For the device +# ===================================================== + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(common_SRC_FILES) +LOCAL_C_INCLUDES += $(common_C_INCLUDES) +LOCAL_SHARED_LIBRARIES += $(common_SHARED_LIBRARIES) +#LOCAL_CFLAGS += -fvisibility=hidden + +LOCAL_MODULE:= libxml2 + +include $(BUILD_SHARED_LIBRARY) + diff --git a/submodules/externals/build/libxml2/config.h b/submodules/externals/build/libxml2/config.h new file mode 100644 index 000000000..c70d020ac --- /dev/null +++ b/submodules/externals/build/libxml2/config.h @@ -0,0 +1,311 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ANSIDECL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_H 1 + +/* Whether struct sockaddr::__ss_family exists */ +/* #undef HAVE_BROKEN_SS_FAMILY */ + +/* Define to 1 if you have the `class' function. */ +/* #undef HAVE_CLASS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CTYPE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Have dlopen based dso */ +#define HAVE_DLOPEN /**/ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `finite' function. */ +#define HAVE_FINITE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOAT_H 1 + +/* Define to 1 if you have the `fpclass' function. */ +/* #undef HAVE_FPCLASS */ + +/* Define to 1 if you have the `fprintf' function. */ +#define HAVE_FPRINTF 1 + +/* Define to 1 if you have the `fp_class' function. */ +/* #undef HAVE_FP_CLASS */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FP_CLASS_H */ + +/* Define to 1 if you have the `ftime' function. */ +#define HAVE_FTIME 1 + +/* Define if getaddrinfo is there */ +/* #undef HAVE_GETADDRINFO */ + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IEEEFP_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INTTYPES_H_H */ + +/* Define if isinf is there */ +#define HAVE_ISINF /**/ + +/* Define if isnan is there */ +#define HAVE_ISNAN /**/ + +/* Define to 1 if you have the `isnand' function. */ +/* #undef HAVE_ISNAND */ + +/* Define if history library is there (-lhistory) */ +/* #undef HAVE_LIBHISTORY */ + +/* Have compression library */ +/* #undef HAVE_LIBLZMA */ + +/* Define if pthread library is there (-lpthread) */ +/* #undef HAVE_LIBPTHREAD */ + +/* Define if readline library is there (-lreadline) */ +/* #undef HAVE_LIBREADLINE */ + +/* Have compression library */ +/* #undef HAVE_LIBZ */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the `localtime' function. */ +#define HAVE_LOCALTIME 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LZMA_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H 1 Already defined in AndroidConfig.h */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MATH_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NAN_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `printf' function. */ +#define HAVE_PRINTF 1 + +/* Define if is there */ +/* #undef HAVE_PTHREAD_H */ + +/* Define to 1 if you have the `rand' function. */ +#define HAVE_RAND 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RESOLV_H 1 + +/* Have shl_load based dso */ +/* #undef HAVE_SHLLOAD */ + +/* Define to 1 if you have the `signal' function. */ +#define HAVE_SIGNAL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `sprintf' function. */ +#define HAVE_SPRINTF 1 + +/* Define to 1 if you have the `srand' function. */ +#define HAVE_SRAND 1 + +/* Define to 1 if you have the `sscanf' function. */ +#define HAVE_SSCANF 1 + +/* Define to 1 if you have the `stat' function. */ +#define HAVE_STAT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strndup' function. */ +#define HAVE_STRNDUP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMEB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `time' function. */ +#define HAVE_TIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Whether va_copy() is available */ +#define HAVE_VA_COPY 1 + +/* Define to 1 if you have the `vfprintf' function. */ +#define HAVE_VFPRINTF 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* Define to 1 if you have the `vsprintf' function. */ +#define HAVE_VSPRINTF 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ZLIB_H */ + +/* Define to 1 if you have the `_stat' function. */ +/* #undef HAVE__STAT */ + +/* Whether __va_copy() is available */ +/* #undef HAVE___VA_COPY */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libxml2" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define to 1 if the C compiler supports function prototypes. */ +#define PROTOTYPES 1 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Support for IPv6 */ +/* #undef SUPPORT_IP6 */ + +/* Version number of package */ +#define VERSION "2.7.8" + +/* Determine what socket length (socklen_t) data type is */ +#define XML_SOCKLEN_T socklen_t + +/* Using the Win32 Socket implementation */ +/* #undef _WINSOCKAPI_ */ + +/* Define like PROTOTYPES; this can be used by system headers. */ +#define __PROTOTYPES 1 + +/* Win32 Std C name mangling work-around */ +/* #undef snprintf */ + +/* ss_family is not defined here, use __ss_family instead */ +/* #undef ss_family */ + +/* Win32 Std C name mangling work-around */ +/* #undef vsnprintf */ diff --git a/submodules/externals/build/libxml2/libxml/xmlversion.h b/submodules/externals/build/libxml2/libxml/xmlversion.h new file mode 100644 index 000000000..c44433755 --- /dev/null +++ b/submodules/externals/build/libxml2/libxml/xmlversion.h @@ -0,0 +1,476 @@ +/* + * Summary: compile-time version informations + * Description: compile-time version informations for the XML library + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_VERSION_H__ +#define __XML_VERSION_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * use those to be sure nothing nasty will happen if + * your library and includes mismatch + */ +#ifndef LIBXML2_COMPILING_MSCCDEF +XMLPUBFUN void XMLCALL xmlCheckVersion(int version); +#endif /* LIBXML2_COMPILING_MSCCDEF */ + +/** + * LIBXML_DOTTED_VERSION: + * + * the version string like "1.2.3" + */ +#define LIBXML_DOTTED_VERSION "2.8.0" + +/** + * LIBXML_VERSION: + * + * the version number: 1.2.3 value is 10203 + */ +#define LIBXML_VERSION 20800 + +/** + * LIBXML_VERSION_STRING: + * + * the version number string, 1.2.3 value is "10203" + */ +#define LIBXML_VERSION_STRING "20800" + +/** + * LIBXML_VERSION_EXTRA: + * + * extra version information, used to show a CVS compilation + */ +#define LIBXML_VERSION_EXTRA "-GITv2.8.0" + +/** + * LIBXML_TEST_VERSION: + * + * Macro to check that the libxml version in use is compatible with + * the version the software has been compiled against + */ +#define LIBXML_TEST_VERSION xmlCheckVersion(20800); + +#ifndef VMS +#if 0 +/** + * WITH_TRIO: + * + * defined if the trio support need to be configured in + */ +#define WITH_TRIO +#else +/** + * WITHOUT_TRIO: + * + * defined if the trio support should not be configured in + */ +#define WITHOUT_TRIO +#endif +#else /* VMS */ +/** + * WITH_TRIO: + * + * defined if the trio support need to be configured in + */ +#define WITH_TRIO 1 +#endif /* VMS */ + +/** + * LIBXML_THREAD_ENABLED: + * + * Whether the thread support is configured in + */ +#if 1 +#if defined(_REENTRANT) || defined(__MT__) || \ + (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L)) +#define LIBXML_THREAD_ENABLED +#endif +#endif + +/** + * LIBXML_TREE_ENABLED: + * + * Whether the DOM like tree manipulation API support is configured in + */ +#if 1 +#define LIBXML_TREE_ENABLED +#endif + +/** + * LIBXML_OUTPUT_ENABLED: + * + * Whether the serialization/saving support is configured in + */ +#if 1 +#define LIBXML_OUTPUT_ENABLED +#endif + +/** + * LIBXML_PUSH_ENABLED: + * + * Whether the push parsing interfaces are configured in + */ +#if 1 +#define LIBXML_PUSH_ENABLED +#endif + +/** + * LIBXML_READER_ENABLED: + * + * Whether the xmlReader parsing interface is configured in + */ +#if 1 +#define LIBXML_READER_ENABLED +#endif + +/** + * LIBXML_PATTERN_ENABLED: + * + * Whether the xmlPattern node selection interface is configured in + */ +#if 1 +#define LIBXML_PATTERN_ENABLED +#endif + +/** + * LIBXML_WRITER_ENABLED: + * + * Whether the xmlWriter saving interface is configured in + */ +#if 1 +#define LIBXML_WRITER_ENABLED +#endif + +/** + * LIBXML_SAX1_ENABLED: + * + * Whether the older SAX1 interface is configured in + */ +#if 1 +#define LIBXML_SAX1_ENABLED +#endif + +/** + * LIBXML_FTP_ENABLED: + * + * Whether the FTP support is configured in + */ +#if 1 +#define LIBXML_FTP_ENABLED +#endif + +/** + * LIBXML_HTTP_ENABLED: + * + * Whether the HTTP support is configured in + */ +#if 1 +#define LIBXML_HTTP_ENABLED +#endif + +/** + * LIBXML_VALID_ENABLED: + * + * Whether the DTD validation support is configured in + */ +#if 1 +#define LIBXML_VALID_ENABLED +#endif + +/** + * LIBXML_HTML_ENABLED: + * + * Whether the HTML support is configured in + */ +#if 1 +#define LIBXML_HTML_ENABLED +#endif + +/** + * LIBXML_LEGACY_ENABLED: + * + * Whether the deprecated APIs are compiled in for compatibility + */ +#if 1 +#define LIBXML_LEGACY_ENABLED +#endif + +/** + * LIBXML_C14N_ENABLED: + * + * Whether the Canonicalization support is configured in + */ +#if 1 +#define LIBXML_C14N_ENABLED +#endif + +/** + * LIBXML_CATALOG_ENABLED: + * + * Whether the Catalog support is configured in + */ +#if 1 +#define LIBXML_CATALOG_ENABLED +#endif + +/** + * LIBXML_DOCB_ENABLED: + * + * Whether the SGML Docbook support is configured in + */ +#if 1 +#define LIBXML_DOCB_ENABLED +#endif + +/** + * LIBXML_XPATH_ENABLED: + * + * Whether XPath is configured in + */ +#if 1 +#define LIBXML_XPATH_ENABLED +#endif + +/** + * LIBXML_XPTR_ENABLED: + * + * Whether XPointer is configured in + */ +#if 1 +#define LIBXML_XPTR_ENABLED +#endif + +/** + * LIBXML_XINCLUDE_ENABLED: + * + * Whether XInclude is configured in + */ +#if 1 +#define LIBXML_XINCLUDE_ENABLED +#endif + +/** + * LIBXML_ICONV_ENABLED: + * + * Whether iconv support is available + */ +#if 0 +#define LIBXML_ICONV_ENABLED +#endif + +/** + * LIBXML_ICU_ENABLED: + * + * Whether icu support is available + */ +#if 0 +#define LIBXML_ICU_ENABLED +#endif + +/** + * LIBXML_ISO8859X_ENABLED: + * + * Whether ISO-8859-* support is made available in case iconv is not + */ +#if 1 +#define LIBXML_ISO8859X_ENABLED +#endif + +/** + * LIBXML_DEBUG_ENABLED: + * + * Whether Debugging module is configured in + */ +#if 1 +#define LIBXML_DEBUG_ENABLED +#endif + +/** + * DEBUG_MEMORY_LOCATION: + * + * Whether the memory debugging is configured in + */ +#if 0 +#define DEBUG_MEMORY_LOCATION +#endif + +/** + * LIBXML_DEBUG_RUNTIME: + * + * Whether the runtime debugging is configured in + */ +#if 0 +#define LIBXML_DEBUG_RUNTIME +#endif + +/** + * LIBXML_UNICODE_ENABLED: + * + * Whether the Unicode related interfaces are compiled in + */ +#if 1 +#define LIBXML_UNICODE_ENABLED +#endif + +/** + * LIBXML_REGEXP_ENABLED: + * + * Whether the regular expressions interfaces are compiled in + */ +#if 1 +#define LIBXML_REGEXP_ENABLED +#endif + +/** + * LIBXML_AUTOMATA_ENABLED: + * + * Whether the automata interfaces are compiled in + */ +#if 1 +#define LIBXML_AUTOMATA_ENABLED +#endif + +/** + * LIBXML_EXPR_ENABLED: + * + * Whether the formal expressions interfaces are compiled in + */ +#if 1 +#define LIBXML_EXPR_ENABLED +#endif + +/** + * LIBXML_SCHEMAS_ENABLED: + * + * Whether the Schemas validation interfaces are compiled in + */ +#if 1 +#define LIBXML_SCHEMAS_ENABLED +#endif + +/** + * LIBXML_SCHEMATRON_ENABLED: + * + * Whether the Schematron validation interfaces are compiled in + */ +#if 1 +#define LIBXML_SCHEMATRON_ENABLED +#endif + +/** + * LIBXML_MODULES_ENABLED: + * + * Whether the module interfaces are compiled in + */ +#if 1 +#define LIBXML_MODULES_ENABLED +/** + * LIBXML_MODULE_EXTENSION: + * + * the string suffix used by dynamic modules (usually shared libraries) + */ +#define LIBXML_MODULE_EXTENSION ".so" +#endif + +/** + * LIBXML_ZLIB_ENABLED: + * + * Whether the Zlib support is compiled in + */ +#if 1 +#define LIBXML_ZLIB_ENABLED +#endif + +/** + * LIBXML_LZMA_ENABLED: + * + * Whether the Lzma support is compiled in + */ +#if 0 +#define LIBXML_LZMA_ENABLED +#endif + +#ifdef __GNUC__ +#ifdef HAVE_ANSIDECL_H +#include +#endif + +/** + * ATTRIBUTE_UNUSED: + * + * Macro used to signal to GCC unused function parameters + */ + +#ifndef ATTRIBUTE_UNUSED +#define ATTRIBUTE_UNUSED __attribute__((unused)) +#endif + +/** + * LIBXML_ATTR_ALLOC_SIZE: + * + * Macro used to indicate to GCC this is an allocator function + */ + +#ifndef LIBXML_ATTR_ALLOC_SIZE +# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) +# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) +# else +# define LIBXML_ATTR_ALLOC_SIZE(x) +# endif +#else +# define LIBXML_ATTR_ALLOC_SIZE(x) +#endif + +/** + * LIBXML_ATTR_FORMAT: + * + * Macro used to indicate to GCC the parameter are printf like + */ + +#ifndef LIBXML_ATTR_FORMAT +# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) +# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) +# else +# define LIBXML_ATTR_FORMAT(fmt,args) +# endif +#else +# define LIBXML_ATTR_FORMAT(fmt,args) +#endif + +#else /* ! __GNUC__ */ +/** + * ATTRIBUTE_UNUSED: + * + * Macro used to signal to GCC unused function parameters + */ +#define ATTRIBUTE_UNUSED +/** + * LIBXML_ATTR_ALLOC_SIZE: + * + * Macro used to indicate to GCC this is an allocator function + */ +#define LIBXML_ATTR_ALLOC_SIZE(x) +/** + * LIBXML_ATTR_FORMAT: + * + * Macro used to indicate to GCC the parameter are printf like + */ +#define LIBXML_ATTR_FORMAT(fmt,args) +#endif /* __GNUC__ */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif + + diff --git a/submodules/externals/libxml2 b/submodules/externals/libxml2 new file mode 160000 index 000000000..c943f708f --- /dev/null +++ b/submodules/externals/libxml2 @@ -0,0 +1 @@ +Subproject commit c943f708f1853de4eb15e5a94cf0b35d108da87a diff --git a/submodules/linphone b/submodules/linphone index 77a03fbdb..bf0953eb1 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 77a03fbdb1ee31de5203aced075271ed0f9273c7 +Subproject commit bf0953eb1d3c83471c6950eea505bea4e67f93e6