Merge branch 'master' of git.linphone.org:linphone-android

This commit is contained in:
Guillaume Beraudo 2010-12-13 15:22:11 +01:00
commit b9aea82101
4 changed files with 65 additions and 3 deletions

View file

@ -58,6 +58,9 @@ class LinphoneCallImpl implements LinphoneCall {
public State getState() {
return LinphoneCall.State.fromInt(getState(nativePtr));
}
public LinphoneCallParams getCurrentParamsReadOnly() {
throw new RuntimeException("Not Implemenetd yet");
}
}

View file

@ -42,5 +42,9 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
public LinphoneAddress getTo() {
return new LinphoneAddressImpl(getTo(nativePtr));
}
public CallStatus getStatus() {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -67,6 +67,8 @@ class LinphoneCoreImpl implements LinphoneCore {
private native void addFriend(long nativePtr,long friend);
private native void setPresenceInfo(long nativePtr,int minute_away, String alternative_contact,int status);
private native long createChatRoom(long nativePtr,String to);
private native void setRing(long nativePtr, String path);
private native String getRing(long nativePtr);
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
mListener=listener;
@ -292,14 +294,56 @@ class LinphoneCoreImpl implements LinphoneCore {
public LinphoneChatRoom createChatRoom(String to) {
return new LinphoneChatRoomImpl(createChatRoom(nativePtr,to));
}
public void setPreviewWindow(VideoWindow w) {
public void setPreviewWindow(Object w) {
throw new RuntimeException("not implemented yet");
// TODO Auto-generated method stub
}
public void setVideoWindow(VideoWindow w) {
public void setVideoWindow(Object w) {
throw new RuntimeException("not implemented yet");
// TODO Auto-generated method stub
}
public void enableVideo(boolean vcap_enabled, boolean display_enabled) {
// TODO Auto-generated method stub
}
public boolean isVideoEnabled() {
// TODO Auto-generated method stub
return false;
}
public void setStunServer(String stun_server) {
// TODO Auto-generated method stub
}
public String getStunServer() {
// TODO Auto-generated method stub
return null;
}
public void setFirewallPolicy(FirewallPolicy pol) {
// TODO Auto-generated method stub
}
public FirewallPolicy getFirewallPolicy() {
// TODO Auto-generated method stub
return null;
}
public void setRing(String path) {
setRing(nativePtr,path);
}
public String getRing() {
return getRing(nativePtr);
}
public LinphoneCall inviteAddressWithParams(LinphoneAddress destination,
LinphoneCallParams params) throws LinphoneCoreException {
throw new RuntimeException("Not Implemenetd yet");
}
public int updateCall(LinphoneCall call, LinphoneCallParams params) {
throw new RuntimeException("Not Implemenetd yet");
}
public LinphoneCallParams createDefaultCallParameters() {
throw new RuntimeException("Not Implemenetd yet");
}
}

View file

@ -38,6 +38,9 @@ public class TutorialBuddyStatusActivity extends Activity {
private static final String defaultSipAddress = "sip:";
private TextView sipAddressWidget;
private TextView mySipAddressWidget;
private TextView mySipPasswordWidget;
private TutorialBuddyStatus tutorial;
private Handler mHandler = new Handler() ;
private Button buttonCall;
@ -49,6 +52,12 @@ public class TutorialBuddyStatusActivity extends Activity {
sipAddressWidget = (TextView) findViewById(R.id.AddressId);
sipAddressWidget.setText(defaultSipAddress);
mySipAddressWidget = (TextView) findViewById(R.id.MyAddressId);
mySipAddressWidget.setVisibility(View.VISIBLE);
mySipPasswordWidget = (TextView) findViewById(R.id.Password);
mySipPasswordWidget.setVisibility(TextView.VISIBLE);
// Output text to the outputText widget
final TextView outputText = (TextView) findViewById(R.id.OutputText);
final TutorialNotifier notifier = new AndroidTutorialNotifier(mHandler, outputText);
@ -84,7 +93,9 @@ public class TutorialBuddyStatusActivity extends Activity {
public void run() {
super.run();
try {
tutorial.launchTutorial(sipAddressWidget.getText().toString());
String myIdentity = mySipAddressWidget.getText().length()>0?mySipAddressWidget.getText().toString():null;
String myPassword = mySipPasswordWidget.getText().length()>0?mySipPasswordWidget.getText().toString():null;
tutorial.launchTutorial(sipAddressWidget.getText().toString(), myIdentity, myPassword);
mHandler.post(new Runnable() {
public void run() {
buttonCall.setEnabled(true);