diff --git a/LinphoneAddress.java b/LinphoneAddress.java deleted file mode 100644 index 86271674c..000000000 --- a/LinphoneAddress.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -LinphoneAddress.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -package org.linphone.core; - -public interface LinphoneAddress { - /** - * Human display name - * @return null if not set - */ - public String getDisplayName(); - /** - * userinfo - * @return null if not set - */ - public String getUserName(); - /** - * - * @return null if not set - */ - public String getDomain(); - /** - * set display name - * @param name - */ - public void setDisplayName(String name); - /** - * @return an URI version of the address that can be used to place a call using {@link LinphoneCore#invite(String)} - */ - public String toUri(); -} diff --git a/LinphoneAuthInfo.java b/LinphoneAuthInfo.java deleted file mode 100644 index 2a5dbaf2d..000000000 --- a/LinphoneAuthInfo.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -LinphoneAuthInfo.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -package org.linphone.core; - -public interface LinphoneAuthInfo { - -} - - diff --git a/LinphoneCallLog.java b/LinphoneCallLog.java deleted file mode 100644 index 19d851a43..000000000 --- a/LinphoneCallLog.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -LinPhoneCallLog.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -package org.linphone.core; - -public interface LinphoneCallLog { - public enum CallDirection { - CallOutgoing,Callincoming - } - - public LinphoneAddress getFrom(); - - public LinphoneAddress getTo (); - - public LinphoneCallLog.CallDirection getDirection(); -} diff --git a/LinphoneCore.java b/LinphoneCore.java deleted file mode 100644 index 8609e04e1..000000000 --- a/LinphoneCore.java +++ /dev/null @@ -1,177 +0,0 @@ -/* -LinphoneCore.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -package org.linphone.core; - -import java.util.List; - - - -public interface LinphoneCore { - /* - * linphone core states - */ - public enum GeneralState { - /* states for GSTATE_GROUP_POWER */ - GSTATE_POWER_OFF(0), /* initial state */ - GSTATE_POWER_STARTUP(1), - GSTATE_POWER_ON(2), - GSTATE_POWER_SHUTDOWN(3), - /* states for GSTATE_GROUP_REG */ - GSTATE_REG_NONE(10), /* initial state */ - GSTATE_REG_OK(11), - GSTATE_REG_FAILED(12), - /* states for GSTATE_GROUP_CALL */ - GSTATE_CALL_IDLE(20), /* initial state */ - GSTATE_CALL_OUT_INVITE(21), - GSTATE_CALL_OUT_CONNECTED(22), - GSTATE_CALL_IN_INVITE(23), - GSTATE_CALL_IN_CONNECTED(24), - GSTATE_CALL_END(25), - GSTATE_CALL_ERROR(26), - GSTATE_INVALID(27); - private final int mValue; - - GeneralState(int value) { - mValue = value; - } - public static GeneralState fromInt(int value) { - for (GeneralState state: GeneralState.values()) { - if (state.mValue == value) return state; - } - throw new RuntimeException("sate not found ["+value+"]"); - } - } - - - /** - * @param identity sip uri sip:jehan@linphone.org - * @param proxy sip uri (sip:linphone.org) - * @param route optionnal sip usi (sip:linphone.org) - * @param register should be initiated - * @return - */ - public LinphoneProxyConfig createProxyConfig(String identity,String proxy,String route,boolean enableRegister) throws LinphoneCoreException; - /** - * clear all added proxy config - */ - public void clearProxyConfigs(); - - public void addProxyConfig(LinphoneProxyConfig proxyCfg) throws LinphoneCoreException; - - public void setDefaultProxyConfig(LinphoneProxyConfig proxyCfg); - - /** - * @return null if no default proxy config - */ - public LinphoneProxyConfig getDefaultProxyConfig() ; - - /** - * clear all the added auth info - */ - void clearAuthInfos(); - - void addAuthInfo(LinphoneAuthInfo info); - - public void invite(String uri); - - public void invite(LinphoneAddress to); - - public void terminateCall(); - /** - * get the remote address in case of in/out call - * @return null if no call engaged yet - */ - public LinphoneAddress getRemoteAddress(); - /** - * - * @return TRUE if there is a call running or pending. - */ - public boolean isIncall(); - /** - * - * @return Returns true if in incoming call is pending, ie waiting for being answered or declined. - */ - public boolean isInComingInvitePending(); - public void iterate(); - /** - * Accept an incoming call. - * - * Basically the application is notified of incoming calls within the - * {@link LinphoneCoreListener#inviteReceived(LinphoneCore, String)} listener. - * The application can later respond positively to the call using - * this method. - */ - public void acceptCall(); - - - /** - * @return a list of LinphoneCallLog - */ - public List getCallLogs(); - - /** - * This method is called by the application to notify the Linphone core library when network is reachable. - * Calling this method with true trigger Linphone to initiate a registration process for all proxy - * configuration with parameter register set to enable. - * This method disable the automatic registration mode. It means you must call this method after each network state changes - * @param network state - * - */ - public void setNetworkStateReachable(boolean isReachable); - /** - * destroy linphone core and free all underlying resources - */ - public void destroy(); - /** - * Allow to control play level before entering sound card: - * @param level in db - */ - public void setSoftPlayLevel(float gain); - /** - * get play level before entering sound card: - * @return level in db - */ - public float getSoftPlayLevel(); - /** - * Mutes or unmutes the local microphone. - * @param isMuted - */ - public void muteMic(boolean isMuted); - /** - * - * @return true is mic is muted - */ - public boolean isMicMuted(); - /** - * Build an address according to the current proxy config. In case destination is not a sip uri, the default proxy domain is automatically appended - * @param destination - * @return - * @throws If no LinphonrAddress can be built from destination - */ - public LinphoneAddress interpretUrl(String destination) throws LinphoneCoreException; - /** - * Initiate a dtmf signal if in call - * @param number - */ - public void sendDtmf(char number); - /** - * - */ - public void clearCallLogs(); -} diff --git a/LinphoneCoreException.java b/LinphoneCoreException.java deleted file mode 100644 index abec2943e..000000000 --- a/LinphoneCoreException.java +++ /dev/null @@ -1,43 +0,0 @@ -/* -LinphoneCoreException.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -package org.linphone.core; - -@SuppressWarnings("serial") -public class LinphoneCoreException extends Exception { - - public LinphoneCoreException() { - // TODO Auto-generated constructor stub - } - - public LinphoneCoreException(String detailMessage) { - super(detailMessage); - // TODO Auto-generated constructor stub - } - - public LinphoneCoreException(Throwable throwable) { - super(throwable); - // TODO Auto-generated constructor stub - } - - public LinphoneCoreException(String detailMessage, Throwable throwable) { - super(detailMessage, throwable); - // TODO Auto-generated constructor stub - } - -} diff --git a/LinphoneCoreFactory.java b/LinphoneCoreFactory.java deleted file mode 100644 index 24315f6dd..000000000 --- a/LinphoneCoreFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -/* -LinphoneCoreFactory.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -package org.linphone.core; - -import java.io.File; -import java.io.IOException; - -public class LinphoneCoreFactory { - - static { - System.loadLibrary("linphone"); - } - static LinphoneCoreFactory theLinphoneCoreFactory = new LinphoneCoreFactory(); - - public static LinphoneCoreFactory instance() { - - return theLinphoneCoreFactory; - } - public LinphoneAuthInfo createAuthInfo(String username,String password) { - return new LinphoneAuthInfoImpl(username,password) ; - } - - public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException { - return new LinphoneCoreImpl(listener,userConfig,factoryConfig,userdata); - } - - public LinphoneAddress createLinphoneAddress(String username,String domain,String displayName) { - return new LinphoneAddressImpl(username,domain,displayName); - } - - /** - * Enable verbose traces - * @param enable - */ - public native void setDebugMode(boolean enable); - -} diff --git a/LinphoneCoreListener.java b/LinphoneCoreListener.java deleted file mode 100644 index f48f8a9eb..000000000 --- a/LinphoneCoreListener.java +++ /dev/null @@ -1,51 +0,0 @@ -/* -LinphoneCoreListener.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -package org.linphone.core; - - - -public interface LinphoneCoreListener { - - /**< Notifies the application that it should show up - * @return */ - public void show(LinphoneCore lc); - /**< Notifies incoming calls - * @return */ - public void inviteReceived(LinphoneCore lc,String from); - /**< Notify calls terminated by far end - * @return */ - public void byeReceived(LinphoneCore lc,String from); - /**< Ask the application some authentication information - * @return */ - public void authInfoRequested(LinphoneCore lc,String realm,String username); - /**< Callback that notifies various events with human readable text. - * @return */ - public void displayStatus(LinphoneCore lc,String message); - /**< Callback to display a message to the user - * @return */ - public void displayMessage(LinphoneCore lc,String message); - /** Callback to display a warning to the user - * @return */ - public void displayWarning(LinphoneCore lc,String message); - /** State notification callback - * @param state LinphoneCore.GeneralState - * @return - * */ - public void generalState(LinphoneCore lc,LinphoneCore.GeneralState state); -} diff --git a/LinphoneProxyConfig.java b/LinphoneProxyConfig.java deleted file mode 100644 index a7fe6b850..000000000 --- a/LinphoneProxyConfig.java +++ /dev/null @@ -1,71 +0,0 @@ -/* -LinphoneProxyConfig.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -package org.linphone.core; - -public interface LinphoneProxyConfig { - - /** - * Unregister proxy config a enable edition - */ - public void edit(); - /** - * Validate proxy config changes. Start registration in case - */ - public void done(); - /** - * sip user made by sip:username@domain - */ - public void setIdentity(String identity) throws LinphoneCoreException; - /** - * Set proxy uri, like sip:linphone.org:5060 - * @param proxyUri - * @throws LinphoneCoreException - */ - public void setProxy(String proxyUri) throws LinphoneCoreException; - /** - * Enable register for this proxy config. - * Register message is issued after call to {@link #done()} - * @param value - * @throws LinphoneCoreException - */ - public void enableRegister(boolean value) throws LinphoneCoreException; - /** - * normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222 - * @param number - * @return - */ - public String normalizePhoneNumber(String number); - /** - * usefull function to automatically add internationnal prefix to e164 phone numbers - * @param prefix - */ - public void setDialPrefix(String prefix); - /** - * * Sets whether liblinphone should replace "+" by "00" in dialed numbers (passed to - * {@link LinphoneCore#invite(String)}). - * @param value default value is false - */ - public void setDialEscapePlus(boolean value); - - /** - * rget domain host name or ip - * @return may be null - */ - public String getDomain(); -}